summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-20 09:00:42 +0200
committerNoel Grandin <noel@peralex.com>2015-04-22 10:28:40 +0200
commit24724aad8e24d0ef3006934a0de3f4b3f9bcd884 (patch)
tree0e92b6b358ddbd10b12e0e7a66bb88d78ae1bccd /svtools
parent2d1c78e5335dee23f2ace23c7a90b56be201cd3d (diff)
convert GRFMGR_DRAW_ constants to scoped enum
Change-Id: Ie0b4cc1d2cfa740d0e260db52db635c3fe6b90b6
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/graphic/grfmgr.cxx14
-rw-r--r--svtools/source/graphic/grfmgr2.cxx22
2 files changed, 18 insertions, 18 deletions
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 0ee4ff9bcdbf..2c2a72fd3d5b 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -487,11 +487,11 @@ void GraphicObject::GraphicManagerDestroyed()
}
bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr, sal_uLong nFlags ) const
+ const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags ) const
{
bool bRet;
- if( nFlags & GRFMGR_DRAW_CACHED )
+ if( nFlags & GraphicManagerDrawFlags::CACHED )
{
Point aPt( rPt );
Size aSz( rSz );
@@ -510,7 +510,7 @@ bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size&
}
bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- const GraphicAttr* pAttr, sal_uLong nFlags )
+ const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags )
{
GraphicAttr aAttr( pAttr ? *pAttr : GetAttr() );
Point aPt( rPt );
@@ -523,7 +523,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
// #i29534# Provide output rects for PDF writer
Rectangle aCropRect;
- if( !( GRFMGR_DRAW_USE_DRAWMODE_SETTINGS & nFlags ) )
+ if( !( GraphicManagerDrawFlags::USE_DRAWMODE_SETTINGS & nFlags ) )
pOut->SetDrawMode( nOldDrawMode & ( ~( DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ) ) );
// mirrored horizontically
@@ -587,7 +587,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
}
bool GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSize,
- const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D )
+ const Size& rOffset, const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags, int nTileCacheSize1D )
{
if( pOut == NULL || rSize.Width() == 0 || rSize.Height() == 0 )
return false;
@@ -609,7 +609,7 @@ bool GraphicObject::DrawTiled( OutputDevice* pOut, const Rectangle& rArea, const
}
bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const Size& rSz,
- long nExtraData, const GraphicAttr* pAttr, sal_uLong /*nFlags*/,
+ long nExtraData, const GraphicAttr* pAttr, GraphicManagerDrawFlags /*nFlags*/,
OutputDevice* pFirstFrameOutDev )
{
bool bRet = false;
@@ -660,7 +660,7 @@ bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const
bRet = true;
}
else
- bRet = Draw( pOut, rPt, rSz, &aAttr, GRFMGR_DRAW_STANDARD );
+ bRet = Draw( pOut, rPt, rSz, &aAttr, GraphicManagerDrawFlags::STANDARD );
}
return bRet;
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index a8daae01f1b0..a77d26ffef05 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -89,7 +89,7 @@ bool GraphicManager::IsInCache( OutputDevice* pOut, const Point& rPt,
bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size& rSz,
GraphicObject& rObj, const GraphicAttr& rAttr,
- const sal_uLong nFlags, bool& rCached )
+ const GraphicManagerDrawFlags nFlags, bool& rCached )
{
Point aPt( rPt );
Size aSz( rSz );
@@ -102,9 +102,9 @@ bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size&
// create output and fill cache
if( rObj.IsAnimated() || ( pOut->GetOutDevType() == OUTDEV_PRINTER ) ||
- ( !( nFlags & GRFMGR_DRAW_NO_SUBSTITUTE ) &&
- ( ( nFlags & GRFMGR_DRAW_SUBSTITUTE ) ||
- !( nFlags & GRFMGR_DRAW_CACHED ) ||
+ ( !( nFlags & GraphicManagerDrawFlags::NO_SUBSTITUTE ) &&
+ ( ( nFlags & GraphicManagerDrawFlags::SUBSTITUTE ) ||
+ !( nFlags & GraphicManagerDrawFlags::CACHED ) ||
( pOut->GetConnectMetaFile() && !pOut->IsOutputEnabled() ) ) ) )
{
// simple output of transformed graphic
@@ -243,7 +243,7 @@ void GraphicManager::ImplGraphicObjectWasSwappedIn( const GraphicObject& rObj )
bool GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
const Size& rSz, GraphicObject& rObj,
const GraphicAttr& rAttr,
- const sal_uLong nFlags, bool& rCached )
+ const GraphicManagerDrawFlags nFlags, bool& rCached )
{
const Graphic& rGraphic = rObj.GetGraphic();
bool bRet = false;
@@ -870,7 +870,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice,
const Point& rPoint, const Size& rSize,
const BitmapEx& rBitmapEx, const GraphicAttr& rAttributes,
- const sal_uLong /*nFlags*/, BitmapEx* pBmpEx )
+ const GraphicManagerDrawFlags /*nFlags*/, BitmapEx* pBmpEx )
{
sal_uInt16 nRot10 = rAttributes.GetRotation() % 3600;
@@ -1088,7 +1088,7 @@ static BitmapEx checkMetadataBitmap( const BitmapEx& rBmpEx,
bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
const Point& rPt, const Size& rSz,
const GDIMetaFile& rMtf, const GraphicAttr& rAttr,
- const sal_uLong /*nFlags*/, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx )
+ const GraphicManagerDrawFlags /*nFlags*/, GDIMetaFile& rOutMtf, BitmapEx& rOutBmpEx )
{
const Size aNewSize( rMtf.GetPrefSize() );
@@ -1661,7 +1661,7 @@ struct ImplTileInfo
bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent,
int nNumTilesX, int nNumTilesY,
const Size& rTileSizePixel,
- const GraphicAttr* pAttr, sal_uLong nFlags )
+ const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags )
{
if( nExponent <= 1 )
return false;
@@ -1703,7 +1703,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
int nNumOrigTilesX, int nNumOrigTilesY,
int nRemainderTilesX, int nRemainderTilesY,
const Size& rTileSizePixel, const GraphicAttr* pAttr,
- sal_uLong nFlags, ImplTileInfo& rTileInfo )
+ GraphicManagerDrawFlags nFlags, ImplTileInfo& rTileInfo )
{
// gets loaded with our tile bitmap
GraphicObject aTmpGraphic;
@@ -1876,7 +1876,7 @@ bool GraphicObject::ImplRenderTileRecursive( VirtualDevice& rVDev, int nExponent
}
bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, const Size& rSizePixel,
- const Size& rOffset, const GraphicAttr* pAttr, sal_uLong nFlags, int nTileCacheSize1D )
+ const Size& rOffset, const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags, int nTileCacheSize1D )
{
// how many tiles to generate per recursion step
enum{ SubdivisionExponent=2 };
@@ -1985,7 +1985,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c
bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
int nNumTilesX, int nNumTilesY,
- const Size& rTileSizePixel, const GraphicAttr* pAttr, sal_uLong nFlags )
+ const Size& rTileSizePixel, const GraphicAttr* pAttr, GraphicManagerDrawFlags nFlags )
{
Point aCurrPos( rPosPixel );
Size aTileSizeLogic( rOut.PixelToLogic( rTileSizePixel ) );