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


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.

-- 
 michael.meeks@novell.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.