Hi Joseph,

On Sat, 2010-11-13 at 07:32 -0800, Joseph Powers wrote:
> Last night I submitted some patches to remove most of the code related to
> BmpColorMode from libs-gui.

        Great :-)

> The only remaining references are in:
> 
>       vcl/source/gdi/bitmap.cxx
>       vcl/inc/vcl/bitmap.hxx
>       vcl/source/gdi/bitmapex.cxx
>       vcl/inc/vcl/bitmapex.hxx
>       vcl/source/gdi/image.cxx
>       vcl/inc/vcl/image.h
>       vcl/source/gdi/impimage.cxx
> 
> These items not only use the normal BMP_COLOR_NORAMAL & 
> BMP_COLOR_HIGHCONTRAST,
> but also BMP_COLOR_MONOCHROME_BLACK & BMP_COLOR_MONOCHROME_WHITE. They also
> have some bitmap transformation code.

        Riight; so - this is odd.

        In the abstract - there should be no monochrome display support in
LibreOffice. To paraphrase my Product Manager:

        "It is an outrage that my phone is only 16bit color"

        So, clearly removing monochrome support is fine.

> As far as I can determine, the MONOCHROME settings are never used outside
> of bitmap.cxx & bitmapex.cxx.

        It leaks out in only one place here:

vcl/source/gdi/impimage.cxx: ( ( nStyle & IMAGE_DRAW_MONOCHROME_BLACK ) ? 
BMP_COLOR_MONOCHROME_BLACK : BMP_COLOR_MONOCHROME_WHITE );

> The big quest is: is anyone attached to this code or can I just remove it?

        Please remove it.

> I could also try to remove the BMP_COLOR_HIGHCONTRAST code from these
> files and leave the other sections intact.

        We should (I think) also remove any other unused IMAGE_DRAW_ flags -
AFAICS the nStyle parameter is almost never used there:

        bin/g grep IMAGE_DRAW_HIGHLIGHT # likewise, and 3DLOOK etc.

        IMHO we could perhaps clean all that up with a nice (proper) enum
DISABLED / NORMAL and an nDrawDisabled param to the outdev DrawImage.

        As you see - the more you poke, the more cruft we find that can be
chopped out happily :-)

        Thanks,

                Michael.

-- 
 [email protected]  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to