summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--canvas/source/vcl/canvascustomsprite.cxx4
-rw-r--r--canvas/source/vcl/canvashelper.cxx6
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx8
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx16
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx10
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx72
-rw-r--r--editeng/source/editeng/impedit.hxx4
-rw-r--r--include/svx/dlgutil.hxx4
-rw-r--r--include/vcl/outdev.hxx71
-rw-r--r--include/vcl/print.hxx2
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
-rw-r--r--sc/source/ui/view/notemark.cxx6
-rw-r--r--sc/source/ui/view/output.cxx16
-rw-r--r--sc/source/ui/view/output3.cxx6
-rw-r--r--sd/source/ui/dlg/animobjs.cxx8
-rw-r--r--sd/source/ui/dlg/docprev.cxx4
-rw-r--r--sd/source/ui/docshell/docshel4.cxx6
-rw-r--r--sd/source/ui/inc/FrameView.hxx32
-rw-r--r--sd/source/ui/inc/ViewShell.hxx26
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx30
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx12
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx36
-rw-r--r--sd/source/ui/view/sdwindow.cxx12
-rw-r--r--sd/source/ui/view/viewshel.cxx2
-rw-r--r--starmath/source/ElementsDockingWindow.cxx2
-rw-r--r--starmath/source/document.cxx4
-rw-r--r--svtools/source/graphic/grfcache.cxx8
-rw-r--r--svtools/source/graphic/grfmgr.cxx4
-rw-r--r--svtools/source/graphic/grfmgr2.cxx2
-rw-r--r--svx/source/dialog/dlgctrl.cxx4
-rw-r--r--svx/source/sdr/contact/objectcontactofpageview.cxx12
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx4
-rw-r--r--svx/source/xoutdev/xtabdash.cxx4
-rw-r--r--svx/source/xoutdev/xtabgrdt.cxx4
-rw-r--r--svx/source/xoutdev/xtabhtch.cxx4
-rw-r--r--svx/source/xoutdev/xtablend.cxx4
-rw-r--r--sw/source/core/layout/paintfrm.cxx26
-rw-r--r--sw/source/core/view/vdraw.cxx6
-rw-r--r--sw/source/ui/table/tautofmt.cxx4
-rw-r--r--vcl/osx/printaccessoryview.mm4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx8
-rw-r--r--vcl/source/gdi/print3.cxx12
-rw-r--r--vcl/source/outdev/bitmap.cxx38
-rw-r--r--vcl/source/outdev/gradient.cxx24
-rw-r--r--vcl/source/outdev/hatch.cxx16
-rw-r--r--vcl/source/outdev/outdev.cxx2
-rw-r--r--vcl/source/outdev/outdevstate.cxx48
-rw-r--r--vcl/source/outdev/text.cxx34
-rw-r--r--vcl/source/outdev/textline.cxx32
-rw-r--r--vcl/source/outdev/transparent.cxx34
-rw-r--r--vcl/source/window/printdlg.cxx6
52 files changed, 375 insertions, 374 deletions
diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index 1b04c1dcbdf1..cb8833696bc7 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -89,8 +89,8 @@ namespace vclcanvas
// set mask vdev drawmode, such that everything is painted
// black. That leaves us with a binary image, white for
// background, black for painted content
- pBackBufferMask->getOutDev().SetDrawMode( DRAWMODE_BLACKLINE | DRAWMODE_BLACKFILL | DRAWMODE_BLACKTEXT |
- DRAWMODE_BLACKGRADIENT | DRAWMODE_BLACKBITMAP );
+ pBackBufferMask->getOutDev().SetDrawMode( DrawModeFlags::BlackLine | DrawModeFlags::BlackFill | DrawModeFlags::BlackText |
+ DrawModeFlags::BlackGradient | DrawModeFlags::BlackBitmap );
// setup canvas helper
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 867405698716..84ba5465b3e2 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -178,7 +178,7 @@ namespace vclcanvas
{
OutputDevice& rOutDev2( mp2ndOutDev->getOutDev() );
- rOutDev2.SetDrawMode( DRAWMODE_DEFAULT );
+ rOutDev2.SetDrawMode( DrawModeFlags::Default );
rOutDev2.EnableMapMode( false );
rOutDev2.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW );
rOutDev2.SetLineColor( COL_WHITE );
@@ -186,8 +186,8 @@ namespace vclcanvas
rOutDev2.SetClipRegion();
rOutDev2.DrawRect( Rectangle( Point(),
rOutDev2.GetOutputSizePixel()) );
- rOutDev2.SetDrawMode( DRAWMODE_BLACKLINE | DRAWMODE_BLACKFILL | DRAWMODE_BLACKTEXT |
- DRAWMODE_BLACKGRADIENT | DRAWMODE_BLACKBITMAP );
+ rOutDev2.SetDrawMode( DrawModeFlags::BlackLine | DrawModeFlags::BlackFill | DrawModeFlags::BlackText |
+ DrawModeFlags::BlackGradient | DrawModeFlags::BlackBitmap );
}
}
}
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index 7e14db058053..76592b4581df 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -260,12 +260,12 @@ void ChartWindow::RequestHelp( const HelpEvent& rHEvt )
void ChartWindow::adjustHighContrastMode()
{
- static const sal_Int32 nContrastMode =
- DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
- DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT;
+ static const DrawModeFlags nContrastMode =
+ DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill |
+ DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient;
bool bUseContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
- SetDrawMode( bUseContrast ? nContrastMode : DRAWMODE_DEFAULT );
+ SetDrawMode( bUseContrast ? nContrastMode : DrawModeFlags::Default );
}
void ChartWindow::ForceInvalidate()
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);
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 6213ea2e0e73..93f2b8ff2f95 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -663,7 +663,7 @@ private:
void ForceAutoColor( bool b ) { bForceAutoColor = b; }
bool IsForceAutoColor() const { return bForceAutoColor; }
- inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode );
+ inline VirtualDevice* GetVirtualDevice( const MapMode& rMapMode, DrawModeFlags nDrawMode );
inline void EraseVirtualDevice() { pVirtDev.disposeAndClear(); }
DECL_LINK_TYPED(StatusTimerHdl, Timer *, void);
@@ -1066,7 +1066,7 @@ inline EditSelection ImpEditEngine::CreateSel( const ESelection& rSel )
return aSel;
}
-inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, sal_uLong nDrawMode )
+inline VirtualDevice* ImpEditEngine::GetVirtualDevice( const MapMode& rMapMode, DrawModeFlags nDrawMode )
{
if ( !pVirtDev )
pVirtDev = new VirtualDevice;
diff --git a/include/svx/dlgutil.hxx b/include/svx/dlgutil.hxx
index 1e751d142a6f..8303b531b2a5 100644
--- a/include/svx/dlgutil.hxx
+++ b/include/svx/dlgutil.hxx
@@ -33,8 +33,8 @@ SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit( const SfxItemSet& );
SVX_DLLPUBLIC FieldUnit GetModuleFieldUnit();
SVX_DLLPUBLIC bool GetApplyCharUnit( const SfxItemSet& );
-static const int OUTPUT_DRAWMODE_COLOR = (DRAWMODE_DEFAULT);
-static const int OUTPUT_DRAWMODE_CONTRAST = (DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT);
+static const DrawModeFlags OUTPUT_DRAWMODE_COLOR = DrawModeFlags::Default;
+static const DrawModeFlags OUTPUT_DRAWMODE_CONTRAST = DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient;
#endif
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 21f36153b4ed..833c9da581d8 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -216,35 +216,42 @@ namespace o3tl
}
// DrawModes
-#define DRAWMODE_DEFAULT ((sal_uLong)0x00000000)
-#define DRAWMODE_BLACKLINE ((sal_uLong)0x00000001)
-#define DRAWMODE_BLACKFILL ((sal_uLong)0x00000002)
-#define DRAWMODE_BLACKTEXT ((sal_uLong)0x00000004)
-#define DRAWMODE_BLACKBITMAP ((sal_uLong)0x00000008)
-#define DRAWMODE_BLACKGRADIENT ((sal_uLong)0x00000010)
-#define DRAWMODE_GRAYLINE ((sal_uLong)0x00000020)
-#define DRAWMODE_GRAYFILL ((sal_uLong)0x00000040)
-#define DRAWMODE_GRAYTEXT ((sal_uLong)0x00000080)
-#define DRAWMODE_GRAYBITMAP ((sal_uLong)0x00000100)
-#define DRAWMODE_GRAYGRADIENT ((sal_uLong)0x00000200)
-#define DRAWMODE_NOFILL ((sal_uLong)0x00000400)
-#define DRAWMODE_NOBITMAP ((sal_uLong)0x00000800)
-#define DRAWMODE_NOGRADIENT ((sal_uLong)0x00001000)
-#define DRAWMODE_GHOSTEDLINE ((sal_uLong)0x00002000)
-#define DRAWMODE_GHOSTEDFILL ((sal_uLong)0x00004000)
-#define DRAWMODE_GHOSTEDTEXT ((sal_uLong)0x00008000)
-#define DRAWMODE_GHOSTEDBITMAP ((sal_uLong)0x00010000)
-#define DRAWMODE_GHOSTEDGRADIENT ((sal_uLong)0x00020000)
-#define DRAWMODE_WHITELINE ((sal_uLong)0x00100000)
-#define DRAWMODE_WHITEFILL ((sal_uLong)0x00200000)
-#define DRAWMODE_WHITETEXT ((sal_uLong)0x00400000)
-#define DRAWMODE_WHITEBITMAP ((sal_uLong)0x00800000)
-#define DRAWMODE_WHITEGRADIENT ((sal_uLong)0x01000000)
-#define DRAWMODE_SETTINGSLINE ((sal_uLong)0x02000000)
-#define DRAWMODE_SETTINGSFILL ((sal_uLong)0x04000000)
-#define DRAWMODE_SETTINGSTEXT ((sal_uLong)0x08000000)
-#define DRAWMODE_SETTINGSGRADIENT ((sal_uLong)0x10000000)
-#define DRAWMODE_NOTRANSPARENCY ((sal_uLong)0x80000000)
+enum class DrawModeFlags : sal_uLong
+{
+ Default = 0x00000000,
+ BlackLine = 0x00000001,
+ BlackFill = 0x00000002,
+ BlackText = 0x00000004,
+ BlackBitmap = 0x00000008,
+ BlackGradient = 0x00000010,
+ GrayLine = 0x00000020,
+ GrayFill = 0x00000040,
+ GrayText = 0x00000080,
+ GrayBitmap = 0x00000100,
+ GrayGradient = 0x00000200,
+ NoFill = 0x00000400,
+ NoBitmap = 0x00000800,
+ NoGradient = 0x00001000,
+ GhostedLine = 0x00002000,
+ GhostedFill = 0x00004000,
+ GhostedText = 0x00008000,
+ GhostedBitmap = 0x00010000,
+ GhostedGradient = 0x00020000,
+ WhiteLine = 0x00100000,
+ WhiteFill = 0x00200000,
+ WhiteText = 0x00400000,
+ WhiteBitmap = 0x00800000,
+ WhiteGradient = 0x01000000,
+ SettingsLine = 0x02000000,
+ SettingsFill = 0x04000000,
+ SettingsText = 0x08000000,
+ SettingsGradient = 0x10000000,
+ NoTransparency = 0x80000000,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<DrawModeFlags> : is_typed_flags<DrawModeFlags, 0x9ff3ffff> {};
+}
// Antialiasing
#define ANTIALIASING_DISABLE_TEXT ((sal_uInt16)0x0001)
@@ -355,7 +362,7 @@ private:
mutable long mnTextOffY;
mutable long mnEmphasisAscent;
mutable long mnEmphasisDescent;
- sal_uLong mnDrawMode;
+ DrawModeFlags mnDrawMode;
ComplexTextLayoutMode mnTextLayoutMode;
ImplMapRes maMapRes;
ImplThresholdRes maThresRes;
@@ -610,8 +617,8 @@ public:
void SetAntialiasing( sal_uInt16 nMode = 0 );
sal_uInt16 GetAntialiasing() const { return mnAntialiasing; }
- void SetDrawMode( sal_uLong nDrawMode );
- sal_uLong GetDrawMode() const { return mnDrawMode; }
+ void SetDrawMode( DrawModeFlags nDrawMode );
+ DrawModeFlags GetDrawMode() const { return mnDrawMode; }
void SetLayoutMode( ComplexTextLayoutMode nTextLayoutMode );
ComplexTextLayoutMode GetLayoutMode() const { return mnTextLayoutMode; }
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 600b2a817cb0..a313a2812293 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -570,7 +570,7 @@ public:
SAL_DLLPRIVATE int getPageCountProtected() const;
SAL_DLLPRIVATE css::uno::Sequence< css::beans::PropertyValue > getPageParametersProtected( int i_nPage ) const;
- SAL_DLLPRIVATE sal_uLong removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut );
+ SAL_DLLPRIVATE DrawModeFlags removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut );
SAL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput );
};
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 6a3d9d5ef785..e8b3a69d1112 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -485,7 +485,7 @@ void ScAutoFmtPreview::NotifyChange( ScAutoFormatData* pNewData )
void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
{
- sal_uInt32 nOldDrawMode = aVD->GetDrawMode();
+ DrawModeFlags nOldDrawMode = aVD->GetDrawMode();
Size aWndSize(GetSizePixel());
vcl::Font aFont(aVD->GetFont());
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 2ed269a242a1..64b63ac11034 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -116,11 +116,11 @@ static void lcl_DrawWin( SdrObject* pObject, vcl::RenderContext* pWindow, const
MapMode aOld = pWindow->GetMapMode();
pWindow->SetMapMode( rMap );
- sal_uLong nOldDrawMode = pWindow->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pWindow->GetDrawMode();
if ( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- pWindow->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
- DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
+ pWindow->SetDrawMode( nOldDrawMode | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill |
+ DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
}
pObject->SingleObjectPainter( *pWindow ); // #110094#-17
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 14298826f7fb..9dfc3b7eb4d8 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1279,7 +1279,7 @@ size_t lclGetArrayColFromCellInfoX( sal_uInt16 nCellInfoX, sal_uInt16 nCellInfoF
void ScOutputData::DrawFrame()
{
- sal_uLong nOldDrawMode = mpDev->GetDrawMode();
+ DrawModeFlags nOldDrawMode = mpDev->GetDrawMode();
Color aSingleColor;
bool bUseSingleColor = false;
@@ -1291,16 +1291,16 @@ void ScOutputData::DrawFrame()
// that are drawn with DrawRect, so if the line/background bits are set, the DrawMode
// must be reset and the border colors handled here.
- if ( ( nOldDrawMode & DRAWMODE_WHITEFILL ) && ( nOldDrawMode & DRAWMODE_BLACKLINE ) )
+ if ( ( nOldDrawMode & DrawModeFlags::WhiteFill ) && ( nOldDrawMode & DrawModeFlags::BlackLine ) )
{
- mpDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_WHITEFILL) );
+ mpDev->SetDrawMode( nOldDrawMode & (~DrawModeFlags::WhiteFill) );
aSingleColor.SetColor( COL_BLACK );
bUseSingleColor = true;
}
- else if ( ( nOldDrawMode & DRAWMODE_SETTINGSFILL ) && ( nOldDrawMode & DRAWMODE_SETTINGSLINE ) )
+ else if ( ( nOldDrawMode & DrawModeFlags::SettingsFill ) && ( nOldDrawMode & DrawModeFlags::SettingsLine ) )
{
- mpDev->SetDrawMode( nOldDrawMode & (~DRAWMODE_SETTINGSFILL) );
- aSingleColor = rStyleSettings.GetWindowTextColor(); // same as used in VCL for DRAWMODE_SETTINGSLINE
+ mpDev->SetDrawMode( nOldDrawMode & (~DrawModeFlags::SettingsFill) );
+ aSingleColor = rStyleSettings.GetWindowTextColor(); // same as used in VCL for DrawModeFlags::SettingsLine
bUseSingleColor = true;
}
else if ( bCellContrast )
@@ -2442,12 +2442,12 @@ void ScOutputData::DrawClipMarks()
Color aArrowFillCol( COL_LIGHTRED );
- sal_uLong nOldDrawMode = mpDev->GetDrawMode();
+ DrawModeFlags nOldDrawMode = mpDev->GetDrawMode();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
if ( mbUseStyleColor && rStyleSettings.GetHighContrastMode() )
{
// use DrawMode to change the arrow's outline color
- mpDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE );
+ mpDev->SetDrawMode( nOldDrawMode | DrawModeFlags::SettingsLine );
// use text color also for the fill color
aArrowFillCol.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
}
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index f2b0a051c9fa..4b56c47421ab 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -189,11 +189,11 @@ void ScOutputData::DrawSelectiveObjects(const sal_uInt16 nLayer)
pModel->UseHyphenator();
- sal_uLong nOldDrawMode = mpDev->GetDrawMode();
+ DrawModeFlags nOldDrawMode = mpDev->GetDrawMode();
if ( mbUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- mpDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
- DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
+ mpDev->SetDrawMode( nOldDrawMode | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill |
+ DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
}
// #109985#
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 2137f5657574..46b9e5122555 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -117,8 +117,8 @@ void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt )
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) );
SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode()
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
- : ViewShell::OUTPUT_DRAWMODE_COLOR );
+ ? sd::OUTPUT_DRAWMODE_CONTRAST
+ : sd::OUTPUT_DRAWMODE_COLOR );
}
}
@@ -560,8 +560,8 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
pVD->SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
pVD->SetDrawMode( rStyles.GetHighContrastMode()
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
- : ViewShell::OUTPUT_DRAWMODE_COLOR );
+ ? sd::OUTPUT_DRAWMODE_CONTRAST
+ : sd::OUTPUT_DRAWMODE_COLOR );
pVD->Erase();
pObject->SingleObjectPainter( *pVD.get() );
aBmp = BitmapEx( pVD->GetBitmap( aObjRect.TopLeft(), aObjSize ) );
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index a9e219425dfa..4d6325384ab8 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -158,8 +158,8 @@ void SdDocPreviewWin::Paint( vcl::RenderContext& /*rRenderContext*/, const Recta
SvtAccessibilityOptions aAccOptions;
bool bUseContrast = aAccOptions.GetIsForPagePreviews() && Application::GetSettings().GetStyleSettings().GetHighContrastMode();
SetDrawMode( bUseContrast
- ? ::sd::ViewShell::OUTPUT_DRAWMODE_CONTRAST
- : ::sd::ViewShell::OUTPUT_DRAWMODE_COLOR );
+ ? ::sd::OUTPUT_DRAWMODE_CONTRAST
+ : ::sd::OUTPUT_DRAWMODE_COLOR );
ImpPaint( pMetaFile, this );
}
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index a11e109dd197..bed2fd7b4e97 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -115,12 +115,12 @@ SfxPrinter* DrawDocShell::GetPrinter(bool bCreate)
// set output quality
sal_uInt16 nQuality = aPrintItem.GetOptionsPrint().GetOutputQuality();
- sal_uLong nMode = DRAWMODE_DEFAULT;
+ DrawModeFlags nMode = DrawModeFlags::Default;
// 1 == Grayscale, 2 == Black & White (with grayscale images)
if( nQuality == 1 )
- nMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT;
+ nMode = DrawModeFlags::GrayLine | DrawModeFlags::GrayFill | DrawModeFlags::GrayText | DrawModeFlags::GrayBitmap | DrawModeFlags::GrayGradient;
else if( nQuality == 2 )
- nMode = DRAWMODE_BLACKLINE | DRAWMODE_WHITEFILL | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_WHITEGRADIENT;
+ nMode = DrawModeFlags::BlackLine | DrawModeFlags::WhiteFill | DrawModeFlags::BlackText | DrawModeFlags::GrayBitmap | DrawModeFlags::WhiteGradient;
mpPrinter->SetDrawMode( nMode );
diff --git a/sd/source/ui/inc/FrameView.hxx b/sd/source/ui/inc/FrameView.hxx
index 2aa665224ae4..1cfe9d1c5fa4 100644
--- a/sd/source/ui/inc/FrameView.hxx
+++ b/sd/source/ui/inc/FrameView.hxx
@@ -160,8 +160,8 @@ public:
void SetSlidesPerRow(sal_uInt16 nSlides) { mnSlidesPerRow = nSlides; }
sal_uInt16 GetSlidesPerRow() const { return mnSlidesPerRow; }
- void SetDrawMode(sal_uLong nNewDrawMode) { mnDrawMode = nNewDrawMode; };
- sal_uLong GetDrawMode() const { return mnDrawMode; };
+ void SetDrawMode(DrawModeFlags nNewDrawMode) { mnDrawMode = nNewDrawMode; };
+ DrawModeFlags GetDrawMode() const { return mnDrawMode; };
void SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes);
bool IsNavigatorShowingAllShapes() const { return mbIsNavigatorShowingAllShapes;}
@@ -171,15 +171,15 @@ public:
private:
sal_uInt16 mnRefCount;
- bool mbRuler;
- SetOfByte maVisibleLayers;
- SetOfByte maLockedLayers;
- SetOfByte maPrintableLayers;
- SdrHelpLineList maStandardHelpLines;
- SdrHelpLineList maNotesHelpLines;
- SdrHelpLineList maHandoutHelpLines;
- bool mbNoColors; ///< structuring mode
- bool mbNoAttribs; ///< structuring mode
+ bool mbRuler;
+ SetOfByte maVisibleLayers;
+ SetOfByte maLockedLayers;
+ SetOfByte maPrintableLayers;
+ SdrHelpLineList maStandardHelpLines;
+ SdrHelpLineList maNotesHelpLines;
+ SdrHelpLineList maHandoutHelpLines;
+ bool mbNoColors; ///< structuring mode
+ bool mbNoAttribs; ///< structuring mode
Rectangle maVisArea; ///< visible area
PageKind mePageKind; ///< kind of page (standard, notes, handout)
sal_uInt16 mnSelectedPage;
@@ -189,14 +189,14 @@ private:
EditMode meNotesEditMode; ///< edit mode in notes mode (Page/MasterPage)
EditMode meHandoutEditMode; ///< edit mode in handout mode (Page/MasterPage)
EditMode meEditModeOnLoad;
- bool mbLayerMode; ///< layer on/off
- bool mbQuickEdit; ///< QuickEdit on/off
- bool mbDoubleClickTextEdit; ///< text mode after double click
- bool mbClickChangeRotation; ///< single click switches between selection/rotation mode
+ bool mbLayerMode; ///< layer on/off
+ bool mbQuickEdit; ///< QuickEdit on/off
+ bool mbDoubleClickTextEdit; ///< text mode after double click
+ bool mbClickChangeRotation; ///< single click switches between selection/rotation mode
sal_uInt16 mnPresViewShellId; ///< ViewShell from which the presentation was started
sal_uInt16 mnSlotId; ///< SlotId, which was initial mentioned
sal_uInt16 mnSlidesPerRow; ///< slides per row on the slide-desk
- sal_uLong mnDrawMode; ///< draw mode for the normal window
+ DrawModeFlags mnDrawMode; ///< draw mode for the normal window
/** Remember whether the navigator shows all shapes (<TRUE/>) or only
the names ones (<FALSE/>). Not persistent.
*/
diff --git a/sd/source/ui/inc/ViewShell.hxx b/sd/source/ui/inc/ViewShell.hxx
index 5019f3cca85e..49417b642797 100644
--- a/sd/source/ui/inc/ViewShell.hxx
+++ b/sd/source/ui/inc/ViewShell.hxx
@@ -64,6 +64,19 @@ class ZoomList;
#undef OUTPUT_DRAWMODE_COLOR
#undef OUTPUT_DRAWMODE_CONTRAST
+static const DrawModeFlags OUTPUT_DRAWMODE_COLOR = DrawModeFlags::Default;
+static const DrawModeFlags OUTPUT_DRAWMODE_GRAYSCALE
+ = DrawModeFlags::GrayLine | DrawModeFlags::GrayFill
+ | DrawModeFlags::BlackText | DrawModeFlags::GrayBitmap
+ | DrawModeFlags::GrayGradient;
+static const DrawModeFlags OUTPUT_DRAWMODE_BLACKWHITE
+ = DrawModeFlags::BlackLine | DrawModeFlags::BlackText
+ | DrawModeFlags::WhiteFill | DrawModeFlags::GrayBitmap
+ | DrawModeFlags::WhiteGradient;
+static const DrawModeFlags OUTPUT_DRAWMODE_CONTRAST
+ = DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill
+ | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient;
+
/** Base class of the stacked shell hierarchy.
<p>Despite its name this class is not a descendant of SfxViewShell
@@ -98,19 +111,6 @@ public:
static const int MAX_VSPLIT_CNT = 1;
static const int MIN_SCROLLBAR_SIZE = 50;
- static const sal_uLong OUTPUT_DRAWMODE_COLOR = DRAWMODE_DEFAULT;
- static const sal_uLong OUTPUT_DRAWMODE_GRAYSCALE
- = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL
- | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP
- | DRAWMODE_GRAYGRADIENT;
- static const int OUTPUT_DRAWMODE_BLACKWHITE
- = DRAWMODE_BLACKLINE | DRAWMODE_BLACKTEXT
- | DRAWMODE_WHITEFILL | DRAWMODE_GRAYBITMAP
- | DRAWMODE_WHITEGRADIENT;
- static const int OUTPUT_DRAWMODE_CONTRAST
- = DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL
- | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT;
-
TYPEINFO_OVERRIDE();
ViewShell (
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index a8412772b79b..316189fd0c2e 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -581,9 +581,9 @@ IMPL_LINK(SlideSorterController, WindowEventHandler, VclWindowEvent*, pEvent)
cache::PageCacheManager::Instance()->InvalidateAllCaches();
// Update the draw mode.
- sal_uLong nDrawMode (Application::GetSettings().GetStyleSettings().GetHighContrastMode()
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
- : ViewShell::OUTPUT_DRAWMODE_COLOR);
+ DrawModeFlags nDrawMode (Application::GetSettings().GetStyleSettings().GetHighContrastMode()
+ ? sd::OUTPUT_DRAWMODE_CONTRAST
+ : sd::OUTPUT_DRAWMODE_COLOR);
if (mrSlideSorter.GetViewShell() != NULL)
mrSlideSorter.GetViewShell()->GetFrameView()->SetDrawMode(nDrawMode);
if (pActiveWindow != nullptr)
@@ -635,23 +635,17 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet)
{
if (mrSlideSorter.GetContentWindow())
{
- sal_uLong nMode = mrSlideSorter.GetContentWindow()->GetDrawMode();
+ DrawModeFlags nMode = mrSlideSorter.GetContentWindow()->GetDrawMode();
sal_uInt16 nQuality = 0;
- switch (nMode)
- {
- case ViewShell::OUTPUT_DRAWMODE_COLOR:
- nQuality = 0;
- break;
- case ViewShell::OUTPUT_DRAWMODE_GRAYSCALE:
- nQuality = 1;
- break;
- case ViewShell::OUTPUT_DRAWMODE_BLACKWHITE:
- nQuality = 2;
- break;
- case ViewShell::OUTPUT_DRAWMODE_CONTRAST:
- nQuality = 3;
- break;
+ if (nMode == sd::OUTPUT_DRAWMODE_COLOR) {
+ nQuality = 0;
+ } else if (nMode == sd::OUTPUT_DRAWMODE_GRAYSCALE) {
+ nQuality = 1;
+ } else if (nMode == sd::OUTPUT_DRAWMODE_BLACKWHITE) {
+ nQuality = 2;
+ } else if (nMode == sd::OUTPUT_DRAWMODE_CONTRAST) {
+ nQuality = 3;
}
rSet.Put (SfxBoolItem (SID_OUTPUT_QUALITY_COLOR, nQuality==0));
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index e6034a87482c..66032635a626 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -164,8 +164,8 @@ Image PreviewRenderer::RenderSubstitution (
const bool bUseContrast (
Application::GetSettings().GetStyleSettings().GetHighContrastMode());
mpPreviewDevice->SetDrawMode (bUseContrast
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
- : ViewShell::OUTPUT_DRAWMODE_COLOR);
+ ? sd::OUTPUT_DRAWMODE_CONTRAST
+ : sd::OUTPUT_DRAWMODE_COLOR);
// Set a map mode that makes a typical substitution text completely
// visible.
@@ -234,8 +234,8 @@ bool PreviewRenderer::Initialize (
bool bUseContrast (bObeyHighContrastMode
&& Application::GetSettings().GetStyleSettings().GetHighContrastMode());
mpPreviewDevice->SetDrawMode (bUseContrast
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
- : ViewShell::OUTPUT_DRAWMODE_COLOR);
+ ? sd::OUTPUT_DRAWMODE_CONTRAST
+ : sd::OUTPUT_DRAWMODE_COLOR);
mpPreviewDevice->SetSettings(Application::GetSettings());
// Tell the view to show the given page.
@@ -447,8 +447,8 @@ Image PreviewRenderer::ScaleBitmap (
bool bUseContrast = Application::GetSettings().GetStyleSettings().
GetHighContrastMode();
mpPreviewDevice->SetDrawMode (bUseContrast
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
- : ViewShell::OUTPUT_DRAWMODE_COLOR);
+ ? sd::OUTPUT_DRAWMODE_CONTRAST
+ : sd::OUTPUT_DRAWMODE_COLOR);
// Set output size.
Size aSize (rBitmapEx.GetSizePixel());
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index c9b38a6c6b99..05b164a72ec7 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -259,7 +259,7 @@ namespace {
Printer* pPrinter,
const bool bPrintMarkedOnly)
: mpPrinter(pPrinter),
- mnDrawMode(DRAWMODE_DEFAULT),
+ mnDrawMode(DrawModeFlags::Default),
msTimeDate(),
msPageString(),
maPrintSize(0,0),
@@ -270,7 +270,7 @@ namespace {
{}
const VclPtr<Printer> mpPrinter;
- sal_uLong mnDrawMode;
+ DrawModeFlags mnDrawMode;
OUString msTimeDate;
OUString msPageString;
Size maPrintSize;
@@ -653,7 +653,7 @@ namespace {
const bool bPrintMarkedOnly,
const OUString& rsPageString,
const Point& rPageStringOffset,
- const sal_uLong nDrawMode,
+ const DrawModeFlags nDrawMode,
const Orientation eOrientation,
const sal_uInt16 nPaperTray)
: mePageKind(ePageKind),
@@ -678,7 +678,7 @@ namespace {
const SetOfByte& rVisibleLayers,
const SetOfByte& rPrintableLayers) const = 0;
- sal_uLong GetDrawMode() const { return mnDrawMode; }
+ DrawModeFlags GetDrawMode() const { return mnDrawMode; }
Orientation GetOrientation() const { return meOrientation; }
sal_uInt16 GetPaperTray() const { return mnPaperTray; }
@@ -688,7 +688,7 @@ namespace {
const bool mbPrintMarkedOnly;
const OUString msPageString;
const Point maPageStringOffset;
- const sal_uLong mnDrawMode;
+ const DrawModeFlags mnDrawMode;
const Orientation meOrientation;
const sal_uInt16 mnPaperTray;
};
@@ -706,7 +706,7 @@ namespace {
const bool bPrintMarkedOnly,
const OUString& rsPageString,
const Point& rPageStringOffset,
- const sal_uLong nDrawMode,
+ const DrawModeFlags nDrawMode,
const Orientation eOrientation,
const sal_uInt16 nPaperTray)
: PrinterPage(ePageKind, rMapMode, bPrintMarkedOnly, rsPageString,
@@ -760,7 +760,7 @@ namespace {
const bool bPrintMarkedOnly,
const OUString& rsPageString,
const Point& rPageStringOffset,
- const sal_uLong nDrawMode,
+ const DrawModeFlags nDrawMode,
const Orientation eOrientation,
const sal_uInt16 nPaperTray)
: PrinterPage(ePageKind, MapMode(), bPrintMarkedOnly, rsPageString,
@@ -843,7 +843,7 @@ namespace {
const PageKind ePageKind,
const MapMode& rMapMode,
const bool bPrintMarkedOnly,
- const sal_uLong nDrawMode,
+ const DrawModeFlags nDrawMode,
const Orientation eOrientation,
const sal_uInt16 nPaperTray)
: PrinterPage(ePageKind, rMapMode, bPrintMarkedOnly, "",
@@ -917,7 +917,7 @@ namespace {
const MapMode& rMapMode,
const OUString& rsPageString,
const Point& rPageStringOffset,
- const sal_uLong nDrawMode,
+ const DrawModeFlags nDrawMode,
const Orientation eOrientation,
const sal_uInt16 nPaperTray)
: PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString,
@@ -1059,7 +1059,7 @@ namespace {
const MapMode& rMapMode,
const OUString& rsPageString,
const Point& rPageStringOffset,
- const sal_uLong nDrawMode,
+ const DrawModeFlags nDrawMode,
const Orientation eOrientation,
const sal_uInt16 nPaperTray)
: PrinterPage(PK_HANDOUT, rMapMode, false, rsPageString,
@@ -1269,7 +1269,7 @@ public:
return;
const Orientation eSavedOrientation (rPrinter.GetOrientation());
- const sal_uLong nSavedDrawMode (rPrinter.GetDrawMode());
+ const DrawModeFlags nSavedDrawMode (rPrinter.GetDrawMode());
const MapMode aSavedMapMode (rPrinter.GetMapMode());
const sal_uInt16 nSavedPaperBin (rPrinter.GetPaperBin());
@@ -1452,19 +1452,19 @@ private:
switch (mpOptions->GetOutputQuality())
{
case 1: // Grayscale
- aInfo.mnDrawMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL
- | DRAWMODE_GRAYTEXT | DRAWMODE_GRAYBITMAP
- | DRAWMODE_GRAYGRADIENT;
+ aInfo.mnDrawMode = DrawModeFlags::GrayLine | DrawModeFlags::GrayFill
+ | DrawModeFlags::GrayText | DrawModeFlags::GrayBitmap
+ | DrawModeFlags::GrayGradient;
break;
case 2: // Black & White
- aInfo.mnDrawMode = DRAWMODE_BLACKLINE | DRAWMODE_WHITEFILL
- | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP
- | DRAWMODE_WHITEGRADIENT;
+ aInfo.mnDrawMode = DrawModeFlags::BlackLine | DrawModeFlags::WhiteFill
+ | DrawModeFlags::BlackText | DrawModeFlags::GrayBitmap
+ | DrawModeFlags::WhiteGradient;
break;
default:
- aInfo.mnDrawMode = DRAWMODE_DEFAULT;
+ aInfo.mnDrawMode = DrawModeFlags::Default;
}
if (mpOptions->IsDraw())
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 2cacce07f01b..c9c4bfe15b61 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -81,8 +81,8 @@ Window::Window(vcl::Window* pParent)
// adjust contrast mode initially
bool bUseContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
SetDrawMode( bUseContrast
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
- : ViewShell::OUTPUT_DRAWMODE_COLOR );
+ ? sd::OUTPUT_DRAWMODE_CONTRAST
+ : sd::OUTPUT_DRAWMODE_COLOR );
// set Help ID
// SetHelpId(HID_SD_WIN_DOCUMENT);
@@ -777,13 +777,13 @@ void Window::DataChanged( const DataChangedEvent& rDCEvt )
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
SvtAccessibilityOptions aAccOptions;
- sal_uLong nOutputMode;
- sal_uInt16 nPreviewSlot;
+ DrawModeFlags nOutputMode;
+ sal_uInt16 nPreviewSlot;
if( rStyleSettings.GetHighContrastMode() )
- nOutputMode = ViewShell::OUTPUT_DRAWMODE_CONTRAST;
+ nOutputMode = sd::OUTPUT_DRAWMODE_CONTRAST;
else
- nOutputMode = ViewShell::OUTPUT_DRAWMODE_COLOR;
+ nOutputMode = sd::OUTPUT_DRAWMODE_COLOR;
if( rStyleSettings.GetHighContrastMode() && aAccOptions.GetIsForPagePreviews() )
nPreviewSlot = SID_PREVIEW_QUALITY_CONTRAST;
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index b7b0694dc69a..402c9a05d409 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -1300,7 +1300,7 @@ void ViewShell::ExecReq( SfxRequest& rReq )
case SID_OUTPUT_QUALITY_BLACKWHITE:
case SID_OUTPUT_QUALITY_CONTRAST:
{
- sal_uLong nMode = OUTPUT_DRAWMODE_COLOR;
+ DrawModeFlags nMode = OUTPUT_DRAWMODE_COLOR;
switch( nSlot )
{
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index 45d8c0bda2ff..d3fcccb2554c 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -227,7 +227,7 @@ SmElementsControl::SmElementsControl(vcl::Window *pParent)
, mxScroll(VclPtr<ScrollBar>::Create(this, WB_VERT))
{
SetMapMode( MapMode(MAP_100TH_MM) );
- SetDrawMode( DRAWMODE_DEFAULT );
+ SetDrawMode( DrawModeFlags::Default );
SetLayoutMode( TEXT_LAYOUT_DEFAULT );
SetDigitLanguage( LANGUAGE_ENGLISH );
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 0d123ec4cc50..ff464741fc1d 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -429,13 +429,13 @@ void SmDocShell::DrawFormula(OutputDevice &rDev, Point &rPosition, bool bDrawSel
//! the draw mode needs to be set to default, because when imbedding
//! Math for example in Calc in "a over b" the fraction bar may not
//! be visible else. More generally: the FillColor may have been changed.
- sal_uLong nOldDrawMode = DRAWMODE_DEFAULT;
+ DrawModeFlags nOldDrawMode = DrawModeFlags::Default;
bool bRestoreDrawMode = false;
if (OUTDEV_WINDOW == rDev.GetOutDevType() &&
static_cast<vcl::Window &>(rDev).GetSettings().GetStyleSettings().GetHighContrastMode())
{
nOldDrawMode = rDev.GetDrawMode();
- rDev.SetDrawMode( DRAWMODE_DEFAULT );
+ rDev.SetDrawMode( DrawModeFlags::Default );
bRestoreDrawMode = true;
}
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;
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index fa8f550e6c23..4d6debd44b3d 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -48,8 +48,8 @@
#include <vcl/bmpacc.hxx>
#include <svx/xbtmpit.hxx>
-#define OUTPUT_DRAWMODE_COLOR (DRAWMODE_DEFAULT)
-#define OUTPUT_DRAWMODE_CONTRAST (DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT)
+#define OUTPUT_DRAWMODE_COLOR (DrawModeFlags::Default)
+#define OUTPUT_DRAWMODE_CONTRAST (DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient)
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index 939f01283b0b..b4d68733a87e 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -454,22 +454,22 @@ namespace sdr
// gray display mode
bool ObjectContactOfPageView::isDrawModeGray() const
{
- const sal_uInt32 nDrawMode(mrPageWindow.GetPaintWindow().GetOutputDevice().GetDrawMode());
- return (nDrawMode == (DRAWMODE_GRAYLINE|DRAWMODE_GRAYFILL|DRAWMODE_BLACKTEXT|DRAWMODE_GRAYBITMAP|DRAWMODE_GRAYGRADIENT));
+ const DrawModeFlags nDrawMode(mrPageWindow.GetPaintWindow().GetOutputDevice().GetDrawMode());
+ return (nDrawMode == (DrawModeFlags::GrayLine|DrawModeFlags::GrayFill|DrawModeFlags::BlackText|DrawModeFlags::GrayBitmap|DrawModeFlags::GrayGradient));
}
// gray display mode
bool ObjectContactOfPageView::isDrawModeBlackWhite() const
{
- const sal_uInt32 nDrawMode(mrPageWindow.GetPaintWindow().GetOutputDevice().GetDrawMode());
- return (nDrawMode == (DRAWMODE_BLACKLINE|DRAWMODE_BLACKTEXT|DRAWMODE_WHITEFILL|DRAWMODE_GRAYBITMAP|DRAWMODE_WHITEGRADIENT));
+ const DrawModeFlags nDrawMode(mrPageWindow.GetPaintWindow().GetOutputDevice().GetDrawMode());
+ return (nDrawMode == (DrawModeFlags::BlackLine|DrawModeFlags::BlackText|DrawModeFlags::WhiteFill|DrawModeFlags::GrayBitmap|DrawModeFlags::WhiteGradient));
}
// high contrast display mode
bool ObjectContactOfPageView::isDrawModeHighContrast() const
{
- const sal_uInt32 nDrawMode(mrPageWindow.GetPaintWindow().GetOutputDevice().GetDrawMode());
- return (nDrawMode == (DRAWMODE_SETTINGSLINE|DRAWMODE_SETTINGSFILL|DRAWMODE_SETTINGSTEXT|DRAWMODE_SETTINGSGRADIENT));
+ const DrawModeFlags nDrawMode(mrPageWindow.GetPaintWindow().GetOutputDevice().GetDrawMode());
+ return (nDrawMode == (DrawModeFlags::SettingsLine|DrawModeFlags::SettingsFill|DrawModeFlags::SettingsText|DrawModeFlags::SettingsGradient));
}
// access to SdrPageView
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index ab91a44fa53e..166b989bf1c1 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -728,7 +728,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
aVDev->SetMapMode( aMap );
if( rSettings.mbUseHighContrast )
- aVDev->SetDrawMode( aVDev->GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
+ aVDev->SetDrawMode( aVDev->GetDrawMode() | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
aVDev->EnableOutput( false );
aMtf.Record( aVDev );
Size aNewSize;
@@ -930,7 +930,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
aOut->EnableOutput( false );
aOut->SetMapMode( aMap );
if( rSettings.mbUseHighContrast )
- aOut->SetDrawMode( aOut->GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
+ aOut->SetDrawMode( aOut->GetDrawMode() | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
GDIMetaFile aMtf;
aMtf.Clear();
diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx
index 6dc7849917d0..e553fec4e1d8 100644
--- a/svx/source/xoutdev/xtabdash.cxx
+++ b/svx/source/xoutdev/xtabdash.cxx
@@ -140,8 +140,8 @@ Bitmap XDashList::ImpCreateBitmapForXDash(const XDash* pDash)
pVirtualDevice->SetOutputSizePixel(aSize);
pVirtualDevice->SetDrawMode(rStyleSettings.GetHighContrastMode()
- ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
- : DRAWMODE_DEFAULT);
+ ? DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient
+ : DrawModeFlags::Default);
if(rStyleSettings.GetPreviewUsesCheckeredBackground())
{
diff --git a/svx/source/xoutdev/xtabgrdt.cxx b/svx/source/xoutdev/xtabgrdt.cxx
index 16983e5c9882..753cf3f1ada2 100644
--- a/svx/source/xoutdev/xtabgrdt.cxx
+++ b/svx/source/xoutdev/xtabgrdt.cxx
@@ -186,8 +186,8 @@ Bitmap XGradientList::CreateBitmapForUI( long nIndex )
pVirtualDevice->SetOutputSizePixel(rSize);
pVirtualDevice->SetDrawMode(rStyleSettings.GetHighContrastMode()
- ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
- : DRAWMODE_DEFAULT);
+ ? DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient
+ : DrawModeFlags::Default);
// create processor and draw primitives
boost::scoped_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D(drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice(
diff --git a/svx/source/xoutdev/xtabhtch.cxx b/svx/source/xoutdev/xtabhtch.cxx
index 30c05a273c70..9586aa7b2056 100644
--- a/svx/source/xoutdev/xtabhtch.cxx
+++ b/svx/source/xoutdev/xtabhtch.cxx
@@ -147,8 +147,8 @@ Bitmap XHatchList::CreateBitmapForUI( long nIndex )
pVirtualDevice->SetOutputSizePixel(rSize);
pVirtualDevice->SetDrawMode(rStyleSettings.GetHighContrastMode()
- ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
- : DRAWMODE_DEFAULT);
+ ? DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient
+ : DrawModeFlags::Default);
if(rStyleSettings.GetPreviewUsesCheckeredBackground())
{
diff --git a/svx/source/xoutdev/xtablend.cxx b/svx/source/xoutdev/xtablend.cxx
index 70bfe2ffb513..b5fcaa71693c 100644
--- a/svx/source/xoutdev/xtablend.cxx
+++ b/svx/source/xoutdev/xtablend.cxx
@@ -130,8 +130,8 @@ Bitmap XLineEndList::CreateBitmapForUI( long nIndex )
pVirtualDevice->SetOutputSizePixel(aSize);
pVirtualDevice->SetDrawMode(rStyleSettings.GetHighContrastMode()
- ? DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT
- : DRAWMODE_DEFAULT);
+ ? DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient
+ : DrawModeFlags::Default);
if(rStyleSettings.GetPreviewUsesCheckeredBackground())
{
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 23be1e1736da..89eb1a326c28 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1063,10 +1063,10 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties &properties
{
pLast = &rLRect.GetColor();
- sal_uLong nOldDrawMode = pOut->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOut->GetDrawMode();
if( properties.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
- pOut->SetDrawMode( 0 );
+ pOut->SetDrawMode( DrawModeFlags::Default );
pOut->SetLineColor( *pLast );
pOut->SetFillColor( *pLast );
@@ -1098,11 +1098,11 @@ void SwLineRects::PaintLines( OutputDevice *pOut, SwPaintProperties &properties
{
pLast = &rLRect.GetColor();
- sal_uLong nOldDrawMode = pOut->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOut->GetDrawMode();
if( properties.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- pOut->SetDrawMode( 0 );
+ pOut->SetDrawMode( DrawModeFlags::Default );
}
pOut->SetFillColor( *pLast );
@@ -1186,11 +1186,11 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
// Reset draw mode in high contrast mode in order to get fill color
// set at output device. Recover draw mode after draw of lines.
// Necessary for the subsidiary lines painted by the fly frames.
- sal_uLong nOldDrawMode = pOut->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOut->GetDrawMode();
if( gProp.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- pOut->SetDrawMode( 0 );
+ pOut->SetDrawMode( DrawModeFlags::Default );
}
for (SwSubsRects::iterator it = aLineRects.begin(); it != aLineRects.end();
@@ -2206,11 +2206,11 @@ void DrawGraphic(
}
// #i75614# reset draw mode in high contrast mode in order to get fill color set
- const sal_uLong nOldDrawMode = pOutDev->GetDrawMode();
+ const DrawModeFlags nOldDrawMode = pOutDev->GetDrawMode();
if ( gProp.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- pOutDev->SetDrawMode( 0 );
+ pOutDev->SetDrawMode( DrawModeFlags::Default );
}
// OD 06.08.2002 #99657# - if background region has to be drawn
@@ -2574,12 +2574,12 @@ void SwTabFrmPainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) const
// high contrast mode:
// overrides the color of non-subsidiary lines.
const Color* pHCColor = 0;
- sal_uLong nOldDrawMode = rDev.GetDrawMode();
+ DrawModeFlags nOldDrawMode = rDev.GetDrawMode();
if( gProp.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
pHCColor = &SwViewOption::GetFontColor();
- rDev.SetDrawMode( 0 );
+ rDev.SetDrawMode( DrawModeFlags::Default );
}
const SwFrm* pUpper = mrTabFrm.GetUpper();
@@ -4588,16 +4588,16 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect,
vcl::RenderContext *pOut = properties.pSGlobalShell->GetOut();
- sal_uLong nOldDrawMode = pOut->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOut->GetDrawMode();
Color aShadowColor( rShadow.GetColor().GetRGBColor() );
if( !aRegion.empty() && properties.pSGlobalShell->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
{
// In high contrast mode, the output device has already set the
- // DRAWMODE_SETTINGSFILL flag. This causes the SetFillColor function
+ // DrawModeFlags::SettingsFill flag. This causes the SetFillColor function
// to ignore the setting of a new color. Therefore we have to reset
// the drawing mode
- pOut->SetDrawMode( 0 );
+ pOut->SetDrawMode( DrawModeFlags::Default );
aShadowColor = SwViewOption::GetFontColor();
}
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index c9bf7159e5cd..01cf7e6f77b5 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -93,13 +93,13 @@ void SwViewShellImp::PaintLayer( const SdrLayerID _nLayerID,
{
//change the draw mode in high contrast mode
OutputDevice* pOutDev = GetShell()->GetOut();
- sal_uLong nOldDrawMode = pOutDev->GetDrawMode();
+ DrawModeFlags nOldDrawMode = pOutDev->GetDrawMode();
if( GetShell()->GetWin() &&
Application::GetSettings().GetStyleSettings().GetHighContrastMode() &&
(!GetShell()->IsPreview()||SW_MOD()->GetAccessibilityOptions().GetIsForPagePreviews()))
{
- pOutDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL |
- DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT );
+ pOutDev->SetDrawMode( nOldDrawMode | DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill |
+ DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient );
}
// For correct handling of accessibility, high contrast, the
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index cd2bbfeb4a00..ddb2aa03e877 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -909,9 +909,9 @@ void AutoFmtPreview::NotifyChange( const SwTableAutoFmt& rNewData )
void AutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext, const Rectangle& /*rRect*/)
{
- sal_uInt32 nOldDrawMode = aVD->GetDrawMode();
+ DrawModeFlags nOldDrawMode = aVD->GetDrawMode();
if (rRenderContext.GetSettings().GetStyleSettings().GetHighContrastMode())
- aVD->SetDrawMode(DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT);
+ aVD->SetDrawMode(DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient);
Bitmap thePreview;
Point aCenterPos;
diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm
index cd37d5fc4119..d936c4ac576d 100644
--- a/vcl/osx/printaccessoryview.mm
+++ b/vcl/osx/printaccessoryview.mm
@@ -301,8 +301,8 @@ class ControllerProperties
PrinterController::PageSize aPageSize( mpController->getFilteredPageFile( i_nPage, aMtf, false ) );
auto aDev(VclPtr<VirtualDevice>::Create());
if( mpController->getPrinter()->GetPrinterOptions().IsConvertToGreyscales() )
- aDev->SetDrawMode( aDev->GetDrawMode() | ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
- DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
+ aDev->SetDrawMode( aDev->GetDrawMode() | ( DrawModeFlags::GrayLine | DrawModeFlags::GrayFill | DrawModeFlags::GrayText |
+ DrawModeFlags::GrayBitmap | DrawModeFlags::GrayGradient ) );
// see salprn.cxx, currently we pretend to be a 720dpi device on printers
aDev->SetReferenceDevice( 720, 720 );
aDev->EnableOutput( TRUE );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index f995b78f1583..cdfccbb41a37 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10943,8 +10943,8 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
aDev->SetMapMode( MapMode( MAP_PIXEL ) );
if( m_aContext.ColorMode == PDFWriter::DrawGreyscale )
aDev->SetDrawMode( aDev->GetDrawMode() |
- ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
- DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
+ ( DrawModeFlags::GrayLine | DrawModeFlags::GrayFill | DrawModeFlags::GrayText |
+ DrawModeFlags::GrayBitmap | DrawModeFlags::GrayGradient ) );
aDev->DrawGradient( Rectangle( Point( 0, 0 ), rObject.m_aSize ), rObject.m_aGradient );
Bitmap aSample = aDev->GetBitmap( Point( 0, 0 ), rObject.m_aSize );
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 9dc93114ff95..1bea52978961 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -465,8 +465,8 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
xVDev->SetLineColor( COL_BLACK );
xVDev->SetFillColor( COL_BLACK );
xVDev->DrawRect( Rectangle( aPoint, aDstSize ) );
- xVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT |
- DRAWMODE_WHITEBITMAP | DRAWMODE_WHITEGRADIENT );
+ xVDev->SetDrawMode( DrawModeFlags::WhiteLine | DrawModeFlags::WhiteFill | DrawModeFlags::WhiteText |
+ DrawModeFlags::WhiteBitmap | DrawModeFlags::WhiteGradient );
aTmpMtf.WindStart();
aTmpMtf.Play( xVDev.get(), aPoint, aDstSize );
aTmpMtf.WindStart();
@@ -475,9 +475,9 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
xVDev->EnableMapMode( true );
// create alpha mask from gradient
- xVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT );
+ xVDev->SetDrawMode( DrawModeFlags::GrayGradient );
xVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient );
- xVDev->SetDrawMode( DRAWMODE_DEFAULT );
+ xVDev->SetDrawMode( DrawModeFlags::Default );
xVDev->EnableMapMode( false );
xVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) );
aAlpha = xVDev->GetBitmap( aPoint, aDstSizePixel );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index b8ed8d5afb9d..e29d1cc72b19 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1202,9 +1202,9 @@ int PrinterController::getFilteredPageCount()
return (getPageCountProtected() * mpImplData->maMultiPage.nRepeat + (nDiv-1)) / nDiv;
}
-sal_uLong PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut )
+DrawModeFlags PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut )
{
- sal_uLong nRestoreDrawMode = mpImplData->mxPrinter->GetDrawMode();
+ DrawModeFlags nRestoreDrawMode = mpImplData->mxPrinter->GetDrawMode();
sal_Int32 nMaxBmpDPIX = mpImplData->mxPrinter->GetDPIX();
sal_Int32 nMaxBmpDPIY = mpImplData->mxPrinter->GetDPIY();
@@ -1237,14 +1237,14 @@ sal_uLong PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFi
if( rPrinterOptions.IsConvertToGreyscales() )
{
mpImplData->mxPrinter->SetDrawMode( mpImplData->mxPrinter->GetDrawMode() |
- ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
- DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
+ ( DrawModeFlags::GrayLine | DrawModeFlags::GrayFill | DrawModeFlags::GrayText |
+ DrawModeFlags::GrayBitmap | DrawModeFlags::GrayGradient ) );
}
// disable transparency output
if( rPrinterOptions.IsReduceTransparency() && ( PRINTER_TRANSPARENCY_NONE == rPrinterOptions.GetReducedTransparencyMode() ) )
{
- mpImplData->mxPrinter->SetDrawMode( mpImplData->mxPrinter->GetDrawMode() | DRAWMODE_NOTRANSPARENCY );
+ mpImplData->mxPrinter->SetDrawMode( mpImplData->mxPrinter->GetDrawMode() | DrawModeFlags::NoTransparency );
}
Color aBg( COL_TRANSPARENT ); // default: let RemoveTransparenciesFromMetaFile do its own background logic
@@ -1306,7 +1306,7 @@ void PrinterController::printFilteredPage( int i_nPage )
}
GDIMetaFile aCleanedFile;
- sal_uLong nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
+ DrawModeFlags nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile );
mpImplData->mxPrinter->EnableOutput( true );
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index b39dbb2bbc9d..a924d5bf45f7 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -52,7 +52,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
if( ImplIsRecordLayout() )
return;
- if ( ( mnDrawMode & DRAWMODE_NOBITMAP ) )
+ if ( ( mnDrawMode & DrawModeFlags::NoBitmap ) )
{
return;
}
@@ -64,15 +64,15 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
Bitmap aBmp( rBitmap );
- if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
- DRAWMODE_GRAYBITMAP | DRAWMODE_GHOSTEDBITMAP ) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap |
+ DrawModeFlags::GrayBitmap | DrawModeFlags::GhostedBitmap ) )
{
- if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap ) )
{
sal_uInt8 cCmpVal;
- if ( mnDrawMode & DRAWMODE_BLACKBITMAP )
- cCmpVal = ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 0x80 : 0;
+ if ( mnDrawMode & DrawModeFlags::BlackBitmap )
+ cCmpVal = ( mnDrawMode & DrawModeFlags::GhostedBitmap ) ? 0x80 : 0;
else
cCmpVal = 255;
@@ -86,10 +86,10 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
}
else if( !!aBmp )
{
- if ( mnDrawMode & DRAWMODE_GRAYBITMAP )
+ if ( mnDrawMode & DrawModeFlags::GrayBitmap )
aBmp.Convert( BMP_CONVERSION_8BIT_GREYS );
- if ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP )
+ if ( mnDrawMode & DrawModeFlags::GhostedBitmap )
aBmp.Convert( BMP_CONVERSION_GHOSTED );
}
}
@@ -274,7 +274,7 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
}
else
{
- if ( mnDrawMode & DRAWMODE_NOBITMAP )
+ if ( mnDrawMode & DrawModeFlags::NoBitmap )
return;
if ( ROP_INVERT == meRasterOp )
@@ -285,16 +285,16 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
BitmapEx aBmpEx( rBitmapEx );
- if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP |
- DRAWMODE_GRAYBITMAP | DRAWMODE_GHOSTEDBITMAP ) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap |
+ DrawModeFlags::GrayBitmap | DrawModeFlags::GhostedBitmap ) )
{
- if ( mnDrawMode & ( DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP ) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap ) )
{
- Bitmap aColorBmp( aBmpEx.GetSizePixel(), ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 4 : 1 );
+ Bitmap aColorBmp( aBmpEx.GetSizePixel(), ( mnDrawMode & DrawModeFlags::GhostedBitmap ) ? 4 : 1 );
sal_uInt8 cCmpVal;
- if ( mnDrawMode & DRAWMODE_BLACKBITMAP )
- cCmpVal = ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP ) ? 0x80 : 0;
+ if ( mnDrawMode & DrawModeFlags::BlackBitmap )
+ cCmpVal = ( mnDrawMode & DrawModeFlags::GhostedBitmap ) ? 0x80 : 0;
else
cCmpVal = 255;
@@ -318,10 +318,10 @@ void OutputDevice::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize,
}
else if( !!aBmpEx )
{
- if ( mnDrawMode & DRAWMODE_GRAYBITMAP )
+ if ( mnDrawMode & DrawModeFlags::GrayBitmap )
aBmpEx.Convert( BMP_CONVERSION_8BIT_GREYS );
- if ( mnDrawMode & DRAWMODE_GHOSTEDBITMAP )
+ if ( mnDrawMode & DrawModeFlags::GhostedBitmap )
aBmpEx.Convert( BMP_CONVERSION_GHOSTED );
}
}
@@ -1143,7 +1143,7 @@ void OutputDevice::DrawTransformedBitmapEx(
if(rBitmapEx.IsEmpty())
return;
- if ( mnDrawMode & DRAWMODE_NOBITMAP )
+ if ( mnDrawMode & DrawModeFlags::NoBitmap )
return;
// decompose matrix to check rotation and shear
@@ -1174,7 +1174,7 @@ void OutputDevice::DrawTransformedBitmapEx(
// we have rotation,shear or mirror, check if some crazy mode needs the
// created transformed bitmap
const bool bInvert(ROP_INVERT == meRasterOp);
- const bool bBitmapChangedColor(mnDrawMode & (DRAWMODE_BLACKBITMAP | DRAWMODE_WHITEBITMAP | DRAWMODE_GRAYBITMAP | DRAWMODE_GHOSTEDBITMAP));
+ const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap | DrawModeFlags::GhostedBitmap));
const bool bMetafile(mpMetaFile);
bool bDone(false);
const basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * rTransformation);
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 2c6e27f9c710..981cfac58a6b 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -41,7 +41,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
const Gradient& rGradient )
{
- if ( mnDrawMode & DRAWMODE_NOGRADIENT )
+ if ( mnDrawMode & DrawModeFlags::NoGradient )
return; // nothing to draw!
if ( mbInitClipRegion )
@@ -52,7 +52,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
if ( rPolyPoly.Count() && rPolyPoly[ 0 ].GetSize() )
{
- if ( mnDrawMode & ( DRAWMODE_BLACKGRADIENT | DRAWMODE_WHITEGRADIENT | DRAWMODE_SETTINGSGRADIENT) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackGradient | DrawModeFlags::WhiteGradient | DrawModeFlags::SettingsGradient) )
{
Color aColor = GetSingleColorGradientFill();
@@ -66,7 +66,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
Gradient aGradient( rGradient );
- if ( mnDrawMode & ( DRAWMODE_GRAYGRADIENT | DRAWMODE_GHOSTEDGRADIENT ) )
+ if ( mnDrawMode & ( DrawModeFlags::GrayGradient | DrawModeFlags::GhostedGradient ) )
{
SetGrayscaleColors( aGradient );
}
@@ -174,7 +174,7 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly,
{
Gradient aGradient( rGradient );
- if ( mnDrawMode & ( DRAWMODE_GRAYGRADIENT | DRAWMODE_GHOSTEDGRADIENT ) )
+ if ( mnDrawMode & ( DrawModeFlags::GrayGradient | DrawModeFlags::GhostedGradient ) )
{
SetGrayscaleColors( aGradient );
}
@@ -941,16 +941,16 @@ Color OutputDevice::GetSingleColorGradientFill()
Color aColor;
// we should never call on this function if any of these aren't set!
- assert( mnDrawMode & ( DRAWMODE_BLACKGRADIENT | DRAWMODE_WHITEGRADIENT | DRAWMODE_SETTINGSGRADIENT) );
+ assert( mnDrawMode & ( DrawModeFlags::BlackGradient | DrawModeFlags::WhiteGradient | DrawModeFlags::SettingsGradient) );
- if ( mnDrawMode & DRAWMODE_BLACKGRADIENT )
+ if ( mnDrawMode & DrawModeFlags::BlackGradient )
aColor = Color( COL_BLACK );
- else if ( mnDrawMode & DRAWMODE_WHITEGRADIENT )
+ else if ( mnDrawMode & DrawModeFlags::WhiteGradient )
aColor = Color( COL_WHITE );
- else if ( mnDrawMode & DRAWMODE_SETTINGSGRADIENT )
+ else if ( mnDrawMode & DrawModeFlags::SettingsGradient )
aColor = GetSettings().GetStyleSettings().GetWindowColor();
- if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
+ if ( mnDrawMode & DrawModeFlags::GhostedGradient )
{
aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
( aColor.GetGreen() >> 1 ) | 0x80,
@@ -963,19 +963,19 @@ Color OutputDevice::GetSingleColorGradientFill()
void OutputDevice::SetGrayscaleColors( Gradient &rGradient )
{
// this should only be called with the drawing mode is for grayscale or ghosted gradients
- assert ( mnDrawMode & ( DRAWMODE_GRAYGRADIENT | DRAWMODE_GHOSTEDGRADIENT ) );
+ assert ( mnDrawMode & ( DrawModeFlags::GrayGradient | DrawModeFlags::GhostedGradient ) );
Color aStartCol( rGradient.GetStartColor() );
Color aEndCol( rGradient.GetEndColor() );
- if ( mnDrawMode & DRAWMODE_GRAYGRADIENT )
+ if ( mnDrawMode & DrawModeFlags::GrayGradient )
{
sal_uInt8 cStartLum = aStartCol.GetLuminance(), cEndLum = aEndCol.GetLuminance();
aStartCol = Color( cStartLum, cStartLum, cStartLum );
aEndCol = Color( cEndLum, cEndLum, cEndLum );
}
- if ( mnDrawMode & DRAWMODE_GHOSTEDGRADIENT )
+ if ( mnDrawMode & DrawModeFlags::GhostedGradient )
{
aStartCol = Color( ( aStartCol.GetRed() >> 1 ) | 0x80,
( aStartCol.GetGreen() >> 1 ) | 0x80,
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 834c6e73953b..928c07f7b088 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -46,27 +46,27 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
Hatch aHatch( rHatch );
- if ( mnDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
- DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE |
- DRAWMODE_SETTINGSLINE ) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackLine | DrawModeFlags::WhiteLine |
+ DrawModeFlags::GrayLine | DrawModeFlags::GhostedLine |
+ DrawModeFlags::SettingsLine ) )
{
Color aColor( rHatch.GetColor() );
- if ( mnDrawMode & DRAWMODE_BLACKLINE )
+ if ( mnDrawMode & DrawModeFlags::BlackLine )
aColor = Color( COL_BLACK );
- else if ( mnDrawMode & DRAWMODE_WHITELINE )
+ else if ( mnDrawMode & DrawModeFlags::WhiteLine )
aColor = Color( COL_WHITE );
- else if ( mnDrawMode & DRAWMODE_GRAYLINE )
+ else if ( mnDrawMode & DrawModeFlags::GrayLine )
{
const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
- else if( mnDrawMode & DRAWMODE_SETTINGSLINE )
+ else if( mnDrawMode & DrawModeFlags::SettingsLine )
{
aColor = GetSettings().GetStyleSettings().GetFontColor();
}
- if ( mnDrawMode & DRAWMODE_GHOSTEDLINE )
+ if ( mnDrawMode & DrawModeFlags::GhostedLine )
{
aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
( aColor.GetGreen() >> 1 ) | 0x80,
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 0fb1d342a560..5724a8647b73 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -117,7 +117,7 @@ OutputDevice::OutputDevice() :
mnOutOffLogicY = 0;
mnEmphasisAscent = 0;
mnEmphasisDescent = 0;
- mnDrawMode = 0;
+ mnDrawMode = DrawModeFlags::Default;
mnTextLayoutMode = TEXT_LAYOUT_DEFAULT;
if( AllSettings::GetLayoutRTL() ) //#i84553# tip BiDi preference to RTL
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index 155efed74888..a6cf8982a48f 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -284,7 +284,7 @@ void OutputDevice::SetAntialiasing( sal_uInt16 nMode )
mpAlphaVDev->SetAntialiasing( nMode );
}
-void OutputDevice::SetDrawMode( sal_uLong nDrawMode )
+void OutputDevice::SetDrawMode( DrawModeFlags nDrawMode )
{
mnDrawMode = nDrawMode;
@@ -357,35 +357,35 @@ void OutputDevice::SetFillColor( const Color& rColor )
Color aColor( rColor );
- if( mnDrawMode & ( DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL |
- DRAWMODE_GRAYFILL | DRAWMODE_NOFILL |
- DRAWMODE_GHOSTEDFILL | DRAWMODE_SETTINGSFILL ) )
+ if( mnDrawMode & ( DrawModeFlags::BlackFill | DrawModeFlags::WhiteFill |
+ DrawModeFlags::GrayFill | DrawModeFlags::NoFill |
+ DrawModeFlags::GhostedFill | DrawModeFlags::SettingsFill ) )
{
if( !ImplIsColorTransparent( aColor ) )
{
- if( mnDrawMode & DRAWMODE_BLACKFILL )
+ if( mnDrawMode & DrawModeFlags::BlackFill )
{
aColor = Color( COL_BLACK );
}
- else if( mnDrawMode & DRAWMODE_WHITEFILL )
+ else if( mnDrawMode & DrawModeFlags::WhiteFill )
{
aColor = Color( COL_WHITE );
}
- else if( mnDrawMode & DRAWMODE_GRAYFILL )
+ else if( mnDrawMode & DrawModeFlags::GrayFill )
{
const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
- else if( mnDrawMode & DRAWMODE_NOFILL )
+ else if( mnDrawMode & DrawModeFlags::NoFill )
{
aColor = Color( COL_TRANSPARENT );
}
- else if( mnDrawMode & DRAWMODE_SETTINGSFILL )
+ else if( mnDrawMode & DrawModeFlags::SettingsFill )
{
aColor = GetSettings().GetStyleSettings().GetWindowColor();
}
- if( mnDrawMode & DRAWMODE_GHOSTEDFILL )
+ if( mnDrawMode & DrawModeFlags::GhostedFill )
{
aColor = Color( (aColor.GetRed() >> 1) | 0x80,
(aColor.GetGreen() >> 1) | 0x80,
@@ -497,25 +497,25 @@ void OutputDevice::SetFont( const vcl::Font& rNewFont )
vcl::Font aFont( rNewFont );
aFont.SetLanguage(rNewFont.GetLanguage());
- if ( mnDrawMode & (DRAWMODE_BLACKTEXT | DRAWMODE_WHITETEXT | DRAWMODE_GRAYTEXT | DRAWMODE_GHOSTEDTEXT | DRAWMODE_SETTINGSTEXT |
- DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL | DRAWMODE_GRAYFILL | DRAWMODE_NOFILL |
- DRAWMODE_GHOSTEDFILL | DRAWMODE_SETTINGSFILL ) )
+ if ( mnDrawMode & (DrawModeFlags::BlackText | DrawModeFlags::WhiteText | DrawModeFlags::GrayText | DrawModeFlags::GhostedText | DrawModeFlags::SettingsText |
+ DrawModeFlags::BlackFill | DrawModeFlags::WhiteFill | DrawModeFlags::GrayFill | DrawModeFlags::NoFill |
+ DrawModeFlags::GhostedFill | DrawModeFlags::SettingsFill ) )
{
Color aTextColor( aFont.GetColor() );
- if ( mnDrawMode & DRAWMODE_BLACKTEXT )
+ if ( mnDrawMode & DrawModeFlags::BlackText )
aTextColor = Color( COL_BLACK );
- else if ( mnDrawMode & DRAWMODE_WHITETEXT )
+ else if ( mnDrawMode & DrawModeFlags::WhiteText )
aTextColor = Color( COL_WHITE );
- else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
+ else if ( mnDrawMode & DrawModeFlags::GrayText )
{
const sal_uInt8 cLum = aTextColor.GetLuminance();
aTextColor = Color( cLum, cLum, cLum );
}
- else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
+ else if ( mnDrawMode & DrawModeFlags::SettingsText )
aTextColor = GetSettings().GetStyleSettings().GetFontColor();
- if ( mnDrawMode & DRAWMODE_GHOSTEDTEXT )
+ if ( mnDrawMode & DrawModeFlags::GhostedText )
{
aTextColor = Color( (aTextColor.GetRed() >> 1 ) | 0x80,
(aTextColor.GetGreen() >> 1 ) | 0x80,
@@ -529,24 +529,24 @@ void OutputDevice::SetFont( const vcl::Font& rNewFont )
{
Color aTextFillColor( aFont.GetFillColor() );
- if ( mnDrawMode & DRAWMODE_BLACKFILL )
+ if ( mnDrawMode & DrawModeFlags::BlackFill )
aTextFillColor = Color( COL_BLACK );
- else if ( mnDrawMode & DRAWMODE_WHITEFILL )
+ else if ( mnDrawMode & DrawModeFlags::WhiteFill )
aTextFillColor = Color( COL_WHITE );
- else if ( mnDrawMode & DRAWMODE_GRAYFILL )
+ else if ( mnDrawMode & DrawModeFlags::GrayFill )
{
const sal_uInt8 cLum = aTextFillColor.GetLuminance();
aTextFillColor = Color( cLum, cLum, cLum );
}
- else if( mnDrawMode & DRAWMODE_SETTINGSFILL )
+ else if( mnDrawMode & DrawModeFlags::SettingsFill )
aTextFillColor = GetSettings().GetStyleSettings().GetWindowColor();
- else if ( mnDrawMode & DRAWMODE_NOFILL )
+ else if ( mnDrawMode & DrawModeFlags::NoFill )
{
aTextFillColor = Color( COL_TRANSPARENT );
bTransFill = true;
}
- if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) )
+ if ( !bTransFill && (mnDrawMode & DrawModeFlags::GhostedFill) )
{
aTextFillColor = Color( (aTextFillColor.GetRed() >> 1) | 0x80,
(aTextFillColor.GetGreen() >> 1) | 0x80,
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index e860df14073c..fbef3085fc57 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -706,23 +706,23 @@ void OutputDevice::SetTextColor( const Color& rColor )
Color aColor( rColor );
- if ( mnDrawMode & ( DRAWMODE_BLACKTEXT | DRAWMODE_WHITETEXT |
- DRAWMODE_GRAYTEXT | DRAWMODE_GHOSTEDTEXT |
- DRAWMODE_SETTINGSTEXT ) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackText | DrawModeFlags::WhiteText |
+ DrawModeFlags::GrayText | DrawModeFlags::GhostedText |
+ DrawModeFlags::SettingsText ) )
{
- if ( mnDrawMode & DRAWMODE_BLACKTEXT )
+ if ( mnDrawMode & DrawModeFlags::BlackText )
aColor = Color( COL_BLACK );
- else if ( mnDrawMode & DRAWMODE_WHITETEXT )
+ else if ( mnDrawMode & DrawModeFlags::WhiteText )
aColor = Color( COL_WHITE );
- else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
+ else if ( mnDrawMode & DrawModeFlags::GrayText )
{
const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
- else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
+ else if ( mnDrawMode & DrawModeFlags::SettingsText )
aColor = GetSettings().GetStyleSettings().GetFontColor();
- if ( mnDrawMode & DRAWMODE_GHOSTEDTEXT )
+ if ( mnDrawMode & DrawModeFlags::GhostedText )
{
aColor = Color( (aColor.GetRed() >> 1) | 0x80,
(aColor.GetGreen() >> 1) | 0x80,
@@ -767,28 +767,28 @@ void OutputDevice::SetTextFillColor( const Color& rColor )
if ( !bTransFill )
{
- if ( mnDrawMode & ( DRAWMODE_BLACKFILL | DRAWMODE_WHITEFILL |
- DRAWMODE_GRAYFILL | DRAWMODE_NOFILL |
- DRAWMODE_GHOSTEDFILL | DRAWMODE_SETTINGSFILL ) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackFill | DrawModeFlags::WhiteFill |
+ DrawModeFlags::GrayFill | DrawModeFlags::NoFill |
+ DrawModeFlags::GhostedFill | DrawModeFlags::SettingsFill ) )
{
- if ( mnDrawMode & DRAWMODE_BLACKFILL )
+ if ( mnDrawMode & DrawModeFlags::BlackFill )
aColor = Color( COL_BLACK );
- else if ( mnDrawMode & DRAWMODE_WHITEFILL )
+ else if ( mnDrawMode & DrawModeFlags::WhiteFill )
aColor = Color( COL_WHITE );
- else if ( mnDrawMode & DRAWMODE_GRAYFILL )
+ else if ( mnDrawMode & DrawModeFlags::GrayFill )
{
const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
- else if( mnDrawMode & DRAWMODE_SETTINGSFILL )
+ else if( mnDrawMode & DrawModeFlags::SettingsFill )
aColor = GetSettings().GetStyleSettings().GetWindowColor();
- else if ( mnDrawMode & DRAWMODE_NOFILL )
+ else if ( mnDrawMode & DrawModeFlags::NoFill )
{
aColor = Color( COL_TRANSPARENT );
bTransFill = true;
}
- if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) )
+ if ( !bTransFill && (mnDrawMode & DrawModeFlags::GhostedFill) )
{
aColor = Color( (aColor.GetRed() >> 1) | 0x80,
(aColor.GetGreen() >> 1) | 0x80,
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 8b680809dceb..9f3820f3d8ca 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -837,29 +837,29 @@ void OutputDevice::SetTextLineColor( const Color& rColor )
Color aColor( rColor );
- if ( mnDrawMode & ( DRAWMODE_BLACKTEXT | DRAWMODE_WHITETEXT |
- DRAWMODE_GRAYTEXT | DRAWMODE_GHOSTEDTEXT |
- DRAWMODE_SETTINGSTEXT ) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackText | DrawModeFlags::WhiteText |
+ DrawModeFlags::GrayText | DrawModeFlags::GhostedText |
+ DrawModeFlags::SettingsText ) )
{
- if ( mnDrawMode & DRAWMODE_BLACKTEXT )
+ if ( mnDrawMode & DrawModeFlags::BlackText )
{
aColor = Color( COL_BLACK );
}
- else if ( mnDrawMode & DRAWMODE_WHITETEXT )
+ else if ( mnDrawMode & DrawModeFlags::WhiteText )
{
aColor = Color( COL_WHITE );
}
- else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
+ else if ( mnDrawMode & DrawModeFlags::GrayText )
{
const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
- else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
+ else if ( mnDrawMode & DrawModeFlags::SettingsText )
{
aColor = GetSettings().GetStyleSettings().GetFontColor();
}
- if( (mnDrawMode & DRAWMODE_GHOSTEDTEXT) &&
+ if( (mnDrawMode & DrawModeFlags::GhostedText) &&
(aColor.GetColor() != COL_TRANSPARENT) )
{
aColor = Color( (aColor.GetRed() >> 1) | 0x80,
@@ -894,29 +894,29 @@ void OutputDevice::SetOverlineColor( const Color& rColor )
Color aColor( rColor );
- if ( mnDrawMode & ( DRAWMODE_BLACKTEXT | DRAWMODE_WHITETEXT |
- DRAWMODE_GRAYTEXT | DRAWMODE_GHOSTEDTEXT |
- DRAWMODE_SETTINGSTEXT ) )
+ if ( mnDrawMode & ( DrawModeFlags::BlackText | DrawModeFlags::WhiteText |
+ DrawModeFlags::GrayText | DrawModeFlags::GhostedText |
+ DrawModeFlags::SettingsText ) )
{
- if ( mnDrawMode & DRAWMODE_BLACKTEXT )
+ if ( mnDrawMode & DrawModeFlags::BlackText )
{
aColor = Color( COL_BLACK );
}
- else if ( mnDrawMode & DRAWMODE_WHITETEXT )
+ else if ( mnDrawMode & DrawModeFlags::WhiteText )
{
aColor = Color( COL_WHITE );
}
- else if ( mnDrawMode & DRAWMODE_GRAYTEXT )
+ else if ( mnDrawMode & DrawModeFlags::GrayText )
{
const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
- else if ( mnDrawMode & DRAWMODE_SETTINGSTEXT )
+ else if ( mnDrawMode & DrawModeFlags::SettingsText )
{
aColor = GetSettings().GetStyleSettings().GetFontColor();
}
- if( (mnDrawMode & DRAWMODE_GHOSTEDTEXT) &&
+ if( (mnDrawMode & DrawModeFlags::GhostedText) &&
(aColor.GetColor() != COL_TRANSPARENT) )
{
aColor = Color( (aColor.GetRed() >> 1) | 0x80,
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 17eccc28748f..52d245d13cf0 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -72,33 +72,33 @@ namespace
Color OutputDevice::ImplDrawModeToColor( const Color& rColor ) const
{
Color aColor( rColor );
- sal_uLong nDrawMode = GetDrawMode();
+ DrawModeFlags nDrawMode = GetDrawMode();
- if( nDrawMode & ( DRAWMODE_BLACKLINE | DRAWMODE_WHITELINE |
- DRAWMODE_GRAYLINE | DRAWMODE_GHOSTEDLINE |
- DRAWMODE_SETTINGSLINE ) )
+ if( nDrawMode & ( DrawModeFlags::BlackLine | DrawModeFlags::WhiteLine |
+ DrawModeFlags::GrayLine | DrawModeFlags::GhostedLine |
+ DrawModeFlags::SettingsLine ) )
{
if( !ImplIsColorTransparent( aColor ) )
{
- if( nDrawMode & DRAWMODE_BLACKLINE )
+ if( nDrawMode & DrawModeFlags::BlackLine )
{
aColor = Color( COL_BLACK );
}
- else if( nDrawMode & DRAWMODE_WHITELINE )
+ else if( nDrawMode & DrawModeFlags::WhiteLine )
{
aColor = Color( COL_WHITE );
}
- else if( nDrawMode & DRAWMODE_GRAYLINE )
+ else if( nDrawMode & DrawModeFlags::GrayLine )
{
const sal_uInt8 cLum = aColor.GetLuminance();
aColor = Color( cLum, cLum, cLum );
}
- else if( nDrawMode & DRAWMODE_SETTINGSLINE )
+ else if( nDrawMode & DrawModeFlags::SettingsLine )
{
aColor = GetSettings().GetStyleSettings().GetFontColor();
}
- if( nDrawMode & DRAWMODE_GHOSTEDLINE )
+ if( nDrawMode & DrawModeFlags::GhostedLine )
{
aColor = Color( ( aColor.GetRed() >> 1 ) | 0x80,
( aColor.GetGreen() >> 1 ) | 0x80,
@@ -601,7 +601,7 @@ void OutputDevice::DrawTransparent( const tools::PolyPolygon& rPolyPoly,
sal_uInt16 nTransparencePercent )
{
// short circuit for drawing an opaque polygon
- if( (nTransparencePercent < 1) || ((mnDrawMode & DRAWMODE_NOTRANSPARENCY) != 0) )
+ if( (nTransparencePercent < 1) || (mnDrawMode & DrawModeFlags::NoTransparency) )
{
DrawPolyPolygon( rPolyPoly );
return;
@@ -663,7 +663,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
return;
if( ( rTransparenceGradient.GetStartColor() == aBlack && rTransparenceGradient.GetEndColor() == aBlack ) ||
- ( mnDrawMode & ( DRAWMODE_NOTRANSPARENCY ) ) )
+ ( mnDrawMode & ( DrawModeFlags::NoTransparency ) ) )
{
( (GDIMetaFile&) rMtf ).WindStart();
( (GDIMetaFile&) rMtf ).Play( this, rPos, rSize );
@@ -731,9 +731,9 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
// create alpha mask from gradient and get as Bitmap
xVDev->EnableMapMode(bBufferMapModeEnabled);
- xVDev->SetDrawMode(DRAWMODE_GRAYGRADIENT);
+ xVDev->SetDrawMode(DrawModeFlags::GrayGradient);
xVDev->DrawGradient(Rectangle(rPos, rSize), rTransparenceGradient);
- xVDev->SetDrawMode(DRAWMODE_DEFAULT);
+ xVDev->SetDrawMode(DrawModeFlags::Default);
xVDev->EnableMapMode(false);
const AlphaMask aAlpha(xVDev->GetBitmap(aPoint, xVDev->GetOutputSizePixel()));
@@ -768,8 +768,8 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
xVDev->SetLineColor( COL_BLACK );
xVDev->SetFillColor( COL_BLACK );
xVDev->DrawRect( Rectangle( xVDev->PixelToLogic( Point() ), xVDev->GetOutputSize() ) );
- xVDev->SetDrawMode( DRAWMODE_WHITELINE | DRAWMODE_WHITEFILL | DRAWMODE_WHITETEXT |
- DRAWMODE_WHITEBITMAP | DRAWMODE_WHITEGRADIENT );
+ xVDev->SetDrawMode( DrawModeFlags::WhiteLine | DrawModeFlags::WhiteFill | DrawModeFlags::WhiteText |
+ DrawModeFlags::WhiteBitmap | DrawModeFlags::WhiteGradient );
( (GDIMetaFile&) rMtf ).WindStart();
( (GDIMetaFile&) rMtf ).Play( xVDev.get(), rPos, rSize );
( (GDIMetaFile&) rMtf ).WindStart();
@@ -778,9 +778,9 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
xVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here!
// create alpha mask from gradient
- xVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT );
+ xVDev->SetDrawMode( DrawModeFlags::GrayGradient );
xVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient );
- xVDev->SetDrawMode( DRAWMODE_DEFAULT );
+ xVDev->SetDrawMode( DrawModeFlags::Default );
xVDev->EnableMapMode( false );
xVDev->DrawMask( Point(), xVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) );
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 9901843401ca..65afa5908434 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -280,11 +280,11 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap()
maPageVDev->Erase();
maPageVDev->Push();
maPageVDev->SetMapMode( MAP_100TH_MM );
- sal_uLong nOldDrawMode = maPageVDev->GetDrawMode();
+ DrawModeFlags nOldDrawMode = maPageVDev->GetDrawMode();
if( mbGreyscale )
maPageVDev->SetDrawMode( maPageVDev->GetDrawMode() |
- ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
- DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
+ ( DrawModeFlags::GrayLine | DrawModeFlags::GrayFill | DrawModeFlags::GrayText |
+ DrawModeFlags::GrayBitmap | DrawModeFlags::GrayGradient ) );
aMtf.WindStart();
aMtf.Scale( fScale, fScale );
aMtf.WindStart();