canvas/source/vcl/canvashelper_texturefill.cxx |    4 ++--
 cppcanvas/source/mtfrenderer/implrenderer.cxx  |    2 +-
 filter/source/svg/svgwriter.cxx                |   10 +++++-----
 include/tools/poly.hxx                         |    9 +++++----
 svtools/source/control/valueset.cxx            |    6 +++---
 svx/source/dialog/contwnd.cxx                  |    4 ++--
 svx/source/dialog/frmsel.cxx                   |   16 ++++++++--------
 tools/source/generic/poly2.cxx                 |    4 ++++
 vcl/qa/cppunit/svm/svmtest.cxx                 |    2 +-
 vcl/source/filter/svm/SvmConverter.cxx         |    2 +-
 vcl/source/filter/wmf/emfwr.cxx                |    2 +-
 vcl/source/gdi/gdimtf.cxx                      |   18 +++++++++---------
 vcl/source/gdi/gradient.cxx                    |    2 +-
 vcl/source/gdi/region.cxx                      |    2 +-
 vcl/source/graphic/GraphicObject.cxx           |    2 +-
 vcl/source/outdev/gradient.cxx                 |    4 ++--
 vcl/source/outdev/polygon.cxx                  |    2 +-
 17 files changed, 48 insertions(+), 43 deletions(-)

New commits:
commit 13d71843510964a98d3c480d1e42533bdd34deab
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Jul 6 19:00:50 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Jul 6 20:28:05 2023 +0200

    make tools::Poly*gon single-arg constructors explicit
    
    which will help avoid ambiguity in method calls in an upcoming patch
    
    Change-Id: Ic7607ac7d95559e0942a84fb3226cfdd6ade22bc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154146
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx 
b/canvas/source/vcl/canvashelper_texturefill.cxx
index 1582a3ad7601..13778b990b61 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -171,7 +171,7 @@ namespace vclcanvas
                 aTempPoly[3] = ::Point( ::basegfx::fround( aLeftBottom.getX() 
),
                                         ::basegfx::fround( aLeftBottom.getY() 
) );
                 aTempPoly[4] = aTempPoly[0];
-                rOutDev.DrawGradient( aTempPoly, vclGradient );
+                rOutDev.DrawGradient( ::tools::PolyPolygon(aTempPoly), 
vclGradient );
                 return;
             }
             // 3 colors with first and last being equal and 3 stops (at 0, 0.5 
and 1) is an axial gradient:
@@ -196,7 +196,7 @@ namespace vclcanvas
                 aTempPoly[3] = ::Point( ::basegfx::fround( aLeftBottom.getX() 
),
                                         ::basegfx::fround( aLeftBottom.getY() 
) );
                 aTempPoly[4] = aTempPoly[0];
-                rOutDev.DrawGradient( aTempPoly, vclGradient );
+                rOutDev.DrawGradient( ::tools::PolyPolygon(aTempPoly), 
vclGradient );
                 return;
             }
 
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx 
b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 958faf8f8378..9d224f1146c4 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1545,7 +1545,7 @@ namespace cppcanvas::internal
                     case MetaActionType::GRADIENT:
                     {
                         MetaGradientAction* pGradAct = 
static_cast<MetaGradientAction*>(pCurrAct);
-                        createGradientAction( ::tools::Polygon( 
pGradAct->GetRect() ),
+                        createGradientAction( ::tools::PolyPolygon( 
pGradAct->GetRect() ),
                                               pGradAct->GetGradient(),
                                               rFactoryParms,
                                               true,
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 00e78ce5c5f2..4f21f0493b06 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -2811,7 +2811,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, 
const OUString& rText,
         aPoly[ 2 ].setX( aPoly[ 1 ].X() ); aPoly[ 2 ].setY( aPoly[ 0 ].Y() + 
nLineHeight - 1 );
         aPoly[ 3 ].setX( aPoly[ 0 ].X() ); aPoly[ 3 ].setY( aPoly[ 2 ].Y() );
 
-        ImplWritePolyPolygon( aPoly, false );
+        ImplWritePolyPolygon( tools::PolyPolygon(aPoly), false );
     }
 
     if( rFont.GetUnderline() )
@@ -2823,7 +2823,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, 
const OUString& rText,
         aPoly[ 2 ].setX( aPoly[ 1 ].X() ); aPoly[ 2 ].setY( aPoly[ 0 ].Y() + 
nLineHeight - 1 );
         aPoly[ 3 ].setX( aPoly[ 0 ].X() ); aPoly[ 3 ].setY( aPoly[ 2 ].Y() );
 
-        ImplWritePolyPolygon( aPoly, false );
+        ImplWritePolyPolygon( tools::PolyPolygon(aPoly), false );
     }
 }
 
@@ -3225,7 +3225,7 @@ void SVGActionWriter::ImplWriteActions( const 
GDIMetaFile& rMtf,
                     if( aPoly.GetSize() )
                     {
                         maAttributeWriter.AddPaintAttr( 
mpVDev->GetLineColor(), mpVDev->GetFillColor() );
-                        ImplWritePolyPolygon( aPoly, false );
+                        ImplWritePolyPolygon( tools::PolyPolygon(aPoly), false 
);
                     }
                 }
             }
@@ -3242,7 +3242,7 @@ void SVGActionWriter::ImplWriteActions( const 
GDIMetaFile& rMtf,
                     {
                         maAttributeWriter.AddPaintAttr( 
mpVDev->GetLineColor(), COL_TRANSPARENT );
                         ImplAddLineAttr( pA->GetLineInfo() );
-                        ImplWritePolyPolygon( rPoly, true );
+                        ImplWritePolyPolygon( tools::PolyPolygon(rPoly), true 
);
                     }
                 }
             }
@@ -3565,7 +3565,7 @@ void SVGActionWriter::ImplWriteActions( const 
GDIMetaFile& rMtf,
                             mapCurShape->maId = aElementId + "_" + 
OUString::number(nEntryCount++);
                         }
 
-                        mapCurShape->maShapePolyPoly = aPoly;
+                        mapCurShape->maShapePolyPoly = 
tools::PolyPolygon(aPoly);
                     }
 
                     mapCurShape->maShapeLineColor = mpVDev->GetLineColor();
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index d9f2a4544901..77653d23bda7 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -83,10 +83,10 @@ public:
 
 public:
                         Polygon();
-                        Polygon( sal_uInt16 nSize );
+                        explicit Polygon( sal_uInt16 nSize );
                         Polygon( sal_uInt16 nPoints, const Point* pPtAry,
                                  const PolyFlags* pFlagAry = nullptr );
-                        Polygon( const tools::Rectangle& rRect );
+                        explicit Polygon( const tools::Rectangle& rRect );
                         Polygon( const tools::Rectangle& rRect,
                                  sal_uInt32 nHorzRound, sal_uInt32 nVertRound 
);
                         Polygon( const Point& rCenter,
@@ -196,8 +196,9 @@ private:
     TOOLS_DLLPRIVATE void  ImplDoOperation( const tools::PolyPolygon& 
rPolyPoly, tools::PolyPolygon& rResult, PolyClipOp nOperation ) const;
 
 public:
-                        PolyPolygon( sal_uInt16 nInitSize = 16 );
-                        PolyPolygon( const tools::Polygon& rPoly );
+                        explicit PolyPolygon( sal_uInt16 nInitSize = 16 );
+                        explicit PolyPolygon( const tools::Polygon& rPoly );
+                        explicit PolyPolygon( const tools::Rectangle& );
                         PolyPolygon( const tools::PolyPolygon& rPolyPoly );
                         PolyPolygon( tools::PolyPolygon&& rPolyPoly ) noexcept;
                         ~PolyPolygon();
diff --git a/svtools/source/control/valueset.cxx 
b/svtools/source/control/valueset.cxx
index 933f8d42ca49..71f2f7c5aa0d 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1263,7 +1263,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& 
rRenderContext,
         {
             rRenderContext.SetLineColor(aDoubleColor);
             tools::PolyPolygon aPolyPoly(1);
-            aPolyPoly.Insert(aRect);
+            aPolyPoly.Insert(tools::Polygon(aRect));
             rRenderContext.DrawTransparent(aPolyPoly, nTransparencePercent);
         }
     }
@@ -1280,7 +1280,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& 
rRenderContext,
             if (bDrawSel)
             {
                 tools::PolyPolygon aPolyPoly(1);
-                aPolyPoly.Insert(aRect);
+                aPolyPoly.Insert(tools::Polygon(aRect));
                 rRenderContext.DrawTransparent(aPolyPoly, 
nTransparencePercent);
             }
 
@@ -1299,7 +1299,7 @@ void ValueSet::ImplDrawSelect(vcl::RenderContext& 
rRenderContext,
             if (bDrawSel)
             {
                 tools::PolyPolygon aPolyPoly(1);
-                aPolyPoly.Insert(aRect);
+                aPolyPoly.Insert(tools::Polygon(aRect));
                 rRenderContext.DrawTransparent(aPolyPoly, 
nTransparencePercent);
             }
 
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index 95a5cb650e35..976897b6bae2 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -246,8 +246,8 @@ void ContourWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::Recta
     {
         tools::PolyPolygon _aPolyPoly(2);
         rTarget.Push(vcl::PushFlags::FILLCOLOR);
-        _aPolyPoly.Insert(tools::Rectangle(Point(), GetGraphicSize()));
-        _aPolyPoly.Insert(aWorkRect);
+        _aPolyPoly.Insert(tools::Polygon(tools::Rectangle(Point(), 
GetGraphicSize())));
+        _aPolyPoly.Insert(tools::Polygon(aWorkRect));
         rTarget.SetFillColor(COL_LIGHTRED);
         rTarget.DrawTransparent(_aPolyPoly, 50);
         rTarget.Pop();
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 31dce82e0a84..5f2ca0e4c718 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -166,7 +166,7 @@ void FrameBorder::SetState( FrameBorderState eState )
 
 void FrameBorder::AddFocusPolygon( const tools::Polygon& rFocus )
 {
-    lclPolyPolyUnion( maFocusArea, rFocus );
+    lclPolyPolyUnion( maFocusArea, tools::PolyPolygon(rFocus) );
 }
 
 void FrameBorder::MergeFocusToPolyPolygon( tools::PolyPolygon& rPPoly ) const
@@ -176,7 +176,7 @@ void FrameBorder::MergeFocusToPolyPolygon( 
tools::PolyPolygon& rPPoly ) const
 
 void FrameBorder::AddClickRect( const tools::Rectangle& rRect )
 {
-    lclPolyPolyUnion( maClickArea, tools::Polygon( rRect ) );
+    lclPolyPolyUnion( maClickArea, tools::PolyPolygon( rRect ) );
 }
 
 bool FrameBorder::ContainsClickPoint( const Point& rPos ) const
@@ -410,12 +410,12 @@ void FrameSelectorImpl::InitBorderGeometry()
     maHor.ClearFocusArea();
     maBottom.ClearFocusArea();
 
-    maLeft.AddFocusPolygon(   tools::Rectangle( mnLine1 - mnFocusOffs, mnLine1 
- mnFocusOffs, mnLine1 + mnFocusOffs, mnLine3 + mnFocusOffs ) );
-    maVer.AddFocusPolygon(    tools::Rectangle( mnLine2 - mnFocusOffs, mnLine1 
- mnFocusOffs, mnLine2 + mnFocusOffs, mnLine3 + mnFocusOffs ) );
-    maRight.AddFocusPolygon(  tools::Rectangle( mnLine3 - mnFocusOffs, mnLine1 
- mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) );
-    maTop.AddFocusPolygon(    tools::Rectangle( mnLine1 - mnFocusOffs, mnLine1 
- mnFocusOffs, mnLine3 + mnFocusOffs, mnLine1 + mnFocusOffs ) );
-    maHor.AddFocusPolygon(    tools::Rectangle( mnLine1 - mnFocusOffs, mnLine2 
- mnFocusOffs, mnLine3 + mnFocusOffs, mnLine2 + mnFocusOffs ) );
-    maBottom.AddFocusPolygon( tools::Rectangle( mnLine1 - mnFocusOffs, mnLine3 
- mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + mnFocusOffs ) );
+    maLeft.AddFocusPolygon(   tools::Polygon(tools::Rectangle( mnLine1 - 
mnFocusOffs, mnLine1 - mnFocusOffs, mnLine1 + mnFocusOffs, mnLine3 + 
mnFocusOffs )) );
+    maVer.AddFocusPolygon(    tools::Polygon(tools::Rectangle( mnLine2 - 
mnFocusOffs, mnLine1 - mnFocusOffs, mnLine2 + mnFocusOffs, mnLine3 + 
mnFocusOffs )) );
+    maRight.AddFocusPolygon(  tools::Polygon(tools::Rectangle( mnLine3 - 
mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + 
mnFocusOffs )) );
+    maTop.AddFocusPolygon(    tools::Polygon(tools::Rectangle( mnLine1 - 
mnFocusOffs, mnLine1 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine1 + 
mnFocusOffs )) );
+    maHor.AddFocusPolygon(    tools::Polygon(tools::Rectangle( mnLine1 - 
mnFocusOffs, mnLine2 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine2 + 
mnFocusOffs )) );
+    maBottom.AddFocusPolygon( tools::Polygon(tools::Rectangle( mnLine1 - 
mnFocusOffs, mnLine3 - mnFocusOffs, mnLine3 + mnFocusOffs, mnLine3 + 
mnFocusOffs )) );
 
     maTLBR.ClearFocusArea();
     maBLTR.ClearFocusArea();
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index c6d0a46032c8..a00f64f41b18 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -40,6 +40,10 @@ PolyPolygon::PolyPolygon( const tools::Polygon& rPoly )
     : mpImplPolyPolygon( rPoly )
 {
 }
+PolyPolygon::PolyPolygon( const tools::Rectangle& rRect )
+    : mpImplPolyPolygon( tools::Polygon(rRect) )
+{
+}
 
 PolyPolygon::PolyPolygon( const tools::PolyPolygon& rPolyPoly )
     : mpImplPolyPolygon( rPolyPoly.mpImplPolyPolygon )
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index 8b43f828ac7d..fcf863e7664a 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -2078,7 +2078,7 @@ void SvmTest::testTransparent()
     tools::PolyPolygon aPolyPolygon(1);
     aPolyPolygon.Insert(aPolygon);
 
-    pVirtualDev->DrawTransparent(aPolygon, 50);
+    pVirtualDev->DrawTransparent(tools::PolyPolygon(aPolygon), 50);
 
     CPPUNIT_ASSERT(aGDIMetaFile.HasTransparentActions());
     checkTransparent(writeAndReadStream(aGDIMetaFile));
diff --git a/vcl/source/filter/svm/SvmConverter.cxx 
b/vcl/source/filter/svm/SvmConverter.cxx
index c844648d7b9b..ea6dc961a659 100644
--- a/vcl/source/filter/svm/SvmConverter.cxx
+++ b/vcl/source/filter/svm/SvmConverter.cxx
@@ -512,7 +512,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, 
GDIMetaFile& rMtf )
                     rMtf.AddAction( new MetaRectAction( aRect ) );
 
                     if( bFatLine )
-                        rMtf.AddAction( new MetaPolyLineAction( aRect, 
aLineInfo ) );
+                        rMtf.AddAction( new MetaPolyLineAction( 
tools::Polygon(aRect), aLineInfo ) );
                 }
             }
             break;
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 74ee7462bb6a..385b698636e0 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -645,7 +645,7 @@ void EMFWriter::ImplWritePolygonRecord( const 
tools::Polygon& rPoly, bool bClose
         return;
 
     if( rPoly.HasFlags() )
-        ImplWritePath( rPoly, bClose );
+        ImplWritePath( tools::PolyPolygon(rPoly), bClose );
     else
     {
         if( bClose )
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 313d03811780..379f222572d4 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -905,7 +905,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
             case MetaActionType::RECT:
             {
                 MetaRectAction* pAct = static_cast<MetaRectAction*>(pAction);
-                aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( 
pAct->GetRect(), aRotAnchor, aRotOffset, fSin, fCos ) ) );
+                aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( 
tools::Polygon(pAct->GetRect()), aRotAnchor, aRotOffset, fSin, fCos ) ) );
             }
             break;
 
@@ -1010,7 +1010,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
             case MetaActionType::BMPSCALE:
             {
                 MetaBmpScaleAction* pAct = 
static_cast<MetaBmpScaleAction*>(pAction);
-                tools::Polygon aBmpPoly( ImplGetRotatedPolygon( 
tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, 
fSin, fCos ) );
+                tools::Polygon aBmpPoly( ImplGetRotatedPolygon( 
tools::Polygon(tools::Rectangle( pAct->GetPoint(), pAct->GetSize() )), 
aRotAnchor, aRotOffset, fSin, fCos ) );
                 tools::Rectangle           aBmpRect( aBmpPoly.GetBoundRect() );
                 BitmapEx            aBmpEx( pAct->GetBitmap() );
 
@@ -1023,7 +1023,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
             case MetaActionType::BMPSCALEPART:
             {
                 MetaBmpScalePartAction* pAct = 
static_cast<MetaBmpScalePartAction*>(pAction);
-                tools::Polygon aBmpPoly( ImplGetRotatedPolygon( 
tools::Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, 
aRotOffset, fSin, fCos ) );
+                tools::Polygon aBmpPoly( ImplGetRotatedPolygon( 
tools::Polygon(tools::Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() )), 
aRotAnchor, aRotOffset, fSin, fCos ) );
                 tools::Rectangle               aBmpRect( 
aBmpPoly.GetBoundRect() );
                 BitmapEx                aBmpEx( pAct->GetBitmap() );
 
@@ -1037,7 +1037,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
             case MetaActionType::BMPEXSCALE:
             {
                 MetaBmpExScaleAction*   pAct = 
static_cast<MetaBmpExScaleAction*>(pAction);
-                tools::Polygon aBmpPoly( ImplGetRotatedPolygon( 
tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, 
fSin, fCos ) );
+                tools::Polygon aBmpPoly( ImplGetRotatedPolygon( 
tools::Polygon(tools::Rectangle( pAct->GetPoint(), pAct->GetSize() )), 
aRotAnchor, aRotOffset, fSin, fCos ) );
                 tools::Rectangle               aBmpRect( 
aBmpPoly.GetBoundRect() );
                 BitmapEx                aBmpEx( pAct->GetBitmapEx() );
 
@@ -1050,7 +1050,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
             case MetaActionType::BMPEXSCALEPART:
             {
                 MetaBmpExScalePartAction*   pAct = 
static_cast<MetaBmpExScalePartAction*>(pAction);
-                tools::Polygon aBmpPoly( ImplGetRotatedPolygon( 
tools::Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, 
aRotOffset, fSin, fCos ) );
+                tools::Polygon aBmpPoly( ImplGetRotatedPolygon( 
tools::Polygon(tools::Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() )), 
aRotAnchor, aRotOffset, fSin, fCos ) );
                 tools::Rectangle                   aBmpRect( 
aBmpPoly.GetBoundRect() );
                 BitmapEx                    aBmpEx( pAct->GetBitmapEx() );
 
@@ -1066,7 +1066,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
                 MetaGradientAction* pAct = 
static_cast<MetaGradientAction*>(pAction);
 
                 ImplAddGradientEx( aMtf, *aMapVDev,
-                                   ImplGetRotatedPolygon( pAct->GetRect(), 
aRotAnchor, aRotOffset, fSin, fCos ),
+                                   tools::PolyPolygon(ImplGetRotatedPolygon( 
tools::Polygon(pAct->GetRect()), aRotAnchor, aRotOffset, fSin, fCos )),
                                    pAct->GetGradient() );
             }
             break;
@@ -1190,7 +1190,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
             {
                 MetaFloatTransparentAction* pAct = 
static_cast<MetaFloatTransparentAction*>(pAction);
                 GDIMetaFile                 aTransMtf( pAct->GetGDIMetaFile() 
);
-                tools::Polygon aMtfPoly( ImplGetRotatedPolygon( 
tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, 
fSin, fCos ) );
+                tools::Polygon aMtfPoly( ImplGetRotatedPolygon( 
tools::Polygon(tools::Rectangle( pAct->GetPoint(), pAct->GetSize() )), 
aRotAnchor, aRotOffset, fSin, fCos ) );
                 tools::Rectangle                   aMtfRect( 
aMtfPoly.GetBoundRect() );
 
                 aTransMtf.Rotate( nAngle10 );
@@ -1203,7 +1203,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
             {
                 MetaEPSAction*  pAct = static_cast<MetaEPSAction*>(pAction);
                 GDIMetaFile     aEPSMtf( pAct->GetSubstitute() );
-                tools::Polygon aEPSPoly( ImplGetRotatedPolygon( 
tools::Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, 
fSin, fCos ) );
+                tools::Polygon aEPSPoly( ImplGetRotatedPolygon( 
tools::Polygon(tools::Rectangle( pAct->GetPoint(), pAct->GetSize() )), 
aRotAnchor, aRotOffset, fSin, fCos ) );
                 tools::Rectangle       aEPSRect( aEPSPoly.GetBoundRect() );
 
                 aEPSMtf.Rotate( nAngle10 );
@@ -1229,7 +1229,7 @@ void GDIMetaFile::Rotate( Degree10 nAngle10 )
             {
                 MetaISectRectClipRegionAction*  pAct = 
static_cast<MetaISectRectClipRegionAction*>(pAction);
                 aMtf.AddAction( new 
MetaISectRegionClipRegionAction(vcl::Region(
-                    ImplGetRotatedPolygon( pAct->GetRect(), aRotAnchor,
+                    ImplGetRotatedPolygon( tools::Polygon(pAct->GetRect()), 
aRotAnchor,
                         aRotOffset, fSin, fCos )) ) );
             }
             break;
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index b8712511a39a..75a53a2a93a7 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -603,7 +603,7 @@ void 
Gradient::DrawComplexGradientToMetafile(tools::Rectangle const& rRect, GDIM
 
     rMetaFile.AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue 
), true ) );
 
-    aPoly = rRect;
+    aPoly = tools::Polygon(rRect);
     xPolyPoly->Insert( aPoly );
     xPolyPoly->Insert( aPoly );
 
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 78a862225ed2..6665b5c48d80 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -326,7 +326,7 @@ Region::Region(const tools::Polygon& rPolygon)
 
     if(rPolygon.GetSize())
     {
-        ImplCreatePolyPolyRegion(rPolygon);
+        ImplCreatePolyPolyRegion(tools::PolyPolygon(rPolygon));
     }
 }
 
diff --git a/vcl/source/graphic/GraphicObject.cxx 
b/vcl/source/graphic/GraphicObject.cxx
index d03db6be891a..7abf3b3d3bfd 100644
--- a/vcl/source/graphic/GraphicObject.cxx
+++ b/vcl/source/graphic/GraphicObject.cxx
@@ -369,7 +369,7 @@ bool GraphicObject::ImplGetCropParams(const OutputDevice& 
rOut, Point& rPt, Size
         else
             bRectClipRegion = true;
 
-        rClipPolyPoly = aClipPoly;
+        rClipPolyPoly = tools::PolyPolygon(aClipPoly);
 
         if (maGraphic.GetPrefMapMode().GetMapUnit() == MapUnit::MapPixel)
             aSize100 = Application::GetDefaultDevice()->PixelToLogic( 
maGraphic.GetPrefSize(), aMap100 );
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index b89fb477c62b..bbedf0256397 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -476,7 +476,7 @@ void OutputDevice::DrawComplexGradient( const 
tools::Rectangle& rRect,
 
     if( xPolyPoly )
     {
-        aPoly = rRect;
+        aPoly = tools::Polygon(rRect);
         xPolyPoly->Insert( aPoly );
         xPolyPoly->Insert( aPoly );
     }
@@ -490,7 +490,7 @@ void OutputDevice::DrawComplexGradient( const 
tools::Rectangle& rRect,
         aExtRect.AdjustRight(1 );
         aExtRect.AdjustBottom(1 );
 
-        aPoly = aExtRect;
+        aPoly = tools::Polygon(aExtRect);
         ImplDrawPolygon( aPoly, pClixPolyPoly );
     }
 
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index fa56f507a921..a261f0c23f60 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -444,7 +444,7 @@ void OutputDevice::ImplDrawPolygon( const tools::Polygon& 
rPoly, const tools::Po
 {
     if( pClipPolyPoly )
     {
-        ImplDrawPolyPolygon( rPoly, pClipPolyPoly );
+        ImplDrawPolyPolygon( tools::PolyPolygon(rPoly), pClipPolyPoly );
     }
     else
     {

Reply via email to