diff options
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 6 | ||||
-rw-r--r-- | drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 6 | ||||
-rw-r--r-- | filter/source/flash/swfwriter1.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/eps/eps.cxx | 6 | ||||
-rw-r--r-- | filter/source/graphicfilter/icgm/class4.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/eschesdo.cxx | 12 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 6 | ||||
-rw-r--r-- | include/tools/poly.hxx | 10 | ||||
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 14 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 2 | ||||
-rw-r--r-- | tools/source/generic/poly.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/wmf/emfwr.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/gdimetafiletools.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/print2.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/svmconverter.cxx | 6 | ||||
-rw-r--r-- | vcl/source/outdev/curvedshapes.cxx | 6 |
18 files changed, 60 insertions, 60 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 0e41235e7cde..3d630e6c2e13 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -2007,7 +2007,7 @@ namespace cppcanvas // TODO(F1): Missing basegfx functionality. Mind empty rects! const ::tools::Polygon aToolsPoly( static_cast<MetaArcAction*>(pCurrAct)->GetRect(), static_cast<MetaArcAction*>(pCurrAct)->GetStartPoint(), - static_cast<MetaArcAction*>(pCurrAct)->GetEndPoint(), POLY_ARC ); + static_cast<MetaArcAction*>(pCurrAct)->GetEndPoint(), PolyStyle::Arc ); ::basegfx::B2DPolygon aPoly( aToolsPoly.getB2DPolygon() ); aPoly.transform( rStates.getState().mapModeTransform ); @@ -2021,7 +2021,7 @@ namespace cppcanvas // TODO(F1): Missing basegfx functionality. Mind empty rects! const ::tools::Polygon aToolsPoly( static_cast<MetaPieAction*>(pCurrAct)->GetRect(), static_cast<MetaPieAction*>(pCurrAct)->GetStartPoint(), - static_cast<MetaPieAction*>(pCurrAct)->GetEndPoint(), POLY_PIE ); + static_cast<MetaPieAction*>(pCurrAct)->GetEndPoint(), PolyStyle::Pie ); ::basegfx::B2DPolygon aPoly( aToolsPoly.getB2DPolygon() ); aPoly.transform( rStates.getState().mapModeTransform ); @@ -2035,7 +2035,7 @@ namespace cppcanvas // TODO(F1): Missing basegfx functionality. Mind empty rects! const ::tools::Polygon aToolsPoly( static_cast<MetaChordAction*>(pCurrAct)->GetRect(), static_cast<MetaChordAction*>(pCurrAct)->GetStartPoint(), - static_cast<MetaChordAction*>(pCurrAct)->GetEndPoint(), POLY_CHORD ); + static_cast<MetaChordAction*>(pCurrAct)->GetEndPoint(), PolyStyle::Chord ); ::basegfx::B2DPolygon aPoly( aToolsPoly.getB2DPolygon() ); aPoly.transform( rStates.getState().mapModeTransform ); diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 0784603bcc40..fbc15f5887c8 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -1845,7 +1845,7 @@ namespace if(rPropertyHolders.Current().getLineColorActive()) { const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction); - const tools::Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC); + const tools::Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Arc); const basegfx::B2DPolygon aOutline(aToolsPoly.getB2DPolygon()); createHairlinePrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); @@ -1859,7 +1859,7 @@ namespace if(rPropertyHolders.Current().getLineOrFillActive()) { const MetaPieAction* pA = static_cast<const MetaPieAction*>(pAction); - const tools::Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE); + const tools::Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Pie); const basegfx::B2DPolygon aOutline(aToolsPoly.getB2DPolygon()); createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); @@ -1873,7 +1873,7 @@ namespace if(rPropertyHolders.Current().getLineOrFillActive()) { const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction); - const tools::Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD); + const tools::Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Chord); const basegfx::B2DPolygon aOutline(aToolsPoly.getB2DPolygon()); createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current()); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 720e8d7e920c..e3ab3ac39224 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -1427,21 +1427,21 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) case MetaActionType::ARC: { const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction); - aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Arc ); } break; case MetaActionType::PIE: { const MetaPieAction* pA = static_cast<const MetaPieAction*>(pAction); - aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Pie ); } break; case MetaActionType::CHORD: { const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction); - aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Chord ); } break; diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 4f299eb02018..4b79fbc67f41 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -678,7 +678,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case MetaActionType::ARC : { tools::Polygon aPoly( static_cast<const MetaArcAction*>(pMA)->GetRect(), static_cast<const MetaArcAction*>(pMA)->GetStartPoint(), - static_cast<const MetaArcAction*>(pMA)->GetEndPoint(), POLY_ARC ); + static_cast<const MetaArcAction*>(pMA)->GetEndPoint(), PolyStyle::Arc ); tools::PolyPolygon aPolyPoly( aPoly ); ImplPolyPoly( aPolyPoly ); } @@ -687,7 +687,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case MetaActionType::PIE : { tools::Polygon aPoly( static_cast<const MetaPieAction*>(pMA)->GetRect(), static_cast<const MetaPieAction*>(pMA)->GetStartPoint(), - static_cast<const MetaPieAction*>(pMA)->GetEndPoint(), POLY_PIE ); + static_cast<const MetaPieAction*>(pMA)->GetEndPoint(), PolyStyle::Pie ); tools::PolyPolygon aPolyPoly( aPoly ); ImplPolyPoly( aPolyPoly ); } @@ -696,7 +696,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) case MetaActionType::CHORD : { tools::Polygon aPoly( static_cast<const MetaChordAction*>(pMA)->GetRect(), static_cast<const MetaChordAction*>(pMA)->GetStartPoint(), - static_cast<const MetaChordAction*>(pMA)->GetEndPoint(), POLY_CHORD ); + static_cast<const MetaChordAction*>(pMA)->GetEndPoint(), PolyStyle::Chord ); tools::PolyPolygon aPolyPoly( aPoly ); ImplPolyPoly( aPolyPoly ); } diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index 442f10dc087d..b215b40f03f9 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -406,7 +406,7 @@ void CGM::ImplDoClass4() { Rectangle aBoundingBox( Point( (long)( aCenterPoint.X - fRadius ), long( aCenterPoint.Y - fRadius ) ), Size( ( static_cast< long >( 2 * fRadius ) ), (long)( 2 * fRadius) ) ); - tools::Polygon aPolygon( aBoundingBox, Point( (long)aStartingPoint.X, (long)aStartingPoint.Y ) ,Point( (long)aEndingPoint.X, (long)aEndingPoint.Y ), POLY_ARC ); + tools::Polygon aPolygon( aBoundingBox, Point( (long)aStartingPoint.X, (long)aStartingPoint.Y ) ,Point( (long)aEndingPoint.X, (long)aEndingPoint.Y ), PolyStyle::Arc ); if ( nSwitch ) mpOutAct->RegPolyLine( aPolygon, true ); else @@ -525,7 +525,7 @@ void CGM::ImplDoClass4() Size( static_cast< long >( 2 * aRadius.X ), (long)( 2 * aRadius.X ) ) ); tools::Polygon aPolygon( aBoundingBox, Point( (long)vector[ 0 ], (long)vector[ 1 ] ), - Point( (long)vector[ 2 ], (long)vector[ 3 ] ), POLY_ARC ); + Point( (long)vector[ 2 ], (long)vector[ 3 ] ), PolyStyle::Arc ); mpOutAct->RegPolyLine( aPolygon ); } else diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 5b9028d0db03..bbaeca550644 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -335,18 +335,18 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, { case CircleKind_SECTION : { - ePolyKind = POLY_PIE; + ePolyKind = PolyStyle::Pie; } break; case CircleKind_ARC : { - ePolyKind = POLY_ARC; + ePolyKind = PolyStyle::Arc; } break; case CircleKind_CUT : { - ePolyKind = POLY_CHORD; + ePolyKind = PolyStyle::Chord; } break; @@ -397,15 +397,15 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, css::awt::Rectangle aNewRect; switch ( ePolyKind ) { - case POLY_PIE : - case POLY_CHORD : + case PolyStyle::Pie : + case PolyStyle::Chord : { aPropOpt.CreatePolygonProperties( rObj.mXPropSet, ESCHER_CREATEPOLYGON_POLYPOLYGON, false, aNewRect, &aPolygon ); aPropOpt.CreateFillProperties( rObj.mXPropSet, true ); } break; - case POLY_ARC : + case PolyStyle::Arc : { aPropOpt.CreatePolygonProperties( rObj.mXPropSet, ESCHER_CREATEPOLYGON_POLYLINE, false, aNewRect, &aPolygon ); aPropOpt.CreateLineProperties( rObj.mXPropSet, false ); diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index 1723eebf327b..a12fc06e3d52 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2929,21 +2929,21 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf, case( MetaActionType::ARC ): { const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction); - aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Arc ); } break; case( MetaActionType::PIE ): { const MetaPieAction* pA = static_cast<const MetaPieAction*>(pAction); - aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Pie ); } break; case( MetaActionType::CHORD ): { const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction); - aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Chord ); } break; diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index eb962cbafb94..383a8f76d0f8 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -42,11 +42,11 @@ namespace o3tl template<> struct typed_flags<PolyOptimizeFlags> : is_typed_flags<PolyOptimizeFlags, 0x001f> {}; } -enum PolyStyle +enum class PolyStyle { - POLY_ARC = 1, - POLY_PIE = 2, - POLY_CHORD = 3 + Arc = 1, + Pie = 2, + Chord = 3 }; enum PolyFlags @@ -94,7 +94,7 @@ public: long nRadX, long nRadY ); Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEnd, - PolyStyle ePolyStyle = POLY_ARC, + PolyStyle ePolyStyle = PolyStyle::Arc, bool bWholeCircle = false ); Polygon( const Point& rBezPt1, const Point& rCtrlPt1, const Point& rBezPt2, const Point& rCtrlPt2, diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index d1feda163db9..69f2fc02fbdc 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -1820,7 +1820,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a else if ( mType == "drawing.Ellipse" ) { css::drawing::CircleKind eCircleKind( css::drawing::CircleKind_FULL ); - PolyStyle ePolyKind = POLY_CHORD; + PolyStyle ePolyKind = PolyStyle::Chord; if ( ImplGetPropertyValue( "CircleKind" ) ) { mAny >>= eCircleKind; @@ -1828,18 +1828,18 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a { case css::drawing::CircleKind_SECTION : { - ePolyKind = POLY_PIE; + ePolyKind = PolyStyle::Pie; } break; case css::drawing::CircleKind_ARC : { - ePolyKind = POLY_ARC; + ePolyKind = PolyStyle::Arc; } break; case css::drawing::CircleKind_CUT : { - ePolyKind = POLY_CHORD; + ePolyKind = PolyStyle::Chord; } break; @@ -1899,15 +1899,15 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a css::awt::Rectangle aNewRect; switch ( ePolyKind ) { - case POLY_PIE : - case POLY_CHORD : + case PolyStyle::Pie : + case PolyStyle::Chord : { if ( aPropOpt.CreatePolygonProperties( mXPropSet, ESCHER_CREATEPOLYGON_POLYPOLYGON, false, aNewRect, &aPolygon ) ) aPropOpt.CreateFillProperties( mXPropSet, true, mXShape ); } break; - case POLY_ARC : + case PolyStyle::Arc : { if ( aPropOpt.CreatePolygonProperties( mXPropSet, ESCHER_CREATEPOLYGON_POLYLINE, false, aNewRect, &aPolygon ) ) aPropOpt.CreateLineProperties( mXPropSet, false ); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 14bf483a4623..f93ddd48b5ba 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1403,7 +1403,7 @@ static basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStar } } - tools::Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC, bFullCircle ); + tools::Polygon aTempPoly( aRect, aStart, aEnd, PolyStyle::Arc, bFullCircle ); basegfx::B2DPolygon aRetval; if ( bClockwise ) diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 593d186ef6a0..20391e3df398 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -710,7 +710,7 @@ Polygon::Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEn nPoints = std::max( (sal_uInt16) ( ( fDiff * 0.1591549 ) * nPoints ), (sal_uInt16) 16 ); fStep = fDiff / ( nPoints - 1 ); - if( POLY_PIE == eStyle ) + if( PolyStyle::Pie == eStyle ) { const Point aCenter2( FRound( fCenterX ), FRound( fCenterY ) ); @@ -722,7 +722,7 @@ Polygon::Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEn } else { - mpImplPolygon = new ImplPolygon( ( POLY_CHORD == eStyle ) ? ( nPoints + 1 ) : nPoints ); + mpImplPolygon = new ImplPolygon( ( PolyStyle::Chord == eStyle ) ? ( nPoints + 1 ) : nPoints ); nStart = 0; nEnd = nPoints; } @@ -735,7 +735,7 @@ Polygon::Polygon( const Rectangle& rBound, const Point& rStart, const Point& rEn rPt.Y() = FRound( fCenterY - fRadY * sin( fStart ) ); } - if( POLY_CHORD == eStyle ) + if( PolyStyle::Chord == eStyle ) mpImplPolygon->mpPointAry[ nPoints ] = mpImplPolygon->mpPointAry[ 0 ]; } else diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index dda3d56f7db8..9b7afb04daff 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -1077,21 +1077,21 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( MetaActionType::ARC ): { const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction); - aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Arc ); } break; case( MetaActionType::PIE ): { const MetaPieAction* pA = static_cast<const MetaPieAction*>(pAction); - aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Pie ); } break; case( MetaActionType::CHORD ): { const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction); - aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), PolyStyle::Chord ); } break; diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 43f23ece94af..d855a2971bfe 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -1135,7 +1135,7 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) ); } else - mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_ARC ), maLineStyle.aLineInfo ) ); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, PolyStyle::Arc ), maLineStyle.aLineInfo ) ); } else mpGDIMetaFile->AddAction( new MetaArcAction( aRect, aStart, aEnd ) ); @@ -1158,7 +1158,7 @@ void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const P ImplSetNonPersistentLineColorTransparenz(); mpGDIMetaFile->AddAction( new MetaPieAction( aRect, aStart, aEnd ) ); UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_PIE ), maLineStyle.aLineInfo ) ); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, PolyStyle::Pie ), maLineStyle.aLineInfo ) ); } else { @@ -1181,7 +1181,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const ImplSetNonPersistentLineColorTransparenz(); mpGDIMetaFile->AddAction( new MetaChordAction( aRect, aStart, aEnd ) ); UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_CHORD ), maLineStyle.aLineInfo ) ); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, PolyStyle::Chord ), maLineStyle.aLineInfo ) ); } else { diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index 877ca9a302f1..372a1094028a 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -603,7 +603,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) rRect, pA->GetStartPoint(), pA->GetEndPoint(), - POLY_ARC); + PolyStyle::Arc); bDone = handleGeometricContent( aClips.back(), @@ -629,7 +629,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) rRect, pA->GetStartPoint(), pA->GetEndPoint(), - POLY_PIE); + PolyStyle::Pie); bDone = handleGeometricContent( aClips.back(), @@ -655,7 +655,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) rRect, pA->GetStartPoint(), pA->GetEndPoint(), - POLY_CHORD); + PolyStyle::Chord); bDone = handleGeometricContent( aClips.back(), diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 74bdd0747026..fed6aa7969b3 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -920,7 +920,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( MetaActionType::ARC ): { MetaArcAction* pAct = static_cast<MetaArcAction*>(pAction); - const tools::Polygon aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_ARC ); + const tools::Polygon aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), PolyStyle::Arc ); aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aArcPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) ); } @@ -929,7 +929,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( MetaActionType::PIE ): { MetaPieAction* pAct = static_cast<MetaPieAction*>(pAction); - const tools::Polygon aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_PIE ); + const tools::Polygon aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), PolyStyle::Pie ); aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aPiePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) ); } @@ -938,7 +938,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) case( MetaActionType::CHORD ): { MetaChordAction* pAct = static_cast<MetaChordAction*>(pAction); - const tools::Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_CHORD ); + const tools::Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), PolyStyle::Chord ); aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aChordPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) ); } diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 53fab0f9f15f..5ee886c0517b 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -446,19 +446,19 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut case MetaActionType::ARC: aActionBounds = tools::Polygon( static_cast<const MetaArcAction&>(rAct).GetRect(), static_cast<const MetaArcAction&>(rAct).GetStartPoint(), - static_cast<const MetaArcAction&>(rAct).GetEndPoint(), POLY_ARC ).GetBoundRect(); + static_cast<const MetaArcAction&>(rAct).GetEndPoint(), PolyStyle::Arc ).GetBoundRect(); break; case MetaActionType::PIE: aActionBounds = tools::Polygon( static_cast<const MetaPieAction&>(rAct).GetRect(), static_cast<const MetaPieAction&>(rAct).GetStartPoint(), - static_cast<const MetaPieAction&>(rAct).GetEndPoint(), POLY_PIE ).GetBoundRect(); + static_cast<const MetaPieAction&>(rAct).GetEndPoint(), PolyStyle::Pie ).GetBoundRect(); break; case MetaActionType::CHORD: aActionBounds = tools::Polygon( static_cast<const MetaChordAction&>(rAct).GetRect(), static_cast<const MetaChordAction&>(rAct).GetStartPoint(), - static_cast<const MetaChordAction&>(rAct).GetEndPoint(), POLY_CHORD ).GetBoundRect(); + static_cast<const MetaChordAction&>(rAct).GetEndPoint(), PolyStyle::Chord ).GetBoundRect(); break; case MetaActionType::POLYLINE: diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index 0ed8e5f94cef..6c6790352333 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -705,7 +705,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) if( bFatLine ) { - const tools::Polygon aPoly( aRect, aPt, aPt1, POLY_ARC ); + const tools::Polygon aPoly( aRect, aPt, aPt1, PolyStyle::Arc ); rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) ); rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); @@ -726,7 +726,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) if( bFatLine ) { - const tools::Polygon aPoly( aRect, aPt, aPt1, POLY_PIE ); + const tools::Polygon aPoly( aRect, aPt, aPt1, PolyStyle::Pie ); rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) ); rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); @@ -1580,7 +1580,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaChordAction* pAct = static_cast<const MetaChordAction*>(pAction); tools::Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), - pAct->GetEndPoint(), POLY_CHORD ); + pAct->GetEndPoint(), PolyStyle::Chord ); const sal_uInt16 nPoints = aChordPoly.GetSize(); rOStm.WriteInt16( GDI_POLYGON_ACTION ); diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx index a086a81f76f6..3c931c87f2f5 100644 --- a/vcl/source/outdev/curvedshapes.cxx +++ b/vcl/source/outdev/curvedshapes.cxx @@ -104,7 +104,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect, const Point aStart( ImplLogicToDevicePixel( rStartPt ) ); const Point aEnd( ImplLogicToDevicePixel( rEndPt ) ); - tools::Polygon aArcPoly( aRect, aStart, aEnd, POLY_ARC ); + tools::Polygon aArcPoly( aRect, aStart, aEnd, PolyStyle::Arc ); if ( aArcPoly.GetSize() >= 2 ) { @@ -148,7 +148,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect, const Point aStart( ImplLogicToDevicePixel( rStartPt ) ); const Point aEnd( ImplLogicToDevicePixel( rEndPt ) ); - tools::Polygon aPiePoly( aRect, aStart, aEnd, POLY_PIE ); + tools::Polygon aPiePoly( aRect, aStart, aEnd, PolyStyle::Pie ); if ( aPiePoly.GetSize() >= 2 ) { @@ -199,7 +199,7 @@ void OutputDevice::DrawChord( const Rectangle& rRect, const Point aStart( ImplLogicToDevicePixel( rStartPt ) ); const Point aEnd( ImplLogicToDevicePixel( rEndPt ) ); - tools::Polygon aChordPoly( aRect, aStart, aEnd, POLY_CHORD ); + tools::Polygon aChordPoly( aRect, aStart, aEnd, PolyStyle::Chord ); if ( aChordPoly.GetSize() >= 2 ) { |