summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-19 10:43:01 +0200
committerNoel Grandin <noel@peralex.com>2015-05-20 09:52:08 +0200
commit3cbdf64ad5240e6d9a73d4f7e005f7110d5e4002 (patch)
tree87ecd744320ba70cd784a2aac82aa436ea5d0c13 /svtools
parent662700703bebad38ca7ad74ca4eb040fe8b5b676 (diff)
convert DRAWMODE constants to scoped enum
Change-Id: I36cbe8057d09226f8b302963bdd94dc5600b686f
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfcache.cxx8
-rw-r--r--svtools/source/graphic/grfmgr.cxx4
-rw-r--r--svtools/source/graphic/grfmgr2.cxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 808cd5d6070f..85dc7143084c 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -386,9 +386,9 @@ private:
BitmapEx* mpBmpEx;
GraphicAttr maAttr;
Size maOutSizePix;
- sal_uLong mnCacheSize;
- sal_uLong mnOutDevDrawMode;
- sal_uInt16 mnOutDevBitCount;
+ sal_uLong mnCacheSize;
+ DrawModeFlags mnOutDevDrawMode;
+ sal_uInt16 mnOutDevBitCount;
static bool IsCacheableAsBitmap( const GDIMetaFile& rMtf, OutputDevice* pOut, const Size& rSz );
@@ -442,7 +442,7 @@ public:
// bit count. One cannot reuse
// this cache object, if it's
// e.g. generated for
- // DRAWMODE_GRAYBITMAP.
+ // DrawModeFlags::GrayBitmap.
return( ( pCacheEntry == mpRefCacheEntry ) &&
( maAttr == rAttr ) &&
( ( maOutSizePix == rSzPixel ) || ( !maOutSizePix.Width() && !maOutSizePix.Height() ) ) &&
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index a6ff51dc78c3..5dc71286839b 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -515,7 +515,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() );
Point aPt( rPt );
Size aSz( rSz );
- const sal_uInt32 nOldDrawMode = pOut->GetDrawMode();
+ const DrawModeFlags nOldDrawMode = pOut->GetDrawMode();
bool bCropped = aAttr.IsCropped();
bool bCached = false;
bool bRet;
@@ -524,7 +524,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
Rectangle aCropRect;
if( !( GraphicManagerDrawFlags::USE_DRAWMODE_SETTINGS & nFlags ) )
- pOut->SetDrawMode( nOldDrawMode & ( ~( DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ) ) );
+ pOut->SetDrawMode( nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient ) );
// mirrored horizontically
if( aSz.Width() < 0L )
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 5570b0c890a7..03867e54cd22 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -256,7 +256,7 @@ bool GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
// #i46805# No point in caching a bitmap that is rendered
// via RectFill on the OutDev
- if( !(pOut->GetDrawMode() & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP )) &&
+ if( !(pOut->GetDrawMode() & ( DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap )) &&
mpCache->IsDisplayCacheable( pOut, rPt, rSz, rObj, rAttr ) )
{
BitmapEx aDstBmpEx;