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 /svx/source/customshapes | |
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 'svx/source/customshapes')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 2 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape3d.cxx | 4 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 21 |
3 files changed, 14 insertions, 13 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index f53e959cf21d..900a72034e70 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1375,7 +1375,7 @@ static basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStar } } - Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC, bFullCircle ); + tools::Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC, bFullCircle ); basegfx::B2DPolygon aRetval; if ( bClockwise ) diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index be54d216df10..2534b94867e7 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -748,7 +748,7 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS // creating initial bound volume ( without rotation. skewing.and camera ) basegfx::B3DPolygon aBoundVolume; - const Polygon aPolygon( rBoundRect ); + const tools::Polygon aPolygon( rBoundRect ); for ( i = 0L; i < 4L; i++ ) { @@ -787,7 +787,7 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS if ( aTransformation2D.IsParallel() ) aBoundVolume = aTransformation2D.ApplySkewSettings( aBoundVolume ); - Polygon aTransformed( 8 ); + tools::Polygon aTransformed( 8 ); for ( i = 0L; i < 8L; i++ ) aTransformed[ (sal_uInt16)i ] = aTransformation2D.Transform2D( aBoundVolume.getB3DPoint( i ) ); diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index cfb6fd67909b..27c855f9f8ab 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -130,14 +130,14 @@ static bool InitializeFontWorkData( const SdrObject* pCustomShape, const sal_uIn return bNoErr; } -double GetLength( const Polygon& rPolygon ) +double GetLength( const tools::Polygon& rPolygon ) { double fLength = 0; if ( rPolygon.GetSize() > 1 ) { sal_uInt16 nCount = rPolygon.GetSize(); while( --nCount ) - fLength += ((Polygon&)rPolygon).CalcDistance( nCount, nCount - 1 ); + fLength += ((tools::Polygon&)rPolygon).CalcDistance( nCount, nCount - 1 ); } return fLength; } @@ -528,14 +528,14 @@ basegfx::B2DPolyPolygon GetOutlinesFromShape2d( const SdrObject* pShape2d ) return aOutlines2d; } -void CalcDistances( const Polygon& rPoly, std::vector< double >& rDistances ) +void CalcDistances( const tools::Polygon& rPoly, std::vector< double >& rDistances ) { sal_uInt16 i, nCount = rPoly.GetSize(); if ( nCount > 1 ) { for ( i = 0; i < nCount; i++ ) { - double fDistance = i ? ((Polygon&)rPoly).CalcDistance( i, i - 1 ) : 0.0; + double fDistance = i ? ((tools::Polygon&)rPoly).CalcDistance( i, i - 1 ) : 0.0; rDistances.push_back( fDistance ); } std::partial_sum( rDistances.begin(), rDistances.end(), rDistances.begin() ); @@ -550,7 +550,8 @@ void CalcDistances( const Polygon& rPoly, std::vector< double >& rDistances ) } } -void InsertMissingOutlinePoints( const Polygon& /*rOutlinePoly*/, const std::vector< double >& rDistances, const Rectangle& rTextAreaBoundRect, Polygon& rPoly ) +void InsertMissingOutlinePoints( const tools::Polygon& /*rOutlinePoly*/, const std::vector< double >& rDistances, + const Rectangle& rTextAreaBoundRect, tools::Polygon& rPoly ) { sal_uInt16 nSize = rPoly.GetSize(); if (nSize == 0) @@ -603,7 +604,7 @@ void InsertMissingOutlinePoints( const Polygon& /*rOutlinePoly*/, const std::vec } } -void GetPoint( const Polygon& rPoly, const std::vector< double >& rDistances, const double& fX, double& fx1, double& fy1 ) +void GetPoint( const tools::Polygon& rPoly, const std::vector< double >& rDistances, const double& fX, double& fx1, double& fy1 ) { fy1 = fx1 = 0.0; if ( rPoly.GetSize() > 1 ) @@ -648,7 +649,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa { if ( nOutline2dIdx >= aOutlines2d.Count() ) break; - const Polygon& rOutlinePoly( aOutlines2d[ nOutline2dIdx++ ] ); + const tools::Polygon& rOutlinePoly( aOutlines2d[ nOutline2dIdx++ ] ); const sal_uInt16 nPointCount = rOutlinePoly.GetSize(); if ( nPointCount > 1 ) { @@ -708,8 +709,8 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa { if ( ( nOutline2dIdx + 1 ) >= aOutlines2d.Count() ) break; - const Polygon& rOutlinePoly( aOutlines2d[ nOutline2dIdx++ ] ); - const Polygon& rOutlinePoly2( aOutlines2d[ nOutline2dIdx++ ] ); + const tools::Polygon& rOutlinePoly( aOutlines2d[ nOutline2dIdx++ ] ); + const tools::Polygon& rOutlinePoly2( aOutlines2d[ nOutline2dIdx++ ] ); const sal_uInt16 nPointCount = rOutlinePoly.GetSize(); const sal_uInt16 nPointCount2 = rOutlinePoly2.GetSize(); if ( ( nPointCount > 1 ) && ( nPointCount2 > 1 ) ) @@ -745,7 +746,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa } // create local polygon copy to work on - Polygon aLocalPoly(aCandidate); + tools::Polygon aLocalPoly(aCandidate); InsertMissingOutlinePoints( rOutlinePoly, vDistances, rTextAreaBoundRect, aLocalPoly ); InsertMissingOutlinePoints( rOutlinePoly2, vDistances2, rTextAreaBoundRect, aLocalPoly ); |