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/gdi/impvect.cxx | |
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/gdi/impvect.cxx')
-rw-r--r-- | vcl/source/gdi/impvect.cxx | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index 4db6d4939e99..0b3b70dee1a6 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -123,24 +123,23 @@ extern "C" int SAL_CALL ImplColorSetCmpFnc( const void* p1, const void* p2 ) class ImplPointArray { - Point* mpArray; - sal_uLong mnSize; - sal_uLong mnRealSize; + Point* mpArray; + sal_uLong mnSize; + sal_uLong mnRealSize; public: - ImplPointArray(); - ~ImplPointArray(); + ImplPointArray(); + ~ImplPointArray(); - void ImplSetSize( sal_uLong nSize ); + void ImplSetSize( sal_uLong nSize ); + sal_uLong ImplGetRealSize() const { return mnRealSize; } + void ImplSetRealSize( sal_uLong nRealSize ) { mnRealSize = nRealSize; } + void ImplCreatePoly( tools::Polygon& rPoly ) const; - sal_uLong ImplGetRealSize() const { return mnRealSize; } - void ImplSetRealSize( sal_uLong nRealSize ) { mnRealSize = nRealSize; } - - inline Point& operator[]( sal_uLong nPos ); + inline Point& operator[]( sal_uLong nPos ); inline const Point& operator[]( sal_uLong nPos ) const; - void ImplCreatePoly( Polygon& rPoly ) const; }; ImplPointArray::ImplPointArray() : @@ -183,9 +182,9 @@ inline const Point& ImplPointArray::operator[]( sal_uLong nPos ) const return mpArray[ nPos ]; } -void ImplPointArray::ImplCreatePoly( Polygon& rPoly ) const +void ImplPointArray::ImplCreatePoly( tools::Polygon& rPoly ) const { - rPoly = Polygon( sal::static_int_cast<sal_uInt16>(mnRealSize), mpArray ); + rPoly = tools::Polygon( sal::static_int_cast<sal_uInt16>(mnRealSize), mpArray ); } class ImplVectMap @@ -265,7 +264,7 @@ class ImplChain { private: - Polygon maPoly; + tools::Polygon maPoly; Point maStartPt; sal_uLong mnArraySize; sal_uLong mnCount; @@ -285,7 +284,7 @@ public: inline void ImplAdd( sal_uInt8 nCode ); void ImplEndAdd( sal_uLong nTypeFlag ); - const Polygon& ImplGetPoly() const { return maPoly; } + const tools::Polygon& ImplGetPoly() const { return maPoly; } }; ImplChain::ImplChain( sal_uLong nInitCount, long nResize ) : @@ -316,7 +315,7 @@ void ImplChain::ImplGetSpace() void ImplChain::ImplBeginAdd( const Point& rStartPt ) { - maPoly = Polygon(); + maPoly = tools::Polygon(); maStartPt = rStartPt; mnCount = 0UL; } @@ -776,7 +775,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp, for( ; nCurPoly < nCount; ++nCurPoly ) { - const Polygon& rPoly = rPolyPoly.GetObject( nCurPoly ); + const tools::Polygon& rPoly = rPolyPoly.GetObject( nCurPoly ); const sal_uInt16 nSize( rPoly.GetSize() ); sal_uInt16 nDepth( 0 ), i( 0 ); const bool bRight( rPoly.IsRightOrientated() ); @@ -789,7 +788,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp, if( nSize && ( ( !bRight && !bHole ) || ( bRight && bHole ) ) ) { - Polygon aNewPoly( nSize ); + tools::Polygon aNewPoly( nSize ); sal_uInt16 nPrim( 0 ), nSec( nSize - 1 ); if( rPoly.HasFlags() ) @@ -814,7 +813,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp, // put outmost polygon to the front if( nFirstPoly > 0 ) { - const Polygon aFirst( rPolyPoly.GetObject( static_cast< sal_uInt16 >( nFirstPoly ) ) ); + const tools::Polygon aFirst( rPolyPoly.GetObject( static_cast< sal_uInt16 >( nFirstPoly ) ) ); rPolyPoly.Remove( static_cast< sal_uInt16 >( nFirstPoly ) ); rPolyPoly.Insert( aFirst, 0 ); @@ -980,7 +979,7 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 else aChain.ImplEndAdd( bInner ? VECT_POLY_OUTLINE_INNER : VECT_POLY_OUTLINE_OUTER ); - const Polygon& rPoly = aChain.ImplGetPoly(); + const tools::Polygon& rPoly = aChain.ImplGetPoly(); if( rPoly.GetSize() > 2 ) { |