diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-08-16 16:45:12 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-08-17 02:07:43 +0000 |
commit | ef46917ff3163d3fdd5152bda5d16c4503b6ab69 (patch) | |
tree | 73271cd339b19964bc91157207565595774e98b5 /vcl/source/filter/wmf | |
parent | 2ce903c7b2d67a46c2fe2755cfaa66d98f2eddf2 (diff) |
Put Polygon from tools under tools:: namespace
Polygon is one of these names that Clash with some system objects
A similar work has been done earlier with PolyPolygon.
Change-Id: Icf2217cb2906292b7275760f1a16be0e150312f5
Reviewed-on: https://gerrit.libreoffice.org/17789
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'vcl/source/filter/wmf')
-rw-r--r-- | vcl/source/filter/wmf/emfwr.cxx | 28 | ||||
-rw-r--r-- | vcl/source/filter/wmf/emfwr.hxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/wmf/enhwmf.cxx | 14 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 42 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.hxx | 34 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winwmf.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/wmf/wmfwr.cxx | 20 | ||||
-rw-r--r-- | vcl/source/filter/wmf/wmfwr.hxx | 4 |
8 files changed, 75 insertions, 77 deletions
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 16b3d60ff7a5..2d022b27f3b3 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -270,7 +270,7 @@ void EMFWriter::ImplWritePlusPoint( const Point& rPoint ) m_rStm.WriteUInt16( aPoint.X() ).WriteUInt16( aPoint.Y() ); } -void EMFWriter::ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_uInt32& nTrans ) +void EMFWriter::ImplWritePlusFillPolygonRecord( const tools::Polygon& rPoly, const sal_uInt32& nTrans ) { ImplBeginCommentRecord( WIN_EMR_COMMENT_EMFPLUS ); if( rPoly.GetSize() ) @@ -664,7 +664,7 @@ void EMFWriter::ImplWriteRect( const Rectangle& rRect ) .WriteInt32( aRect.Bottom() ); } -void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, bool bClose ) +void EMFWriter::ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose ) { if( rPoly.GetSize() ) { @@ -726,7 +726,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly for( i = 0; i < nPolyCount; i++ ) { - const Polygon& rPoly = rPolyPoly[ i ]; + const tools::Polygon& rPoly = rPolyPoly[ i ]; for( n = 0; n < rPoly.GetSize(); n++ ) ImplWritePoint( rPoly[ n ] ); @@ -751,7 +751,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed for ( i = 0; i < nPolyCount; i++ ) { n = 0; - const Polygon& rPoly = rPolyPoly[ i ]; + const tools::Polygon& rPoly = rPolyPoly[ i ]; while ( n < rPoly.GetSize() ) { if( n == 0 ) @@ -771,7 +771,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed if ( nBezPoints ) { ImplBeginRecord( WIN_EMR_POLYBEZIERTO ); - Polygon aNewPoly( nBezPoints + 1 ); + tools::Polygon aNewPoly( nBezPoints + 1 ); aNewPoly[ 0 ] = rPoly[ n - 1 ]; for ( o = 0; o < nBezPoints; o++ ) aNewPoly[ o + 1 ] = rPoly[ n + o ]; @@ -791,7 +791,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed if ( nPoints > 1 ) { ImplBeginRecord( WIN_EMR_POLYLINETO ); - Polygon aNewPoly( nPoints + 1 ); + tools::Polygon aNewPoly( nPoints + 1 ); aNewPoly[ 0 ] = rPoly[ n - 1]; for ( o = 1; o <= nPoints; o++ ) aNewPoly[ o ] = rPoly[ n - 1 + o ]; @@ -969,7 +969,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) { const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); - ImplWritePolygonRecord( Polygon(aCandidate), false ); + ImplWritePolygonRecord( tools::Polygon(aCandidate), false ); } } @@ -983,8 +983,8 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) { - const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); - ImplWritePolyPolygonRecord(tools::PolyPolygon(Polygon(aPolygon))); + const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); + ImplWritePolyPolygonRecord(tools::PolyPolygon( tools::Polygon(aPolygon) )); } maVDev->SetLineColor(aOldLineColor); @@ -1120,28 +1120,28 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { if( maVDev->IsLineColor() || maVDev->IsFillColor() ) { - Polygon aPoly; + tools::Polygon aPoly; switch( nType ) { case( MetaActionType::ARC ): { const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction); - aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC ); } break; case( MetaActionType::PIE ): { const MetaPieAction* pA = static_cast<const MetaPieAction*>(pAction); - aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE ); } break; case( MetaActionType::CHORD ): { const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction); - aPoly = Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); + aPoly = tools::Polygon( pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD ); } break; @@ -1161,7 +1161,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) if( maVDev->IsLineColor() ) { const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction); - const Polygon& rPoly = pA->GetPolygon(); + const tools::Polygon& rPoly = pA->GetPolygon(); if( rPoly.GetSize() ) { diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx index 80fc6e39ec89..35506c209b36 100644 --- a/vcl/source/filter/wmf/emfwr.hxx +++ b/vcl/source/filter/wmf/emfwr.hxx @@ -74,7 +74,7 @@ private: void ImplWriteSize( const Size& rSize); void ImplWriteRect( const Rectangle& rRect ); void ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClose ); - void ImplWritePolygonRecord( const Polygon& rPoly, bool bClose ); + void ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose ); void ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly ); void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP ); void ImplWriteTextRecord( const Point& rPos, const OUString& rText, const long* pDXArray, sal_uInt32 nWidth ); @@ -83,7 +83,7 @@ private: void ImplWrite( const GDIMetaFile& rMtf ); void WriteEMFPlusHeader( const Size &rMtfSizePix, const Size &rMtfSizeLog ); void ImplWritePlusEOF(); - void ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_uInt32& nTrans ); + void ImplWritePlusFillPolygonRecord( const tools::Polygon& rPoly, const sal_uInt32& nTrans ); void ImplWritePlusColor( const Color& rColor, const sal_uInt32& nTrans ); void ImplWritePlusPoint( const Point& rPoint ); diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index 7f880d0ea8f9..96cbac64a4fc 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -381,7 +381,7 @@ static bool ImplReadRegion( tools::PolyPolygon& rPolyPoly, SvStream& rStream, sa Rectangle aRectangle(Point(nx1, ny1), Point(nx2, ny2)); - Polygon aPolygon(aRectangle); + tools::Polygon aPolygon(aRectangle); tools::PolyPolygon aPolyPolyOr1(aPolygon); tools::PolyPolygon aPolyPolyOr2(rPolyPoly); rPolyPoly.GetUnion(aPolyPolyOr1, aPolyPolyOr2); @@ -485,7 +485,7 @@ void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const bool skipFirst) nStartIndex ++; } - Polygon aPolygon = ReadPolygon<T>(nStartIndex, nPoints); + tools::Polygon aPolygon = ReadPolygon<T>(nStartIndex, nPoints); drawer(pOut, aPolygon, skipFirst, bRecordPath); } @@ -497,14 +497,14 @@ void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const bool skipFirst) * pWMF: the stream containings the polygons * */ template <class T> -Polygon EnhWMFReader::ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints) +tools::Polygon EnhWMFReader::ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints) { bool bRecordOk = nPoints <= SAL_MAX_UINT16; SAL_WARN_IF(!bRecordOk, "vcl.filter", "polygon record has more polygons than we can handle"); if (!bRecordOk) - return Polygon(); + return tools::Polygon(); - Polygon aPolygon(nPoints); + tools::Polygon aPolygon(nPoints); for (sal_uInt16 i = nStartIndex ; i < nPoints && pWMF->good(); i++ ) { T nX, nY; @@ -545,7 +545,7 @@ void EnhWMFReader::ReadAndDrawPolyLine() // Get polygon points: for ( i = 0; ( i < nPoly ) && pWMF->good(); i++ ) { - Polygon aPolygon = ReadPolygon<T>(0, pnPoints[i]); + tools::Polygon aPolygon = ReadPolygon<T>(0, pnPoints[i]); pOut->DrawPolyLine( aPolygon, false, bRecordPath ); } } @@ -603,7 +603,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon() ++nReadPoints; } - aPolyPoly.Insert(Polygon(nPointCount, pPtAry.get())); + aPolyPoly.Insert( tools::Polygon(nPointCount, pPtAry.get()) ); } pOut->DrawPolyPolygon( aPolyPoly, bRecordPath ); diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index d4bdaa86cb8b..74a0774a458a 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -97,22 +97,22 @@ basegfx::B2DPolyPolygon WinMtfClipPath::getClipPath() const void WinMtfPathObj::AddPoint( const Point& rPoint ) { if ( bClosed ) - Insert( Polygon() ); - Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ]; + Insert( tools::Polygon() ); + tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ]; rPoly.Insert( rPoly.GetSize(), rPoint ); bClosed = false; } -void WinMtfPathObj::AddPolyLine( const Polygon& rPolyLine ) +void WinMtfPathObj::AddPolyLine( const tools::Polygon& rPolyLine ) { if ( bClosed ) - Insert( Polygon() ); - Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ]; + Insert( tools::Polygon() ); + tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ]; rPoly.Insert( rPoly.GetSize(), rPolyLine ); bClosed = false; } -void WinMtfPathObj::AddPolygon( const Polygon& rPoly ) +void WinMtfPathObj::AddPolygon( const tools::Polygon& rPoly ) { Insert( rPoly ); bClosed = true; @@ -130,7 +130,7 @@ void WinMtfPathObj::ClosePath() { if ( Count() ) { - Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ]; + tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ]; if ( rPoly.GetSize() > 2 ) { Point aFirst( rPoly[ 0 ] ); @@ -483,7 +483,7 @@ void WinMtfOutput::ImplMap( vcl::Font& rFont ) rFont.SetOrientation( 3600 - rFont.GetOrientation() ); } -Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon ) +tools::Polygon& WinMtfOutput::ImplMap( tools::Polygon& rPolygon ) { sal_uInt16 nPoints = rPolygon.GetSize(); for ( sal_uInt16 i = 0; i < nPoints; i++ ) @@ -493,7 +493,7 @@ Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon ) return rPolygon; } -Polygon& WinMtfOutput::ImplScale( Polygon& rPolygon ) +tools::Polygon& WinMtfOutput::ImplScale( tools::Polygon& rPolygon ) { sal_uInt16 nPoints = rPolygon.GetSize(); for ( sal_uInt16 i = 0; i < nPoints; i++ ) @@ -653,7 +653,7 @@ void WinMtfOutput::ImplDrawClippedPolyPolygon( const tools::PolyPolygon& rPolyPo mpGDIMetaFile->AddAction( new MetaRectAction( rPolyPoly.GetBoundRect() ) ); else { - Polygon aPoly( rPolyPoly[ 0 ] ); + tools::Polygon aPoly( rPolyPoly[ 0 ] ); sal_uInt16 nCount = aPoly.GetSize(); if ( nCount ) { @@ -1022,7 +1022,7 @@ void WinMtfOutput::MoveTo( const Point& rPoint, bool bRecordPath ) // fdo#57353 create new subpath for subsequent moves if ( aPathObj.Count() ) if ( aPathObj[ aPathObj.Count() - 1 ].GetSize() ) - aPathObj.Insert( Polygon() ); + aPathObj.Insert( tools::Polygon() ); aPathObj.AddPoint( aDest ); } maActPos = aDest; @@ -1049,7 +1049,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge ) if ( mbComplexClip ) { - Polygon aPoly( ImplMap( rRect ) ); + tools::Polygon aPoly( ImplMap( rRect ) ); tools::PolyPolygon aPolyPolyRect( aPoly ); tools::PolyPolygon aDest; tools::PolyPolygon(aClipPath.getClipPath()).GetIntersection( aPolyPolyRect, aDest ); @@ -1064,7 +1064,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge ) ImplSetNonPersistentLineColorTransparenz(); mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) ); UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( ImplMap( rRect ) ),maLineStyle.aLineInfo ) ); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( ImplMap( rRect ) ),maLineStyle.aLineInfo ) ); } else { @@ -1101,7 +1101,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) ImplSetNonPersistentLineColorTransparenz(); mpGDIMetaFile->AddAction( new MetaEllipseAction( ImplMap( rRect ) ) ); UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) ); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) ); } else { @@ -1127,10 +1127,10 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P Point aCenter( aRect.Center() ); Size aRad( aRect.GetWidth() / 2, aRect.GetHeight() / 2 ); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) ); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) ); } else - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_ARC ), maLineStyle.aLineInfo ) ); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_ARC ), maLineStyle.aLineInfo ) ); } else mpGDIMetaFile->AddAction( new MetaArcAction( aRect, aStart, aEnd ) ); @@ -1153,7 +1153,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( Polygon( aRect, aStart, aEnd, POLY_PIE ), maLineStyle.aLineInfo ) ); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_PIE ), maLineStyle.aLineInfo ) ); } else { @@ -1176,7 +1176,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const ImplSetNonPersistentLineColorTransparenz(); mpGDIMetaFile->AddAction( new MetaChordAction( aRect, aStart, aEnd ) ); UpdateLineStyle(); - mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_CHORD ), maLineStyle.aLineInfo ) ); + mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_CHORD ), maLineStyle.aLineInfo ) ); } else { @@ -1185,7 +1185,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const } } -void WinMtfOutput::DrawPolygon( Polygon& rPolygon, bool bRecordPath ) +void WinMtfOutput::DrawPolygon( tools::Polygon& rPolygon, bool bRecordPath ) { UpdateClipRegion(); ImplMap( rPolygon ); @@ -1290,7 +1290,7 @@ void WinMtfOutput::DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon, bool bReco } } -void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, bool bTo, bool bRecordPath ) +void WinMtfOutput::DrawPolyLine( tools::Polygon& rPolygon, bool bTo, bool bRecordPath ) { UpdateClipRegion(); @@ -1313,7 +1313,7 @@ void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, bool bTo, bool bRecordPath ) } } -void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, bool bTo, bool bRecordPath ) +void WinMtfOutput::DrawPolyBezier( tools::Polygon& rPolygon, bool bTo, bool bRecordPath ) { UpdateClipRegion(); diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index b68b9acfb30d..bf933632f008 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -278,8 +278,8 @@ public: void ClosePath(); void AddPoint( const Point& rPoint ); - void AddPolygon( const Polygon& rPoly ); - void AddPolyLine( const Polygon& rPoly ); + void AddPolygon( const tools::Polygon& rPoly ); + void AddPolyLine( const tools::Polygon& rPoly ); void AddPolyPolygon( const tools::PolyPolygon& rPolyPolygon ); }; @@ -598,10 +598,10 @@ class WinMtfOutput Size ImplMap( const Size& rSize, bool bDoWorldTransform = true); Rectangle ImplMap( const Rectangle& rRectangle ); void ImplMap( vcl::Font& rFont ); - Polygon& ImplMap( Polygon& rPolygon ); - tools::PolyPolygon& ImplMap( tools::PolyPolygon& rPolyPolygon ); - Polygon& ImplScale( Polygon& rPolygon ); - tools::PolyPolygon& ImplScale( tools::PolyPolygon& rPolyPolygon ); + tools::Polygon& ImplMap( tools::Polygon& rPolygon ); + tools::PolyPolygon& ImplMap( tools::PolyPolygon& rPolyPolygon ); + tools::Polygon& ImplScale( tools::Polygon& rPolygon ); + tools::PolyPolygon& ImplScale( tools::PolyPolygon& rPolyPolygon ); void ImplResizeObjectArry( sal_uInt32 nNewEntry ); void ImplSetNonPersistentLineColorTransparenz(); void ImplDrawClippedPolyPolygon( const tools::PolyPolygon& rPolyPoly ); @@ -654,7 +654,7 @@ public: void ClearPath(){ aPathObj.Init(); }; void ClosePath(){ aPathObj.ClosePath(); }; - const tools::PolyPolygon& GetPathObj(){ return aPathObj; }; + const tools::PolyPolygon& GetPathObj(){ return aPathObj; }; void MoveTo( const Point& rPoint, bool bRecordPath = false ); void LineTo( const Point& rPoint, bool bRecordPath = false ); @@ -678,22 +678,20 @@ public: const Point& rStartAngle, const Point& rEndAngle ); - void DrawPolygon( Polygon& rPolygon, bool bRecordPath = false ); - void DrawPolygon( Polygon& rPolygon, bool /*bDrawTo*/, bool bRecordPath) + void DrawPolygon( tools::Polygon& rPolygon, bool bRecordPath = false ); + void DrawPolygon( tools::Polygon& rPolygon, bool /*bDrawTo*/, bool bRecordPath) { //For ReadAndDrawPolygon template compatibility DrawPolygon(rPolygon, bRecordPath); } void DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon, bool bRecordPath = false ); - void DrawPolyLine( - Polygon& rPolygon, - bool bDrawTo = false, - bool bRecordPath = false + void DrawPolyLine( tools::Polygon& rPolygon, + bool bDrawTo = false, + bool bRecordPath = false ); - void DrawPolyBezier( - Polygon& rPolygin, - bool bDrawTo = false, - bool bRecordPath = false + void DrawPolyBezier( tools::Polygon& rPolygin, + bool bDrawTo = false, + bool bRecordPath = false ); void DrawText( Point& rPosition, OUString& rString, @@ -768,7 +766,7 @@ public: private: template <class T> void ReadAndDrawPolyPolygon(); template <class T> void ReadAndDrawPolyLine(); - template <class T> Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints); + template <class T> tools::Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints); template <class T, class Drawer> void ReadAndDrawPolygon(Drawer drawer, const bool skipFirst); Rectangle ReadRectangle(); diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index 52f228ef1c99..a379d8bd9bc4 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -350,7 +350,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) } else { - Polygon aPoly(nPoints); + tools::Polygon aPoly(nPoints); for (sal_uInt16 i(0); i < nPoints && pWMF->good(); ++i) aPoly[ i ] = ReadPoint(); pOut->DrawPolygon(aPoly); @@ -429,7 +429,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) pPtAry[b] = ReadPoint(); } - aPolyPoly.Insert(Polygon(nPointCount, pPtAry)); + aPolyPoly.Insert( tools::Polygon(nPointCount, pPtAry) ); } bRecordOk &= pWMF->good(); @@ -458,7 +458,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) } else { - Polygon aPoly(nPoints); + tools::Polygon aPoly(nPoints); for (sal_uInt16 i(0); i < nPoints && pWMF->good(); ++i) aPoly[ i ] = ReadPoint(); pOut->DrawPolyLine( aPoly ); diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 623f0cd2d8d9..bdcf8701445e 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -611,9 +611,9 @@ void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, c WriteRectangle(rRect); } -void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly) +void WMFWriter::WMFRecord_Polygon(const tools::Polygon & rPoly) { - Polygon aSimplePoly; + tools::Polygon aSimplePoly; if ( rPoly.HasFlags() ) rPoly.AdaptiveSubdivide( aSimplePoly ); else @@ -625,9 +625,9 @@ void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly) WritePointXY(aSimplePoly.GetPoint(i)); } -void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly) +void WMFWriter::WMFRecord_PolyLine(const tools::Polygon & rPoly) { - Polygon aSimplePoly; + tools::Polygon aSimplePoly; if ( rPoly.HasFlags() ) rPoly.AdaptiveSubdivide( aSimplePoly ); else @@ -641,7 +641,7 @@ void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly) void WMFWriter::WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly) { - const Polygon * pPoly; + const tools::Polygon * pPoly; sal_uInt16 nCount,nSize,i,j; nCount=rPolyPoly.Count(); @@ -650,7 +650,7 @@ void WMFWriter::WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly) { if ( aSimplePolyPoly[ i ].HasFlags() ) { - Polygon aSimplePoly; + tools::Polygon aSimplePoly; aSimplePolyPoly[ i ].AdaptiveSubdivide( aSimplePoly ); aSimplePolyPoly[ i ] = aSimplePoly; } @@ -981,7 +981,7 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx: for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) { const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); - WMFRecord_PolyLine(Polygon(aCandidate)); + WMFRecord_PolyLine( tools::Polygon(aCandidate) ); } } @@ -996,8 +996,8 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx: for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) { - const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); - WMFRecord_Polygon(Polygon(aPolygon)); + const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); + WMFRecord_Polygon( tools::Polygon(aPolygon) ); } aSrcLineColor = aOldLineColor; @@ -1119,7 +1119,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) case MetaActionType::POLYLINE: { const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pMA); - const Polygon& rPoly = pA->GetPolygon(); + const tools::Polygon& rPoly = pA->GetPolygon(); if( rPoly.GetSize() ) { diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx index 1acbc4e4f4e0..d26cac01ecc7 100644 --- a/vcl/source/filter/wmf/wmfwr.hxx +++ b/vcl/source/filter/wmf/wmfwr.hxx @@ -152,8 +152,8 @@ private: void WMFRecord_LineTo(const Point & rPoint); void WMFRecord_MoveTo(const Point & rPoint); void WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt); - void WMFRecord_Polygon(const Polygon & rPoly); - void WMFRecord_PolyLine(const Polygon & rPoly); + void WMFRecord_Polygon(const tools::Polygon & rPoly); + void WMFRecord_PolyLine(const tools::Polygon & rPoly); void WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly); void WMFRecord_Rectangle(const Rectangle & rRect); void WMFRecord_RestoreDC(); |