[Libreoffice] BmpColorMode removal from libs-gui
michael.meeks at novell.com
Mon Nov 15 08:59:40 PST 2010
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.
> The only remaining references are in:
> 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 :-)
michael.meeks at novell.com <><, Pseudo Engineer, itinerant idiot
More information about the LibreOffice