Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Julien,

On Fri, 2011-11-18 at 08:43 -0800, Julien Chaffraix wrote:
attached are more icons removals.

        Nice :-)

I tried them with a clean-build to avoid any building issues and
removed the reference one by one to make sure I did not miss anything.

        So - just one quick query; if you check:

        vcl/unx/generic/app/soicon.cxx

        you'll see that we calculate the resource id at run-time (this is a bit
of a gotcha):

    if( iconSize >= 48 )
        nIconSizeOffset = SV_ICON_SIZE48_START;
    else if( iconSize >= 32 )
        nIconSizeOffset = SV_ICON_SIZE32_START;
    else if( iconSize >= 16 )
        nIconSizeOffset = SV_ICON_SIZE16_START;
    else
        return sal_False;

    BitmapEx aIcon( ResId(nIconSizeOffset + nIcon, *ImplGetResMgr()));

        Did you consider whether it is possible to generate the same number as
SV_ICON_ID_PRESENTATION_TEMPLATE in some other way ? presumably it is
not ( in a sane world ), and you removed it from the header which looks
good. There can be -some- cases like this where a compile would succeed,
that might fail at runtime - sometimes instead of using ImageLists in a
pleasant way, this sort of arithmetic happens ;-)

        In some ways, I'm surprised to see:

Removed SV_ICON_ID_PRESENTATION_COMPRESSED and all associated code.

        Given that this (apparently) has an 'industrial' version, and we tried
to focus on icons that were actually visible for that, but - it also
seems correct :-) (in general it's worth being a bit more paranoid about
removing them).

        Anyhow - thanks for the test compile from clean, I'm pushing them to
master now.

        Out of interest, how many more unused icons have you detected ? and/or
do you have a nice script for that ? :-)

        Great work !

                Michael.

-- 
michael.meeks@suse.com  <><, Pseudo Engineer, itinerant idiot


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.