vcl: remove unused DrawImageFlags::ColorTransform

There's a note in the enum definition for DrawImageFlags that
they need to be kept in-sync with com/sun/star/awt/ImageDrawMode
but that doesn't have ColorTransform. Furthermore the
flag has no effect in Image::Draw() anyway.

Change-Id: I7cb3f7061051b8691211bd3a78aaf99b7bb82bd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196584
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
This commit is contained in:
Dan Williams
2026-01-13 07:01:34 +01:00
parent f1e496d968
commit 8eb1026d0c
3 changed files with 3 additions and 15 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ enum class DrawImageFlags
Disable = 0x0001,
Highlight = 0x0002,
Deactive = 0x0004,
ColorTransform = 0x0008,
// 0x0008 is unused,
SemiTransparent = 0x0010,
};
namespace o3tl
+2 -2
View File
@@ -134,8 +134,8 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle
Bitmap aRenderBmp = mpImplData->getBitmapForHiDPI(bool(nStyle & DrawImageFlags::Disable), pOutDev->GetGraphics());
if (!(nStyle & DrawImageFlags::Disable) &&
(nStyle & (DrawImageFlags::ColorTransform | DrawImageFlags::Highlight |
DrawImageFlags::Deactive | DrawImageFlags::SemiTransparent)))
(nStyle & (DrawImageFlags::Highlight | DrawImageFlags::Deactive |
DrawImageFlags::SemiTransparent)))
{
if (nStyle & (DrawImageFlags::Highlight | DrawImageFlags::Deactive))
{
-12
View File
@@ -2549,12 +2549,6 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
// no gradient background for items that have a popup open
bool bHasOpenPopup = mpFloatWin && (mnDownItemId==pItem->mnId);
bool bHighContrastWhite = false;
// check the face color as highcontrast indicator
// because the toolbox itself might have a gradient
if (rStyleSettings.GetFaceColor() == COL_WHITE)
bHighContrastWhite = true;
// Compute buttons area.
Size aBtnSize = pItem->maRect.GetSize();
@@ -2636,12 +2630,6 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplToolItems::si
else
ImplDrawButton(rRenderContext, aButtonRect, nHighlight, pItem->meState == TRISTATE_TRUE,
pItem->mbEnabled && IsEnabled(), pItem->mbShowWindow);
if( nHighlight != 0 )
{
if( bHighContrastWhite )
nImageStyle |= DrawImageFlags::ColorTransform;
}
}
rRenderContext.DrawImage(Point( nImageOffX, nImageOffY ), *pImage, nImageStyle);
}