diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-18 15:41:24 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-20 09:52:08 +0200 |
commit | dcefc97c8bd5be9ba229098c32d2a5c73d084163 (patch) | |
tree | 860caac40b5c15ddb3cd1297316975d7034b260e /svtools | |
parent | 953f327818f565969b8de5d9b956bd6b9a7c64b2 (diff) |
convert IMAGE_DRAW_ constants to scoped enum
Change-Id: I75619eeb902af4953a5ac1525605cf3f0f15e2c0
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/brwbox/editbrowsebox.cxx | 4 | ||||
-rw-r--r-- | svtools/source/contnr/svlbitm.cxx | 10 | ||||
-rw-r--r-- | svtools/source/contnr/treelistbox.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/headbar.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/toolbarmenu.cxx | 4 | ||||
-rw-r--r-- | svtools/source/control/valueset.cxx | 4 | ||||
-rw-r--r-- | svtools/source/table/gridtablerenderer.cxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/treecontrolpeer.cxx | 4 |
8 files changed, 18 insertions, 18 deletions
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); |