[Libreoffice-commits] core.git: canvas/source cppcanvas/source cui/source dbaccess/source drawinglayer/source editeng/qa editeng/source filter/source forms/source include/o3tl include/vcl reportdesign/source sc/source sfx2/source starmath/source svtools/source svx/source sw/source test/source vcl/source vcl/workben writerfilter/source

Noel Grandin noel at peralex.com
Mon Oct 13 08:46:45 PDT 2014


 canvas/source/vcl/canvashelper_texturefill.cxx             |    8 
 canvas/source/vcl/spritecanvashelper.cxx                   |    2 
 canvas/source/vcl/spritehelper.cxx                         |    2 
 cppcanvas/source/inc/outdevstate.hxx                       |    2 
 cppcanvas/source/mtfrenderer/implrenderer.cxx              |   36 +-
 cui/source/dialogs/hangulhanjadlg.cxx                      |    2 
 dbaccess/source/ui/browser/dataview.cxx                    |    2 
 dbaccess/source/ui/control/listviewitems.cxx               |    4 
 dbaccess/source/ui/tabledesign/TEditControl.cxx            |    2 
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx    |   44 +-
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |    2 
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx    |    2 
 editeng/qa/items/borderline_test.cxx                       |    4 
 editeng/source/editeng/impedit.cxx                         |    2 
 editeng/source/editeng/impedit2.cxx                        |    2 
 editeng/source/editeng/impedit3.cxx                        |   12 
 editeng/source/items/borderline.cxx                        |    8 
 editeng/source/items/frmitems.cxx                          |    8 
 editeng/source/misc/hangulhanja.cxx                        |    2 
 filter/source/flash/swfwriter1.cxx                         |    2 
 filter/source/graphicfilter/ieps/ieps.cxx                  |    2 
 filter/source/graphicfilter/ios2met/ios2met.cxx            |    6 
 filter/source/pdf/pdfexport.cxx                            |    4 
 forms/source/richtext/richtextimplcontrol.cxx              |    4 
 include/o3tl/typed_flags_set.hxx                           |  208 +++++++++++++
 include/vcl/outdev.hxx                                     |    2 
 include/vcl/outdevstate.hxx                                |   57 +--
 include/vcl/pdfwriter.hxx                                  |    2 
 reportdesign/source/ui/inc/ColorChanger.hxx                |    6 
 sc/source/filter/excel/xichart.cxx                         |    2 
 sc/source/ui/cctrl/checklistmenu.cxx                       |    4 
 sc/source/ui/cctrl/dpcontrol.cxx                           |    2 
 sc/source/ui/dbgui/csvcontrol.cxx                          |    2 
 sc/source/ui/miscdlgs/autofmt.cxx                          |    2 
 sfx2/source/dialog/backingwindow.cxx                       |    2 
 sfx2/source/dialog/titledockwin.cxx                        |    2 
 sfx2/source/sidebar/TitleBar.cxx                           |    4 
 starmath/source/dialog.cxx                                 |    2 
 starmath/source/document.cxx                               |    4 
 starmath/source/node.cxx                                   |    2 
 starmath/source/rect.cxx                                   |    4 
 starmath/source/tmpdevice.cxx                              |    4 
 starmath/source/visitors.cxx                               |    8 
 svtools/source/brwbox/brwbox2.cxx                          |    4 
 svtools/source/control/headbar.cxx                         |    2 
 svtools/source/control/ruler.cxx                           |    2 
 svtools/source/control/toolbarmenu.cxx                     |    2 
 svtools/source/graphic/grfmgr.cxx                          |    4 
 svtools/source/graphic/grfmgr2.cxx                         |    4 
 svtools/source/table/gridtablerenderer.cxx                 |   10 
 svtools/source/toolpanel/paneltabbar.cxx                   |    6 
 svx/source/dialog/framelink.cxx                            |    6 
 svx/source/dialog/framelinkarray.cxx                       |    2 
 svx/source/form/filtnav.cxx                                |    2 
 svx/source/gallery2/galctrl.cxx                            |    2 
 svx/source/sdr/contact/objectcontactofpageview.cxx         |    2 
 svx/source/sidebar/tools/ValueSetWithTextControl.cxx       |    2 
 sw/source/core/doc/notxtfrm.cxx                            |    2 
 sw/source/core/draw/dflyobj.cxx                            |    2 
 sw/source/core/layout/layact.cxx                           |    2 
 sw/source/core/layout/paintfrm.cxx                         |   16 -
 sw/source/core/layout/virtoutp.cxx                         |    2 
 sw/source/core/text/EnhancedPDFExportHelper.cxx            |    2 
 sw/source/core/text/inftxt.cxx                             |   10 
 sw/source/core/text/porlin.cxx                             |    4 
 sw/source/core/txtnode/fntcache.cxx                        |    2 
 sw/source/core/txtnode/fntcap.cxx                          |    2 
 sw/source/core/txtnode/swfont.cxx                          |    2 
 sw/source/core/view/vdraw.cxx                              |    2 
 sw/source/core/view/viewsh.cxx                             |    4 
 sw/source/core/view/vprint.cxx                             |    2 
 sw/source/filter/ww8/ww8par3.cxx                           |    2 
 sw/source/ui/table/tautofmt.cxx                            |    2 
 test/source/mtfxmldump.cxx                                 |   30 -
 vcl/source/control/button.cxx                              |   10 
 vcl/source/control/edit.cxx                                |    2 
 vcl/source/control/fixed.cxx                               |    2 
 vcl/source/filter/wmf/emfwr.cxx                            |    2 
 vcl/source/filter/wmf/winmtf.cxx                           |    6 
 vcl/source/filter/wmf/wmfwr.cxx                            |   16 -
 vcl/source/gdi/cvtsvm.cxx                                  |   14 
 vcl/source/gdi/gdimetafiletools.cxx                        |    8 
 vcl/source/gdi/gdimtf.cxx                                  |    6 
 vcl/source/gdi/metaact.cxx                                 |    4 
 vcl/source/gdi/pdfextoutdevdata.cxx                        |   10 
 vcl/source/gdi/pdfwriter.cxx                               |    2 
 vcl/source/gdi/pdfwriter_impl.cxx                          |   48 +--
 vcl/source/gdi/pdfwriter_impl.hxx                          |    2 
 vcl/source/gdi/print.cxx                                   |    4 
 vcl/source/gdi/print2.cxx                                  |    6 
 vcl/source/gdi/print3.cxx                                  |    4 
 vcl/source/gdi/textlayout.cxx                              |    4 
 vcl/source/gdi/virdev.cxx                                  |    2 
 vcl/source/outdev/bitmap.cxx                               |    2 
 vcl/source/outdev/gradient.cxx                             |    8 
 vcl/source/outdev/hatch.cxx                                |    4 
 vcl/source/outdev/outdevstate.cxx                          |   76 ++--
 vcl/source/outdev/rect.cxx                                 |    2 
 vcl/source/outdev/text.cxx                                 |   20 -
 vcl/source/outdev/textline.cxx                             |    2 
 vcl/source/outdev/transparent.cxx                          |    4 
 vcl/source/outdev/wallpaper.cxx                            |    4 
 vcl/source/window/decoview.cxx                             |    2 
 vcl/source/window/menubarwindow.cxx                        |    4 
 vcl/source/window/menufloatingwindow.cxx                   |    2 
 vcl/source/window/splitwin.cxx                             |    2 
 vcl/source/window/status.cxx                               |    2 
 vcl/source/window/toolbox.cxx                              |    4 
 vcl/source/window/window.cxx                               |    2 
 vcl/workben/svptest.cxx                                    |    2 
 writerfilter/source/dmapper/SdtHelper.cxx                  |    2 
 111 files changed, 562 insertions(+), 355 deletions(-)

New commits:
commit af5ebbf7835441c767f91a620f109ee6722e57bd
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Oct 6 14:48:16 2014 +0200

    create a macro library for implementing bit-flags types
    
    Signed-off-by: Stephan Bergmann <sbergman at 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

diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 7f6ff63..f57e498 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 dd4fd2b..a4ad7fa 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 523e4aa..8e7d783 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 15d33ec..339688a 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 1437f32a..f44c2b0 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 067397c..a571654 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 3938953..b850906 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 fef4647..c81018c 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 706f0a5..c2ca50a 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 f51099b..c42b1cb 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 14a1a6e..2b2c0b8 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 79351ce..ddd6d33 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 1432276..b97a414 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 5e11287..7e069d6 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 f1b0fbc..ed238cd 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 1f5cd00..e12209d 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 4bea25c..c921c05 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 9eb3a25..ce63581 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 c71089c..5414ffa 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 b90b3c9..13b38c1 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 20a4886..d70e471 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 f3b61dc..1568ef9 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 5d19fd7..2393c27 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 55e039c..1e84f1b 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 0000000..baa6793
--- /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 c90f09d..d87100a 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 9b2811a..da3dc4e 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 03211f4..880e2fa 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 3a4f9b3..7a26c60 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 610b4e2..c65e558 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 dd3e57d36..9b807c4 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 ba9ae8c..02022a1 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 56c8eb7c..4b42c91 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 8125335..30711b9 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 08ccff1..53a09ba 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 b63f4bb..3d5c8e2 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 ca59c4b..fb1597c 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 2f1bf0a..50aa25e 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 fbc9a1b..b8a3774 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 0b7af71..dd1c51c 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 8eef2bc..53775b1 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 2a6c3ba..934bff4 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 d0882b2..9ffdc4d 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 d04a618..4e9e0c6 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 82a9bb0..490ad89 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 f25a0e6..a85a474 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 cb01684..f72eb40 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 be4baa3..69c7109 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 57a1620..b61f079 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 a6d7c61..e1eeec0 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 79cf378..7570adf 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 190858b..fec46f8 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 9ad80cc..6a33719 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 42930b7..72b815a 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 9b9c718..74d9712 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 f778df1..c9d9366 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 7712e62..9a3d882 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 83b8f8d..7f86660 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 834bc65..ad56718 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 1902a01..ed0a031 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 b2c9f8d..bbb2cda 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 5c14148..6a036894 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 5d9a488..d394165 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 b72d18f..311059c 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 68be6f0..d1ef7de 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 f3b648b..c7216d1 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 92d7d7e..4dd6e40 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 24afd66..3975cc3 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 4ac2908..6c80d1f 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 d861c8d..561bcd9 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 9db2970..7f2b520 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 227f534..046e146 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 7cff47e..d8c9c47 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 ca81b55..43098d0 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 52ef7b3..0332995 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 2c57dee..dc345d2 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 06a3cde..d7a0f8d 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 f54fcd7..579ca89 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 5153574..1aa01fe 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 16493ce..95473f0 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 ) )

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list