summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/button.cxx10
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/fixed.cxx2
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx2
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx6
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx16
-rw-r--r--vcl/source/gdi/cvtsvm.cxx14
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx6
-rw-r--r--vcl/source/gdi/metaact.cxx4
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx10
-rw-r--r--vcl/source/gdi/pdfwriter.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx48
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx2
-rw-r--r--vcl/source/gdi/print.cxx4
-rw-r--r--vcl/source/gdi/print2.cxx6
-rw-r--r--vcl/source/gdi/print3.cxx4
-rw-r--r--vcl/source/gdi/textlayout.cxx4
-rw-r--r--vcl/source/gdi/virdev.cxx2
-rw-r--r--vcl/source/outdev/bitmap.cxx2
-rw-r--r--vcl/source/outdev/gradient.cxx8
-rw-r--r--vcl/source/outdev/hatch.cxx4
-rw-r--r--vcl/source/outdev/outdevstate.cxx76
-rw-r--r--vcl/source/outdev/rect.cxx2
-rw-r--r--vcl/source/outdev/text.cxx20
-rw-r--r--vcl/source/outdev/textline.cxx2
-rw-r--r--vcl/source/outdev/transparent.cxx4
-rw-r--r--vcl/source/outdev/wallpaper.cxx4
-rw-r--r--vcl/source/window/decoview.cxx2
-rw-r--r--vcl/source/window/menubarwindow.cxx4
-rw-r--r--vcl/source/window/menufloatingwindow.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx2
-rw-r--r--vcl/source/window/status.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx4
-rw-r--r--vcl/source/window/window.cxx2
35 files changed, 146 insertions, 146 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 52ef7b3afd84..03329959edcf 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -838,7 +838,7 @@ void PushButton::ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawF
if( aInRect.Right() < aInRect.Left() || aInRect.Bottom() < aInRect.Top() )
aInRect.SetEmpty();
- pDev->Push( PUSH_CLIPREGION );
+ pDev->Push( PushFlags::CLIPREGION );
pDev->IntersectClipRegion( aInRect );
if ( nDrawFlags & WINDOW_DRAW_MONO )
@@ -2033,7 +2033,7 @@ void RadioButton::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
- pDev->Push( PUSH_CLIPREGION );
+ pDev->Push( PushFlags::CLIPREGION );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
// no image radio button
@@ -2860,7 +2860,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlag
void RadioButton::ImplSetMinimumNWFSize()
{
- Push( PUSH_MAPMODE );
+ Push( PushFlags::MAPMODE );
SetMapMode( MAP_PIXEL );
ImplControlValue aControlValue;
@@ -3083,7 +3083,7 @@ void CheckBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
WinBits nWinStyle = GetStyle();
OUString aText( GetText() );
- pDev->Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
+ pDev->Push( PushFlags::CLIPREGION | PushFlags::LINECOLOR );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
long nLineY = rPos.Y() + (rSize.Height()-1)/2;
@@ -3714,7 +3714,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags )
void CheckBox::ImplSetMinimumNWFSize()
{
- Push( PUSH_MAPMODE );
+ Push( PushFlags::MAPMODE );
SetMapMode( MAP_PIXEL );
ImplControlValue aControlValue;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 2c57deecd063..dc345d21b78f 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -530,7 +530,7 @@ void Edit::ImplRepaint(bool bLayout)
if( (GetStyle() & WB_FORCECTRLBACKGROUND) != 0 && IsControlBackground() )
{
// check if we need to set ControlBackground even in NWF case
- Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
+ Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
SetLineColor();
SetFillColor( GetControlBackground() );
DrawRect( Rectangle( aPos, Size( GetOutputSizePixel().Width() - 2*mnXOffset, GetOutputSizePixel().Height() ) ) );
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 06a3cde5cee0..d7a0f8d82bc3 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -564,7 +564,7 @@ void FixedLine::ImplDraw( bool bLayout )
else if( (nWinStyle & WB_VERT) )
{
long nWidth = GetTextWidth( aText );
- Push( PUSH_FONT );
+ Push( PushFlags::FONT );
vcl::Font aFont( GetFont() );
aFont.SetOrientation( 900 );
SetFont( aFont );
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index f54fcd76607a..579ca89f20ee 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1246,7 +1246,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const MetaAction* pSubstAct = aSubstitute.GetAction( i );
if( pSubstAct->GetType() == META_BMPSCALE_ACTION )
{
- maVDev.Push( PUSH_ALL );
+ maVDev.Push( PushFlags::ALL );
ImplBeginRecord( WIN_EMR_SAVEDC );
ImplEndRecord();
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 51535749746f..1aa01fef966b 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -830,7 +830,7 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) :
{
mbIsMapWinSet = false;
mbIsMapDevSet = false;
- mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // The original clipregion has to be on top
+ mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::CLIPREGION ) ); // The original clipregion has to be on top
// of the stack so it can always be restored
// this is necessary to be able to support
// SetClipRgn( NULL ) and similar ClipRgn actions (SJ)
@@ -867,7 +867,7 @@ void WinMtfOutput::UpdateClipRegion()
mbComplexClip = false;
mpGDIMetaFile->AddAction( new MetaPopAction() ); // taking the original clipregion
- mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) );
+ mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::CLIPREGION ) );
// skip for 'no clipping at all' case
if( !aClipPath.isEmpty() )
@@ -976,7 +976,7 @@ void WinMtfOutput::StrokeAndFillPath( bool bStroke, bool bFill )
{
if ( !bStroke )
{
- mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ mpGDIMetaFile->AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), false ) );
}
if ( aPathObj.Count() == 1 )
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 16493cec4005..95473f08f08c 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -1495,27 +1495,27 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
{
aDstLineInfo = pAt->aLineInfo;
aDstLineColor = pAt->aLineColor;
- if ( pAt->nFlags & PUSH_LINECOLOR )
+ if ( pAt->nFlags & PushFlags::LINECOLOR )
aSrcLineColor = pAt->aLineColor;
aDstFillColor = pAt->aFillColor;
- if ( pAt->nFlags & PUSH_FILLCOLOR )
+ if ( pAt->nFlags & PushFlags::FILLCOLOR )
aSrcFillColor = pAt->aFillColor;
eDstROP2 = pAt->eRasterOp;
- if ( pAt->nFlags & PUSH_RASTEROP )
+ if ( pAt->nFlags & PushFlags::RASTEROP )
eSrcRasterOp = pAt->eRasterOp;
aDstFont = pAt->aFont;
- if ( pAt->nFlags & PUSH_FONT )
+ if ( pAt->nFlags & PushFlags::FONT )
aSrcFont = pAt->aFont;
eDstTextAlign = pAt->eTextAlign;
- if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTALIGN ) )
+ if ( pAt->nFlags & ( PushFlags::FONT | PushFlags::TEXTALIGN ) )
eSrcTextAlign = pAt->eTextAlign;
aDstTextColor = pAt->aTextColor;
- if ( pAt->nFlags & ( PUSH_FONT | PUSH_TEXTCOLOR ) )
+ if ( pAt->nFlags & ( PushFlags::FONT | PushFlags::TEXTCOLOR ) )
aSrcTextColor = pAt->aTextColor;
- if ( pAt->nFlags & PUSH_MAPMODE )
+ if ( pAt->nFlags & PushFlags::MAPMODE )
aSrcMapMode = pAt->aMapMode;
aDstClipRegion = pAt->aClipRegion;
- if ( pAt->nFlags & PUSH_CLIPREGION )
+ if ( pAt->nFlags & PushFlags::CLIPREGION )
aSrcClipRegion = pAt->aClipRegion;
WMFRecord_RestoreDC();
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 38a9b523c80a..3d95cc97d59d 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -665,7 +665,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
const Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -686,7 +686,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
const Polygon aPoly( aRect, aPt, aPt1, POLY_ARC );
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -707,7 +707,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
{
const Polygon aPoly( aRect, aPt, aPt1, POLY_PIE );
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolygonAction( aPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -722,7 +722,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_HIGHLIGHTRECT_ACTION ):
{
ImplReadRect( rIStm, aRect );
- rMtf.AddAction( new MetaPushAction( PUSH_RASTEROP ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::RASTEROP ) );
rMtf.AddAction( new MetaRasterOpAction( ROP_INVERT ) );
rMtf.AddAction( new MetaRectAction( aRect ) );
rMtf.AddAction( new MetaPopAction() );
@@ -747,7 +747,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolygonAction( aActionPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -769,7 +769,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) );
rMtf.AddAction( new MetaPopAction() );
@@ -1109,7 +1109,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case( GDI_PUSH_ACTION ):
{
aLIStack.push( new LineInfo( aLineInfo ) );
- rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
+ rMtf.AddAction( new MetaPushAction( PushFlags::ALL ) );
// #106172# Track font relevant data in shadow VDev
aFontVDev.Push();
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index d7ea6092a859..963592b9853f 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -371,12 +371,12 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
aPushFlags.push_back(nFlags);
- if(nFlags & PUSH_CLIPREGION)
+ if(nFlags & PushFlags::CLIPREGION)
{
aClips.push_back(aClips.back());
}
- if(nFlags & PUSH_MAPMODE)
+ if(nFlags & PushFlags::MAPMODE)
{
aMapModes.push_back(aMapModes.back());
}
@@ -391,7 +391,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
const PushFlags nFlags(aPushFlags.back());
aPushFlags.pop_back();
- if(nFlags & PUSH_CLIPREGION)
+ if(nFlags & PushFlags::CLIPREGION)
{
if(aClips.size() > 1)
{
@@ -403,7 +403,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
}
}
- if(nFlags & PUSH_MAPMODE)
+ if(nFlags & PushFlags::MAPMODE)
{
if(aMapModes.size() > 1)
{
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index b1e4f8e7d29f..9144800e627c 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -350,7 +350,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
// This is necessary, since old metafiles don't even know of these
// recent add-ons. Newer metafiles must of course explicitly set
// those states.
- pOut->Push( PUSH_TEXTLAYOUTMODE|PUSH_TEXTLANGUAGE );
+ pOut->Push( PushFlags::TEXTLAYOUTMODE|PushFlags::TEXTLANGUAGE );
pOut->SetLayoutMode( TEXT_LAYOUT_DEFAULT );
pOut->SetDigitLanguage( 0 );
@@ -1792,7 +1792,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaPushAction* pAct = static_cast<MetaPushAction*>(pAction);
aPushFlagStack.push_back( pAct->GetFlags() );
- if( aPushFlagStack.back() & PUSH_CLIPREGION )
+ if( aPushFlagStack.back() & PushFlags::CLIPREGION )
{
Rectangle aRect( aClipStack.back() );
aClipStack.push_back( aRect );
@@ -1803,7 +1803,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
// sanity check
if( ! aPushFlagStack.empty() )
{
- if( aPushFlagStack.back() & PUSH_CLIPREGION )
+ if( aPushFlagStack.back() & PushFlags::CLIPREGION )
{
if( aClipStack.size() > 1 )
aClipStack.pop_back();
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 670f1694b75e..365bd46edbfe 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -3108,7 +3108,7 @@ void MetaFontAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
MetaPushAction::MetaPushAction() :
MetaAction ( META_PUSH_ACTION ),
- mnFlags ( PUSH_NONE )
+ mnFlags ( PushFlags::NONE )
{}
MetaPushAction::~MetaPushAction()
@@ -3140,7 +3140,7 @@ void MetaPushAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
{
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, STREAM_WRITE, 1);
- rOStm.WriteUInt16( mnFlags );
+ rOStm.WriteUInt16( static_cast<sal_uInt16>(mnFlags) );
}
void MetaPushAction::Read( SvStream& rIStm, ImplMetaReadData* )
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index f4524ed6a979..ea3b130f24af 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -147,7 +147,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
{
case PDFExtOutDevDataSync::CreateNamedDest : //i56629
{
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
mParaMapModes.pop_front();
mParaIds.push_back( rWriter.CreateNamedDest( mParaOUStrings.front(), mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
@@ -160,7 +160,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
break;
case PDFExtOutDevDataSync::CreateDest :
{
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
mParaMapModes.pop_front();
mParaIds.push_back( rWriter.CreateDest( mParaRects.front(), mParaInts.front(), mParaDestAreaTypes.front() ) );
@@ -172,7 +172,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
break;
case PDFExtOutDevDataSync::CreateLink :
{
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
mParaMapModes.pop_front();
mParaIds.push_back( rWriter.CreateLink( mParaRects.front(), mParaInts.front() ) );
@@ -206,7 +206,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
PDFLinkDestination& rDest = mFutureDestinations[ nDestId ];
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( rDest.mMapMode );
mParaIds.push_back( rWriter.RegisterDestReference( nDestId, rDest.mRect, rDest.mPageNr, rDest.mAreaType ) );
rWriter.Pop();
@@ -243,7 +243,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
break;
case PDFExtOutDevDataSync::CreateNote :
{
- rWriter.Push( PUSH_MAPMODE );
+ rWriter.Push( PushFlags::MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
rWriter.CreateNote( mParaRects.front(), mParaPDFNotes.front(), mParaInts.front() );
mParaMapModes.pop_front();
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index b399d7acefa4..81ad0f5cb2f0 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -198,7 +198,7 @@ void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient
void PDFWriter::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient )
{
- pImplementation->push(PUSH_CLIPREGION);
+ pImplementation->push(PushFlags::CLIPREGION);
pImplementation->setClipRegion( rPolyPoly.getB2DPolyPolygon() );
pImplementation->drawGradient( rPolyPoly.GetBoundRect(), rGradient );
pImplementation->pop();
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 2fc71954f756..b9f0df7c441e 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -237,7 +237,7 @@ void doTestCode()
aClipPoly.setClosed( true );
aClip.append( aClipPoly );
- aWriter.Push( PUSH_CLIPREGION | PUSH_FILLCOLOR );
+ aWriter.Push( PushFlags::CLIPREGION | PushFlags::FILLCOLOR );
aWriter.SetClipRegion( aClip );
aWriter.DrawEllipse( Rectangle( Point( 4500, 9600 ), Size( 12000, 3000 ) ) );
aWriter.MoveClipRegion( 1000, 500 );
@@ -3524,7 +3524,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
throw FontException();
OutputDevice* pRef = getReferenceDevice();
- pRef->Push( PUSH_FONT | PUSH_MAPMODE );
+ pRef->Push( PushFlags::FONT | PushFlags::MAPMODE );
pRef->SetMapMode( MapMode( MAP_PIXEL ) );
Font aFont( pFont->GetFamilyName(), pFont->GetStyleName(), Size( 0, 1000 ) );
aFont.SetWeight( pFont->GetWeight() );
@@ -4679,7 +4679,7 @@ void PDFWriterImpl::createDefaultPushButtonAppearance( PDFWidget& rButton, const
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
// save graphics state
- push( PUSH_ALL );
+ push( PushFlags::ALL );
// transform relative to control's coordinates since an
// appearance stream is a form XObject
@@ -4786,7 +4786,7 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
SvMemoryStream* pEditStream = new SvMemoryStream( 1024, 1024 );
- push( PUSH_ALL );
+ push( PushFlags::ALL );
// prepare font to use, draw field border
Font aFont = drawFieldBorder( rEdit, rWidget, rSettings );
@@ -4838,7 +4838,7 @@ void PDFWriterImpl::createDefaultListBoxAppearance( PDFWidget& rBox, const PDFWr
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
SvMemoryStream* pListBoxStream = new SvMemoryStream( 1024, 1024 );
- push( PUSH_ALL );
+ push( PushFlags::ALL );
// prepare font to use, draw field border
Font aFont = drawFieldBorder( rBox, rWidget, rSettings );
@@ -4889,7 +4889,7 @@ void PDFWriterImpl::createDefaultCheckBoxAppearance( PDFWidget& rBox, const PDFW
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
// save graphics state
- push( PUSH_ALL );
+ push( PushFlags::ALL );
if( rWidget.Background || rWidget.Border )
{
@@ -5014,7 +5014,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
// save graphics state
- push( PUSH_ALL );
+ push( PushFlags::ALL );
if( rWidget.Background || rWidget.Border )
{
@@ -5102,7 +5102,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
rBox.m_aRect = aCheckRect;
// create appearance streams
- push( PUSH_ALL);
+ push( PushFlags::ALL);
SvMemoryStream* pCheckStream = new SvMemoryStream( 256, 256 );
beginRedirect( pCheckStream, aCheckRect );
@@ -7142,7 +7142,7 @@ void PDFWriterImpl::registerGlyphs( int nGlyphs,
void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool bTextLines )
{
- push( PUSH_ALL );
+ push( PushFlags::ALL );
FontRelief eRelief = m_aCurrentPDFState.m_aFont.GetRelief();
@@ -7714,7 +7714,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
bool bEmphPolyLine;
FontEmphasisMark nEmphMark;
- push( PUSH_ALL );
+ push( PushFlags::ALL );
aLine.setLength( 0 );
aLine.append( "q\n" );
@@ -8396,7 +8396,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
ComplexTextLayoutMode nOrigTLM = m_pReferenceDevice->GetLayoutMode();
m_pReferenceDevice->SetLayoutMode( TEXT_LAYOUT_BIDI_STRONG|TEXT_LAYOUT_COMPLEX_DISABLED );
- push( PUSH_CLIPREGION );
+ push( PushFlags::CLIPREGION );
FontMetric aRefDevFontMetric = m_pReferenceDevice->GetFontMetric();
Rectangle aRect;
aRect.Left() = rPos.X();
@@ -8659,7 +8659,7 @@ void PDFWriterImpl::pushResource( ResourceKind eKind, const OString& rResource,
void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRect )
{
- push( PUSH_ALL );
+ push( PushFlags::ALL );
// force reemitting clip region inside the new stream, and
// prevent emitting an unbalanced "Q" at the start
@@ -10321,7 +10321,7 @@ void PDFWriterImpl::drawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
tools::PolyPolygon aPolyPoly( rPolyPoly );
aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME );
- push( PUSH_LINECOLOR );
+ push( PushFlags::LINECOLOR );
setLineColor( rHatch.GetColor() );
getReferenceDevice()->DrawHatch( aPolyPoly, rHatch, false );
pop();
@@ -10630,32 +10630,32 @@ void PDFWriterImpl::pop()
// move those parameters back that were not pushed
// in the first place
- if( ! (aState.m_nFlags & PUSH_LINECOLOR) )
+ if( ! (aState.m_nFlags & PushFlags::LINECOLOR) )
setLineColor( aState.m_aLineColor );
- if( ! (aState.m_nFlags & PUSH_FILLCOLOR) )
+ if( ! (aState.m_nFlags & PushFlags::FILLCOLOR) )
setFillColor( aState.m_aFillColor );
- if( ! (aState.m_nFlags & PUSH_FONT) )
+ if( ! (aState.m_nFlags & PushFlags::FONT) )
setFont( aState.m_aFont );
- if( ! (aState.m_nFlags & PUSH_TEXTCOLOR) )
+ if( ! (aState.m_nFlags & PushFlags::TEXTCOLOR) )
setTextColor( aState.m_aFont.GetColor() );
- if( ! (aState.m_nFlags & PUSH_MAPMODE) )
+ if( ! (aState.m_nFlags & PushFlags::MAPMODE) )
setMapMode( aState.m_aMapMode );
- if( ! (aState.m_nFlags & PUSH_CLIPREGION) )
+ if( ! (aState.m_nFlags & PushFlags::CLIPREGION) )
{
// do not use setClipRegion here
// it would convert again assuming the current mapmode
rOld.m_aClipRegion = aState.m_aClipRegion;
rOld.m_bClipRegion = aState.m_bClipRegion;
}
- if( ! (aState.m_nFlags & PUSH_TEXTLINECOLOR ) )
+ if( ! (aState.m_nFlags & PushFlags::TEXTLINECOLOR ) )
setTextLineColor( aState.m_aTextLineColor );
- if( ! (aState.m_nFlags & PUSH_OVERLINECOLOR ) )
+ if( ! (aState.m_nFlags & PushFlags::OVERLINECOLOR ) )
setOverlineColor( aState.m_aOverlineColor );
- if( ! (aState.m_nFlags & PUSH_TEXTALIGN ) )
+ if( ! (aState.m_nFlags & PushFlags::TEXTALIGN ) )
setTextAlign( aState.m_aFont.GetAlign() );
- if( ! (aState.m_nFlags & PUSH_TEXTFILLCOLOR) )
+ if( ! (aState.m_nFlags & PushFlags::TEXTFILLCOLOR) )
setTextFillColor( aState.m_aFont.GetFillColor() );
- if( ! (aState.m_nFlags & PUSH_REFPOINT) )
+ if( ! (aState.m_nFlags & PushFlags::REFPOINT) )
{
// what ?
}
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 461c31a4900e..d453f11735e5 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -738,7 +738,7 @@ private:
m_nLayoutMode( TEXT_LAYOUT_DEFAULT ),
m_aDigitLanguage( 0 ),
m_nTransparentPercent( 0 ),
- m_nFlags( PUSH_ALL ),
+ m_nFlags( PushFlags::ALL ),
m_nUpdateFlags( 0xffff )
{}
GraphicsState( const GraphicsState& rState ) :
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 960c6ca65f26..581b3f02e350 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -287,7 +287,7 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
default: nMove = 0; break;
}
- Push( PUSH_CLIPREGION | PUSH_LINECOLOR );
+ Push( PushFlags::CLIPREGION | PushFlags::LINECOLOR );
IntersectClipRegion(vcl::Region(rPolyPoly));
SetLineColor( GetFillColor() );
const bool bOldMap = mbMap;
@@ -854,7 +854,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
mpMetaFile = NULL;
mbMap = false;
- Push( PUSH_FILLCOLOR | PUSH_LINECOLOR );
+ Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
SetLineColor( rMaskColor );
SetFillColor( rMaskColor );
InitLineColor();
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index c8e0524518db..c9339e3e31ad 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -165,7 +165,7 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf,
// #i10613# Respect transparency for draw color
if( nTransparency )
{
- o_rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR|PUSH_FILLCOLOR ) );
+ o_rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR|PushFlags::FILLCOLOR ) );
// assume white background for alpha blending
Color aLineColor( rStateOutDev.GetLineColor() );
@@ -1161,7 +1161,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
VirtualDevice aPaintVDev; // into this one, we render.
aPaintVDev.SetBackground( aBackgroundComponent.aBgColor );
- rOutMtf.AddAction( new MetaPushAction( PUSH_MAPMODE ) );
+ rOutMtf.AddAction( new MetaPushAction( PushFlags::MAPMODE ) );
rOutMtf.AddAction( new MetaMapModeAction() );
aPaintVDev.SetDrawMode( GetDrawMode() );
@@ -1372,7 +1372,7 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const
( (long) rEndColor.GetBlue() * rGradient.GetEndIntensity() ) / 100L ) >> 1;
const Color aColor( (sal_uInt8) nR, (sal_uInt8) nG, (sal_uInt8) nB );
- pOut->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pOut->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
pOut->SetLineColor( aColor );
pOut->SetFillColor( aColor );
pOut->DrawRect( rRect );
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 90969a3f1669..369c8fb47ace 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1010,7 +1010,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
io_rSubPage.Clip( i_rClipRect );
// save gstate
- o_rMtf.AddAction( new MetaPushAction( PUSH_ALL ) );
+ o_rMtf.AddAction( new MetaPushAction( PushFlags::ALL ) );
// clip to page rect
o_rMtf.AddAction( new MetaClipRegionAction( vcl::Region( i_rClipRect ), true ) );
@@ -1026,7 +1026,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD
if( i_bDrawBorder )
{
// save gstate
- o_rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR | PUSH_FILLCOLOR | PUSH_CLIPREGION | PUSH_MAPMODE ) );
+ o_rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR | PushFlags::FILLCOLOR | PushFlags::CLIPREGION | PushFlags::MAPMODE ) );
o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) );
Rectangle aBorderRect( i_rClipRect );
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 237971dbff8b..0d584eb1a8b3 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -117,7 +117,7 @@ namespace vcl
,m_aZoom( _rControl.GetZoom() )
,m_bRTLEnabled( _rControl.IsRTLEnabled() )
{
- m_rTargetDevice.Push( PUSH_MAPMODE | PUSH_FONT | PUSH_TEXTLAYOUTMODE );
+ m_rTargetDevice.Push( PushFlags::MAPMODE | PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
MapMode aTargetMapMode( m_rTargetDevice.GetMapMode() );
OSL_ENSURE( aTargetMapMode.GetOrigin() == Point(), "ReferenceDeviceTextLayout::ReferenceDeviceTextLayout: uhm, the code below won't work here ..." );
@@ -147,7 +147,7 @@ namespace vcl
_rTargetDevice.SetFont( aDrawFont );
// transfer font to the reference device
- m_rReferenceDevice.Push( PUSH_FONT | PUSH_TEXTLAYOUTMODE );
+ m_rReferenceDevice.Push( PushFlags::FONT | PushFlags::TEXTLAYOUTMODE );
Font aRefFont( m_aUnzoomedPointFont );
aRefFont.SetSize( OutputDevice::LogicToLogic(
aRefFont.GetSize(), MAP_POINT, m_rReferenceDevice.GetMapMode().GetMapUnit() ) );
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 1655dd664174..a8ef0925bab1 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -387,7 +387,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect )
// Set line and fill color to black (->opaque),
// fill rect with that (linecolor, too, because of
// those pesky missing pixel problems)
- Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
SetLineColor( COL_BLACK );
SetFillColor( COL_BLACK );
DrawRect( rRect );
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index cd555f7feb67..a191b8b2c703 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -77,7 +77,7 @@ void OutputDevice::DrawBitmap( const Point& rDestPt, const Size& rDestSize,
cCmpVal = 255;
Color aCol( cCmpVal, cCmpVal, cCmpVal );
- Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
SetLineColor( aCol );
SetFillColor( aCol );
DrawRect( Rectangle( rDestPt, rDestSize ) );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index e1a423abb0dd..f8b0b213f629 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -56,7 +56,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
{
Color aColor = GetSingleColorGradientFill();
- Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
SetLineColor( aColor );
SetFillColor( aColor );
DrawPolyPolygon( rPolyPoly );
@@ -84,7 +84,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
mpMetaFile->AddAction( new MetaCommentAction( "XGRAD_SEQ_BEGIN" ) );
mpMetaFile->AddAction( new MetaGradientExAction( rPolyPoly, rGradient ) );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion(vcl::Region(rPolyPoly));
DrawGradient( aBoundRect, rGradient );
Pop();
@@ -112,7 +112,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
return;
// secure clip region
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( aBoundRect );
if( mbInitClipRegion )
@@ -655,7 +655,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
GDIMetaFile* pOldMtf = mpMetaFile;
mpMetaFile = &rMtf;
- mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
+ mpMetaFile->AddAction( new MetaPushAction( PushFlags::ALL ) );
mpMetaFile->AddAction( new MetaISectRectClipRegionAction( aRect ) );
mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) );
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 2e72fa2124ef..d4777e2ed24d 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -102,7 +102,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
mpMetaFile = NULL;
EnableMapMode( false );
- Push( PUSH_LINECOLOR );
+ Push( PushFlags::LINECOLOR );
SetLineColor( aHatch.GetColor() );
InitLineColor();
DrawHatch( aPolyPoly, aHatch, false );
@@ -127,7 +127,7 @@ void OutputDevice::AddHatchActions( const tools::PolyPolygon& rPolyPoly, const H
GDIMetaFile* pOldMtf = mpMetaFile;
mpMetaFile = &rMtf;
- mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) );
+ mpMetaFile->AddAction( new MetaPushAction( PushFlags::ALL ) );
mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), true ) );
DrawHatch( aPolyPoly, rHatch, true );
mpMetaFile->AddAction( new MetaPopAction() );
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index d53bbf8664e7..738a5e510de0 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -42,25 +42,25 @@
OutDevState::~OutDevState()
{
- if ( mnFlags & PUSH_LINECOLOR )
+ if ( mnFlags & PushFlags::LINECOLOR )
delete mpLineColor;
- if ( mnFlags & PUSH_FILLCOLOR )
+ if ( mnFlags & PushFlags::FILLCOLOR )
delete mpFillColor;
- if ( mnFlags & PUSH_FONT )
+ if ( mnFlags & PushFlags::FONT )
delete mpFont;
- if ( mnFlags & PUSH_TEXTCOLOR )
+ if ( mnFlags & PushFlags::TEXTCOLOR )
delete mpTextColor;
- if ( mnFlags & PUSH_TEXTFILLCOLOR )
+ if ( mnFlags & PushFlags::TEXTFILLCOLOR )
delete mpTextFillColor;
- if ( mnFlags & PUSH_TEXTLINECOLOR )
+ if ( mnFlags & PushFlags::TEXTLINECOLOR )
delete mpTextLineColor;
- if ( mnFlags & PUSH_OVERLINECOLOR )
+ if ( mnFlags & PushFlags::OVERLINECOLOR )
delete mpOverlineColor;
- if ( mnFlags & PUSH_MAPMODE )
+ if ( mnFlags & PushFlags::MAPMODE )
delete mpMapMode;
- if ( mnFlags & PUSH_CLIPREGION )
+ if ( mnFlags & PushFlags::CLIPREGION )
delete mpClipRegion;
- if ( mnFlags & PUSH_REFPOINT )
+ if ( mnFlags & PushFlags::REFPOINT )
delete mpRefPoint;
}
@@ -75,66 +75,66 @@ void OutputDevice::Push( PushFlags nFlags )
pState->mnFlags = nFlags;
- if ( nFlags & PUSH_LINECOLOR )
+ if ( nFlags & PushFlags::LINECOLOR )
{
if ( mbLineColor )
pState->mpLineColor = new Color( maLineColor );
else
pState->mpLineColor = NULL;
}
- if ( nFlags & PUSH_FILLCOLOR )
+ if ( nFlags & PushFlags::FILLCOLOR )
{
if ( mbFillColor )
pState->mpFillColor = new Color( maFillColor );
else
pState->mpFillColor = NULL;
}
- if ( nFlags & PUSH_FONT )
+ if ( nFlags & PushFlags::FONT )
pState->mpFont = new vcl::Font( maFont );
- if ( nFlags & PUSH_TEXTCOLOR )
+ if ( nFlags & PushFlags::TEXTCOLOR )
pState->mpTextColor = new Color( GetTextColor() );
- if ( nFlags & PUSH_TEXTFILLCOLOR )
+ if ( nFlags & PushFlags::TEXTFILLCOLOR )
{
if ( IsTextFillColor() )
pState->mpTextFillColor = new Color( GetTextFillColor() );
else
pState->mpTextFillColor = NULL;
}
- if ( nFlags & PUSH_TEXTLINECOLOR )
+ if ( nFlags & PushFlags::TEXTLINECOLOR )
{
if ( IsTextLineColor() )
pState->mpTextLineColor = new Color( GetTextLineColor() );
else
pState->mpTextLineColor = NULL;
}
- if ( nFlags & PUSH_OVERLINECOLOR )
+ if ( nFlags & PushFlags::OVERLINECOLOR )
{
if ( IsOverlineColor() )
pState->mpOverlineColor = new Color( GetOverlineColor() );
else
pState->mpOverlineColor = NULL;
}
- if ( nFlags & PUSH_TEXTALIGN )
+ if ( nFlags & PushFlags::TEXTALIGN )
pState->meTextAlign = GetTextAlign();
- if( nFlags & PUSH_TEXTLAYOUTMODE )
+ if( nFlags & PushFlags::TEXTLAYOUTMODE )
pState->mnTextLayoutMode = GetLayoutMode();
- if( nFlags & PUSH_TEXTLANGUAGE )
+ if( nFlags & PushFlags::TEXTLANGUAGE )
pState->meTextLanguage = GetDigitLanguage();
- if ( nFlags & PUSH_RASTEROP )
+ if ( nFlags & PushFlags::RASTEROP )
pState->meRasterOp = GetRasterOp();
- if ( nFlags & PUSH_MAPMODE )
+ if ( nFlags & PushFlags::MAPMODE )
{
pState->mpMapMode = new MapMode( maMapMode );
pState->mbMapActive = mbMap;
}
- if ( nFlags & PUSH_CLIPREGION )
+ if ( nFlags & PushFlags::CLIPREGION )
{
if ( mbClipRegion )
pState->mpClipRegion = new vcl::Region( maRegion );
else
pState->mpClipRegion = NULL;
}
- if ( nFlags & PUSH_REFPOINT )
+ if ( nFlags & PushFlags::REFPOINT )
{
if ( mbRefPoint )
pState->mpRefPoint = new Point( maRefPoint );
@@ -167,7 +167,7 @@ void OutputDevice::Pop()
if( mpAlphaVDev )
mpAlphaVDev->Pop();
- if ( rState.mnFlags & PUSH_LINECOLOR )
+ if ( rState.mnFlags & PushFlags::LINECOLOR )
{
if ( rState.mpLineColor )
SetLineColor( *rState.mpLineColor );
@@ -175,7 +175,7 @@ void OutputDevice::Pop()
SetLineColor();
}
- if ( rState.mnFlags & PUSH_FILLCOLOR )
+ if ( rState.mnFlags & PushFlags::FILLCOLOR )
{
if ( rState.mpFillColor )
SetFillColor( *rState.mpFillColor );
@@ -183,13 +183,13 @@ void OutputDevice::Pop()
SetFillColor();
}
- if ( rState.mnFlags & PUSH_FONT )
+ if ( rState.mnFlags & PushFlags::FONT )
SetFont( *rState.mpFont );
- if ( rState.mnFlags & PUSH_TEXTCOLOR )
+ if ( rState.mnFlags & PushFlags::TEXTCOLOR )
SetTextColor( *rState.mpTextColor );
- if ( rState.mnFlags & PUSH_TEXTFILLCOLOR )
+ if ( rState.mnFlags & PushFlags::TEXTFILLCOLOR )
{
if ( rState.mpTextFillColor )
SetTextFillColor( *rState.mpTextFillColor );
@@ -197,7 +197,7 @@ void OutputDevice::Pop()
SetTextFillColor();
}
- if ( rState.mnFlags & PUSH_TEXTLINECOLOR )
+ if ( rState.mnFlags & PushFlags::TEXTLINECOLOR )
{
if ( rState.mpTextLineColor )
SetTextLineColor( *rState.mpTextLineColor );
@@ -205,7 +205,7 @@ void OutputDevice::Pop()
SetTextLineColor();
}
- if ( rState.mnFlags & PUSH_OVERLINECOLOR )
+ if ( rState.mnFlags & PushFlags::OVERLINECOLOR )
{
if ( rState.mpOverlineColor )
SetOverlineColor( *rState.mpOverlineColor );
@@ -213,19 +213,19 @@ void OutputDevice::Pop()
SetOverlineColor();
}
- if ( rState.mnFlags & PUSH_TEXTALIGN )
+ if ( rState.mnFlags & PushFlags::TEXTALIGN )
SetTextAlign( rState.meTextAlign );
- if( rState.mnFlags & PUSH_TEXTLAYOUTMODE )
+ if( rState.mnFlags & PushFlags::TEXTLAYOUTMODE )
SetLayoutMode( rState.mnTextLayoutMode );
- if( rState.mnFlags & PUSH_TEXTLANGUAGE )
+ if( rState.mnFlags & PushFlags::TEXTLANGUAGE )
SetDigitLanguage( rState.meTextLanguage );
- if ( rState.mnFlags & PUSH_RASTEROP )
+ if ( rState.mnFlags & PushFlags::RASTEROP )
SetRasterOp( rState.meRasterOp );
- if ( rState.mnFlags & PUSH_MAPMODE )
+ if ( rState.mnFlags & PushFlags::MAPMODE )
{
if ( rState.mpMapMode )
SetMapMode( *rState.mpMapMode );
@@ -234,10 +234,10 @@ void OutputDevice::Pop()
mbMap = rState.mbMapActive;
}
- if ( rState.mnFlags & PUSH_CLIPREGION )
+ if ( rState.mnFlags & PushFlags::CLIPREGION )
SetDeviceClipRegion( rState.mpClipRegion );
- if ( rState.mnFlags & PUSH_REFPOINT )
+ if ( rState.mnFlags & PushFlags::REFPOINT )
{
if ( rState.mpRefPoint )
SetRefPoint( *rState.mpRefPoint );
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index 285100c65923..ac7c96c8d1cc 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -126,7 +126,7 @@ void OutputDevice::DrawCheckered(const Point& rPos, const Size& rSize, sal_uInt3
const sal_uInt32 nMaxX(rPos.X() + rSize.Width());
const sal_uInt32 nMaxY(rPos.Y() + rSize.Height());
- Push(PUSH_LINECOLOR|PUSH_FILLCOLOR);
+ Push(PushFlags::LINECOLOR|PushFlags::FILLCOLOR);
SetLineColor();
for(sal_uInt32 x(0), nX(rPos.X()); nX < nMaxX; x++, nX += nLen)
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 9dced6c6d6dd..fe24597c120a 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1201,11 +1201,11 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
if( nEndIndex < nMinIndex )
nEndIndex = nMinIndex;
- if( (mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) != 0 )
+ if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL )
nLayoutFlags |= SAL_LAYOUT_BIDI_RTL;
- if( (mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG) != 0 )
+ if( mnTextLayoutMode & TEXT_LAYOUT_BIDI_STRONG )
nLayoutFlags |= SAL_LAYOUT_BIDI_STRONG;
- else if( 0 == (mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) )
+ else if( !(mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) )
{
// disable Bidi if no RTL hint and no RTL codes used
const sal_Unicode* pStr = rStr.getStr() + nMinIndex;
@@ -1226,9 +1226,9 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
if( maFont.IsVertical() )
nLayoutFlags |= SAL_LAYOUT_VERTICAL;
- if( (mnTextLayoutMode & TEXT_LAYOUT_ENABLE_LIGATURES) != 0 )
+ if( mnTextLayoutMode & TEXT_LAYOUT_ENABLE_LIGATURES )
nLayoutFlags |= SAL_LAYOUT_ENABLE_LIGATURES;
- else if( (mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED) != 0 )
+ else if( mnTextLayoutMode & TEXT_LAYOUT_COMPLEX_DISABLED )
nLayoutFlags |= SAL_LAYOUT_COMPLEX_DISABLED;
else
{
@@ -1273,10 +1273,10 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
}
// right align for RTL text, DRAWPOS_REVERSED, RTL window style
- bool bRightAlign = ((mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL) != 0);
- if( (mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT) != 0 )
+ bool bRightAlign = bool(mnTextLayoutMode & TEXT_LAYOUT_BIDI_RTL);
+ if( mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_LEFT )
bRightAlign = false;
- else if ( (mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT) != 0 )
+ else if ( mnTextLayoutMode & TEXT_LAYOUT_TEXTORIGIN_RIGHT )
bRightAlign = true;
// SSA: hack for western office, ie text get right aligned
// for debugging purposes of mirrored UI
@@ -1620,7 +1620,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
// Set clipping
if ( nStyle & TEXT_DRAW_CLIP )
{
- rTargetDevice.Push( PUSH_CLIPREGION );
+ rTargetDevice.Push( PushFlags::CLIPREGION );
rTargetDevice.IntersectClipRegion( rRect );
}
@@ -1737,7 +1737,7 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r
if ( nStyle & TEXT_DRAW_CLIP )
{
- rTargetDevice.Push( PUSH_CLIPREGION );
+ rTargetDevice.Push( PushFlags::CLIPREGION );
rTargetDevice.IntersectClipRegion( rRect );
_rLayout.DrawText( aPos, aStr, 0, aStr.getLength(), pVector, pDisplayText );
if ( bDrawMnemonics )
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 1b0f60289f47..ab29ed325bb8 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -653,7 +653,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
aPixelRect = aPoly.GetBoundRect();
}
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( PixelToLogic(aPixelRect) );
if( mbInitClipRegion )
InitClipRegion();
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 5490a37736f9..d3d7393a55f0 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -284,7 +284,7 @@ void OutputDevice::DrawInvisiblePolygon( const tools::PolyPolygon& rPolyPoly )
return;
// we assume that the border is NOT to be drawn transparently???
- Push( PUSH_FILLCOLOR );
+ Push( PushFlags::FILLCOLOR );
SetFillColor();
DrawPolyPolygon( rPolyPoly );
Pop();
@@ -577,7 +577,7 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
if( mbLineColor )
{
- Push( PUSH_FILLCOLOR );
+ Push( PushFlags::FILLCOLOR );
SetFillColor();
DrawPolyPolygon( rPolyPoly );
Pop();
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 14fd74176e29..8e4d86bc321f 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -171,7 +171,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
mpMetaFile = NULL;
EnableMapMode( false );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
switch( eStyle )
@@ -344,7 +344,7 @@ void OutputDevice::DrawGradientWallpaper( long nX, long nY,
mpMetaFile = NULL;
EnableMapMode( false );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
DrawGradient( aBound, rWallpaper.GetGradient() );
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 19d63b074e3f..083f13c19692 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -1053,7 +1053,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
return;
}
- mpOutDev->Push( PUSH_LINECOLOR );
+ mpOutDev->Push( PushFlags::LINECOLOR );
if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO )
mpOutDev->SetLineColor( Color( COL_BLACK ) );
else
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 7a96ac850c87..9fd93c8e9b11 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -586,7 +586,7 @@ void MenuBarWindow::HighlightItem( sal_uInt16 nPos, bool bHighlight )
{
// #107747# give menuitems the height of the menubar
Rectangle aRect = Rectangle( Point( nX, 1 ), Size( pData->aSz.Width(), GetOutputSizePixel().Height()-2 ) );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( aRect );
bool bRollover = bHighlight && nPos != nHighlightedItem;
if ( bHighlight )
@@ -899,7 +899,7 @@ void MenuBarWindow::Paint( const Rectangle& )
if( ! IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) &&
GetSettings().GetStyleSettings().GetHighContrastMode() )
{
- Push( PUSH_LINECOLOR | PUSH_MAPMODE );
+ Push( PushFlags::LINECOLOR | PushFlags::MAPMODE );
SetLineColor( Color( COL_WHITE ) );
SetMapMode( MapMode( MAP_PIXEL ) );
Size aSize = GetSizePixel();
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 9b2b4392ba5a..9ef3f91cdfc0 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -747,7 +747,7 @@ void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, bool bHighlight )
if( IsNativeControlSupported( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL ) )
{
Size aPxSize( GetOutputSizePixel() );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) ) );
Rectangle aCtrlRect( Point( nX, 0 ), Size( aPxSize.Width()-nX, aPxSize.Height() ) );
MenupopupValue aVal( pMenu->nTextPos-GUTTERBORDER, aItemRect );
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 4c07b25392a2..368f7cbe6ac8 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -911,7 +911,7 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect,
{
Point aPos = rRect.TopLeft();
Size aBmpSize = pBitmap->GetSizePixel();
- pWindow->Push( PUSH_CLIPREGION );
+ pWindow->Push( PushFlags::CLIPREGION );
pWindow->IntersectClipRegion( rRect );
do
{
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 82d99d01141c..c4ccf055f433 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -495,7 +495,7 @@ void DrawProgress( vcl::Window* pWindow, const Point& rPos,
INVALIDATE_TRANSPARENT );
pEraseWindow->Update();
}
- pWindow->Push( PUSH_CLIPREGION );
+ pWindow->Push( PushFlags::CLIPREGION );
pWindow->IntersectClipRegion( rFramePosSize );
}
bool bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index adcf55128543..816fac94d9e6 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -505,7 +505,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect )
if( pThis->IsInPaint() )
aPaintRegion.Intersect( pThis->GetActiveClipRegion() );
- pThis->Push( PUSH_CLIPREGION );
+ pThis->Push( PushFlags::CLIPREGION );
pThis->IntersectClipRegion( aPaintRegion );
if( !pWrapper /*|| bIsInPopupMode*/ )
@@ -553,7 +553,7 @@ void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, bool bHighlight
{
if( (((vcl::Window*) pThis)->GetStyle() & WB_3DLOOK ) )
{
- pThis->Push( PUSH_LINECOLOR | PUSH_FILLCOLOR );
+ pThis->Push( PushFlags::LINECOLOR | PushFlags::FILLCOLOR );
pThis->SetLineColor();
if( bHasOpenPopup )
// choose the same color as the popup will use
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 8d8eb6cea652..cc9763b17ed9 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3842,7 +3842,7 @@ void Window::DrawGradientWallpaper( long nX, long nY,
mpMetaFile = NULL;
EnableMapMode( false );
- Push( PUSH_CLIPREGION );
+ Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
if( rWallpaper.GetStyle() == WALLPAPER_APPLICATIONGRADIENT )