diff options
24 files changed, 69 insertions, 61 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index ee1752d06979..e72631c5fd82 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -186,12 +186,20 @@ namespace o3tl template<> struct typed_flags<DrawTextFlags> : is_typed_flags<DrawTextFlags, 0xffff> {}; } -// Flags for DrawImage() -#define IMAGE_DRAW_DISABLE ((sal_uInt16)0x0001) -#define IMAGE_DRAW_HIGHLIGHT ((sal_uInt16)0x0002) -#define IMAGE_DRAW_DEACTIVE ((sal_uInt16)0x0004) -#define IMAGE_DRAW_COLORTRANSFORM ((sal_uInt16)0x0008) -#define IMAGE_DRAW_SEMITRANSPARENT ((sal_uInt16)0x0010) +// Flags for DrawImage(), these must match the definitions in css::awt::ImageDrawMode +enum class DrawImageFlags +{ + NONE = 0x0000, + Disable = 0x0001, + Highlight = 0x0002, + Deactive = 0x0004, + ColorTransform = 0x0008, + SemiTransparent = 0x0010, +}; +namespace o3tl +{ + template<> struct typed_flags<DrawImageFlags> : is_typed_flags<DrawImageFlags, 0x001f> {}; +} // Grid #define GRID_DOTS ((sal_uLong)0x00000001) @@ -1403,13 +1411,13 @@ public: virtual void DrawImage( const Point& rPos, const Image& rImage, - sal_uInt16 nStyle = 0 ); + DrawImageFlags nStyle = DrawImageFlags::NONE ); virtual void DrawImage( const Point& rPos, const Size& rSize, const Image& rImage, - sal_uInt16 nStyle = 0 ); + DrawImageFlags nStyle = DrawImageFlags::NONE ); virtual Bitmap GetBitmap( const Point& rSrcPt, const Size& rSize ) const; diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index 70dcb9ccf278..600b2a817cb0 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -401,9 +401,9 @@ public: const Point& rSrcPt, const Size& rSrcSize, bool bWindowInvalidate = false ) SAL_OVERRIDE; - virtual void DrawImage( const Point&, const Image&, sal_uInt16 ) SAL_OVERRIDE; + virtual void DrawImage( const Point&, const Image&, DrawImageFlags ) SAL_OVERRIDE; virtual void DrawImage( const Point&, const Size&, - const Image&, sal_uInt16 ) SAL_OVERRIDE; + const Image&, DrawImageFlags ) SAL_OVERRIDE; // These 3 together are more modular PrintJob(), allowing printing more documents as one print job diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx index aad01fae4a27..0c0dad6690c6 100644 --- a/sfx2/source/control/recentdocsview.cxx +++ b/sfx2/source/control/recentdocsview.cxx @@ -278,7 +278,7 @@ void RecentDocsView::Paint(vcl::RenderContext& rRenderContext, const Rectangle & Point aStr1Point((rSize.Width() - nTextWidth1)/2, nY + rImgSize.Height() + 0.7 * nTextHeight); Point aStr2Point((rSize.Width() - nTextWidth2)/2, nY + rImgSize.Height() + 1.7 * nTextHeight); - rRenderContext.DrawImage(aImgPoint, rImgSize, maWelcomeImage, IMAGE_DRAW_SEMITRANSPARENT); + rRenderContext.DrawImage(aImgPoint, rImgSize, maWelcomeImage, DrawImageFlags::SemiTransparent); rRenderContext.DrawText(aStr1Point, maWelcomeLine1); rRenderContext.DrawText(aStr2Point, maWelcomeLine2); diff --git a/sfx2/source/sidebar/TabItem.cxx b/sfx2/source/sidebar/TabItem.cxx index 438291c2aa9b..d053f323dc35 100644 --- a/sfx2/source/sidebar/TabItem.cxx +++ b/sfx2/source/sidebar/TabItem.cxx @@ -66,7 +66,7 @@ void TabItem::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdate const Size aIconSize (aIcon.GetSizePixel()); const Point aIconLocation((GetSizePixel().Width() - aIconSize.Width()) / 2, (GetSizePixel().Height() - aIconSize.Height()) / 2); - rRenderContext.DrawImage(aIconLocation, aIcon, IsEnabled() ? 0 : IMAGE_DRAW_DISABLE); + rRenderContext.DrawImage(aIconLocation, aIcon, IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable); break; } case PT_Native: diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 016680358554..66cc84aae519 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -377,9 +377,9 @@ namespace svt aPos.Y() += ( rRect.GetHeight() - aImageSize.Height() ) / 2; if ( IsZoom() ) - rDev.DrawImage( aPos, aImageSize, aImage, 0 ); + rDev.DrawImage( aPos, aImageSize, aImage ); else - rDev.DrawImage( aPos, aImage, 0 ); + rDev.DrawImage( aPos, aImage ); if (rDev.IsClipRegion()) rDev.SetClipRegion(); diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index 371b407c9d61..2721d27e7a89 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -273,7 +273,7 @@ void SvLBoxBmp::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, void SvLBoxBmp::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/) { - sal_uInt16 nStyle = rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE; + DrawImageFlags nStyle = rDev.IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable; rRenderContext.DrawImage(rPos, aBmp ,nStyle); } @@ -341,7 +341,7 @@ void SvLBoxButton::Paint( const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/) { SvBmp nIndex = eKind == SvLBoxButtonKind_staticImage ? SvBmp::STATICIMAGE : SvLBoxButtonData::GetIndex(nItemFlags); - sal_uInt16 nStyle = eKind != SvLBoxButtonKind_disabledCheckbox && rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE; + DrawImageFlags nStyle = eKind != SvLBoxButtonKind_disabledCheckbox && rDev.IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable; //Native drawing bool bNativeOK = false; @@ -358,7 +358,7 @@ void SvLBoxButton::Paint( //states ControlState::DEFAULT, ControlState::PRESSED and ControlState::ROLLOVER are not implemented if (IsStateHilighted()) nState |= ControlState::FOCUSED; - if (nStyle != IMAGE_DRAW_DISABLE) + if (nStyle != DrawImageFlags::Disable) nState |= ControlState::ENABLED; if (IsStateChecked()) aControlValue.setTristateVal(BUTTONVALUE_ON); @@ -514,9 +514,9 @@ void SvLBoxContextBmp::Paint( bool _bSemiTransparent = pEntry && bool( SvTLEntryFlags::SEMITRANSPARENT & pEntry->GetFlags( ) ); // draw - sal_uInt16 nStyle = _rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE; + DrawImageFlags nStyle = _rDev.IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable; if (_bSemiTransparent) - nStyle |= IMAGE_DRAW_SEMITRANSPARENT; + nStyle |= DrawImageFlags::SemiTransparent; rRenderContext.DrawImage(_rPos, rImage, nStyle); } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index bdf372cfdd02..efb9b936e54b 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -3141,9 +3141,9 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, vcl::Render } aPos.Y() += (nTempEntryHeight - pImg->GetSizePixel().Height()) / 2; - sal_uInt16 nStyle = 0; + DrawImageFlags nStyle = DrawImageFlags::NONE; if (!IsEnabled()) - nStyle |= IMAGE_DRAW_DISABLE; + nStyle |= DrawImageFlags::Disable; //native bool bNativeOK = false; diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 3207e998dc29..8bde905c7857 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -529,9 +529,9 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos } if (nImagePos + aImageSize.Width() <= aRect.Right()) { - sal_uInt16 nStyle = 0; + DrawImageFlags nStyle = DrawImageFlags::NONE; if (!IsEnabled()) - nStyle |= IMAGE_DRAW_DISABLE; + nStyle |= DrawImageFlags::Disable; rRenderContext.DrawImage(Point(nImagePos, nImagePosY), pItem->maImage, nStyle); } } diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 8490cadd4680..79d60caedf8d 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -1331,13 +1331,13 @@ void ToolbarMenu::implPaint(vcl::RenderContext& rRenderContext, ToolbarMenuEntry DrawTextFlags nTextStyle = DrawTextFlags::NONE; DrawSymbolFlags nSymbolStyle = DrawSymbolFlags::NONE; - sal_uInt16 nImageStyle = 0; + DrawImageFlags nImageStyle = DrawImageFlags::NONE; if (!pEntry->mbEnabled) { nTextStyle |= DrawTextFlags::Disable; nSymbolStyle |= DrawSymbolFlags::Disable; - nImageStyle |= IMAGE_DRAW_DISABLE; + nImageStyle |= DrawImageFlags::Disable; } Rectangle aOuterCheckRect(Point(aPos.X() + mpImpl->mnCheckPos, aPos.Y()), diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index a3398c9d9689..c0c8446189bc 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -310,9 +310,9 @@ void ValueSet::ImplFormatItem(vcl::RenderContext& rRenderContext, ValueSetItem* aPos.X() += (aRectSize.Width() - aImageSize.Width()) / 2; aPos.Y() += (aRectSize.Height() - aImageSize.Height()) / 2; - sal_uInt16 nImageStyle = 0; + DrawImageFlags nImageStyle = DrawImageFlags::NONE; if (!IsEnabled()) - nImageStyle |= IMAGE_DRAW_DISABLE; + nImageStyle |= DrawImageFlags::Disable; if (aImageSize.Width() > aRectSize.Width() || aImageSize.Height() > aRectSize.Height()) diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index 07d721f5855f..aef617517544 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -492,7 +492,7 @@ namespace svt { namespace table } else imageSize.Height() = i_context.aContentArea.GetHeight() - 1; - sal_uInt16 const nStyle = m_pImpl->rModel.isEnabled() ? 0 : IMAGE_DRAW_DISABLE; + DrawImageFlags const nStyle = m_pImpl->rModel.isEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable; i_context.rDevice.DrawImage( imagePos, imageSize, i_image, nStyle ); } diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 850c6fadfeb9..13f004c77888 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -1601,7 +1601,7 @@ void UnoTreeListItem::Paint( Size aSize(GetSize(&rDev, pEntry)); if (!!maImage) { - rRenderContext.DrawImage(aPos, maImage, rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE); + rRenderContext.DrawImage(aPos, maImage, rDev.IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable); int nWidth = maImage.GetSizePixel().Width() + 6; aPos.X() += nWidth; aSize.Width() -= nWidth; @@ -1612,7 +1612,7 @@ void UnoTreeListItem::Paint( { if (!!maImage) { - rRenderContext.DrawImage(aPos, maImage, rDev.IsEnabled() ? 0 : IMAGE_DRAW_DISABLE); + rRenderContext.DrawImage(aPos, maImage, rDev.IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable); aPos.X() += maImage.GetSizePixel().Width() + 6; } rRenderContext.DrawText(aPos, maText); diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index f4155b1e2762..073afa5946fd 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -514,7 +514,7 @@ void VCLXGraphics::drawImage( sal_Int32 x, sal_Int32 y, sal_Int32 width, sal_Int if ( !!aImage ) { InitOutputDevice( InitOutDevFlags::CLIPREGION|InitOutDevFlags::RASTEROP|InitOutDevFlags::COLORS ); - mpOutputDevice->DrawImage( Point( x, y ), Size( width, height ), aImage, nStyle ); + mpOutputDevice->DrawImage( Point( x, y ), Size( width, height ), aImage, static_cast<DrawImageFlags>(nStyle) ); } } } diff --git a/vcl/inc/image.h b/vcl/inc/image.h index ced9debcc6a6..3aa942418bb6 100644 --- a/vcl/inc/image.h +++ b/vcl/inc/image.h @@ -35,7 +35,7 @@ public: void Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHeight,sal_uInt16 nInitSize ); void ColorTransform(); - void Draw( sal_uInt16 nPos, OutputDevice* pDev, const Point& rPos, sal_uInt16 nStyle, const Size* pSize = NULL ); + void Draw( sal_uInt16 nPos, OutputDevice* pDev, const Point& rPos, DrawImageFlags nStyle, const Size* pSize = NULL ); private: diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index f66067237494..7714c240ed02 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -485,11 +485,11 @@ void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, } } - sal_uInt16 nStyle = 0; + DrawImageFlags nStyle = DrawImageFlags::NONE; if ( ! ( nDrawFlags & WINDOW_DRAW_NODISABLE ) && ! IsEnabled() ) - nStyle |= IMAGE_DRAW_DISABLE; + nStyle |= DrawImageFlags::Disable; if ( IsZoom() ) pDev->DrawImage( aImagePos, aImageSize, *pImage, nStyle ); @@ -1937,9 +1937,9 @@ void RadioButton::ImplDrawRadioButtonState(vcl::RenderContext& rRenderContext) rRenderContext.DrawRect(aImageRect); // display image - sal_uInt16 nImageStyle = 0; + DrawImageFlags nImageStyle = DrawImageFlags::NONE; if (!bEnabled) - nImageStyle |= IMAGE_DRAW_DISABLE; + nImageStyle |= DrawImageFlags::Disable; Image* pImage = &maImage; @@ -3890,9 +3890,9 @@ void DisclosureButton::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext) if (!pImg) return; - sal_uInt16 nStyle = 0; + DrawImageFlags nStyle = DrawImageFlags::NONE; if (!IsEnabled()) - nStyle |= IMAGE_DRAW_DISABLE; + nStyle |= DrawImageFlags::Disable; Size aSize(aStateRect.GetSize()); Size aImgSize(pImg->GetSizePixel()); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index edeb7baeac54..dd7c27e7b352 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -919,11 +919,11 @@ FixedImage::FixedImage( vcl::Window* pParent, const ResId& rResId ) : void FixedImage::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize ) { - sal_uInt16 nStyle = 0; + DrawImageFlags nStyle = DrawImageFlags::NONE; if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) { if ( !IsEnabled() ) - nStyle |= IMAGE_DRAW_DISABLE; + nStyle |= DrawImageFlags::Disable; } Image *pImage = &maImage; diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 47bf65fccd59..beca62b2268e 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -2847,7 +2847,7 @@ void ImplWin::DrawEntry( bool bDrawImage, bool bDrawText, bool bDrawTextAtImageP bool bImage = !!maImage; if( bDrawImage && bImage && !bLayout ) { - sal_uInt16 nStyle = 0; + DrawImageFlags nStyle = DrawImageFlags::NONE; Size aImgSz = maImage.GetSizePixel(); Point aPtImg( nBorder, ( ( aOutSz.Height() - aImgSz.Height() ) / 2 ) ); const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx index 1ba4fcbf535b..6da20c0cde53 100644 --- a/vcl/source/control/imgctrl.cxx +++ b/vcl/source/control/imgctrl.cxx @@ -69,11 +69,11 @@ namespace void ImageControl::ImplDraw(OutputDevice& rDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize) const { - sal_uInt16 nStyle = 0; + DrawImageFlags nStyle = DrawImageFlags::NONE; if ( !(nDrawFlags & WINDOW_DRAW_NODISABLE) ) { if ( !IsEnabled() ) - nStyle |= IMAGE_DRAW_DISABLE; + nStyle |= DrawImageFlags::Disable; } const Image& rImage( GetModeImage() ); diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 86915d956f01..1558b7304e6d 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -965,7 +965,7 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p Point aImgTL( nXPos, aRect.Top() ); if (aImageSize.Height() < aRect.GetHeight()) aImgTL.Y() += (aRect.GetHeight() - aImageSize.Height()) / 2; - rRenderContext.DrawImage(aImgTL, pItem->maTabImage, pItem->mbEnabled ? 0 : IMAGE_DRAW_DISABLE ); + rRenderContext.DrawImage(aImgTL, pItem->maTabImage, pItem->mbEnabled ? DrawImageFlags::NONE : DrawImageFlags::Disable ); } } diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx index 184e5b192e85..067b6e8ab95e 100644 --- a/vcl/source/gdi/impimage.cxx +++ b/vcl/source/gdi/impimage.cxx @@ -170,7 +170,7 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe } void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev, - const Point& rPos, sal_uInt16 nStyle, + const Point& rPos, DrawImageFlags nStyle, const Size* pSize ) { if( pOutDev->IsDeviceOutputNecessary() ) @@ -180,15 +180,15 @@ void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev, aOutSize = ( pSize ? *pSize : pOutDev->PixelToLogic( maSize ) ); - if( nStyle & IMAGE_DRAW_DISABLE ) + if( nStyle & DrawImageFlags::Disable ) { ImplUpdateDisabledBmpEx( nPos); pOutDev->DrawBitmapEx( rPos, aOutSize, aSrcPos, maSize, maDisabledBmpEx ); } else { - if( nStyle & ( IMAGE_DRAW_COLORTRANSFORM | - IMAGE_DRAW_HIGHLIGHT | IMAGE_DRAW_DEACTIVE | IMAGE_DRAW_SEMITRANSPARENT ) ) + if( nStyle & ( DrawImageFlags::ColorTransform | + DrawImageFlags::Highlight | DrawImageFlags::Deactive | DrawImageFlags::SemiTransparent ) ) { BitmapEx aTmpBmpEx; const Rectangle aCropRect( aSrcPos, maSize ); @@ -202,7 +202,7 @@ void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev, Bitmap aTmpBmp( aTmpBmpEx.GetBitmap() ); - if( nStyle & ( IMAGE_DRAW_HIGHLIGHT | IMAGE_DRAW_DEACTIVE ) ) + if( nStyle & ( DrawImageFlags::Highlight | DrawImageFlags::Deactive ) ) { BitmapWriteAccess* pAcc = aTmpBmp.AcquireWriteAccess(); @@ -218,7 +218,7 @@ void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev, boost::scoped_array<sal_uInt8> pMapB(new sal_uInt8[ 256 ]); long nX, nY; - if( nStyle & IMAGE_DRAW_HIGHLIGHT ) + if( nStyle & DrawImageFlags::Highlight ) aColor = rSettings.GetHighlightColor(); else aColor = rSettings.GetDeactiveColor(); @@ -278,7 +278,7 @@ void ImplImageBmp::Draw( sal_uInt16 nPos, OutputDevice* pOutDev, } } - if( nStyle & IMAGE_DRAW_SEMITRANSPARENT ) + if( nStyle & DrawImageFlags::SemiTransparent ) { if( aTmpBmpEx.IsTransparent() ) { diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 3b0c145f617c..b971e1c28b4b 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -1851,13 +1851,13 @@ void Printer::SetFontOrientation( ImplFontEntry* const pFontEntry ) const pFontEntry->mnOrientation = pFontEntry->maMetric.mnOrientation; } -void Printer::DrawImage( const Point&, const Image&, sal_uInt16 ) +void Printer::DrawImage( const Point&, const Image&, DrawImageFlags ) { SAL_WARN ("vcl.gdi", "DrawImage(): Images can't be drawn on any Printer instance"); assert(false); } -void Printer::DrawImage( const Point&, const Size&, const Image&, sal_uInt16 ) +void Printer::DrawImage( const Point&, const Size&, const Image&, DrawImageFlags ) { SAL_WARN ("vcl.gdi", "DrawImage(): Images can't be drawn on any Printer instance"); assert(false); diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index b94b8f170eb1..b39dbb2bbc9d 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -1306,13 +1306,13 @@ namespace } } -void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, sal_uInt16 nStyle ) +void OutputDevice::DrawImage( const Point& rPos, const Image& rImage, DrawImageFlags nStyle ) { DrawImage( rPos, Size(), rImage, nStyle ); } void OutputDevice::DrawImage( const Point& rPos, const Size& rSize, - const Image& rImage, sal_uInt16 nStyle ) + const Image& rImage, DrawImageFlags nStyle ) { bool bIsSizeValid = rSize.getWidth() != 0 && rSize.getHeight() != 0; @@ -1323,7 +1323,7 @@ void OutputDevice::DrawImage( const Point& rPos, const Size& rSize, case IMAGETYPE_BITMAP: { const Bitmap &rBitmap = *static_cast< Bitmap* >( rImage.mpImplData->mpData ); - if( nStyle & IMAGE_DRAW_DISABLE ) + if( nStyle & DrawImageFlags::Disable ) { if ( bIsSizeValid ) DrawBitmapEx( rPos, rSize, makeDisabledBitmap(rBitmap) ); diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 9cefd27c8f7d..9d1dee066889 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -1863,7 +1863,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, nTextOffsetY += (aOutSz.Height()-pData->aSz.Height()) / 2; DrawTextFlags nTextStyle = DrawTextFlags::NONE; DrawSymbolFlags nSymbolStyle = DrawSymbolFlags::NONE; - sal_uInt16 nImageStyle = 0; + DrawImageFlags nImageStyle = DrawImageFlags::NONE; // submenus without items are not disabled when no items are // contained. The application itself should check for this! @@ -1873,7 +1873,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext, { nTextStyle |= DrawTextFlags::Disable; nSymbolStyle |= DrawSymbolFlags::Disable; - nImageStyle |= IMAGE_DRAW_DISABLE; + nImageStyle |= DrawImageFlags::Disable; } // Separator diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 438a405290cc..76051f8eabbc 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -3164,10 +3164,10 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, aImageSize = pImage->GetSizePixel(); // determine drawing flags - sal_uInt16 nImageStyle = 0; + DrawImageFlags nImageStyle = DrawImageFlags::NONE; if ( !pItem->mbEnabled || !IsEnabled() ) - nImageStyle |= IMAGE_DRAW_DISABLE; + nImageStyle |= DrawImageFlags::Disable; // #i35563# the dontknow state indicates different states at the same time // which should not be rendered disabled but normal @@ -3198,7 +3198,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, if( nHighlight != 0 ) { if( bHighContrastWhite ) - nImageStyle |= IMAGE_DRAW_COLORTRANSFORM; + nImageStyle |= DrawImageFlags::ColorTransform; } } rRenderContext.DrawImage(Point( nImageOffX, nImageOffY ), *pImage, nImageStyle); |