summaryrefslogtreecommitdiff
path: root/drawinglayer/source
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 /drawinglayer/source
parent662700703bebad38ca7ad74ca4eb040fe8b5b676 (diff)
convert DRAWMODE constants to scoped enum
Change-Id: I36cbe8057d09226f8b302963bdd94dc5600b686f
Diffstat (limited to 'drawinglayer/source')
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx16
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx10
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx72
3 files changed, 49 insertions, 49 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index ffc0e292806b..77039f38e2ad 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1097,7 +1097,7 @@ namespace drawinglayer
// const primitive2d::TextDecoratedPortionPrimitive2D* pTextDecoratedCandidate = dynamic_cast< const primitive2d::TextDecoratedPortionPrimitive2D* >(&rCandidate);
// Adapt evtl. used special DrawMode
- const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode());
+ const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode());
adaptTextToFillDrawMode();
// directdraw of text simple portion; use default processing
@@ -1324,20 +1324,20 @@ namespace drawinglayer
// write LineGeometry start marker
impStartSvtGraphicStroke(pSvtGraphicStroke);
- // #i116162# When B&W is set as DrawMode, DRAWMODE_WHITEFILL is used
- // to let all fills be just white; for lines DRAWMODE_BLACKLINE is used
+ // #i116162# When B&W is set as DrawMode, DrawModeFlags::WhiteFill is used
+ // to let all fills be just white; for lines DrawModeFlags::BlackLine is used
// so all line geometry is supposed to get black. Since in the in-between
// stages of line geometry drawing filled polygons are used (e.g. line
// start/ends) it is necessary to change these drawmodes to preserve
- // that lines shall be black; thus change DRAWMODE_WHITEFILL to
- // DRAWMODE_BLACKFILL during line geometry processing to have line geometry
+ // that lines shall be black; thus change DrawModeFlags::WhiteFill to
+ // DrawModeFlags::BlackFill during line geometry processing to have line geometry
// parts filled black.
- const sal_uLong nOldDrawMode(mpOutputDevice->GetDrawMode());
- const bool bDrawmodeChange(nOldDrawMode & DRAWMODE_WHITEFILL && mnSvtGraphicStrokeCount);
+ const DrawModeFlags nOldDrawMode(mpOutputDevice->GetDrawMode());
+ const bool bDrawmodeChange(nOldDrawMode & DrawModeFlags::WhiteFill && mnSvtGraphicStrokeCount);
if(bDrawmodeChange)
{
- mpOutputDevice->SetDrawMode((nOldDrawMode & ~DRAWMODE_WHITEFILL) | DRAWMODE_BLACKFILL);
+ mpOutputDevice->SetDrawMode((nOldDrawMode & ~DrawModeFlags::WhiteFill) | DrawModeFlags::BlackFill);
}
// process sub-line geometry (evtl. filled PolyPolygons)
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index d287739bca94..b644c4fb7cf4 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -646,7 +646,7 @@ namespace drawinglayer
static bool bForceSimpleTextDecomposition(false);
// Adapt evtl. used special DrawMode
- const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode());
+ const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode());
adaptTextToFillDrawMode();
if(!bForceSimpleTextDecomposition && getOptionsDrawinglayer().IsRenderSimpleTextDirect())
@@ -669,7 +669,7 @@ namespace drawinglayer
static bool bForceComplexTextDecomposition(false);
// Adapt evtl. used special DrawMode
- const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode());
+ const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode());
adaptTextToFillDrawMode();
if(!bForceComplexTextDecomposition && getOptionsDrawinglayer().IsRenderDecoratedTextDirect())
@@ -1044,10 +1044,10 @@ namespace drawinglayer
}
// the stroke primitive may be decomposed to filled polygons. To keep
- // evtl. set DrawModes aka DRAWMODE_BLACKLINE, DRAWMODE_GRAYLINE,
- // DRAWMODE_GHOSTEDLINE, DRAWMODE_WHITELINE or DRAWMODE_SETTINGSLINE
+ // evtl. set DrawModes aka DrawModeFlags::BlackLine, DrawModeFlags::GrayLine,
+ // DrawModeFlags::GhostedLine, DrawModeFlags::WhiteLine or DrawModeFlags::SettingsLine
// working, these need to be copied to the corresponding fill modes
- const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode());
+ const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode());
adaptLineToFillDrawMode();
// polygon stroke primitive
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index a98726676fa0..d8fee138000d 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -1485,55 +1485,55 @@ namespace drawinglayer
void VclProcessor2D::adaptLineToFillDrawMode() const
{
- const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode());
+ const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode());
- if(nOriginalDrawMode & (DRAWMODE_BLACKLINE|DRAWMODE_GRAYLINE|DRAWMODE_GHOSTEDLINE|DRAWMODE_WHITELINE|DRAWMODE_SETTINGSLINE))
+ if(nOriginalDrawMode & (DrawModeFlags::BlackLine|DrawModeFlags::GrayLine|DrawModeFlags::GhostedLine|DrawModeFlags::WhiteLine|DrawModeFlags::SettingsLine))
{
- sal_uInt32 nAdaptedDrawMode(nOriginalDrawMode);
+ DrawModeFlags nAdaptedDrawMode(nOriginalDrawMode);
- if(nOriginalDrawMode & DRAWMODE_BLACKLINE)
+ if(nOriginalDrawMode & DrawModeFlags::BlackLine)
{
- nAdaptedDrawMode |= DRAWMODE_BLACKFILL;
+ nAdaptedDrawMode |= DrawModeFlags::BlackFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_BLACKFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::BlackFill;
}
- if(nOriginalDrawMode & DRAWMODE_GRAYLINE)
+ if(nOriginalDrawMode & DrawModeFlags::GrayLine)
{
- nAdaptedDrawMode |= DRAWMODE_GRAYFILL;
+ nAdaptedDrawMode |= DrawModeFlags::GrayFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_GRAYFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::GrayFill;
}
- if(nOriginalDrawMode & DRAWMODE_GHOSTEDLINE)
+ if(nOriginalDrawMode & DrawModeFlags::GhostedLine)
{
- nAdaptedDrawMode |= DRAWMODE_GHOSTEDFILL;
+ nAdaptedDrawMode |= DrawModeFlags::GhostedFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_GHOSTEDFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::GhostedFill;
}
- if(nOriginalDrawMode & DRAWMODE_WHITELINE)
+ if(nOriginalDrawMode & DrawModeFlags::WhiteLine)
{
- nAdaptedDrawMode |= DRAWMODE_WHITEFILL;
+ nAdaptedDrawMode |= DrawModeFlags::WhiteFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_WHITEFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::WhiteFill;
}
- if(nOriginalDrawMode & DRAWMODE_SETTINGSLINE)
+ if(nOriginalDrawMode & DrawModeFlags::SettingsLine)
{
- nAdaptedDrawMode |= DRAWMODE_SETTINGSFILL;
+ nAdaptedDrawMode |= DrawModeFlags::SettingsFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_SETTINGSFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::SettingsFill;
}
mpOutputDevice->SetDrawMode(nAdaptedDrawMode);
@@ -1542,54 +1542,54 @@ namespace drawinglayer
void VclProcessor2D::adaptTextToFillDrawMode() const
{
- const sal_uInt32 nOriginalDrawMode(mpOutputDevice->GetDrawMode());
- if(nOriginalDrawMode & (DRAWMODE_BLACKTEXT|DRAWMODE_GRAYTEXT|DRAWMODE_GHOSTEDTEXT|DRAWMODE_WHITETEXT|DRAWMODE_SETTINGSTEXT))
+ const DrawModeFlags nOriginalDrawMode(mpOutputDevice->GetDrawMode());
+ if(nOriginalDrawMode & (DrawModeFlags::BlackText|DrawModeFlags::GrayText|DrawModeFlags::GhostedText|DrawModeFlags::WhiteText|DrawModeFlags::SettingsText))
{
- sal_uInt32 nAdaptedDrawMode(nOriginalDrawMode);
+ DrawModeFlags nAdaptedDrawMode(nOriginalDrawMode);
- if(nOriginalDrawMode & DRAWMODE_BLACKTEXT)
+ if(nOriginalDrawMode & DrawModeFlags::BlackText)
{
- nAdaptedDrawMode |= DRAWMODE_BLACKFILL;
+ nAdaptedDrawMode |= DrawModeFlags::BlackFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_BLACKFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::BlackFill;
}
- if(nOriginalDrawMode & DRAWMODE_GRAYTEXT)
+ if(nOriginalDrawMode & DrawModeFlags::GrayText)
{
- nAdaptedDrawMode |= DRAWMODE_GRAYFILL;
+ nAdaptedDrawMode |= DrawModeFlags::GrayFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_GRAYFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::GrayFill;
}
- if(nOriginalDrawMode & DRAWMODE_GHOSTEDTEXT)
+ if(nOriginalDrawMode & DrawModeFlags::GhostedText)
{
- nAdaptedDrawMode |= DRAWMODE_GHOSTEDFILL;
+ nAdaptedDrawMode |= DrawModeFlags::GhostedFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_GHOSTEDFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::GhostedFill;
}
- if(nOriginalDrawMode & DRAWMODE_WHITETEXT)
+ if(nOriginalDrawMode & DrawModeFlags::WhiteText)
{
- nAdaptedDrawMode |= DRAWMODE_WHITEFILL;
+ nAdaptedDrawMode |= DrawModeFlags::WhiteFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_WHITEFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::WhiteFill;
}
- if(nOriginalDrawMode & DRAWMODE_SETTINGSTEXT)
+ if(nOriginalDrawMode & DrawModeFlags::SettingsText)
{
- nAdaptedDrawMode |= DRAWMODE_SETTINGSFILL;
+ nAdaptedDrawMode |= DrawModeFlags::SettingsFill;
}
else
{
- nAdaptedDrawMode &= ~DRAWMODE_SETTINGSFILL;
+ nAdaptedDrawMode &= ~DrawModeFlags::SettingsFill;
}
mpOutputDevice->SetDrawMode(nAdaptedDrawMode);