diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-06 14:48:16 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-13 17:45:57 +0200 |
commit | af5ebbf7835441c767f91a620f109ee6722e57bd (patch) | |
tree | c72b2a1ddb5aa0a0a369be7babd516a5592d5fac /vcl/source/gdi | |
parent | 1156d11ef0bb2bc3d71ae9299656db4fed66f073 (diff) |
create a macro library for implementing bit-flags types
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>,
changed from a macro- to a template-based solution. (Unfortunately MSVC 2012
does not support explicit conversion operators. Worked around that with
explicit #ifs rather than some HAVE_EXPLICIT_CONVERSION_OPERATORS and
SAL_EXPLICIT_CONVERSION_OPERATOR ainticipating we hopefully soon move to a
baseline that requires unconditional support for them.)
Change-Id: I4a89643b218d247e8e4a861faba458ec6dfe1396
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/cvtsvm.cxx | 14 | ||||
-rw-r--r-- | vcl/source/gdi/gdimetafiletools.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pdfextoutdevdata.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 48 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/print2.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/textlayout.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/virdev.cxx | 2 |
13 files changed, 57 insertions, 57 deletions
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 ); |