summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-10-06 14:48:16 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-13 17:45:57 +0200
commitaf5ebbf7835441c767f91a620f109ee6722e57bd (patch)
treec72b2a1ddb5aa0a0a369be7babd516a5592d5fac
parent1156d11ef0bb2bc3d71ae9299656db4fed66f073 (diff)
create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, changed from a macro- to a template-based solution. (Unfortunately MSVC 2012 does not support explicit conversion operators. Worked around that with explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a baseline that requires unconditional support for them.) Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx8
-rw-r--r--canvas/source/vcl/spritecanvashelper.cxx2
-rw-r--r--canvas/source/vcl/spritehelper.cxx2
-rw-r--r--cppcanvas/source/inc/outdevstate.hxx2
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx36
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx2
-rw-r--r--dbaccess/source/ui/browser/dataview.cxx2
-rw-r--r--dbaccess/source/ui/control/listviewitems.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx2
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx44
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx2
-rw-r--r--editeng/qa/items/borderline_test.cxx4
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx12
-rw-r--r--editeng/source/items/borderline.cxx8
-rw-r--r--editeng/source/items/frmitems.cxx8
-rw-r--r--editeng/source/misc/hangulhanja.cxx2
-rw-r--r--filter/source/flash/swfwriter1.cxx2
-rw-r--r--filter/source/graphicfilter/ieps/ieps.cxx2
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx6
-rw-r--r--filter/source/pdf/pdfexport.cxx4
-rw-r--r--forms/source/richtext/richtextimplcontrol.cxx4
-rw-r--r--include/o3tl/typed_flags_set.hxx208
-rw-r--r--include/vcl/outdev.hxx2
-rw-r--r--include/vcl/outdevstate.hxx57
-rw-r--r--include/vcl/pdfwriter.hxx2
-rw-r--r--reportdesign/source/ui/inc/ColorChanger.hxx6
-rw-r--r--sc/source/filter/excel/xichart.cxx2
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx4
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx2
-rw-r--r--sc/source/ui/dbgui/csvcontrol.cxx2
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
-rw-r--r--sfx2/source/dialog/backingwindow.cxx2
-rw-r--r--sfx2/source/dialog/titledockwin.cxx2
-rw-r--r--sfx2/source/sidebar/TitleBar.cxx4
-rw-r--r--starmath/source/dialog.cxx2
-rw-r--r--starmath/source/document.cxx4
-rw-r--r--starmath/source/node.cxx2
-rw-r--r--starmath/source/rect.cxx4
-rw-r--r--starmath/source/tmpdevice.cxx4
-rw-r--r--starmath/source/visitors.cxx8
-rw-r--r--svtools/source/brwbox/brwbox2.cxx4
-rw-r--r--svtools/source/control/headbar.cxx2
-rw-r--r--svtools/source/control/ruler.cxx2
-rw-r--r--svtools/source/control/toolbarmenu.cxx2
-rw-r--r--svtools/source/graphic/grfmgr.cxx4
-rw-r--r--svtools/source/graphic/grfmgr2.cxx4
-rw-r--r--svtools/source/table/gridtablerenderer.cxx10
-rw-r--r--svtools/source/toolpanel/paneltabbar.cxx6
-rw-r--r--svx/source/dialog/framelink.cxx6
-rw-r--r--svx/source/dialog/framelinkarray.cxx2
-rw-r--r--svx/source/form/filtnav.cxx2
-rw-r--r--svx/source/gallery2/galctrl.cxx2
-rw-r--r--svx/source/sdr/contact/objectcontactofpageview.cxx2
-rw-r--r--svx/source/sidebar/tools/ValueSetWithTextControl.cxx2
-rw-r--r--sw/source/core/doc/notxtfrm.cxx2
-rw-r--r--sw/source/core/draw/dflyobj.cxx2
-rw-r--r--sw/source/core/layout/layact.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx16
-rw-r--r--sw/source/core/layout/virtoutp.cxx2
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx2
-rw-r--r--sw/source/core/text/inftxt.cxx10
-rw-r--r--sw/source/core/text/porlin.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2
-rw-r--r--sw/source/core/txtnode/fntcap.cxx2
-rw-r--r--sw/source/core/txtnode/swfont.cxx2
-rw-r--r--sw/source/core/view/vdraw.cxx2
-rw-r--r--sw/source/core/view/viewsh.cxx4
-rw-r--r--sw/source/core/view/vprint.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx2
-rw-r--r--sw/source/ui/table/tautofmt.cxx2
-rw-r--r--test/source/mtfxmldump.cxx30
-rw-r--r--vcl/source/control/button.cxx10
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/fixed.cxx2
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx2
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx6
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx16
-rw-r--r--vcl/source/gdi/cvtsvm.cxx14
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
-rw-r--r--vcl/source/gdi/metaact.cxx4
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx10
-rw-r--r--vcl/source/gdi/pdfwriter.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx48
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx2
-rw-r--r--vcl/source/gdi/print.cxx4
-rw-r--r--vcl/source/gdi/print2.cxx6
-rw-r--r--vcl/source/gdi/print3.cxx4
-rw-r--r--vcl/source/gdi/textlayout.cxx4
-rw-r--r--vcl/source/gdi/virdev.cxx2
-rw-r--r--vcl/source/outdev/bitmap.cxx2
-rw-r--r--vcl/source/outdev/gradient.cxx8
-rw-r--r--vcl/source/outdev/hatch.cxx4
-rw-r--r--vcl/source/outdev/outdevstate.cxx76
-rw-r--r--vcl/source/outdev/rect.cxx2
-rw-r--r--vcl/source/outdev/text.cxx20
-rw-r--r--vcl/source/outdev/textline.cxx2
-rw-r--r--vcl/source/outdev/transparent.cxx4
-rw-r--r--vcl/source/outdev/wallpaper.cxx4
-rw-r--r--vcl/source/window/decoview.cxx2
-rw-r--r--vcl/source/window/menubarwindow.cxx4
-rw-r--r--vcl/source/window/menufloatingwindow.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx2
-rw-r--r--vcl/source/window/status.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx4
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--vcl/workben/svptest.cxx2
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx2
111 files changed, 562 insertions, 355 deletions
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 7f6ff6381779..f57e49812acc 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -584,7 +584,7 @@ namespace vclcanvas
// poly-polygons, and don't have to output the gradient
// twice for XOR
- rOutDev.Push( PUSH_CLIPREGION );
+ rOutDev.Push( PushFlags::CLIPREGION );
rOutDev.IntersectClipRegion( aPolygonDeviceRectOrig );
doGradientFill( rOutDev,
rValues,
@@ -609,7 +609,7 @@ namespace vclcanvas
{
const vcl::Region aPolyClipRegion( rPoly );
- rOutDev.Push( PUSH_CLIPREGION );
+ rOutDev.Push( PushFlags::CLIPREGION );
rOutDev.SetClipRegion( aPolyClipRegion );
doGradientFill( rOutDev,
@@ -1071,7 +1071,7 @@ namespace vclcanvas
{
const vcl::Region aPolyClipRegion( aPolyPoly );
- rOutDev.Push( PUSH_CLIPREGION );
+ rOutDev.Push( PushFlags::CLIPREGION );
rOutDev.SetClipRegion( aPolyClipRegion );
textureFill( rOutDev,
@@ -1088,7 +1088,7 @@ namespace vclcanvas
if( mp2ndOutDev )
{
OutputDevice& r2ndOutDev( mp2ndOutDev->getOutDev() );
- r2ndOutDev.Push( PUSH_CLIPREGION );
+ r2ndOutDev.Push( PushFlags::CLIPREGION );
r2ndOutDev.SetClipRegion( aPolyClipRegion );
textureFill( r2ndOutDev,
diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx
index dd4fd2bac735..a4ad7fa349e6 100644
--- a/canvas/source/vcl/spritecanvashelper.cxx
+++ b/canvas/source/vcl/spritecanvashelper.cxx
@@ -453,7 +453,7 @@ namespace vclcanvas
// repaint uncovered areas from sprite. Need to actually
// clip here, since we're only repainting _parts_ of the
// sprite
- rOutDev.Push( PUSH_CLIPREGION );
+ rOutDev.Push( PushFlags::CLIPREGION );
::std::for_each( aUnscrollableAreas.begin(),
aUnscrollableAreas.end(),
::boost::bind( &opaqueUpdateSpriteArea,
diff --git a/canvas/source/vcl/spritehelper.cxx b/canvas/source/vcl/spritehelper.cxx
index 523e4aa37a68..8e7d783847d8 100644
--- a/canvas/source/vcl/spritehelper.cxx
+++ b/canvas/source/vcl/spritehelper.cxx
@@ -237,7 +237,7 @@ namespace vclcanvas
// already redrawn the sprite.
bool bSpriteRedrawn( false );
- rTargetSurface.Push( PUSH_CLIPREGION );
+ rTargetSurface.Push( PushFlags::CLIPREGION );
// apply clip (if any)
if( getClip().is() )
diff --git a/cppcanvas/source/inc/outdevstate.hxx b/cppcanvas/source/inc/outdevstate.hxx
index 15d33ecd9969..339688a5aca2 100644
--- a/cppcanvas/source/inc/outdevstate.hxx
+++ b/cppcanvas/source/inc/outdevstate.hxx
@@ -58,7 +58,7 @@ namespace cppcanvas
fontRotation(0.0),
textEmphasisMarkStyle(EMPHASISMARK_NONE),
- pushFlags(PUSH_ALL),
+ pushFlags(PushFlags::ALL),
textDirection(::com::sun::star::rendering::TextDirection::WEAK_LEFT_TO_RIGHT),
textAlignment(0), // TODO(Q2): Synchronize with implrenderer
// and possibly new rendering::TextAlignment
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 1437f32a0832..f44c2b0d721b 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -270,7 +270,7 @@ namespace cppcanvas
void VectorOfOutDevStates::popState()
{
- if( getState().pushFlags != PUSH_ALL )
+ if( getState().pushFlags != PushFlags::ALL )
{
// a state is pushed which is incomplete, i.e. does not
// restore everything to the previous stack level when
@@ -289,19 +289,19 @@ namespace cppcanvas
const OutDevState& rNewState( getState() );
- if( (aCalculatedNewState.pushFlags & PUSH_LINECOLOR) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::LINECOLOR) )
{
aCalculatedNewState.lineColor = rNewState.lineColor;
aCalculatedNewState.isLineColorSet = rNewState.isLineColorSet;
}
- if( (aCalculatedNewState.pushFlags & PUSH_FILLCOLOR) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::FILLCOLOR) )
{
aCalculatedNewState.fillColor = rNewState.fillColor;
aCalculatedNewState.isFillColorSet = rNewState.isFillColorSet;
}
- if( (aCalculatedNewState.pushFlags & PUSH_FONT) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::FONT) )
{
aCalculatedNewState.xFont = rNewState.xFont;
aCalculatedNewState.fontRotation = rNewState.fontRotation;
@@ -315,17 +315,17 @@ namespace cppcanvas
aCalculatedNewState.isTextOutlineModeSet = rNewState.isTextOutlineModeSet;
}
- if( (aCalculatedNewState.pushFlags & PUSH_TEXTCOLOR) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::TEXTCOLOR) )
{
aCalculatedNewState.textColor = rNewState.textColor;
}
- if( (aCalculatedNewState.pushFlags & PUSH_MAPMODE) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::MAPMODE) )
{
aCalculatedNewState.mapModeTransform = rNewState.mapModeTransform;
}
- if( (aCalculatedNewState.pushFlags & PUSH_CLIPREGION) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::CLIPREGION) )
{
aCalculatedNewState.clip = rNewState.clip;
aCalculatedNewState.clipRect = rNewState.clipRect;
@@ -333,40 +333,40 @@ namespace cppcanvas
}
// TODO(F2): Raster ops NYI
- // if( (aCalculatedNewState.pushFlags & PUSH_RASTEROP) )
+ // if( (aCalculatedNewState.pushFlags & PushFlags::RASTEROP) )
// {
// }
- if( (aCalculatedNewState.pushFlags & PUSH_TEXTFILLCOLOR) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::TEXTFILLCOLOR) )
{
aCalculatedNewState.textFillColor = rNewState.textFillColor;
aCalculatedNewState.isTextFillColorSet = rNewState.isTextFillColorSet;
}
- if( (aCalculatedNewState.pushFlags & PUSH_TEXTALIGN) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::TEXTALIGN) )
{
aCalculatedNewState.textReferencePoint = rNewState.textReferencePoint;
}
// TODO(F1): Refpoint handling NYI
- // if( (aCalculatedNewState.pushFlags & PUSH_REFPOINT) )
+ // if( (aCalculatedNewState.pushFlags & PushFlags::REFPOINT) )
// {
// }
- if( (aCalculatedNewState.pushFlags & PUSH_TEXTLINECOLOR) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::TEXTLINECOLOR) )
{
aCalculatedNewState.textLineColor = rNewState.textLineColor;
aCalculatedNewState.isTextLineColorSet = rNewState.isTextLineColorSet;
}
- if( (aCalculatedNewState.pushFlags & PUSH_TEXTLAYOUTMODE) )
+ if( (aCalculatedNewState.pushFlags & PushFlags::TEXTLAYOUTMODE) )
{
aCalculatedNewState.textAlignment = rNewState.textAlignment;
aCalculatedNewState.textDirection = rNewState.textDirection;
}
// TODO(F2): Text language handling NYI
- // if( (aCalculatedNewState.pushFlags & PUSH_TEXTLANGUAGE) )
+ // if( (aCalculatedNewState.pushFlags & PushFlags::TEXTLANGUAGE) )
// {
// }
@@ -730,7 +730,7 @@ namespace cppcanvas
// cannot currently use native canvas gradients, as a
// finite step size is given (this funny feature is not
// supported by the XCanvas API)
- rParms.mrStates.pushState(PUSH_ALL);
+ rParms.mrStates.pushState(PushFlags::ALL);
if( !bIsPolygonRectangle )
{
@@ -1520,7 +1520,7 @@ namespace cppcanvas
::cppcanvas::internal::OutDevState& rState = rStates.getState();
ComplexTextLayoutMode nBidiLayoutMode = nLayoutMode & (TEXT_LAYOUT_BIDI_RTL|TEXT_LAYOUT_BIDI_STRONG);
- if( nBidiLayoutMode == 0)
+ if( nBidiLayoutMode == TEXT_LAYOUT_DEFAULT)
rState.textDirection = rendering::TextDirection::WEAK_LEFT_TO_RIGHT;
else if( nBidiLayoutMode == TEXT_LAYOUT_BIDI_STRONG)
rState.textDirection = rendering::TextDirection::STRONG_LEFT_TO_RIGHT;
@@ -1590,7 +1590,7 @@ namespace cppcanvas
// Setup local transform, such that the
// metafile renders itself into the given
// output rectangle
- rStates.pushState(PUSH_ALL);
+ rStates.pushState(PushFlags::ALL);
rVDev.Push();
rVDev.SetMapMode( rSubstitute.GetPrefMapMode() );
@@ -2557,7 +2557,7 @@ namespace cppcanvas
{
MetaTextRectAction* pAct = static_cast<MetaTextRectAction*>(pCurrAct);
- rStates.pushState(PUSH_ALL);
+ rStates.pushState(PushFlags::ALL);
// use the VDev to break up the text rect
// action into readily formatted lines
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 067397cef2e8..a57165437b5b 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -64,7 +64,7 @@ namespace svx
inline FontSwitch( OutputDevice& _rDev, const vcl::Font& _rTemporaryFont )
:m_rDev( _rDev )
{
- m_rDev.Push( PUSH_FONT );
+ m_rDev.Push( PushFlags::FONT );
m_rDev.SetFont( _rTemporaryFont );
}
inline ~FontSwitch( )
diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx
index 393895367739..b8509063ed43 100644
--- a/dbaccess/source/ui/browser/dataview.cxx
+++ b/dbaccess/source/ui/browser/dataview.cxx
@@ -48,7 +48,7 @@ namespace dbaui
ColorChanger( OutputDevice* _pDev, const ::Color& _rNewLineColor, const ::Color& _rNewFillColor )
:m_pDev( _pDev )
{
- m_pDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ m_pDev->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
m_pDev->SetLineColor( _rNewLineColor );
m_pDev->SetFillColor( _rNewFillColor );
}
diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx
index fef464774952..c81018cb0720 100644
--- a/dbaccess/source/ui/control/listviewitems.cxx
+++ b/dbaccess/source/ui/control/listviewitems.cxx
@@ -31,7 +31,7 @@ namespace dbaui
return;
if (!_pViewData)
_pViewData = pView->GetViewDataItem( pEntry, this );
- pView->Push(PUSH_ALL);
+ pView->Push(PushFlags::ALL);
vcl::Font aFont( pView->GetFont());
aFont.SetWeight(WEIGHT_BOLD);
pView->Control::SetFont( aFont );
@@ -50,7 +50,7 @@ namespace dbaui
{
if (m_bEmphasized)
{
- rDev.Push(PUSH_ALL);
+ rDev.Push(PushFlags::ALL);
vcl::Font aFont( rDev.GetFont());
aFont.SetWeight(WEIGHT_BOLD);
rDev.SetFont( aFont );
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 706f0a56c512..c2ca50ac7ce3 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -310,7 +310,7 @@ void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const Rectangle& rRect,
{
const OUString aText( GetCellText( m_nCurrentPos, nColumnId ));
- rDev.Push( PUSH_CLIPREGION );
+ rDev.Push( PushFlags::CLIPREGION );
rDev.SetClipRegion(vcl::Region(rRect));
rDev.DrawText( rRect, aText, TEXT_DRAW_LEFT | TEXT_DRAW_VCENTER );
rDev.Pop();
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index f51099bc4c67..c42b1cb20e0d 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -118,7 +118,7 @@ namespace
maRasterOp(ROP_OVERPAINT),
mnLayoutMode(TEXT_LAYOUT_DEFAULT),
maLanguageType(0),
- mnPushFlags(PUSH_NONE),
+ mnPushFlags(PushFlags::NONE),
mbLineColor(false),
mbFillColor(false),
mbTextColor(true),
@@ -229,7 +229,7 @@ namespace
void Push(PushFlags nPushFlags)
{
- if(nPushFlags)
+ if(bool(nPushFlags))
{
OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)");
if ( !maPropertyHolders.empty() )
@@ -251,54 +251,54 @@ namespace
const PropertyHolder* pTip = maPropertyHolders.back();
const PushFlags nPushFlags(pTip->getPushFlags());
- if(nPushFlags != PUSH_NONE)
+ if(nPushFlags != PushFlags::NONE)
{
if(nSize > 1)
{
// copy back content for all non-set flags
PropertyHolder* pLast = maPropertyHolders[nSize - 2];
- if(PUSH_ALL != nPushFlags)
+ if(PushFlags::ALL != nPushFlags)
{
- if(!(nPushFlags & PUSH_LINECOLOR ))
+ if(!(nPushFlags & PushFlags::LINECOLOR ))
{
pLast->setLineColor(pTip->getLineColor());
pLast->setLineColorActive(pTip->getLineColorActive());
}
- if(!(nPushFlags & PUSH_FILLCOLOR ))
+ if(!(nPushFlags & PushFlags::FILLCOLOR ))
{
pLast->setFillColor(pTip->getFillColor());
pLast->setFillColorActive(pTip->getFillColorActive());
}
- if(!(nPushFlags & PUSH_FONT ))
+ if(!(nPushFlags & PushFlags::FONT ))
{
pLast->setFont(pTip->getFont());
}
- if(!(nPushFlags & PUSH_TEXTCOLOR ))
+ if(!(nPushFlags & PushFlags::TEXTCOLOR ))
{
pLast->setTextColor(pTip->getTextColor());
pLast->setTextColorActive(pTip->getTextColorActive());
}
- if(!(nPushFlags & PUSH_MAPMODE ))
+ if(!(nPushFlags & PushFlags::MAPMODE ))
{
pLast->setTransformation(pTip->getTransformation());
pLast->setMapUnit(pTip->getMapUnit());
}
- if(!(nPushFlags & PUSH_CLIPREGION ))
+ if(!(nPushFlags & PushFlags::CLIPREGION ))
{
pLast->setClipPolyPolygon(pTip->getClipPolyPolygon());
pLast->setClipPolyPolygonActive(pTip->getClipPolyPolygonActive());
}
- if(!(nPushFlags & PUSH_RASTEROP ))
+ if(!(nPushFlags & PushFlags::RASTEROP ))
{
pLast->setRasterOp(pTip->getRasterOp());
}
- if(!(nPushFlags & PUSH_TEXTFILLCOLOR ))
+ if(!(nPushFlags & PushFlags::TEXTFILLCOLOR ))
{
pLast->setTextFillColor(pTip->getTextFillColor());
pLast->setTextFillColorActive(pTip->getTextFillColorActive());
}
- if(!(nPushFlags & PUSH_TEXTALIGN ))
+ if(!(nPushFlags & PushFlags::TEXTALIGN ))
{
if(pLast->getFont().GetAlign() != pTip->getFont().GetAlign())
{
@@ -307,24 +307,24 @@ namespace
pLast->setFont(aFont);
}
}
- if(!(nPushFlags & PUSH_REFPOINT ))
+ if(!(nPushFlags & PushFlags::REFPOINT ))
{
// not supported
}
- if(!(nPushFlags & PUSH_TEXTLINECOLOR ))
+ if(!(nPushFlags & PushFlags::TEXTLINECOLOR ))
{
pLast->setTextLineColor(pTip->getTextLineColor());
pLast->setTextLineColorActive(pTip->getTextLineColorActive());
}
- if(!(nPushFlags & PUSH_TEXTLAYOUTMODE ))
+ if(!(nPushFlags & PushFlags::TEXTLAYOUTMODE ))
{
pLast->setLayoutMode(pTip->getLayoutMode());
}
- if(!(nPushFlags & PUSH_TEXTLANGUAGE ))
+ if(!(nPushFlags & PushFlags::TEXTLANGUAGE ))
{
pLast->setLanguageType(pTip->getLanguageType());
}
- if(!(nPushFlags & PUSH_OVERLINECOLOR ))
+ if(!(nPushFlags & PushFlags::OVERLINECOLOR ))
{
pLast->setOverlineColor(pTip->getOverlineColor());
pLast->setOverlineColorActive(pTip->getOverlineColorActive());
@@ -1229,8 +1229,8 @@ namespace
drawinglayer::primitive2d::getFontAttributeFromVclFont(
aFontScaling,
rFont,
- 0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_RTL),
- 0 != (rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_STRONG)));
+ bool(rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_RTL),
+ bool(rProperty.getLayoutMode() & TEXT_LAYOUT_BIDI_STRONG)));
// add FontScaling
rTextTransform.scale(aFontScaling.getX(), aFontScaling.getY());
@@ -2788,8 +2788,8 @@ namespace
case META_POP_ACTION :
{
/** CHECKED, WORKS WELL */
- const bool bRegionMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_CLIPREGION);
- const bool bRasterOpMayChange(rPropertyHolders.Current().getPushFlags() & PUSH_RASTEROP);
+ const bool bRegionMayChange(rPropertyHolders.Current().getPushFlags() & PushFlags::CLIPREGION);
+ const bool bRasterOpMayChange(rPropertyHolders.Current().getPushFlags() & PushFlags::RASTEROP);
if(bRegionMayChange && rPropertyHolders.Current().getClipPolyPolygonActive())
{
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 14a1a6ec8ed5..2b2c0b86d220 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1784,7 +1784,7 @@ namespace drawinglayer
// set VCL clip region; subdivide before conversion to tools polygon. Subdivision necessary (!)
// Removed subdivision and fixed in vcl::Region::ImplPolyPolyRegionToBandRegionFunc() in VCL where
// the ClipRegion is built from the Polygon. A AdaptiveSubdivide on the source polygon was missing there
- mpOutputDevice->Push(PUSH_CLIPREGION);
+ mpOutputDevice->Push(PushFlags::CLIPREGION);
mpOutputDevice->SetClipRegion(vcl::Region(maClipPolyPolygon));
// recursively paint content
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 79351ce96363..ddd6d331dbc4 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -109,7 +109,7 @@ namespace drawinglayer
maCurrentTransformation = rViewInformation.getObjectToViewTransformation();
// prepare output directly to pixels
- mpOutputDevice->Push(PUSH_MAPMODE);
+ mpOutputDevice->Push(PushFlags::MAPMODE);
mpOutputDevice->SetMapMode();
// react on AntiAliasing settings
diff --git a/editeng/qa/items/borderline_test.cxx b/editeng/qa/items/borderline_test.cxx
index 14322762081d..b97a41432978 100644
--- a/editeng/qa/items/borderline_test.cxx
+++ b/editeng/qa/items/borderline_test.cxx
@@ -134,7 +134,7 @@ void BorderLineTest::testGuessWidthThinthickLargegap()
void BorderLineTest::testGuessWidthNostyleDouble()
{
SvxBorderLine line;
- line.GuessLinesWidths( NONE,
+ line.GuessLinesWidths( css::table::BorderLineStyle::NONE,
THINTHICKLG_OUT_WIDTH,
THINTHICKLG_IN_WIDTH,
THINTHICKLG_DIST_WIDTH );
@@ -152,7 +152,7 @@ void BorderLineTest::testGuessWidthNostyleDouble()
void BorderLineTest::testGuessWidthNostyleSingle()
{
SvxBorderLine line;
- line.GuessLinesWidths( NONE, TEST_WIDTH );
+ line.GuessLinesWidths( css::table::BorderLineStyle::NONE, TEST_WIDTH );
CPPUNIT_ASSERT_EQUAL( SOLID, line.GetBorderLineStyle() );
CPPUNIT_ASSERT_EQUAL( TEST_WIDTH, line.GetWidth() );
}
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 5e112874ecd4..7e069d6da9a6 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -341,7 +341,7 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rD
}
else
{
- _pTarget->Push(PUSH_LINECOLOR|PUSH_FILLCOLOR|PUSH_RASTEROP);
+ _pTarget->Push(PushFlags::LINECOLOR|PushFlags::FILLCOLOR|PushFlags::RASTEROP);
_pTarget->SetLineColor();
_pTarget->SetFillColor(COL_BLACK);
_pTarget->SetRasterOp(ROP_INVERT);
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index f1b0fbc76b97..ed238cda11f1 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3116,7 +3116,7 @@ sal_uInt32 ImpEditEngine::CalcLineWidth( ParaPortion* pPortion, EditLine* pLine,
// #114278# Saving both layout mode and language (since I'm
// potentially changing both)
- GetRefDevice()->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
+ GetRefDevice()->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
ImplInitLayoutMode( GetRefDevice(), nPara, -1 );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 1f5cd00bd2b0..e12209db16b3 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -664,7 +664,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
// SW disables TEXT_LAYOUT_COMPLEX_DISABLED, so maybe I have to enable it...
// Saving both layout mode and language (since I'm potentially changing both)
- GetRefDevice()->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
+ GetRefDevice()->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
ImplInitLayoutMode( GetRefDevice(), nPara, -1 );
@@ -2271,7 +2271,7 @@ sal_Int32 ImpEditEngine::SplitTextPortion( ParaPortion* pPortion, sal_Int32 nPos
SvxFont aTmpFont( pPortion->GetNode()->GetCharAttribs().GetDefFont() );
SeekCursor( pPortion->GetNode(), nTxtPortionStart+1, aTmpFont );
aTmpFont.SetPhysFont( GetRefDevice() );
- GetRefDevice()->Push( PUSH_TEXTLANGUAGE );
+ GetRefDevice()->Push( PushFlags::TEXTLANGUAGE );
ImplInitDigitMode(GetRefDevice(), aTmpFont.GetLanguage());
Size aSz = aTmpFont.QuickGetTextSize( GetRefDevice(), pPortion->GetNode()->GetString(), nTxtPortionStart, pTextPortion->GetLen(), NULL );
GetRefDevice()->Pop();
@@ -3032,7 +3032,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
// #114278# Saving both layout mode and language (since I'm
// potentially changing both)
- pOutDev->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
+ pOutDev->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
ImplInitLayoutMode( pOutDev, n, nIndex );
ImplInitDigitMode(pOutDev, aTmpFont.GetLanguage());
@@ -3096,8 +3096,8 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
aBottomRightRectPos.Y() += 2 * nHalfBlankWidth;
}
- pOutDev->Push( PUSH_FILLCOLOR );
- pOutDev->Push( PUSH_LINECOLOR );
+ pOutDev->Push( PushFlags::FILLCOLOR );
+ pOutDev->Push( PushFlags::LINECOLOR );
pOutDev->SetFillColor( COL_LIGHTGRAY );
pOutDev->SetLineColor( COL_LIGHTGRAY );
@@ -3776,7 +3776,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev
if ( GetTextRanger() )
{
// Some problems here with push/pop, why?!
-// pTarget->Push( PUSH_CLIPREGION|PUSH_MAPMODE );
+// pTarget->Push( PushFlags::CLIPREGION|PushFlags::MAPMODE );
bClipRegion = pTarget->IsClipRegion();
aOldRegion = pTarget->GetClipRegion();
// How do I get the polygon to the right place??
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index 4bea25c9df17..c921c05b4385 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -163,7 +163,7 @@ ConvertBorderStyleFromWord(int const nWordLineStyle)
case 27:
return INSET;
default:
- return NONE;
+ return css::table::BorderLineStyle::NONE;
}
}
@@ -302,7 +302,7 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle )
switch ( nStyle )
{
// No line: no width
- case NONE:
+ case css::table::BorderLineStyle::NONE:
aImpl = BorderWidthImpl( 0, 0.0 );
break;
@@ -431,7 +431,7 @@ void SvxBorderLine::ScaleMetrics( long nMult, long nDiv )
void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sal_uInt16 nIn, sal_uInt16 nDist )
{
- if (NONE == nStyle)
+ if (css::table::BorderLineStyle::NONE == nStyle)
{
nStyle = SOLID;
if ( nOut > 0 && nIn > 0 )
@@ -454,7 +454,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
static size_t const len = SAL_N_ELEMENTS(aDoubleStyles);
long nWidth = 0;
- SvxBorderStyle nTestStyle(NONE);
+ SvxBorderStyle nTestStyle(css::table::BorderLineStyle::NONE);
for (size_t i = 0; i < len && nWidth == 0; ++i)
{
nTestStyle = aDoubleStyles[i];
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 9eb3a253a6b5..ce635812ceaa 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -118,7 +118,7 @@ namespace
SvxBorderLine CreateBorderLine(SvStream &stream, sal_uInt16 version)
{
sal_uInt16 nOutline, nInline, nDistance;
- sal_uInt16 nStyle = NONE;
+ sal_uInt16 nStyle = css::table::BorderLineStyle::NONE;
Color aColor;
ReadColor( stream, aColor ).ReadUInt16( nOutline ).ReadUInt16( nInline ).ReadUInt16( nDistance );
@@ -1905,7 +1905,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
{
drawing::LineStyle eDrawingStyle;
rVal >>= eDrawingStyle;
- editeng::SvxBorderStyle eBorderStyle = NONE;
+ editeng::SvxBorderStyle eBorderStyle = css::table::BorderLineStyle::NONE;
switch ( eDrawingStyle )
{
default:
@@ -2643,7 +2643,7 @@ SfxPoolItem* SvxBoxInfoItem::Create( SvStream& rStrm, sal_uInt16 ) const
Color aColor;
ReadColor( rStrm, aColor ).ReadInt16( nOutline ).ReadInt16( nInline ).ReadInt16( nDistance );
SvxBorderLine aBorder( &aColor );
- aBorder.GuessLinesWidths(NONE, nOutline, nInline, nDistance);
+ aBorder.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance);
switch( cLine )
{
@@ -3239,7 +3239,7 @@ SfxPoolItem* SvxLineItem::Create( SvStream& rStrm, sal_uInt16 ) const
if( nOutline )
{
SvxBorderLine aLine( &aColor );
- aLine.GuessLinesWidths(NONE, nOutline, nInline, nDistance);
+ aLine.GuessLinesWidths(css::table::BorderLineStyle::NONE, nOutline, nInline, nDistance);
_pLine->SetLine( &aLine );
}
return _pLine;
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index c71089c5172b..5414ffa45f2d 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -328,7 +328,7 @@ namespace editeng
sal_Int32 nLength = m_sCurrentPortion.getLength() - nStartSearch;
m_nCurrentConversionType = implGetConversionType();
- m_nCurrentConversionOption = IsByCharacter() ? CHARACTER_BY_CHARACTER : NONE;
+ m_nCurrentConversionOption = IsByCharacter() ? CHARACTER_BY_CHARACTER : css::i18n::TextConversionOption::NONE;
if( m_bIgnorePostPositionalWord )
m_nCurrentConversionOption = m_nCurrentConversionOption | IGNORE_POST_POSITIONAL_WORD;
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index b90b3c9c397f..13b38c1040df 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -498,7 +498,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
if( !nLen )
return;
- const bool bRTL = (mpVDev->GetLayoutMode() & TEXT_LAYOUT_BIDI_RTL) != 0;
+ const bool bRTL = bool(mpVDev->GetLayoutMode() & TEXT_LAYOUT_BIDI_RTL);
sal_Int16 nScriptType = ScriptType::LATIN;
Reference < XBreakIterator > xBI( Impl_GetBreakIterator() );
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 20a48869e638..d70e471b0ff1 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -453,7 +453,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
aFont.SetColor( COL_LIGHTRED );
// aFont.SetSize( Size( 0, 32 ) );
- aVDev.Push( PUSH_FONT );
+ aVDev.Push( PushFlags::FONT );
aVDev.SetFont( aFont );
Rectangle aRect( Point( 1, 1 ), Size( nWidth - 2, nHeight - 2 ) );
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index f3b61dcafae6..1568ef9112f5 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -483,7 +483,7 @@ void OS2METReader::DrawPolygon( const Polygon& rPolygon )
{
if ( IsLineInfo() )
{
- pVirDev->Push( PUSH_LINECOLOR );
+ pVirDev->Push( PushFlags::LINECOLOR );
pVirDev->SetLineColor( COL_TRANSPARENT );
pVirDev->DrawPolygon( rPolygon );
pVirDev->Pop();
@@ -497,7 +497,7 @@ void OS2METReader::DrawPolyPolygon( const tools::PolyPolygon& rPolyPolygon )
{
if ( IsLineInfo() )
{
- pVirDev->Push( PUSH_LINECOLOR );
+ pVirDev->Push( PushFlags::LINECOLOR );
pVirDev->SetLineColor( COL_TRANSPARENT );
pVirDev->DrawPolyPolygon( rPolyPolygon );
pVirDev->Pop();
@@ -939,7 +939,7 @@ void OS2METReader::ReadBox(bool bGivenPos)
Polygon aPolygon( aBoxRect, nHRound, nVRound );
if ( nFlags & 0x40 )
{
- pVirDev->Push( PUSH_LINECOLOR );
+ pVirDev->Push( PushFlags::LINECOLOR );
pVirDev->SetLineColor( COL_TRANSPARENT );
pVirDev->DrawRect( aBoxRect, nHRound, nVRound );
pVirDev->Pop();
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 5d19fd77bd6f..2393c27a039b 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1060,7 +1060,7 @@ void PDFExport::ImplWriteWatermark( PDFWriter& rWriter, const Size& rPageSize )
// adjust font height for text to fit
OutputDevice* pDev = rWriter.GetReferenceDevice();
- pDev->Push( PUSH_ALL );
+ pDev->Push( PushFlags::ALL );
pDev->SetFont( aFont );
pDev->SetMapMode( MapMode( MAP_POINT ) );
int w = 0;
@@ -1082,7 +1082,7 @@ void PDFExport::ImplWriteWatermark( PDFWriter& rWriter, const Size& rPageSize )
nTextHeight += nTextHeight/20;
pDev->Pop();
- rWriter.Push( PUSH_ALL );
+ rWriter.Push( PushFlags::ALL );
rWriter.SetMapMode( MapMode( MAP_POINT ) );
rWriter.SetFont( aFont );
rWriter.SetTextColor( COL_LIGHTGREEN );
diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx
index 55e039c0d375..1e84f1b39648 100644
--- a/forms/source/richtext/richtextimplcontrol.cxx
+++ b/forms/source/richtext/richtextimplcontrol.cxx
@@ -461,7 +461,7 @@ namespace frm
long nFontWidth = m_pEngine->GetStandardFont(0).GetSize().Width();
if ( !nFontWidth )
{
- m_pViewport->Push( PUSH_FONT );
+ m_pViewport->Push( PushFlags::FONT );
m_pViewport->SetFont( m_pEngine->GetStandardFont(0) );
nFontWidth = m_pViewport->GetTextWidth( "x" );
m_pViewport->Pop();
@@ -576,7 +576,7 @@ namespace frm
{
// need to normalize the map mode of the device - every paint operation on any device needs
// to use the same map mode
- _pDev->Push( PUSH_MAPMODE | PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ _pDev->Push( PushFlags::MAPMODE | PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
// enforce our "normalize map mode" on the device
MapMode aRefMapMode( m_pEngine->GetRefDevice()->GetMapMode() );
diff --git a/include/o3tl/typed_flags_set.hxx b/include/o3tl/typed_flags_set.hxx
new file mode 100644
index 000000000000..baa679354de5
--- /dev/null
+++ b/include/o3tl/typed_flags_set.hxx
@@ -0,0 +1,208 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_O3TL_TYPED_FLAGS_SET_HXX
+#define INCLUDED_O3TL_TYPED_FLAGS_SET_HXX
+
+#include <sal/config.h>
+
+#include <cassert>
+#include <type_traits>
+
+namespace o3tl {
+
+template<typename T> struct typed_flags {};
+
+/// Mark a (scoped) enumeration as a set of bit flags, with accompanying
+/// operations.
+///
+/// template<>
+/// struct o3tl::typed_flags<TheE>: o3tl::is_typed_flags<TheE, TheM> {};
+///
+/// All relevant values must be non-negative. (Typically, the enumeration's
+/// underlying type will either be fixed and unsigned, or it will be unfixed---
+/// and can thus default to a signed type---and all enumerators will have non-
+/// negative values.)
+///
+/// \param E the enumeration type.
+/// \param M the all-bits-set value for the bit flags.
+template<typename E, typename std::underlying_type<E>::type M>
+struct is_typed_flags {
+ static_assert(
+ M >= 0, "is_typed_flags expects only non-negative bit values");
+
+ class Self {
+ public:
+ explicit Self(typename std::underlying_type<E>::type value):
+ value_(value)
+ { assert(value >= 0); }
+
+ operator E() { return static_cast<E>(value_); }
+
+#if !defined _MSC_VER || _MSC_VER > 1700
+ explicit
+#endif
+ operator typename std::underlying_type<E>::type() { return value_; }
+
+#if !defined _MSC_VER || _MSC_VER > 1700
+ explicit
+#endif
+ operator bool() { return value_ != 0; }
+
+ private:
+ typename std::underlying_type<E>::type value_;
+ };
+
+ static typename std::underlying_type<E>::type const mask = M;
+};
+
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator ~(E rhs) {
+ assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ o3tl::typed_flags<E>::mask
+ & ~static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator ~(
+ typename o3tl::typed_flags<E>::Self rhs)
+{
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ o3tl::typed_flags<E>::mask
+ & ~static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator &(E lhs, E rhs) {
+ assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
+ assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ static_cast<typename std::underlying_type<E>::type>(lhs)
+ & static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator &(
+ E lhs, typename o3tl::typed_flags<E>::Self rhs)
+{
+ assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ static_cast<typename std::underlying_type<E>::type>(lhs)
+ & static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator &(
+ typename o3tl::typed_flags<E>::Self lhs, E rhs)
+{
+ assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ static_cast<typename std::underlying_type<E>::type>(lhs)
+ & static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator &(
+ typename o3tl::typed_flags<E>::Self lhs,
+ typename o3tl::typed_flags<E>::Self rhs)
+{
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ static_cast<typename std::underlying_type<E>::type>(lhs)
+ & static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator |(E lhs, E rhs) {
+ assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
+ assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ static_cast<typename std::underlying_type<E>::type>(lhs)
+ | static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator |(
+ E lhs, typename o3tl::typed_flags<E>::Self rhs)
+{
+ assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ static_cast<typename std::underlying_type<E>::type>(lhs)
+ | static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator |(
+ typename o3tl::typed_flags<E>::Self lhs, E rhs)
+{
+ assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ static_cast<typename std::underlying_type<E>::type>(lhs)
+ | static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator |(
+ typename o3tl::typed_flags<E>::Self lhs,
+ typename o3tl::typed_flags<E>::Self rhs)
+{
+ return static_cast<typename o3tl::typed_flags<E>::Self>(
+ static_cast<typename std::underlying_type<E>::type>(lhs)
+ | static_cast<typename std::underlying_type<E>::type>(rhs));
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator &=(E & lhs, E rhs) {
+ assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
+ assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
+ lhs = lhs & rhs;
+ return lhs;
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator &=(
+ E & lhs, typename o3tl::typed_flags<E>::Self rhs)
+{
+ assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
+ lhs = lhs & rhs;
+ return lhs;
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator |=(E & lhs, E rhs) {
+ assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
+ assert(static_cast<typename std::underlying_type<E>::type>(rhs) >= 0);
+ lhs = lhs | rhs;
+ return lhs;
+}
+
+template<typename E>
+inline typename o3tl::typed_flags<E>::Self operator |=(
+ E & lhs, typename o3tl::typed_flags<E>::Self rhs)
+{
+ assert(static_cast<typename std::underlying_type<E>::type>(lhs) >= 0);
+ lhs = lhs | rhs;
+ return lhs;
+}
+
+#endif /* INCLUDED_O3TL_TYPED_FLAGS_SET_HXX */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index c90f09d8820c..d87100afe8f4 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -537,7 +537,7 @@ private:
public:
- void Push( PushFlags nFlags = PUSH_ALL );
+ void Push( PushFlags nFlags = PushFlags::ALL );
void Pop();
// returns the current stack depth; that is the number of Push() calls minus the number of Pop() calls
diff --git a/include/vcl/outdevstate.hxx b/include/vcl/outdevstate.hxx
index 9b2811a86a6a..da3dc4e0b050 100644
--- a/include/vcl/outdevstate.hxx
+++ b/include/vcl/outdevstate.hxx
@@ -30,38 +30,35 @@
#include <tools/gen.hxx>
#include <tools/color.hxx>
#include <tools/fontenum.hxx>
+#include <o3tl/typed_flags_set.hxx>
// Flags for OutputDevice::Push() and OutDevState
-enum PushFlags {
- PUSH_NONE = ((sal_uInt16)0x0000),
- PUSH_LINECOLOR = ((sal_uInt16)0x0001),
- PUSH_FILLCOLOR = ((sal_uInt16)0x0002),
- PUSH_FONT = ((sal_uInt16)0x0004),
- PUSH_TEXTCOLOR = ((sal_uInt16)0x0008),
- PUSH_MAPMODE = ((sal_uInt16)0x0010),
- PUSH_CLIPREGION = ((sal_uInt16)0x0020),
- PUSH_RASTEROP = ((sal_uInt16)0x0040),
- PUSH_TEXTFILLCOLOR = ((sal_uInt16)0x0080),
- PUSH_TEXTALIGN = ((sal_uInt16)0x0100),
- PUSH_REFPOINT = ((sal_uInt16)0x0200),
- PUSH_TEXTLINECOLOR = ((sal_uInt16)0x0400),
- PUSH_TEXTLAYOUTMODE = ((sal_uInt16)0x0800),
- PUSH_TEXTLANGUAGE = ((sal_uInt16)0x1000),
- PUSH_OVERLINECOLOR = ((sal_uInt16)0x2000),
- PUSH_ALL = ((sal_uInt16)0xFFFF)
+enum class PushFlags : sal_uInt16 {
+ NONE = 0x0000,
+ LINECOLOR = 0x0001,
+ FILLCOLOR = 0x0002,
+ FONT = 0x0004,
+ TEXTCOLOR = 0x0008,
+ MAPMODE = 0x0010,
+ CLIPREGION = 0x0020,
+ RASTEROP = 0x0040,
+ TEXTFILLCOLOR = 0x0080,
+ TEXTALIGN = 0x0100,
+ REFPOINT = 0x0200,
+ TEXTLINECOLOR = 0x0400,
+ TEXTLAYOUTMODE = 0x0800,
+ TEXTLANGUAGE = 0x1000,
+ OVERLINECOLOR = 0x2000,
+ ALL = 0xFFFF
+
+ //bool operator bool() { return static_cast<sal_uInt16>(*this) != 0; }
};
-// make combining these type-safe
-inline PushFlags operator| (PushFlags lhs, PushFlags rhs)
-{
- return static_cast<PushFlags>(static_cast<sal_uInt16>(lhs) | static_cast<sal_uInt16>(rhs));
-}
-inline PushFlags operator& (PushFlags lhs, PushFlags rhs)
-{
- return static_cast<PushFlags>(static_cast<sal_uInt16>(lhs) & static_cast<sal_uInt16>(rhs));
-}
+template<>
+struct o3tl::typed_flags<PushFlags>: o3tl::is_typed_flags<PushFlags, 0xFFFF> {};
+#define PUSH_ALLTEXT (PushFlags::TEXTCOLOR | PushFlags::TEXTFILLCOLOR | PushFlags::TEXTLINECOLOR | PushFlags::OVERLINECOLOR | PushFlags::TEXTALIGN | PushFlags::TEXTLAYOUTMODE | PushFlags::TEXTLANGUAGE)
+#define PUSH_ALLFONT (PUSH_ALLTEXT | PushFlags::FONT)
+
-#define PUSH_ALLTEXT (PUSH_TEXTCOLOR | PUSH_TEXTFILLCOLOR | PUSH_TEXTLINECOLOR | PUSH_OVERLINECOLOR | PUSH_TEXTALIGN | PUSH_TEXTLAYOUTMODE | PUSH_TEXTLANGUAGE)
-#define PUSH_ALLFONT (PUSH_ALLTEXT | PUSH_FONT)
// LayoutModes for Complex Text Layout
// These are flag values, i.e they can be combined
@@ -101,6 +98,8 @@ inline ComplexTextLayoutMode& operator&= (ComplexTextLayoutMode& lhs, ComplexTex
}
+
+
class OutDevState
{
public:
@@ -108,7 +107,7 @@ public:
MapMode* mpMapMode;
bool mbMapActive;
- vcl::Region* mpClipRegion;
+ vcl::Region* mpClipRegion;
Color* mpLineColor;
Color* mpFillColor;
vcl::Font* mpFont;
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 03211f42aa80..880e2fa30949 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -729,7 +729,7 @@ The following structure describes the permissions used in PDF security
/* functions for graphics state */
/* flag values: see vcl/outdev.hxx */
- void Push( PushFlags nFlags = PUSH_ALL );
+ void Push( PushFlags nFlags = PushFlags::ALL );
void Pop();
void SetClipRegion();
diff --git a/reportdesign/source/ui/inc/ColorChanger.hxx b/reportdesign/source/ui/inc/ColorChanger.hxx
index 3a4f9b333c9b..7a26c606e05b 100644
--- a/reportdesign/source/ui/inc/ColorChanger.hxx
+++ b/reportdesign/source/ui/inc/ColorChanger.hxx
@@ -33,20 +33,20 @@ namespace rptui
ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor)
:m_pDev( _pDev )
{
- m_pDev->Push( PUSH_LINECOLOR );
+ m_pDev->Push( PushFlags::LINECOLOR );
m_pDev->SetLineColor( _rNewLineColor );
}
ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor, const Color& _rNewFillColor )
:m_pDev( _pDev )
{
- m_pDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ m_pDev->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
m_pDev->SetLineColor( _rNewLineColor );
m_pDev->SetFillColor( _rNewFillColor );
}
ColorChanger( OutputDevice* _pDev, const Color& _rNewLineColor, const Color& _rNewFillColor, const Color& _rNewTextColor )
:m_pDev( _pDev )
{
- m_pDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR);
+ m_pDev->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::TEXTCOLOR);
m_pDev->SetLineColor( _rNewLineColor );
m_pDev->SetFillColor( _rNewFillColor );
m_pDev->SetTextColor( _rNewTextColor );
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 610b4e2684f5..c65e558ca946 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -3089,7 +3089,7 @@ namespace {
sal_Int32 lclGetApiTickmarks( sal_uInt8 nXclTickPos )
{
using namespace ::com::sun::star::chart2::TickmarkStyle;
- sal_Int32 nApiTickmarks = NONE;
+ sal_Int32 nApiTickmarks = css::chart2::TickmarkStyle::NONE;
::set_flag( nApiTickmarks, INNER, ::get_flag( nXclTickPos, EXC_CHTICK_INSIDE ) );
::set_flag( nApiTickmarks, OUTER, ::get_flag( nXclTickPos, EXC_CHTICK_OUTSIDE ) );
return nApiTickmarks;
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index dd3e57d364f2..9b807c490d10 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -377,7 +377,7 @@ void ScMenuFloatingWindow::drawSeparator(size_t nPos)
if (IsNativeControlSupported(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL))
{
- Push(PUSH_CLIPREGION);
+ Push(PushFlags::CLIPREGION);
IntersectClipRegion(aRegion);
Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel());
DrawNativeControl(
@@ -667,7 +667,7 @@ void ScMenuFloatingWindow::highlightMenuItem(size_t nPos, bool bSelected)
if (IsNativeControlSupported(CTRL_MENU_POPUP, PART_ENTIRE_CONTROL))
{
- Push(PUSH_CLIPREGION);
+ Push(PushFlags::CLIPREGION);
IntersectClipRegion(Rectangle(aPos, aSize));
Rectangle aCtrlRect(Point(0,0), GetOutputSizePixel());
DrawNativeControl(
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index ba9ae8c2b63c..02022a1d348d 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -136,7 +136,7 @@ void ScDPFieldButton::draw()
aTextPos.setX(maPos.getX() + 2); // 2 = Margin
aTextPos.setY(maPos.getY() + (maSize.Height()-nTHeight)/2);
- mpOutDev->Push(PUSH_CLIPREGION);
+ mpOutDev->Push(PushFlags::CLIPREGION);
mpOutDev->IntersectClipRegion(aRect);
mpOutDev->DrawText(aTextPos, maText);
mpOutDev->Pop();
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index 56c8eb7cf6be..4b42c914f8fd 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -250,7 +250,7 @@ sal_Int32 ScCsvControl::GetLineFromY( sal_Int32 nY ) const
void ScCsvControl::ImplInvertRect( OutputDevice& rOutDev, const Rectangle& rRect )
{
- rOutDev.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_RASTEROP );
+ rOutDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::RASTEROP );
rOutDev.SetLineColor( Color( COL_BLACK ) );
rOutDev.SetFillColor( Color( COL_BLACK ) );
rOutDev.SetRasterOp( ROP_INVERT );
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index 81253359236d..30711b99f4d9 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -375,7 +375,7 @@ void ScAutoFmtPreview::DrawBackground()
const SvxBrushItem* pItem = static_cast< const SvxBrushItem* >(
pCurData->GetItem( GetFormatIndex( nCol, nRow ), ATTR_BACKGROUND ) );
- aVD.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ aVD.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
aVD.SetLineColor();
aVD.SetFillColor( pItem->GetColor() );
aVD.DrawRect( maArray.GetCellRect( nCol, nRow ) );
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index 08ccff1d73ea..53a09bae2539 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -356,7 +356,7 @@ void BackingWindow::Paint( const Rectangle& )
aClip.Exclude( maStartCentButtons );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( aClip );
DrawWallpaper( Rectangle( Point( 0, 0 ), GetOutputSizePixel() ), aBack );
Pop();
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index b63f4bbf8d26..3d5c8e2baf61 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -162,7 +162,7 @@ namespace sfx2
SfxDockingWindow::Paint( i_rArea );
- Push( PUSH_FONT | PUSH_FILLCOLOR | PUSH_LINECOLOR );
+ Push( PushFlags::FONT | PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
SetFillColor( GetSettings().GetStyleSettings().GetDialogColor() );
SetLineColor();
diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx
index ca59c4b1c3df..fb1597cade79 100644
--- a/sfx2/source/sidebar/TitleBar.cxx
+++ b/sfx2/source/sidebar/TitleBar.cxx
@@ -157,7 +157,7 @@ css::uno::Reference<css::accessibility::XAccessible> TitleBar::CreateAccessible
void TitleBar::PaintTitle (const Rectangle& rTitleBox)
{
- Push(PUSH_FONT | PUSH_TEXTCOLOR);
+ Push(PushFlags::FONT | PushFlags::TEXTCOLOR);
Rectangle aTitleBox (rTitleBox);
@@ -192,7 +192,7 @@ void TitleBar::PaintTitle (const Rectangle& rTitleBox)
void TitleBar::PaintFocus (const Rectangle& rFocusBox)
{
- Push(PUSH_FONT | PUSH_TEXTCOLOR);
+ Push(PushFlags::FONT | PushFlags::TEXTCOLOR);
vcl::Font aFont(GetFont());
aFont.SetWeight(WEIGHT_BOLD);
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 2f1bf0a4bd93..50aa25ef53c8 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1062,7 +1062,7 @@ Point SmShowSymbolSetWindow::OffsetPoint(const Point &rPoint) const
void SmShowSymbolSetWindow::Paint(const Rectangle&)
{
- Push(PUSH_MAPMODE);
+ Push(PushFlags::MAPMODE);
// set MapUnit for which 'nLen' has been calculated
SetMapMode(MapMode(MAP_PIXEL));
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index fbc9a1b27cfa..b8a37740f135 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -507,7 +507,7 @@ SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
{
if ( 0 != (pPrinter = rDocShell.GetPrt()) )
{
- pPrinter->Push( PUSH_MAPMODE );
+ pPrinter->Push( PushFlags::MAPMODE );
if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
{
// if it is an embedded object (without it's own printer)
@@ -532,7 +532,7 @@ SmPrinterAccess::SmPrinterAccess( SmDocShell &rDocShell )
}
if ( 0 != (pRefDev = rDocShell.GetRefDev()) && pPrinter != pRefDev )
{
- pRefDev->Push( PUSH_MAPMODE );
+ pRefDev->Push( PushFlags::MAPMODE );
if ( SFX_CREATE_MODE_EMBEDDED == rDocShell.GetCreateMode() )
{
// if it is an embedded object (without it's own printer)
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 0b7af71cb03c..dd1c51c4b4b9 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2675,7 +2675,7 @@ void SmMathSymbolNode::AdaptToY(const OutputDevice &rDev, sal_uLong nHeight)
if (aFntSize.Width() == 0)
{
OutputDevice &rDevNC = (OutputDevice &) rDev;
- rDevNC.Push(PUSH_FONT | PUSH_MAPMODE);
+ rDevNC.Push(PushFlags::FONT | PushFlags::MAPMODE);
rDevNC.SetFont(GetFont());
aFntSize.Width() = rDev.GetFontMetric().GetSize().Width();
rDevNC.Pop();
diff --git a/starmath/source/rect.cxx b/starmath/source/rect.cxx
index 8eef2bcb15e0..53775b128a01 100644
--- a/starmath/source/rect.cxx
+++ b/starmath/source/rect.cxx
@@ -154,7 +154,7 @@ void SmRect::BuildRect(const OutputDevice &rDev, const SmFormat *pFormat,
{
OutputDevice *pWindow = Application::GetDefaultDevice();
- pWindow->Push(PUSH_MAPMODE | PUSH_FONT);
+ pWindow->Push(PushFlags::MAPMODE | PushFlags::FONT);
pWindow->SetMapMode(rDev.GetMapMode());
pWindow->SetFont(rDev.GetFontMetric());
@@ -618,7 +618,7 @@ bool SmGetGlyphBoundRect(const OutputDevice &rDev,
const FontMetric aDevFM (rDev.GetFontMetric());
- pGlyphDev->Push(PUSH_FONT | PUSH_MAPMODE);
+ pGlyphDev->Push(PushFlags::FONT | PushFlags::MAPMODE);
vcl::Font aFnt(rDev.GetFont());
aFnt.SetAlign(ALIGN_TOP);
diff --git a/starmath/source/tmpdevice.cxx b/starmath/source/tmpdevice.cxx
index 2a6c3babce57..934bff4030f1 100644
--- a/starmath/source/tmpdevice.cxx
+++ b/starmath/source/tmpdevice.cxx
@@ -33,8 +33,8 @@
SmTmpDevice::SmTmpDevice(OutputDevice &rTheDev, bool bUseMap100th_mm) :
rOutDev(rTheDev)
{
- rOutDev.Push( PUSH_FONT | PUSH_MAPMODE |
- PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR );
+ rOutDev.Push( PushFlags::FONT | PushFlags::MAPMODE |
+ PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::TEXTCOLOR );
if (bUseMap100th_mm && MAP_100TH_MM != rOutDev.GetMapMode().GetMapUnit())
{
SAL_WARN("starmath", "incorrect MapMode?");
diff --git a/starmath/source/visitors.cxx b/starmath/source/visitors.cxx
index d0882b231fdf..9ffdc4d7f291 100644
--- a/starmath/source/visitors.cxx
+++ b/starmath/source/visitors.cxx
@@ -359,7 +359,7 @@ SmCaretDrawingVisitor::SmCaretDrawingVisitor( OutputDevice& rDevice,
return;
//Save device state
- rDev.Push( PUSH_FONT | PUSH_MAPMODE | PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_TEXTCOLOR );
+ rDev.Push( PushFlags::FONT | PushFlags::MAPMODE | PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::TEXTCOLOR );
pos.pSelectedNode->Accept( this );
//Restore device state
@@ -433,7 +433,7 @@ void SmCaretDrawingVisitor::DefaultVisit( SmNode* pNode )
void SmCaretPos2LineVisitor::Visit( SmTextNode* pNode )
{
//Save device state
- pDev->Push( PUSH_FONT | PUSH_TEXTCOLOR );
+ pDev->Push( PushFlags::FONT | PushFlags::TEXTCOLOR );
long i = pos.Index;
@@ -2070,7 +2070,7 @@ SmSelectionDrawingVisitor::SmSelectionDrawingVisitor( OutputDevice& rDevice, SmN
aSelectionArea.Move( Offset.X( ), Offset.Y( ) );
//Save device state
- rDev.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ rDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
//Change colors
rDev.SetLineColor( );
rDev.SetFillColor( Color( COL_LIGHTGRAY ) );
@@ -2109,7 +2109,7 @@ void SmSelectionDrawingVisitor::VisitChildren( SmNode* pNode )
void SmSelectionDrawingVisitor::Visit( SmTextNode* pNode )
{
if( pNode->IsSelected( ) ){
- rDev.Push( PUSH_TEXTCOLOR | PUSH_FONT );
+ rDev.Push( PushFlags::TEXTCOLOR | PushFlags::FONT );
rDev.SetFont( pNode->GetFont( ) );
Point Position = pNode->GetTopLeft( );
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index d04a6182e912..4e9e0c671593 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -805,7 +805,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
pFirstCol->Title(), false, false, !IsEnabled());
aButtonFrame.Draw( *pDev );
- pDev->Push( PUSH_LINECOLOR );
+ pDev->Push( PushFlags::LINECOLOR );
pDev->SetLineColor( Color( COL_BLACK ) );
pDev->DrawLine( Point( aRealPos.X(), aRealPos.Y() + nTitleHeight-1 ),
@@ -1018,7 +1018,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const Rectangle& _rRect, bool
{
// draw horizontal delimitation lines
_rOut.SetClipRegion();
- _rOut.Push( PUSH_LINECOLOR );
+ _rOut.Push( PushFlags::LINECOLOR );
_rOut.SetLineColor( aDelimiterLineColor );
long nY = aPos.Y() + nDataRowHeigt - 1;
if (nY <= aOverallAreaBRPos.Y())
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 82a9bb02d94e..490ad89bcbf0 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -502,7 +502,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
{
if( aSelectionTextColor != Color( COL_TRANSPARENT ) )
{
- pDev->Push( PUSH_TEXTCOLOR );
+ pDev->Push( PushFlags::TEXTCOLOR );
pDev->SetTextColor( aSelectionTextColor );
}
if ( IsEnabled() )
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index f25a0e6a50d5..a85a474293e2 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -2744,7 +2744,7 @@ void Ruler::DrawTab( OutputDevice* pDevice, const Color &rFillColor, const Point
Point aPos( rPos );
sal_uInt16 nTabStyle = nStyle & (RULER_TAB_STYLE | RULER_TAB_RTL);
- pDevice->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pDevice->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
pDevice->SetLineColor();
pDevice->SetFillColor(rFillColor);
ImplCenterTabPos( aPos, nTabStyle );
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index cb016846b3d5..f72eb40c3d8b 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -903,7 +903,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight )
if( IsNativeControlSupported( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL ) )
{
Size aPxSize( GetOutputSizePixel() );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( aSz.Width(), pEntry->maSize.Height() ) ) );
Rectangle aCtrlRect( Point( nX, 0 ), Size( aPxSize.Width()-nX, aPxSize.Height() ) );
DrawNativeControl( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL,
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index be4baa30e6ea..69c710991d5b 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -582,7 +582,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz,
bool bRectClip;
const bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
- pOut->Push( PUSH_CLIPREGION );
+ pOut->Push( PushFlags::CLIPREGION );
if( bCrop )
{
@@ -727,7 +727,7 @@ bool GraphicObject::StartAnimation( OutputDevice* pOut, const Point& rPt, const
bool bRectClip;
const bool bCrop = ImplGetCropParams( pOut, aPt, aSz, &aAttr, aClipPolyPoly, bRectClip );
- pOut->Push( PUSH_CLIPREGION );
+ pOut->Push( PushFlags::CLIPREGION );
if( bCrop )
{
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 57a1620d5fa7..b61f079d39d2 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1647,7 +1647,7 @@ void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size&
aOutSz = aRotBoundRect.GetSize();
}
- pOut->Push( PUSH_CLIPREGION );
+ pOut->Push( PushFlags::CLIPREGION );
pOut->IntersectClipRegion( Rectangle( aOutPt, aOutSz ) );
( (GDIMetaFile&) rMtf ).WindStart();
@@ -1994,7 +1994,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c
const Point aOutStart( aOutOrigin.X() + nInvisibleTilesX*rSizePixel.Width(),
aOutOrigin.Y() + nInvisibleTilesY*rSizePixel.Height() );
- pOut->Push( PUSH_CLIPREGION );
+ pOut->Push( PushFlags::CLIPREGION );
pOut->IntersectClipRegion( rArea );
// Paint all tiles
diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx
index a6d7c613540e..e1eeec061d76 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/svtools/source/table/gridtablerenderer.cxx
@@ -225,7 +225,7 @@ namespace svt { namespace table
OSL_PRECOND( _bIsColHeaderArea || _bIsRowHeaderArea,
"GridTableRenderer::PaintHeaderArea: invalid area flags!" );
- _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
+ _rDevice.Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
Color const background = lcl_getEffectiveColor( m_pImpl->rModel.getHeaderBackgroundColor(), _rStyle, &StyleSettings::GetDialogColor );
_rDevice.SetFillColor( background );
@@ -249,7 +249,7 @@ namespace svt { namespace table
void GridTableRenderer::PaintColumnHeader( ColPos _nCol, bool _bActive, bool _bSelected,
OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle )
{
- _rDevice.Push( PUSH_LINECOLOR);
+ _rDevice.Push( PushFlags::LINECOLOR);
OUString sHeaderText;
PColumnModel const pColumn = m_pImpl->rModel.getColumnModel( _nCol );
@@ -320,7 +320,7 @@ namespace svt { namespace table
// remember the row for subsequent calls to the other ->ITableRenderer methods
m_pImpl->nCurrentRow = _nRow;
- _rDevice.Push( PUSH_FILLCOLOR | PUSH_LINECOLOR);
+ _rDevice.Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR);
::Color backgroundColor = _rStyle.GetFieldColor();
@@ -384,7 +384,7 @@ namespace svt { namespace table
void GridTableRenderer::PaintRowHeader( bool i_hasControlFocus, bool _bSelected, OutputDevice& _rDevice, const Rectangle& _rArea,
const StyleSettings& _rStyle )
{
- _rDevice.Push( PUSH_LINECOLOR | PUSH_TEXTCOLOR );
+ _rDevice.Push( PushFlags::LINECOLOR | PushFlags::TEXTCOLOR );
::boost::optional< ::Color > const aLineColor( m_pImpl->rModel.getLineColor() );
::Color const lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : *aLineColor;
@@ -437,7 +437,7 @@ namespace svt { namespace table
void GridTableRenderer::PaintCell( ColPos const i_column, bool _bSelected, bool i_hasControlFocus,
OutputDevice& _rDevice, const Rectangle& _rArea, const StyleSettings& _rStyle )
{
- _rDevice.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ _rDevice.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
Rectangle const aContentArea( lcl_getContentArea( *m_pImpl, _rArea ) );
CellRenderContext const aRenderContext( _rDevice, aContentArea, _rStyle, i_column, _bSelected, i_hasControlFocus );
diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx
index 79cf3784dd44..7570adf0ce4e 100644
--- a/svtools/source/toolpanel/paneltabbar.cxx
+++ b/svtools/source/toolpanel/paneltabbar.cxx
@@ -472,7 +472,7 @@ namespace svt
ClipItemRegion( const PanelTabBar_Impl& i_rImpl )
:m_rDevice( i_rImpl.m_rTabBar )
{
- m_rDevice.Push( PUSH_CLIPREGION );
+ m_rDevice.Push( PushFlags::CLIPREGION );
m_rDevice.SetClipRegion(vcl::Region(
i_rImpl.m_aNormalizer.getTransformed(
i_rImpl.m_aGeometry.getItemsRect(),
@@ -683,7 +683,7 @@ namespace svt
Point aTextPos( aRenderArea.TopLeft() );
if ( IsVertical() )
{
- m_rTabBar.Push( PUSH_FONT );
+ m_rTabBar.Push( PushFlags::FONT );
vcl::Font aFont( m_rTabBar.GetFont() );
aFont.SetOrientation( 2700 );
@@ -1046,7 +1046,7 @@ namespace svt
// background
const Rectangle aNormalizedPaintArea( m_pImpl->m_aNormalizer.getNormalized( i_rRect, m_pImpl->m_eTabAlignment ) );
- m_pImpl->m_aRenderDevice.Push( PUSH_CLIPREGION );
+ m_pImpl->m_aRenderDevice.Push( PushFlags::CLIPREGION );
m_pImpl->m_aRenderDevice.SetClipRegion(vcl::Region(aNormalizedPaintArea));
m_pImpl->m_pRenderer->renderBackground();
m_pImpl->m_aRenderDevice.Pop();
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index 190858bdc9fe..fec46f81bc2c 100644
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -746,7 +746,7 @@ vcl::Region lclCreatePolygon( const Point& rP1, const Point& rP2, const Point& r
*/
void lclSetColorToOutDev( OutputDevice& rDev, const Color& rColor, const Color* pForceColor )
{
- rDev.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ rDev.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
rDev.SetLineColor( pForceColor ? *pForceColor : rColor );
rDev.SetFillColor( pForceColor ? *pForceColor : rColor );
}
@@ -958,7 +958,7 @@ void lclPushDiagClipRect( OutputDevice& rDev, const Rectangle& rRect, const Diag
if( (aClipRect.GetWidth() < 1) ||(aClipRect.GetHeight() < 1) )
aClipRect.SetEmpty();
- rDev.Push( PUSH_CLIPREGION );
+ rDev.Push( PushFlags::CLIPREGION );
rDev.IntersectClipRegion( aClipRect );
}
@@ -1005,7 +1005,7 @@ void lclPushCrossingClipRegion( OutputDevice& rDev, const Rectangle& rRect, bool
aRPoints.maBeg, aRPoints.maEnd, rRect.BottomLeft(), rRect.BottomRight(), rRect.TopRight() ) );
}
- rDev.Push( PUSH_CLIPREGION );
+ rDev.Push( PushFlags::CLIPREGION );
rDev.IntersectClipRegion( aClipReg );
}
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx
index 9ad80ccc53b0..6a3371941812 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -1126,7 +1126,7 @@ void Array::DrawRange( OutputDevice& rDev,
// *** diagonal frame borders ***
// set clipping region to clip partly visible merged cells
- rDev.Push( PUSH_CLIPREGION );
+ rDev.Push( PushFlags::CLIPREGION );
rDev.IntersectClipRegion( GetClipRangeRectangle() );
for( nRow = nFirstRow; nRow <= nLastRow; ++nRow )
{
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 42930b756cf0..72b815a9a1c7 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1031,7 +1031,7 @@ void FmFilterItemsString::Paint(
const bool bIsCurrentFilter = pForm->GetChildren()[ pForm->GetFilterController()->getActiveTerm() ] == pRow;
if ( bIsCurrentFilter )
{
- rDev.Push( PUSH_LINECOLOR );
+ rDev.Push( PushFlags::LINECOLOR );
rDev.SetLineColor( rDev.GetTextColor() );
diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx
index 9b9c71824428..74d97120c86f 100644
--- a/svx/source/gallery2/galctrl.cxx
+++ b/svx/source/gallery2/galctrl.cxx
@@ -506,7 +506,7 @@ sal_Int32 GalleryListView::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColu
void GalleryListView::PaintField( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 /*nColumnId*/ ) const
{
- rDev.Push( PUSH_CLIPREGION );
+ rDev.Push( PushFlags::CLIPREGION );
rDev.IntersectClipRegion( rRect );
if( mpTheme && ( mnCurRow < mpTheme->GetObjectCount() ) )
diff --git a/svx/source/sdr/contact/objectcontactofpageview.cxx b/svx/source/sdr/contact/objectcontactofpageview.cxx
index f778df103307..c9d9366c24ca 100644
--- a/svx/source/sdr/contact/objectcontactofpageview.cxx
+++ b/svx/source/sdr/contact/objectcontactofpageview.cxx
@@ -161,7 +161,7 @@ namespace sdr
if(!rRedrawArea.IsEmpty())
{
bClipRegionPushed = true;
- pOutDev->Push(PUSH_CLIPREGION);
+ pOutDev->Push(PushFlags::CLIPREGION);
pOutDev->IntersectClipRegion(rRedrawArea);
}
diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
index 7712e625c55f..9a3d88262d9f 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -191,7 +191,7 @@ void ValueSetWithTextControl::UserDraw( const UserDrawEvent& rUDEvt )
{
const Rectangle aRect = rUDEvt.GetRect();
OutputDevice* pDev = rUDEvt.GetDevice();
- pDev->Push( PUSH_ALL );
+ pDev->Push( PushFlags::ALL );
const sal_uInt16 nItemId = rUDEvt.GetItemId();
const long nRectHeight = aRect.GetHeight();
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 83b8f8da9006..7f8666064bfe 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -202,7 +202,7 @@ static void lcl_ClearArea( const SwFrm &rFrm,
}
else
{
- rOut.Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ rOut.Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
rOut.SetFillColor( rFrm.getRootFrm()->GetCurrShell()->Imp()->GetRetoucheColor());
rOut.SetLineColor();
for( sal_uInt16 i = 0; i < aRegion.size(); ++i )
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 834bc65fc6e3..ad56718a900c 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -412,7 +412,7 @@ namespace
{
if ( pViewShell->getPrePostMapMode() != mpOutDev->GetMapMode() )
{
- mpOutDev->Push(PUSH_MAPMODE);
+ mpOutDev->Push(PushFlags::MAPMODE);
GDIMetaFile* pMetaFile = mpOutDev->GetConnectMetaFile();
if ( pMetaFile &&
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 1902a01dc0ba..ed0a031d4139 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -2116,7 +2116,7 @@ void SwLayIdle::ShowIdle( ColorData eColorData )
Rectangle aRect( 0, 0, 5, 5 );
aRect = pWin->PixelToLogic( aRect );
// OD 2004-04-23 #116347#
- pWin->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ pWin->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pWin->SetFillColor( eColorData );
pWin->SetLineColor();
pWin->DrawRect( aRect );
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index b2c9f8d0ebea..bbb2cda42a65 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -995,7 +995,7 @@ void SwLineRects::PaintLines( OutputDevice *pOut )
// #i16816# tagged pdf support
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pOut );
- pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOut->SetFillColor();
pOut->SetLineColor();
ConnectEdges( pOut );
@@ -1166,7 +1166,7 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut,
if ( !aLineRects.empty() )
{
- pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOut->SetLineColor();
// Reset draw mode in high contrast mode in order to get fill color
@@ -1817,7 +1817,7 @@ static void lcl_DrawGraphic( const SvxBrushItem& rBrush, OutputDevice *pOut,
const bool bNotInside = bClip && !rOut.IsInside( aAlignedGrfRect );
if ( bNotInside )
{
- pOut->Push( PUSH_CLIPREGION );
+ pOut->Push( PushFlags::CLIPREGION );
pOut->IntersectClipRegion( rOut.SVRect() );
}
@@ -2062,7 +2062,7 @@ void DrawGraphic(
// area, from which the background brush is determined.
aGrf.Pos() = rOrg.Pos();
// setup clipping at output device
- pOutDev->Push( PUSH_CLIPREGION );
+ pOutDev->Push( PushFlags::CLIPREGION );
pOutDev->IntersectClipRegion( rOut.SVRect() );
// use new method <GraphicObject::DrawTiled(::)>
{
@@ -2120,7 +2120,7 @@ void DrawGraphic(
bool bGrfBackgrdAlreadyDrawn = false;
if ( bRetouche )
{
- pOutDev->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ pOutDev->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOutDev->SetLineColor();
// check, if a existing background graphic (not filling the complete
@@ -4136,7 +4136,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
aRect._Intersection( Frm() );
OutputDevice* pOut = pGlobalShell->GetOut();
- pOut->Push( PUSH_CLIPREGION );
+ pOut->Push( PushFlags::CLIPREGION );
pOut->SetClipRegion();
const SwPageFrm* pPage = FindPageFrm();
@@ -4239,7 +4239,7 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const
//one.
// OD 2004-04-23 #116347#
- pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOut->SetLineColor();
pPage = FindPageFrm();
@@ -6420,7 +6420,7 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage,
SwTaggedPDFHelper aTaggedPDFHelper( 0, 0, 0, *pOut );
// OD 2004-04-23 #116347#
- pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOut->SetLineColor();
SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)this );
diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx
index 5c141488a774..6a036894091d 100644
--- a/sw/source/core/layout/virtoutp.cxx
+++ b/sw/source/core/layout/virtoutp.cxx
@@ -42,7 +42,7 @@ inline DbgRect::DbgRect( OutputDevice *pOutDev, const Rectangle &rRect,
{
if( pOut )
{
- pOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ pOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
pOut->SetLineColor( eColor );
pOut->SetFillColor();
pOut->DrawRect( rRect );
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 5d9a4880ba59..d394165166c6 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -1546,7 +1546,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Prepare the output device:
- mrOut.Push( PUSH_MAPMODE );
+ mrOut.Push( PushFlags::MAPMODE );
MapMode aMapMode( mrOut.GetMapMode() );
aMapMode.SetMapUnit( MAP_TWIP );
mrOut.SetMapMode( aMapMode );
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index b72d18f598ec..311059c51910 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1069,7 +1069,7 @@ void SwTxtPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool b
!GetOpt().IsPagePreview())
{
OutputDevice* pOut = (OutputDevice*)GetOut();
- pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
pOut->SetFillColor( SwViewOption::GetFieldShadingsColor() );
pOut->SetLineColor();
pOut->DrawRect( aIntersect.SVRect() );
@@ -1077,7 +1077,7 @@ void SwTxtPaintInfo::DrawCheckBox(const SwFieldFormCheckboxPortion &rPor, bool b
}
const int delta=10;
Rectangle r(aIntersect.Left()+delta, aIntersect.Top()+delta, aIntersect.Right()-delta, aIntersect.Bottom()-delta);
- m_pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ m_pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
m_pOut->SetLineColor( Color(0, 0, 0));
m_pOut->SetFillColor();
m_pOut->DrawRect( r );
@@ -1100,7 +1100,7 @@ void SwTxtPaintInfo::DrawBackground( const SwLinePortion &rPor ) const
if ( aIntersect.HasArea() )
{
OutputDevice* pOut = (OutputDevice*)GetOut();
- pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
// For dark background we do not want to have a filled rectangle
if ( GetVsh() && GetVsh()->GetWin() && lcl_IsDarkBackground( *this ) )
@@ -1151,7 +1151,7 @@ void SwTxtPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
!GetOpt().IsPagePreview())
{
OutputDevice* pOutDev = (OutputDevice*)GetOut();
- pOutDev->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pOutDev->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
pOutDev->SetFillColor( SwViewOption::GetFieldShadingsColor() );
pOutDev->SetLineColor( );
pOutDev->DrawRect( aIntersect.SVRect() );
@@ -1183,7 +1183,7 @@ void SwTxtPaintInfo::DrawBackBrush( const SwLinePortion &rPor ) const
aFillColor = *m_pFnt->GetBackColor();
}
- pTmpOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pTmpOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
pTmpOut->SetFillColor(aFillColor);
pTmpOut->SetLineColor();
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index 68be6f01b416..d1ef7de685d9 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -98,8 +98,8 @@ void SwLinePortion::PrePaint( const SwTxtPaintInfo& rInf,
sal_uInt16 nPos;
SwTxtPaintInfo aInf( rInf );
- const bool bBidiPor = ( rInf.GetTxtFrm()->IsRightToLeft() ) !=
- ( 0 != ( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() ) );
+ const bool bBidiPor = rInf.GetTxtFrm()->IsRightToLeft() !=
+ bool( TEXT_LAYOUT_BIDI_RTL & rInf.GetOut()->GetLayoutMode() );
sal_uInt16 nDir = bBidiPor ?
1800 :
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index f3b648bc2af0..c7216d1e190c 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -868,7 +868,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
! rInf.IsIgnoreFrmRTL();
const ComplexTextLayoutMode nMode = rInf.GetOut().GetLayoutMode();
const bool bBidiPor = ( bSwitchL2R !=
- ( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
+ ( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
// be sure to have the correct layout mode at the printer
if ( pPrinter )
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 92d7d7e8035c..4dd6e4099c10 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -284,7 +284,7 @@ void SwDoDrawCapital::DrawSpace( Point &rPos )
const ComplexTextLayoutMode nMode = rInf.GetpOut()->GetLayoutMode();
const bool bBidiPor = ( bSwitchL2R !=
- ( 0 != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
+ ( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & nMode ) ) );
if ( bBidiPor )
nDiff = -nDiff;
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 24afd66d7d7c..3975cc371518 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -1481,7 +1481,7 @@ void SwDrawTextInfo::Shift( sal_uInt16 nDir )
#endif
const bool bBidiPor = ( GetFrm() && GetFrm()->IsRightToLeft() ) !=
- ( 0 != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
+ ( TEXT_LAYOUT_DEFAULT != ( TEXT_LAYOUT_BIDI_RTL & GetpOut()->GetLayoutMode() ) );
nDir = bBidiPor ?
1800 :
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index 4ac29083c745..6c80d1f64b9b 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -130,7 +130,7 @@ void SwViewImp::PaintLayer( const SdrLayerID _nLayerID,
GetDrawView()->GetModel()->GetDrawOutliner().SetDefaultHorizontalTextDirection( aEEHoriTextDirOfPage );
}
- pOutDev->Push( PUSH_LINECOLOR ); // #114231#
+ pOutDev->Push( PushFlags::LINECOLOR ); // #114231#
if (pPrintData)
{
// hide drawings but not form controls (form controls are handled elsewhere)
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index d861c8d51cc8..561bcd9027c9 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1473,7 +1473,7 @@ void SwViewShell::PaintDesktop( const SwRect &rRect )
void SwViewShell::_PaintDesktop( const SwRegionRects &rRegion )
{
// OD 2004-04-23 #116347#
- GetOut()->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ GetOut()->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
GetOut()->SetLineColor();
for ( sal_uInt16 i = 0; i < rRegion.size(); ++i )
@@ -1744,7 +1744,7 @@ void SwViewShell::Paint(const Rectangle &rRect)
const vcl::Region aDLRegion(rRect);
DLPrePaint2(aDLRegion);
- mpOut->Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
+ mpOut->Push( PushFlags::FILLCOLOR|PushFlags::LINECOLOR );
mpOut->SetFillColor( Imp()->GetRetoucheColor() );
mpOut->SetLineColor();
mpOut->DrawRect( rRect );
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 9db297083121..7f2b520d73ce 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -611,7 +611,7 @@ void SwViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, const SwPrintD
// document because the thumbnail creation will not trigger a complete
// formatting of the document.
- pOleOut->Push( PUSH_CLIPREGION );
+ pOleOut->Push( PushFlags::CLIPREGION );
pOleOut->IntersectClipRegion( aSwRect.SVRect() );
pSh->GetLayout()->Paint( aSwRect );
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 227f5347588a..046e14685ebb 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -2355,7 +2355,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const OUString &rString,
OSL_ENSURE(pOut, "Impossible");
if (pOut)
{
- pOut->Push( PUSH_FONT | PUSH_MAPMODE );
+ pOut->Push( PushFlags::FONT | PushFlags::MAPMODE );
pOut->SetMapMode( MapMode( MAP_100TH_MM ));
pOut->SetFont( aFont );
aRet.Width = pOut->GetTextWidth(rString);
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 7cff47ead65c..d8c9c47bcbf3 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -758,7 +758,7 @@ void AutoFmtPreview::DrawBackground()
{
SvxBrushItem aBrushItem( aCurData.GetBoxFmt( GetFormatIndex( nCol, nRow ) ).GetBackground() );
- aVD.Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ aVD.Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
aVD.SetLineColor();
aVD.SetFillColor( aBrushItem.GetColor() );
aVD.DrawRect( maArray.GetCellRect( nCol, nRow ) );
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index ca81b559d32b..43098d0d5ca7 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -24,33 +24,33 @@ const size_t constMaxActionType = 513;
OUString flagToString(PushFlags nFlag)
{
- if (nFlag & PUSH_LINECOLOR)
+ if (nFlag & PushFlags::LINECOLOR)
return OUString("PushLineColor");
- else if (nFlag & PUSH_FILLCOLOR)
+ else if (nFlag & PushFlags::FILLCOLOR)
return OUString("PushFillColor");
- else if (nFlag & PUSH_FONT)
+ else if (nFlag & PushFlags::FONT)
return OUString("PushFont");
- else if (nFlag & PUSH_TEXTCOLOR)
+ else if (nFlag & PushFlags::TEXTCOLOR)
return OUString("PushTextColor");
- else if (nFlag & PUSH_MAPMODE)
+ else if (nFlag & PushFlags::MAPMODE)
return OUString("PushMapMode");
- else if (nFlag & PUSH_CLIPREGION)
+ else if (nFlag & PushFlags::CLIPREGION)
return OUString("PushClipRegion");
- else if (nFlag & PUSH_RASTEROP)
+ else if (nFlag & PushFlags::RASTEROP)
return OUString("PushRasterOp");
- else if (nFlag & PUSH_TEXTFILLCOLOR)
+ else if (nFlag & PushFlags::TEXTFILLCOLOR)
return OUString("PushTextFillColor");
- else if (nFlag & PUSH_TEXTALIGN)
+ else if (nFlag & PushFlags::TEXTALIGN)
return OUString("PushTextAlign");
- else if (nFlag & PUSH_REFPOINT)
+ else if (nFlag & PushFlags::REFPOINT)
return OUString("PushRefPoint");
- else if (nFlag & PUSH_TEXTLINECOLOR)
+ else if (nFlag & PushFlags::TEXTLINECOLOR)
return OUString("PushTextLineColor");
- else if (nFlag & PUSH_TEXTLAYOUTMODE)
+ else if (nFlag & PushFlags::TEXTLAYOUTMODE)
return OUString("PushTextLayoutMode");
- else if (nFlag & PUSH_TEXTLANGUAGE)
+ else if (nFlag & PushFlags::TEXTLANGUAGE)
return OUString("PushTextLanguage");
- else if (nFlag & PUSH_OVERLINECOLOR)
+ else if (nFlag & PushFlags::OVERLINECOLOR)
return OUString("PushOverlineColor");
return OUString();
@@ -58,7 +58,7 @@ OUString flagToString(PushFlags nFlag)
OUString collectPushFlags(PushFlags nFlags)
{
- if ((nFlags & PUSH_ALL) == nFlags)
+ if ((nFlags & PushFlags::ALL) == nFlags)
return OUString("PushAll");
else if ((nFlags & PUSH_ALLFONT) == nFlags)
return OUString("PushAllFont");
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 52ef7b3afd84..03329959edcf 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -838,7 +838,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF
if( aInRect.Right() < aInRect.Left() || aInRect.Bottom() < aInRect.Top() )
aInRect.SetEmpty();
- pDev->Push( PUSH_CLIPREGION );
+ pDev->Push( PushFlags::CLIPREGION );
pDev->IntersectClipRegion( aInRect );
if ( nDrawFlags & WINDOW_DRAW_MONO )
@@ -2033,7 +2033,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
- pDev->Push( PUSH_CLIPREGION );
+ pDev->Push( PushFlags::CLIPREGION );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
// no image radio button
@@ -2860,7 +2860,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlag
void RadioButton::ImplSetMinimumNWFSize()
{
- Push( PUSH_MAPMODE );
+ Push( PushFlags::MAPMODE );
SetMapMode( MAP_PIXEL );
ImplControlValue aControlValue;
@@ -3083,7 +3083,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
WinBits nWinStyle = GetStyle();
OUString aText( GetText() );
- pDev->Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
+ pDev->Push( PushFlags::CLIPREGION | PushFlags::LINECOLOR );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
long nLineY = rPos.Y() + (rSize.Height()-1)/2;
@@ -3714,7 +3714,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags )
void CheckBox::ImplSetMinimumNWFSize()
{
- Push( PUSH_MAPMODE );
+ Push( PushFlags::MAPMODE );
SetMapMode( MAP_PIXEL );
ImplControlValue aControlValue;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 2c57deecd063..dc345d21b78f 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -530,7 +530,7 @@ void Edit::ImplRepaint(bool bLayout)
if( (GetStyle() & WB_FORCECTRLBACKGROUND) != 0 && IsControlBackground() )
{
// check if we need to set ControlBackground even in NWF case
- Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
+ Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
SetLineColor();
SetFillColor( GetControlBackground() );
DrawRect( Rectangle( aPos, Size( GetOutputSizePixel().Width() - 2*mnXOffset, GetOutputSizePixel().Height() ) ) );
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 06a3cde5cee0..d7a0f8d82bc3 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -564,7 +564,7 @@ void FixedLine::ImplDraw( bool bLayout )
else if( (nWinStyle & WB_VERT) )
{
long nWidth = GetTextWidth( aText );
- Push( PUSH_FONT );
+ Push( PushFlags::FONT );
vcl::Font aFont( GetFont() );
aFont.SetOrientation( 900 );
SetFont( aFont );
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index f54fcd76607a..579ca89f20ee 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1246,7 +1246,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const MetaAction* pSubstAct = aSubstitute.GetAction( i );
if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
{
- maVDev.Push( PUSH_ALL );
+ maVDev.Push( PushFlags::ALL );
ImplBeginRecord( WIN_EMR_SAVEDC );
ImplEndRecord();
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 51535749746f..1aa01fef966b 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -830,7 +830,7 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
{
mbIsMapWinSet = false;
mbIsMapDevSet = false;
- mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // The original clipregion has to be on top
+ mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::CLIPREGION ) ); // The original clipregion has to be on top
// of the stack so it can always be restored
// this is necessary to be able to support
// SetClipRgn( NULL ) and similar ClipRgn actions (SJ)
@@ -867,7 +867,7 @@ void WinMtfOutput::UpdateClipRegion()
mbComplexClip = false;
mpGDIMetaFile->AddAction( new MetaPopAction() ); // taking the original clipregion
- mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) );
+ mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::CLIPREGION ) );
// skip for 'no clipping at all' case
if( !aClipPath.isEmpty() )
@@ -976,7 +976,7 @@ void WinMtfOutput::StrokeAndFillPath( bool bStroke, bool bFill )
{
if ( !bStroke )
{
- mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), false ) );
}
if ( aPathObj.Count() == 1 )
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 16493cec4005..95473f08f08c 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1495,27 +1495,27 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
aDstLineInfo = pAt->aLineInfo;
aDstLineColor = pAt->aLineColor;
- if ( pAt->nFlags & PUSH_LINECOLOR )
+ if ( pAt->nFlags & PushFlags::LINECOLOR )
aSrcLineColor = pAt->aLineColor;
aDstFillColor = pAt->aFillColor;
- if ( pAt->nFlags & PUSH_FILLCOLOR )
+ if ( pAt->nFlags & PushFlags::FILLCOLOR )
aSrcFillColor = pAt->aFillColor;
eDstROP2 = pAt->eRasterOp;
- if ( pAt->nFlags & PUSH_RASTEROP )
+ if ( pAt->nFlags & PushFlags::RASTEROP )
eSrcRasterOp = pAt->eRasterOp;
aDstFont = pAt->aFont;
- if ( pAt->nFlags & PUSH_FONT )
+ if ( pAt->nFlags & PushFlags::FONT )
aSrcFont = pAt->aFont;
eDstTextAlign = pAt->eTextAlign;
- if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTALIGN ) )
+ if ( pAt->nFlags & ( PushFlags::FONT | PushFlags::TEXTALIGN ) )
eSrcTextAlign = pAt->eTextAlign;
aDstTextColor = pAt->aTextColor;
- if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTCOLOR ) )
+ if ( pAt->nFlags & ( PushFlags::FONT | PushFlags::TEXTCOLOR ) )
aSrcTextColor = pAt->aTextColor;
- if ( pAt->nFlags & PUSH_MAPMODE )
+ if ( pAt->nFlags & PushFlags::MAPMODE )
aSrcMapMode = pAt->aMapMode;
aDstClipRegion = pAt->aClipRegion;
- if ( pAt->nFlags & PUSH_CLIPREGION )
+ if ( pAt->nFlags & PushFlags::CLIPREGION )
aSrcClipRegion = pAt->aClipRegion;
WMFRecord_RestoreDC();
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 38a9b523c80a..3d95cc97d59d 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -665,7 +665,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
const Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -686,7 +686,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
const Polygon aPoly( aRect, aPt, aPt1, POLY_ARC );
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -707,7 +707,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
const Polygon aPoly( aRect, aPt, aPt1, POLY_PIE );
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -722,7 +722,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_HIGHLIGHTRECT_ACTION ):
{
ImplReadRect( rIStm, aRect );
- rMtf.AddAction( new MetaPushAction( PUSH_RASTEROP ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::RASTEROP ) );
rMtf.AddAction( new MetaRasterOpAction( ROP_INVERT ) );
rMtf.AddAction( new MetaRectAction( aRect ) );
rMtf.AddAction( new MetaPopAction() );
@@ -747,7 +747,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolygonAction( aActionPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -769,7 +769,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -1109,7 +1109,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_PUSH_ACTION ):
{
aLIStack.push( new LineInfo( aLineInfo ) );
- rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::ALL ) );
// #106172# Track font relevant data in shadow VDev
aFontVDev.Push();
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index d7ea6092a859..963592b9853f 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -371,12 +371,12 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
aPushFlags.push_back(nFlags);
- if(nFlags & PUSH_CLIPREGION)
+ if(nFlags & PushFlags::CLIPREGION)
{
aClips.push_back(aClips.back());
}
- if(nFlags & PUSH_MAPMODE)
+ if(nFlags & PushFlags::MAPMODE)
{
aMapModes.push_back(aMapModes.back());
}
@@ -391,7 +391,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
const PushFlags nFlags(aPushFlags.back());
aPushFlags.pop_back();
- if(nFlags & PUSH_CLIPREGION)
+ if(nFlags & PushFlags::CLIPREGION)
{
if(aClips.size() > 1)
{
@@ -403,7 +403,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
}
}
- if(nFlags & PUSH_MAPMODE)
+ if(nFlags & PushFlags::MAPMODE)
{
if(aMapModes.size() > 1)
{
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index b1e4f8e7d29f..9144800e627c 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -350,7 +350,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
// This is necessary, since old metafiles don't even know of these
// recent add-ons. Newer metafiles must of course explicitly set
// those states.
- pOut->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
+ pOut->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
pOut->SetLayoutMode( TEXT_LAYOUT_DEFAULT );
pOut->SetDigitLanguage( 0 );
@@ -1792,7 +1792,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaPushAction* pAct = static_cast<MetaPushAction*>(pAction);
aPushFlagStack.push_back( pAct->GetFlags() );
- if( aPushFlagStack.back() & PUSH_CLIPREGION )
+ if( aPushFlagStack.back() & PushFlags::CLIPREGION )
{
Rectangle aRect( aClipStack.back() );
aClipStack.push_back( aRect );
@@ -1803,7 +1803,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
// sanity check
if( ! aPushFlagStack.empty() )
{
- if( aPushFlagStack.back() & PUSH_CLIPREGION )
+ if( aPushFlagStack.back() & PushFlags::CLIPREGION )
{
if( aClipStack.size() > 1 )
aClipStack.pop_back();
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 670f1694b75e..365bd46edbfe 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -3108,7 +3108,7 @@ void MetaFontAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
MetaPushAction::MetaPushAction() :
MetaAction ( META_PUSH_ACTION ),
- mnFlags ( PUSH_NONE )
+ mnFlags ( PushFlags::NONE )
{}
MetaPushAction::~MetaPushAction()
@@ -3140,7 +3140,7 @@ void MetaPushAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, STREAM_WRITE, 1);
- rOStm.WriteUInt16( mnFlags );
+ rOStm.WriteUInt16( static_cast<sal_uInt16>(mnFlags) );
}
void MetaPushAction::Read( SvStream& rIStm, ImplMetaReadData* )
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index f4524ed6a979..ea3b130f24af 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -147,7 +147,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
{
case PDFExtOutDevDataSync::CreateNamedDest : //i56629
{
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
mParaMapModes.pop_front();
mParaIds.push_back( rWriter.CreateNamedDest( mParaOUStrings.front(), mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
@@ -160,7 +160,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
break;
case PDFExtOutDevDataSync::CreateDest :
{
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
mParaMapModes.pop_front();
mParaIds.push_back( rWriter.CreateDest( mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
@@ -172,7 +172,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
break;
case PDFExtOutDevDataSync::CreateLink :
{
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
mParaMapModes.pop_front();
mParaIds.push_back( rWriter.CreateLink( mParaRects.front(), mParaInts.front() ) );
@@ -206,7 +206,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
PDFLinkDestination& rDest = mFutureDestinations[ nDestId ];
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( rDest.mMapMode );
mParaIds.push_back( rWriter.RegisterDestReference( nDestId, rDest.mRect, rDest.mPageNr, rDest.mAreaType ) );
rWriter.Pop();
@@ -243,7 +243,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
break;
case PDFExtOutDevDataSync::CreateNote :
{
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
rWriter.CreateNote( mParaRects.front(), mParaPDFNotes.front(), mParaInts.front() );
mParaMapModes.pop_front();
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index b399d7acefa4..81ad0f5cb2f0 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -198,7 +198,7 @@ void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient
void PDFWriter::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient )
{
- pImplementation->push(PUSH_CLIPREGION);
+ pImplementation->push(PushFlags::CLIPREGION);
pImplementation->setClipRegion( rPolyPoly.getB2DPolyPolygon() );
pImplementation->drawGradient( rPolyPoly.GetBoundRect(), rGradient );
pImplementation->pop();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2fc71954f756..b9f0df7c441e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -237,7 +237,7 @@ void doTestCode()
aClipPoly.setClosed( true );
aClip.append( aClipPoly );
- aWriter.Push( PUSH_CLIPREGION | PUSH_FILLCOLOR );
+ aWriter.Push( PushFlags::CLIPREGION | PushFlags::FILLCOLOR );
aWriter.SetClipRegion( aClip );
aWriter.DrawEllipse( Rectangle( Point( 4500, 9600 ), Size( 12000, 3000 ) ) );
aWriter.MoveClipRegion( 1000, 500 );
@@ -3524,7 +3524,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
throw FontException();
OutputDevice* pRef = getReferenceDevice();
- pRef->Push( PUSH_FONT | PUSH_MAPMODE );
+ pRef->Push( PushFlags::FONT | PushFlags::MAPMODE );
pRef->SetMapMode( MapMode( MAP_PIXEL ) );
Font aFont( pFont->GetFamilyName(), pFont->GetStyleName(), Size( 0, 1000 ) );
aFont.SetWeight( pFont->GetWeight() );
@@ -4679,7 +4679,7 @@ void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
// save graphics state
- push( PUSH_ALL );
+ push( PushFlags::ALL );
// transform relative to control's coordinates since an
// appearance stream is a form XObject
@@ -4786,7 +4786,7 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
SvMemoryStream* pEditStream = new SvMemoryStream( 1024, 1024 );
- push( PUSH_ALL );
+ push( PushFlags::ALL );
// prepare font to use, draw field border
Font aFont = drawFieldBorder( rEdit, rWidget, rSettings );
@@ -4838,7 +4838,7 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
SvMemoryStream* pListBoxStream = new SvMemoryStream( 1024, 1024 );
- push( PUSH_ALL );
+ push( PushFlags::ALL );
// prepare font to use, draw field border
Font aFont = drawFieldBorder( rBox, rWidget, rSettings );
@@ -4889,7 +4889,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
// save graphics state
- push( PUSH_ALL );
+ push( PushFlags::ALL );
if( rWidget.Background || rWidget.Border )
{
@@ -5014,7 +5014,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
// save graphics state
- push( PUSH_ALL );
+ push( PushFlags::ALL );
if( rWidget.Background || rWidget.Border )
{
@@ -5102,7 +5102,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
rBox.m_aRect = aCheckRect;
// create appearance streams
- push( PUSH_ALL);
+ push( PushFlags::ALL);
SvMemoryStream* pCheckStream = new SvMemoryStream( 256, 256 );
beginRedirect( pCheckStream, aCheckRect );
@@ -7142,7 +7142,7 @@ void PDFWriterImpl::registerGlyphs( int nGlyphs,
void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool bTextLines )
{
- push( PUSH_ALL );
+ push( PushFlags::ALL );
FontRelief eRelief = m_aCurrentPDFState.m_aFont.GetRelief();
@@ -7714,7 +7714,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
bool bEmphPolyLine;
FontEmphasisMark nEmphMark;
- push( PUSH_ALL );
+ push( PushFlags::ALL );
aLine.setLength( 0 );
aLine.append( "q\n" );
@@ -8396,7 +8396,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
ComplexTextLayoutMode nOrigTLM = m_pReferenceDevice->GetLayoutMode();
m_pReferenceDevice->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG|TEXT_LAYOUT_COMPLEX_DISABLED );
- push( PUSH_CLIPREGION );
+ push( PushFlags::CLIPREGION );
FontMetric aRefDevFontMetric = m_pReferenceDevice->GetFontMetric();
Rectangle aRect;
aRect.Left() = rPos.X();
@@ -8659,7 +8659,7 @@ void PDFWriterImpl::pushResource( ResourceKind eKind, const OString& rResource,
void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRect )
{
- push( PUSH_ALL );
+ push( PushFlags::ALL );
// force reemitting clip region inside the new stream, and
// prevent emitting an unbalanced "Q" at the start
@@ -10321,7 +10321,7 @@ void PDFWriterImpl::drawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
tools::PolyPolygon aPolyPoly( rPolyPoly );
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
- push( PUSH_LINECOLOR );
+ push( PushFlags::LINECOLOR );
setLineColor( rHatch.GetColor() );
getReferenceDevice()->DrawHatch( aPolyPoly, rHatch, false );
pop();
@@ -10630,32 +10630,32 @@ void PDFWriterImpl::pop()
// move those parameters back that were not pushed
// in the first place
- if( ! (aState.m_nFlags & PUSH_LINECOLOR) )
+ if( ! (aState.m_nFlags & PushFlags::LINECOLOR) )
setLineColor( aState.m_aLineColor );
- if( ! (aState.m_nFlags & PUSH_FILLCOLOR) )
+ if( ! (aState.m_nFlags & PushFlags::FILLCOLOR) )
setFillColor( aState.m_aFillColor );
- if( ! (aState.m_nFlags & PUSH_FONT) )
+ if( ! (aState.m_nFlags & PushFlags::FONT) )
setFont( aState.m_aFont );
- if( ! (aState.m_nFlags & PUSH_TEXTCOLOR) )
+ if( ! (aState.m_nFlags & PushFlags::TEXTCOLOR) )
setTextColor( aState.m_aFont.GetColor() );
- if( ! (aState.m_nFlags & PUSH_MAPMODE) )
+ if( ! (aState.m_nFlags & PushFlags::MAPMODE) )
setMapMode( aState.m_aMapMode );
- if( ! (aState.m_nFlags & PUSH_CLIPREGION) )
+ if( ! (aState.m_nFlags & PushFlags::CLIPREGION) )
{
// do not use setClipRegion here
// it would convert again assuming the current mapmode
rOld.m_aClipRegion = aState.m_aClipRegion;
rOld.m_bClipRegion = aState.m_bClipRegion;
}
- if( ! (aState.m_nFlags & PUSH_TEXTLINECOLOR ) )
+ if( ! (aState.m_nFlags & PushFlags::TEXTLINECOLOR ) )
setTextLineColor( aState.m_aTextLineColor );
- if( ! (aState.m_nFlags & PUSH_OVERLINECOLOR ) )
+ if( ! (aState.m_nFlags & PushFlags::OVERLINECOLOR ) )
setOverlineColor( aState.m_aOverlineColor );
- if( ! (aState.m_nFlags & PUSH_TEXTALIGN ) )
+ if( ! (aState.m_nFlags & PushFlags::TEXTALIGN ) )
setTextAlign( aState.m_aFont.GetAlign() );
- if( ! (aState.m_nFlags & PUSH_TEXTFILLCOLOR) )
+ if( ! (aState.m_nFlags & PushFlags::TEXTFILLCOLOR) )
setTextFillColor( aState.m_aFont.GetFillColor() );
- if( ! (aState.m_nFlags & PUSH_REFPOINT) )
+ if( ! (aState.m_nFlags & PushFlags::REFPOINT) )
{
// what ?
}
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 461c31a4900e..d453f11735e5 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -738,7 +738,7 @@ private:
m_nLayoutMode( TEXT_LAYOUT_DEFAULT ),
m_aDigitLanguage( 0 ),
m_nTransparentPercent( 0 ),
- m_nFlags( PUSH_ALL ),
+ m_nFlags( PushFlags::ALL ),
m_nUpdateFlags( 0xffff )
{}
GraphicsState( const GraphicsState& rState ) :
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 960c6ca65f26..581b3f02e350 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -287,7 +287,7 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
default: nMove = 0; break;
}
- Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
+ Push( PushFlags::CLIPREGION | PushFlags::LINECOLOR );
IntersectClipRegion(vcl::Region(rPolyPoly));
SetLineColor( GetFillColor() );
const bool bOldMap = mbMap;
@@ -854,7 +854,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
mpMetaFile = NULL;
mbMap = false;
- Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
+ Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
SetLineColor( rMaskColor );
SetFillColor( rMaskColor );
InitLineColor();
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index c8e0524518db..c9339e3e31ad 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -165,7 +165,7 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
// #i10613# Respect transparency for draw color
if( nTransparency )
{
- o_rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR|PUSH_FILLCOLOR ) );
+ o_rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR|PushFlags::FILLCOLOR ) );
// assume white background for alpha blending
Color aLineColor( rStateOutDev.GetLineColor() );
@@ -1161,7 +1161,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
VirtualDevice aPaintVDev; // into this one, we render.
aPaintVDev.SetBackground( aBackgroundComponent.aBgColor );
- rOutMtf.AddAction( new MetaPushAction( PUSH_MAPMODE ) );
+ rOutMtf.AddAction( new MetaPushAction( PushFlags::MAPMODE ) );
rOutMtf.AddAction( new MetaMapModeAction() );
aPaintVDev.SetDrawMode( GetDrawMode() );
@@ -1372,7 +1372,7 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const
( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
const Color aColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
- pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
pOut->SetLineColor( aColor );
pOut->SetFillColor( aColor );
pOut->DrawRect( rRect );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 90969a3f1669..369c8fb47ace 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1010,7 +1010,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
io_rSubPage.Clip( i_rClipRect );
// save gstate
- o_rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
+ o_rMtf.AddAction( new MetaPushAction( PushFlags::ALL ) );
// clip to page rect
o_rMtf.AddAction( new MetaClipRegionAction( vcl::Region( i_rClipRect ), true ) );
@@ -1026,7 +1026,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
if( i_bDrawBorder )
{
// save gstate
- o_rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_CLIPREGION | PUSH_MAPMODE ) );
+ o_rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::CLIPREGION | PushFlags::MAPMODE ) );
o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
Rectangle aBorderRect( i_rClipRect );
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 237971dbff8b..0d584eb1a8b3 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -117,7 +117,7 @@ namespace vcl
,m_aZoom( _rControl.GetZoom() )
,m_bRTLEnabled( _rControl.IsRTLEnabled() )
{
- m_rTargetDevice.Push( PUSH_MAPMODE | PUSH_FONT | PUSH_TEXTLAYOUTMODE );
+ m_rTargetDevice.Push( PushFlags::MAPMODE | PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
MapMode aTargetMapMode( m_rTargetDevice.GetMapMode() );
OSL_ENSURE( aTargetMapMode.GetOrigin() == Point(), "ReferenceDeviceTextLayout::ReferenceDeviceTextLayout: uhm, the code below won't work here ..." );
@@ -147,7 +147,7 @@ namespace vcl
_rTargetDevice.SetFont( aDrawFont );
// transfer font to the reference device
- m_rReferenceDevice.Push( PUSH_FONT | PUSH_TEXTLAYOUTMODE );
+ m_rReferenceDevice.Push( PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
Font aRefFont( m_aUnzoomedPointFont );
aRefFont.SetSize( OutputDevice::LogicToLogic(
aRefFont.GetSize(), MAP_POINT, m_rReferenceDevice.GetMapMode().GetMapUnit() ) );
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 1655dd664174..a8ef0925bab1 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -387,7 +387,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect )
// Set line and fill color to black (->opaque),
// fill rect with that (linecolor, too, because of
// those pesky missing pixel problems)
- Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
SetLineColor( COL_BLACK );
SetFillColor( COL_BLACK );
DrawRect( rRect );
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index cd555f7feb67..a191b8b2c703 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -77,7 +77,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
cCmpVal = 255;
Color aCol( cCmpVal, cCmpVal, cCmpVal );
- Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
SetLineColor( aCol );
SetFillColor( aCol );
DrawRect( Rectangle( rDestPt, rDestSize ) );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index e1a423abb0dd..f8b0b213f629 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -56,7 +56,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
{
Color aColor = GetSingleColorGradientFill();
- Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
SetLineColor( aColor );
SetFillColor( aColor );
DrawPolyPolygon( rPolyPoly );
@@ -84,7 +84,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN" ) );
mpMetaFile->AddAction( new MetaGradientExAction( rPolyPoly, rGradient ) );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion(vcl::Region(rPolyPoly));
DrawGradient( aBoundRect, rGradient );
Pop();
@@ -112,7 +112,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
return;
// secure clip region
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( aBoundRect );
if( mbInitClipRegion )
@@ -655,7 +655,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
GDIMetaFile* pOldMtf = mpMetaFile;
mpMetaFile = &rMtf;
- mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
+ mpMetaFile->AddAction( new MetaPushAction( PushFlags::ALL ) );
mpMetaFile->AddAction( new MetaISectRectClipRegionAction( aRect ) );
mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) );
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 2e72fa2124ef..d4777e2ed24d 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -102,7 +102,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
mpMetaFile = NULL;
EnableMapMode( false );
- Push( PUSH_LINECOLOR );
+ Push( PushFlags::LINECOLOR );
SetLineColor( aHatch.GetColor() );
InitLineColor();
DrawHatch( aPolyPoly, aHatch, false );
@@ -127,7 +127,7 @@ void OutputDevice::AddHatchActions( const tools::PolyPolygon& rPolyPoly, const H
GDIMetaFile* pOldMtf = mpMetaFile;
mpMetaFile = &rMtf;
- mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
+ mpMetaFile->AddAction( new MetaPushAction( PushFlags::ALL ) );
mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), true ) );
DrawHatch( aPolyPoly, rHatch, true );
mpMetaFile->AddAction( new MetaPopAction() );
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index d53bbf8664e7..738a5e510de0 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -42,25 +42,25 @@
OutDevState::~OutDevState()
{
- if ( mnFlags & PUSH_LINECOLOR )
+ if ( mnFlags & PushFlags::LINECOLOR )
delete mpLineColor;
- if ( mnFlags & PUSH_FILLCOLOR )
+ if ( mnFlags & PushFlags::FILLCOLOR )
delete mpFillColor;
- if ( mnFlags & PUSH_FONT )
+ if ( mnFlags & PushFlags::FONT )
delete mpFont;
- if ( mnFlags & PUSH_TEXTCOLOR )
+ if ( mnFlags & PushFlags::TEXTCOLOR )
delete mpTextColor;
- if ( mnFlags & PUSH_TEXTFILLCOLOR )
+ if ( mnFlags & PushFlags::TEXTFILLCOLOR )
delete mpTextFillColor;
- if ( mnFlags & PUSH_TEXTLINECOLOR )
+ if ( mnFlags & PushFlags::TEXTLINECOLOR )
delete mpTextLineColor;
- if ( mnFlags & PUSH_OVERLINECOLOR )
+ if ( mnFlags & PushFlags::OVERLINECOLOR )
delete mpOverlineColor;
- if ( mnFlags & PUSH_MAPMODE )
+ if ( mnFlags & PushFlags::MAPMODE )
delete mpMapMode;
- if ( mnFlags & PUSH_CLIPREGION )
+ if ( mnFlags & PushFlags::CLIPREGION )
delete mpClipRegion;
- if ( mnFlags & PUSH_REFPOINT )
+ if ( mnFlags & PushFlags::REFPOINT )
delete mpRefPoint;
}
@@ -75,66 +75,66 @@ void OutputDevice::Push( PushFlags nFlags )
pState->mnFlags = nFlags;
- if ( nFlags & PUSH_LINECOLOR )
+ if ( nFlags & PushFlags::LINECOLOR )
{
if ( mbLineColor )
pState->mpLineColor = new Color( maLineColor );
else
pState->mpLineColor = NULL;
}
- if ( nFlags & PUSH_FILLCOLOR )
+ if ( nFlags & PushFlags::FILLCOLOR )
{
if ( mbFillColor )
pState->mpFillColor = new Color( maFillColor );
else
pState->mpFillColor = NULL;
}
- if ( nFlags & PUSH_FONT )
+ if ( nFlags & PushFlags::FONT )
pState->mpFont = new vcl::Font( maFont );
- if ( nFlags & PUSH_TEXTCOLOR )
+ if ( nFlags & PushFlags::TEXTCOLOR )
pState->mpTextColor = new Color( GetTextColor() );
- if ( nFlags & PUSH_TEXTFILLCOLOR )
+ if ( nFlags & PushFlags::TEXTFILLCOLOR )
{
if ( IsTextFillColor() )
pState->mpTextFillColor = new Color( GetTextFillColor() );
else
pState->mpTextFillColor = NULL;
}
- if ( nFlags & PUSH_TEXTLINECOLOR )
+ if ( nFlags & PushFlags::TEXTLINECOLOR )
{
if ( IsTextLineColor() )
pState->mpTextLineColor = new Color( GetTextLineColor() );
else
pState->mpTextLineColor = NULL;
}
- if ( nFlags & PUSH_OVERLINECOLOR )
+ if ( nFlags & PushFlags::OVERLINECOLOR )
{
if ( IsOverlineColor() )
pState->mpOverlineColor = new Color( GetOverlineColor() );
else
pState->mpOverlineColor = NULL;
}
- if ( nFlags & PUSH_TEXTALIGN )
+ if ( nFlags & PushFlags::TEXTALIGN )
pState->meTextAlign = GetTextAlign();
- if( nFlags & PUSH_TEXTLAYOUTMODE )
+ if( nFlags & PushFlags::TEXTLAYOUTMODE )
pState->mnTextLayoutMode = GetLayoutMode();
- if( nFlags & PUSH_TEXTLANGUAGE )
+ if( nFlags & PushFlags::TEXTLANGUAGE )
pState->meTextLanguage = GetDigitLanguage();
- if ( nFlags & PUSH_RASTEROP )
+ if ( nFlags & PushFlags::RASTEROP )
pState->meRasterOp = GetRasterOp();
- if ( nFlags & PUSH_MAPMODE )
+ if ( nFlags & PushFlags::MAPMODE )
{
pState->mpMapMode = new MapMode( maMapMode );
pState->mbMapActive = mbMap;
}
- if ( nFlags & PUSH_CLIPREGION )
+ if ( nFlags & PushFlags::CLIPREGION )
{
if ( mbClipRegion )
pState->mpClipRegion = new vcl::Region( maRegion );
else
pState->mpClipRegion = NULL;
}
- if ( nFlags & PUSH_REFPOINT )
+ if ( nFlags & PushFlags::REFPOINT )
{
if ( mbRefPoint )
pState->mpRefPoint = new Point( maRefPoint );
@@ -167,7 +167,7 @@ void OutputDevice::Pop()
if( mpAlphaVDev )
mpAlphaVDev->Pop();
- if ( rState.mnFlags & PUSH_LINECOLOR )
+ if ( rState.mnFlags & PushFlags::LINECOLOR )
{
if ( rState.mpLineColor )
SetLineColor( *rState.mpLineColor );
@@ -175,7 +175,7 @@ void OutputDevice::Pop()
SetLineColor();
}
- if ( rState.mnFlags & PUSH_FILLCOLOR )
+ if ( rState.mnFlags & PushFlags::FILLCOLOR )
{
if ( rState.mpFillColor )
SetFillColor( *rState.mpFillColor );
@@ -183,13 +183,13 @@ void OutputDevice::Pop()
SetFillColor();
}
- if ( rState.mnFlags & PUSH_FONT )
+ if ( rState.mnFlags & PushFlags::FONT )
SetFont( *rState.mpFont );
- if ( rState.mnFlags & PUSH_TEXTCOLOR )
+ if ( rState.mnFlags & PushFlags::TEXTCOLOR )
SetTextColor( *rState.mpTextColor );
- if ( rState.mnFlags & PUSH_TEXTFILLCOLOR )
+ if ( rState.mnFlags & PushFlags::TEXTFILLCOLOR )
{
if ( rState.mpTextFillColor )
SetTextFillColor( *rState.mpTextFillColor );
@@ -197,7 +197,7 @@ void OutputDevice::Pop()
SetTextFillColor();
}
- if ( rState.mnFlags & PUSH_TEXTLINECOLOR )
+ if ( rState.mnFlags & PushFlags::TEXTLINECOLOR )
{
if ( rState.mpTextLineColor )
SetTextLineColor( *rState.mpTextLineColor );
@@ -205,7 +205,7 @@ void OutputDevice::Pop()
SetTextLineColor();
}
- if ( rState.mnFlags & PUSH_OVERLINECOLOR )
+ if ( rState.mnFlags & PushFlags::OVERLINECOLOR )
{
if ( rState.mpOverlineColor )
SetOverlineColor( *rState.mpOverlineColor );
@@ -213,19 +213,19 @@ void OutputDevice::Pop()
SetOverlineColor();
}
- if ( rState.mnFlags & PUSH_TEXTALIGN )
+ if ( rState.mnFlags & PushFlags::TEXTALIGN )
SetTextAlign( rState.meTextAlign );
- if( rState.mnFlags & PUSH_TEXTLAYOUTMODE )
+ if( rState.mnFlags & PushFlags::TEXTLAYOUTMODE )
SetLayoutMode( rState.mnTextLayoutMode );
- if( rState.mnFlags & PUSH_TEXTLANGUAGE )
+ if( rState.mnFlags & PushFlags::TEXTLANGUAGE )
SetDigitLanguage( rState.meTextLanguage );
- if ( rState.mnFlags & PUSH_RASTEROP )
+ if ( rState.mnFlags & PushFlags::RASTEROP )
SetRasterOp( rState.meRasterOp );
- if ( rState.mnFlags & PUSH_MAPMODE )
+ if ( rState.mnFlags & PushFlags::MAPMODE )
{
if ( rState.mpMapMode )
SetMapMode( *rState.mpMapMode );
@@ -234,10 +234,10 @@ void OutputDevice::Pop()
mbMap = rState.mbMapActive;
}
- if ( rState.mnFlags & PUSH_CLIPREGION )
+ if ( rState.mnFlags & PushFlags::CLIPREGION )
SetDeviceClipRegion( rState.mpClipRegion );
- if ( rState.mnFlags & PUSH_REFPOINT )
+ if ( rState.mnFlags & PushFlags::REFPOINT )
{
if ( rState.mpRefPoint )
SetRefPoint( *rState.mpRefPoint );
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 285100c65923..ac7c96c8d1cc 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -126,7 +126,7 @@ void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt3
const sal_uInt32 nMaxX(rPos.X() + rSize.Width());
const sal_uInt32 nMaxY(rPos.Y() + rSize.Height());
- Push(PUSH_LINECOLOR|PUSH_FILLCOLOR);
+ Push(PushFlags::LINECOLOR|PushFlags::FILLCOLOR);
SetLineColor();
for(sal_uInt32 x(0), nX(rPos.X()); nX < nMaxX; x++, nX += nLen)
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 9dced6c6d6dd..fe24597c120a 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1201,11 +1201,11 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
if( nEndIndex < nMinIndex )
nEndIndex = nMinIndex;
- if( (mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) != 0 )
+ if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL )
nLayoutFlags |= SAL_LAYOUT_BIDI_RTL;
- if( (mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG) != 0 )
+ if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG )
nLayoutFlags |= SAL_LAYOUT_BIDI_STRONG;
- else if( 0 == (mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) )
+ else if( !(mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) )
{
// disable Bidi if no RTL hint and no RTL codes used
const sal_Unicode* pStr = rStr.getStr() + nMinIndex;
@@ -1226,9 +1226,9 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
if( maFont.IsVertical() )
nLayoutFlags |= SAL_LAYOUT_VERTICAL;
- if( (mnTextLayoutMode & TEXT_LAYOUT_ENABLE_LIGATURES) != 0 )
+ if( mnTextLayoutMode & TEXT_LAYOUT_ENABLE_LIGATURES )
nLayoutFlags |= SAL_LAYOUT_ENABLE_LIGATURES;
- else if( (mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED) != 0 )
+ else if( mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED )
nLayoutFlags |= SAL_LAYOUT_COMPLEX_DISABLED;
else
{
@@ -1273,10 +1273,10 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
}
// right align for RTL text, DRAWPOS_REVERSED, RTL window style
- bool bRightAlign = ((mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) != 0);
- if( (mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) != 0 )
+ bool bRightAlign = bool(mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL);
+ if( mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT )
bRightAlign = false;
- else if ( (mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) != 0 )
+ else if ( mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT )
bRightAlign = true;
// SSA: hack for western office, ie text get right aligned
// for debugging purposes of mirrored UI
@@ -1620,7 +1620,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
// Set clipping
if ( nStyle & TEXT_DRAW_CLIP )
{
- rTargetDevice.Push( PUSH_CLIPREGION );
+ rTargetDevice.Push( PushFlags::CLIPREGION );
rTargetDevice.IntersectClipRegion( rRect );
}
@@ -1737,7 +1737,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
if ( nStyle & TEXT_DRAW_CLIP )
{
- rTargetDevice.Push( PUSH_CLIPREGION );
+ rTargetDevice.Push( PushFlags::CLIPREGION );
rTargetDevice.IntersectClipRegion( rRect );
_rLayout.DrawText( aPos, aStr, 0, aStr.getLength(), pVector, pDisplayText );
if ( bDrawMnemonics )
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 1b0f60289f47..ab29ed325bb8 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -653,7 +653,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
aPixelRect = aPoly.GetBoundRect();
}
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( PixelToLogic(aPixelRect) );
if( mbInitClipRegion )
InitClipRegion();
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 5490a37736f9..d3d7393a55f0 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -284,7 +284,7 @@ void OutputDevice::DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly )
return;
// we assume that the border is NOT to be drawn transparently???
- Push( PUSH_FILLCOLOR );
+ Push( PushFlags::FILLCOLOR );
SetFillColor();
DrawPolyPolygon( rPolyPoly );
Pop();
@@ -577,7 +577,7 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
if( mbLineColor )
{
- Push( PUSH_FILLCOLOR );
+ Push( PushFlags::FILLCOLOR );
SetFillColor();
DrawPolyPolygon( rPolyPoly );
Pop();
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 14fd74176e29..8e4d86bc321f 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -171,7 +171,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
mpMetaFile = NULL;
EnableMapMode( false );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
switch( eStyle )
@@ -344,7 +344,7 @@ void OutputDevice::DrawGradientWallpaper( long nX, long nY,
mpMetaFile = NULL;
EnableMapMode( false );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
DrawGradient( aBound, rWallpaper.GetGradient() );
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 19d63b074e3f..083f13c19692 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -1053,7 +1053,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
return;
}
- mpOutDev->Push( PUSH_LINECOLOR );
+ mpOutDev->Push( PushFlags::LINECOLOR );
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
mpOutDev->SetLineColor( Color( COL_BLACK ) );
else
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 7a96ac850c87..9fd93c8e9b11 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -586,7 +586,7 @@ void MenuBarWindow::HighlightItem( sal_uInt16 nPos, bool bHighlight )
{
// #107747# give menuitems the height of the menubar
Rectangle aRect = Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( aRect );
bool bRollover = bHighlight && nPos != nHighlightedItem;
if ( bHighlight )
@@ -899,7 +899,7 @@ void MenuBarWindow::Paint( const Rectangle& )
if( ! IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) &&
GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- Push( PUSH_LINECOLOR | PUSH_MAPMODE );
+ Push( PushFlags::LINECOLOR | PushFlags::MAPMODE );
SetLineColor( Color( COL_WHITE ) );
SetMapMode( MapMode( MAP_PIXEL ) );
Size aSize = GetSizePixel();
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 9b2b4392ba5a..9ef3f91cdfc0 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -747,7 +747,7 @@ void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, bool bHighlight )
if( IsNativeControlSupported( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL ) )
{
Size aPxSize( GetOutputSizePixel() );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) ) );
Rectangle aCtrlRect( Point( nX, 0 ), Size( aPxSize.Width()-nX, aPxSize.Height() ) );
MenupopupValue aVal( pMenu->nTextPos-GUTTERBORDER, aItemRect );
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 4c07b25392a2..368f7cbe6ac8 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -911,7 +911,7 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect,
{
Point aPos = rRect.TopLeft();
Size aBmpSize = pBitmap->GetSizePixel();
- pWindow->Push( PUSH_CLIPREGION );
+ pWindow->Push( PushFlags::CLIPREGION );
pWindow->IntersectClipRegion( rRect );
do
{
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 82d99d01141c..c4ccf055f433 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -495,7 +495,7 @@ void DrawProgress( vcl::Window* pWindow, const Point& rPos,
INVALIDATE_TRANSPARENT );
pEraseWindow->Update();
}
- pWindow->Push( PUSH_CLIPREGION );
+ pWindow->Push( PushFlags::CLIPREGION );
pWindow->IntersectClipRegion( rFramePosSize );
}
bool bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index adcf55128543..816fac94d9e6 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -505,7 +505,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect )
if( pThis->IsInPaint() )
aPaintRegion.Intersect( pThis->GetActiveClipRegion() );
- pThis->Push( PUSH_CLIPREGION );
+ pThis->Push( PushFlags::CLIPREGION );
pThis->IntersectClipRegion( aPaintRegion );
if( !pWrapper /*|| bIsInPopupMode*/ )
@@ -553,7 +553,7 @@ void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, bool bHighlight
{
if( (((vcl::Window*) pThis)->GetStyle() & WB_3DLOOK ) )
{
- pThis->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pThis->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
pThis->SetLineColor();
if( bHasOpenPopup )
// choose the same color as the popup will use
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 8d8eb6cea652..cc9763b17ed9 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3842,7 +3842,7 @@ void Window::DrawGradientWallpaper( long nX, long nY,
mpMetaFile = NULL;
EnableMapMode( false );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
if( rWallpaper.GetStyle() == WALLPAPER_APPLICATIONGRADIENT )
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index edaad437ed8e..6b9cfb891ffd 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -215,7 +215,7 @@ void MyWin::Paint( const Rectangle& rRect )
{
WorkWindow::Paint( rRect );
- Push( PUSH_ALL );
+ Push( PushFlags::ALL );
MapMode aMapMode( MAP_100TH_MM );
SetMapMode( aMapMode );
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index b59a9bc2c3b0..93ff1983d5ca 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -40,7 +40,7 @@ awt::Size lcl_getOptimalWidth(StyleSheetTablePtr pStyleSheet, OUString& rDefault
MapMode aMap(MAP_100TH_MM);
OutputDevice* pOut = Application::GetDefaultDevice();
- pOut->Push(PUSH_FONT | PUSH_MAPMODE);
+ pOut->Push(PushFlags::FONT | PushFlags::MAPMODE);
PropertyMapPtr pDefaultCharProps = pStyleSheet->GetDefaultCharProps();
vcl::Font aFont(pOut->GetFont());