[Libreoffice-commits] core.git: cppcanvas/source drawinglayer/source filter/source include/tools sd/source svx/source tools/source vcl/source

Noel Grandin noel.grandin at collabora.co.uk
Tue Dec 6 05:31:45 UTC 2016


 cppcanvas/source/mtfrenderer/implrenderer.cxx           |    6 +++---
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx |    6 +++---
 filter/source/flash/swfwriter1.cxx                      |    6 +++---
 filter/source/graphicfilter/eps/eps.cxx                 |    6 +++---
 filter/source/graphicfilter/icgm/class4.cxx             |    4 ++--
 filter/source/msfilter/eschesdo.cxx                     |   12 ++++++------
 filter/source/svg/svgwriter.cxx                         |    6 +++---
 include/tools/poly.hxx                                  |   10 +++++-----
 sd/source/filter/eppt/epptso.cxx                        |   14 +++++++-------
 svx/source/customshapes/EnhancedCustomShape2d.cxx       |    2 +-
 tools/source/generic/poly.cxx                           |    6 +++---
 vcl/source/filter/wmf/emfwr.cxx                         |    6 +++---
 vcl/source/filter/wmf/winmtf.cxx                        |    6 +++---
 vcl/source/gdi/gdimetafiletools.cxx                     |    6 +++---
 vcl/source/gdi/gdimtf.cxx                               |    6 +++---
 vcl/source/gdi/print2.cxx                               |    6 +++---
 vcl/source/gdi/svmconverter.cxx                         |    6 +++---
 vcl/source/outdev/curvedshapes.cxx                      |    6 +++---
 18 files changed, 60 insertions(+), 60 deletions(-)

New commits:
commit 70f05aa69acca911298201b8a61e3312ec1ab30e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon Dec 5 13:59:20 2016 +0200

    convert PolyStyle to scoped enum
    
    Change-Id: Ia35fdbb5e40888db9558988ac069741b31721f0e
    Reviewed-on: https://gerrit.libreoffice.org/31633
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 0e41235..3d630e6 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 0784603..fbc15f5 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 720e8d7..e3ab3ac 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 4f299eb..4b79fbc 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 442f10d..b215b40 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 5b9028d..bbaeca5 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 1723eeb..a12fc06 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 eb962cb..383a8f7 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 d1feda1..69f2fc0 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 14bf483..f93ddd4 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 593d186..20391e3 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 dda3d56..9b7afb0 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 43f23ec..d855a29 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 877ca9a..372a109 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 74bdd07..fed6aa7 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 53fab0f..5ee886c 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 0ed8e5f..6c67903 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 a086a81..3c931c8 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 )
     {


More information about the Libreoffice-commits mailing list