diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-28 07:51:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-09-30 11:47:41 +0200 |
commit | c9d4a2887c13a5df244022276dd79a5bef8af0ea (patch) | |
tree | fb849270affd5fca01fa26094c89595d18c6f588 /vcl/source/gdi | |
parent | d17d4d48b5dc3332fd03f6ef186ed2bda4665e7c (diff) |
fdo#82577: Handle PolyPolygon
Put the TOOLS PolyPolygon class in the tools namespace. Avoids clash with the Windows
PolyPolygon typedef.
Change-Id: I811ecbb3d55ba4ce66e4555a8586f60fcd57fb66
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/bitmap3.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/cvtsvm.cxx | 38 | ||||
-rw-r--r-- | vcl/source/gdi/gdimetafiletools.cxx | 16 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/graphictools.cxx | 18 | ||||
-rw-r--r-- | vcl/source/gdi/impvect.cxx | 10 | ||||
-rw-r--r-- | vcl/source/gdi/impvect.hxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/metaact.cxx | 24 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 16 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.hxx | 12 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 12 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/region.cxx | 54 |
15 files changed, 115 insertions, 115 deletions
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 884845b5a51d..ece13a3cfda5 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -2409,7 +2409,7 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, } } -bool Bitmap::Vectorize( PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) +bool Bitmap::Vectorize( tools::PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) { return ImplVectorizer().ImplVectorize( *this, rPolyPoly, nFlags, pProgress ); } diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 8ee40c3197d0..1caf85742d6a 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -61,7 +61,7 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly ) ReadPair( rIStm, rPoly[ i ] ); } -void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly ) +void ImplReadPolyPoly( SvStream& rIStm, tools::PolyPolygon& rPolyPoly ) { Polygon aPoly; sal_Int32 nPolyCount; @@ -75,7 +75,7 @@ void ImplReadPolyPoly( SvStream& rIStm, PolyPolygon& rPolyPoly ) } } -void ImplWritePolyPolyAction( SvStream& rOStm, const PolyPolygon& rPolyPoly ) +void ImplWritePolyPolyAction( SvStream& rOStm, const tools::PolyPolygon& rPolyPoly ) { const sal_uInt16 nPoly = rPolyPoly.Count(); sal_uInt16 nPoints = 0; @@ -311,7 +311,7 @@ void ImplSkipActions( SvStream& rIStm, sal_uLong nSkipCount ) } } -bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPolyPolygon, bool bOnlyWhenCurve) +bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygon& rPolyPolygon, bool bOnlyWhenCurve) { const sal_uInt16 nPolygonCount(rPolyPolygon.Count()); @@ -391,7 +391,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const PolyPolygon& rPol return false; } -void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, PolyPolygon& rPolyPoly) +void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, tools::PolyPolygon& rPolyPoly) { rPolyPoly.Clear(); sal_uInt16 nPolygonCount(0); @@ -571,8 +571,8 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case (GDI_EXTENDEDPOLYGON_ACTION) : { - // read the PolyPolygon in every case - PolyPolygon aInputPolyPolygon; + // read the tools::PolyPolygon in every case + tools::PolyPolygon aInputPolyPolygon; ImplReadExtendedPolyPolygonAction(rIStm, aInputPolyPolygon); // now check if it can be set somewhere @@ -760,7 +760,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_POLYPOLYGON_ACTION ): { - PolyPolygon aPolyPoly; + tools::PolyPolygon aPolyPoly; ImplReadPolyPoly( rIStm, aPolyPoly ); @@ -1038,7 +1038,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( 3 ): { - PolyPolygon aPolyPoly; + tools::PolyPolygon aPolyPoly; sal_Int32 nPolyCount; rIStm.ReadInt32( nPolyCount ); @@ -1172,7 +1172,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_TRANSPARENT_COMMENT ): { - PolyPolygon aPolyPoly; + tools::PolyPolygon aPolyPoly; sal_Int32 nFollowingActionCount; sal_Int16 nTrans; @@ -1207,7 +1207,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_HATCH_COMMENT ): { - PolyPolygon aPolyPoly; + tools::PolyPolygon aPolyPoly; Hatch aHatch; sal_Int32 nFollowingActionCount; @@ -1279,7 +1279,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_GRADIENTEX_COMMENT ): { - PolyPolygon aPolyPoly; + tools::PolyPolygon aPolyPoly; Gradient aGradient; sal_Int32 nFollowingActionCount; @@ -1627,7 +1627,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, nCount++; - const PolyPolygon aPolyPolygon(pAct->GetPolygon()); + const tools::PolyPolygon aPolyPolygon(pAct->GetPolygon()); if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon, true)) { nCount++; @@ -1675,7 +1675,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, nCount++; - const PolyPolygon aPolyPolygon(pAct->GetPolygon()); + const tools::PolyPolygon aPolyPolygon(pAct->GetPolygon()); if(ImplWriteExtendedPolyPolygonAction(rOStm, aPolyPolygon, true)) { nCount++; @@ -2143,10 +2143,10 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, case( META_TRANSPARENT_ACTION ): { - const PolyPolygon& rPolyPoly = static_cast<const MetaTransparentAction*>(pAction)->GetPolyPolygon(); - const sal_Int16 nTrans = static_cast<const MetaTransparentAction*>(pAction)->GetTransparence(); - const sal_Int16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10; - sal_uLong nOldPos, nNewPos; + const tools::PolyPolygon& rPolyPoly = static_cast<const MetaTransparentAction*>(pAction)->GetPolyPolygon(); + const sal_Int16 nTrans = static_cast<const MetaTransparentAction*>(pAction)->GetTransparence(); + const sal_Int16 nBrushStyle = ( nTrans < 38 ) ? 8 : ( nTrans < 63 ) ? 9 : 10; + sal_uLong nOldPos, nNewPos; // write transparence comment rOStm.WriteInt16( GDI_TRANSPARENT_COMMENT ); @@ -2264,8 +2264,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, case( META_HATCH_ACTION ): { - const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction); - const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); + const MetaHatchAction* pA = static_cast<const MetaHatchAction*>(pAction); + const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); const Hatch& rHatch = pA->GetHatch(); sal_uLong nOldPos, nNewPos, nAddCount; diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index 97cea08278c3..d7ea6092a859 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -69,7 +69,7 @@ namespace { rTarget.AddAction( new MetaPolyPolygonAction( - PolyPolygon(aResult))); + tools::PolyPolygon(aResult))); } } } @@ -105,7 +105,7 @@ namespace // add clipped geometry rTarget.AddAction( new MetaGradientExAction( - PolyPolygon(aResult), + tools::PolyPolygon(aResult), rGradient)); } } @@ -191,7 +191,7 @@ namespace aPixelPoly.transform(aTransform); // to fill the non-covered parts, use the Xor fill rule of - // PolyPolygon painting. Start with a all-covering polygon and + // tools::PolyPolygon painting. Start with a all-covering polygon and // add the clip polygon one basegfx::B2DPolyPolygon aInvertPixelPoly; @@ -693,7 +693,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case META_POLYPOLYGON_ACTION : { const MetaPolyPolygonAction* pA = static_cast< const MetaPolyPolygonAction* >(pAction); - const PolyPolygon& rPoly = pA->GetPolyPolygon(); + const tools::PolyPolygon& rPoly = pA->GetPolyPolygon(); bDone = handleGeometricContent( aClips.back(), @@ -872,7 +872,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) else if(rComment.equalsIgnoreAsciiCase("XPATHFILL_SEQ_BEGIN")) { SvtGraphicFill aFilling; - PolyPolygon aPath; + tools::PolyPolygon aPath; { // read SvtGraphicFill SvMemoryStream aMemStm((void*)pA->GetData(), pA->GetDataSize(),STREAM_READ); @@ -896,7 +896,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) if(aResult != aSource) { // add clipped geometry - aFilling.setPath(PolyPolygon(aResult)); + aFilling.setPath(tools::PolyPolygon(aResult)); addSvtGraphicFill(aFilling, aTarget); bDone = true; } @@ -904,7 +904,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) else { // exchange with empty polygon - aFilling.setPath(PolyPolygon()); + aFilling.setPath(tools::PolyPolygon()); addSvtGraphicFill(aFilling, aTarget); bDone = true; } @@ -989,7 +989,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) case META_GRADIENTEX_ACTION : { const MetaGradientExAction* pA = static_cast< const MetaGradientExAction* >(pAction); - const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); + const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); bDone = handleGradientContent( aClips.back(), diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index b631331bad5f..d6b8e51da237 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -874,10 +874,10 @@ Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& r return aRet; } -PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly, const Point& rRotatePt, +tools::PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const tools::PolyPolygon& rPolyPoly, const Point& rRotatePt, const Size& rOffset, double fSin, double fCos ) { - PolyPolygon aRet( rPolyPoly ); + tools::PolyPolygon aRet( rPolyPoly ); aRet.Rotate( rRotatePt, fSin, fCos ); aRet.Move( rOffset.Width(), rOffset.Height() ); @@ -887,7 +887,7 @@ PolyPolygon GDIMetaFile::ImplGetRotatedPolyPolygon( const PolyPolygon& rPolyPoly void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf, const OutputDevice& rMapDev, - const PolyPolygon& rPolyPoly, + const tools::PolyPolygon& rPolyPoly, const Gradient& rGrad ) { // Generate comment, GradientEx and Gradient actions (within DrawGradient) @@ -1212,7 +1212,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) { SvtGraphicFill aFill; ReadSvtGraphicFill( aMemStm, aFill ); - PolyPolygon aPath; + tools::PolyPolygon aPath; aFill.getPath( aPath ); aFill.setPath( ImplGetRotatedPolyPolygon( aPath, aRotAnchor, aRotOffset, fSin, fCos ) ); WriteSvtGraphicFill( aDest, aFill ); @@ -2714,7 +2714,7 @@ sal_uLong GDIMetaFile::GetSizeBytes() const case( META_POLYGON_ACTION ): nSizeBytes += static_cast<MetaPolygonAction*>( pAction )->GetPolygon().GetSize() * sizeof( Point ); break; case( META_POLYPOLYGON_ACTION ): { - const PolyPolygon& rPolyPoly = static_cast<MetaPolyPolygonAction*>( pAction )->GetPolyPolygon(); + const tools::PolyPolygon& rPolyPoly = static_cast<MetaPolyPolygonAction*>( pAction )->GetPolyPolygon(); for( sal_uInt16 n = 0; n < rPolyPoly.Count(); ++n ) nSizeBytes += ( rPolyPoly[ n ].GetSize() * sizeof( Point ) ); diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx index 8cfc4e49b2d8..9a53bb638368 100644 --- a/vcl/source/gdi/graphictools.cxx +++ b/vcl/source/gdi/graphictools.cxx @@ -41,8 +41,8 @@ SvtGraphicStroke::SvtGraphicStroke() : } SvtGraphicStroke::SvtGraphicStroke( const Polygon& rPath, - const PolyPolygon& rStartArrow, - const PolyPolygon& rEndArrow, + const tools::PolyPolygon& rStartArrow, + const tools::PolyPolygon& rEndArrow, double fTransparency, double fStrokeWidth, CapType aCap, @@ -66,12 +66,12 @@ void SvtGraphicStroke::getPath( Polygon& rPath ) const rPath = maPath; } -void SvtGraphicStroke::getStartArrow( PolyPolygon& rPath ) const +void SvtGraphicStroke::getStartArrow( tools::PolyPolygon& rPath ) const { rPath = maStartArrow; } -void SvtGraphicStroke::getEndArrow( PolyPolygon& rPath ) const +void SvtGraphicStroke::getEndArrow( tools::PolyPolygon& rPath ) const { rPath = maEndArrow; } @@ -91,12 +91,12 @@ void SvtGraphicStroke::setPath( const Polygon& rPoly ) maPath = rPoly; } -void SvtGraphicStroke::setStartArrow( const PolyPolygon& rPoly ) +void SvtGraphicStroke::setStartArrow( const tools::PolyPolygon& rPoly ) { maStartArrow = rPoly; } -void SvtGraphicStroke::setEndArrow( const PolyPolygon& rPoly ) +void SvtGraphicStroke::setEndArrow( const tools::PolyPolygon& rPoly ) { maEndArrow = rPoly; } @@ -181,7 +181,7 @@ SvtGraphicFill::SvtGraphicFill() : { } -SvtGraphicFill::SvtGraphicFill( const PolyPolygon& rPath, +SvtGraphicFill::SvtGraphicFill( const tools::PolyPolygon& rPath, Color aFillColor, double fTransparency, FillRule aFillRule, @@ -212,7 +212,7 @@ SvtGraphicFill::SvtGraphicFill( const PolyPolygon& rPath, { } -void SvtGraphicFill::getPath( PolyPolygon& rPath ) const +void SvtGraphicFill::getPath( tools::PolyPolygon& rPath ) const { rPath = maPath; } @@ -234,7 +234,7 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const rGraphic = maFillGraphic; } -void SvtGraphicFill::setPath( const PolyPolygon& rPath ) +void SvtGraphicFill::setPath( const tools::PolyPolygon& rPath ) { maPath = rPath; } diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index e4ba7fcdb0d7..6b8c06fbbb05 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -639,7 +639,7 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, if( pRAcc ) { - PolyPolygon aPolyPoly; + tools::PolyPolygon aPolyPoly; double fPercent = 0.0; double fPercentStep_2 = 0.0; const long nWidth = pRAcc->Width(); @@ -731,7 +731,7 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, } bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp, - PolyPolygon& rPolyPoly, + tools::PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) { boost::scoped_ptr<Bitmap> pBmp(new Bitmap( rMonoBmp )); @@ -824,11 +824,11 @@ bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp, return bRet; } -void ImplVectorizer::ImplLimitPolyPoly( PolyPolygon& rPolyPoly ) +void ImplVectorizer::ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly ) { if( rPolyPoly.Count() > VECT_POLY_MAX ) { - PolyPolygon aNewPolyPoly; + tools::PolyPolygon aNewPolyPoly; long nReduce = 0; sal_uInt16 nNewCount; @@ -943,7 +943,7 @@ ImplVectMap* ImplVectorizer::ImplExpand( BitmapReadAccess* pRAcc, const Color& r return pMap; } -void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags ) +void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags ) { const long nWidth = pMap->Width(), nHeight= pMap->Height(); diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx index f903dcdd44c0..f36f3c169067 100644 --- a/vcl/source/gdi/impvect.hxx +++ b/vcl/source/gdi/impvect.hxx @@ -34,10 +34,10 @@ class ImplVectorizer private: ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor ); - void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags ); + void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags ); bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain ); bool ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const; - void ImplLimitPolyPoly( PolyPolygon& rPolyPoly ); + void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly ); public: @@ -46,7 +46,7 @@ public: bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress ); - bool ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly, + bool ImplVectorize( const Bitmap& rMonoBmp, tools::PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ); }; diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index a5c5cf61f400..670f1694b75e 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -996,7 +996,7 @@ MetaPolyPolygonAction::MetaPolyPolygonAction() : MetaPolyPolygonAction::~MetaPolyPolygonAction() {} -MetaPolyPolygonAction::MetaPolyPolygonAction( const PolyPolygon& rPolyPoly ) : +MetaPolyPolygonAction::MetaPolyPolygonAction( const tools::PolyPolygon& rPolyPoly ) : MetaAction ( META_POLYPOLYGON_ACTION ), maPolyPoly ( rPolyPoly ) {} @@ -2252,7 +2252,7 @@ MetaGradientExAction::MetaGradientExAction() : MetaAction ( META_GRADIENTEX_ACTION ) {} -MetaGradientExAction::MetaGradientExAction( const PolyPolygon& rPolyPoly, const Gradient& rGradient ) : +MetaGradientExAction::MetaGradientExAction( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ) : MetaAction ( META_GRADIENTEX_ACTION ), maPolyPoly ( rPolyPoly ), maGradient ( rGradient ) @@ -2300,7 +2300,7 @@ void MetaGradientExAction::Write( SvStream& rOStm, ImplMetaWriteData* pData ) VersionCompat aCompat(rOStm, STREAM_WRITE, 1); // #i105373# see comment at MetaTransparentAction::Write - PolyPolygon aNoCurvePolyPolygon; + tools::PolyPolygon aNoCurvePolyPolygon; maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon); WritePolyPolygon( rOStm, aNoCurvePolyPolygon ); @@ -2321,7 +2321,7 @@ MetaHatchAction::MetaHatchAction() : MetaHatchAction::~MetaHatchAction() {} -MetaHatchAction::MetaHatchAction( const PolyPolygon& rPolyPoly, const Hatch& rHatch ) : +MetaHatchAction::MetaHatchAction( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ) : MetaAction ( META_HATCH_ACTION ), maPolyPoly ( rPolyPoly ), maHatch ( rHatch ) @@ -2362,7 +2362,7 @@ void MetaHatchAction::Write( SvStream& rOStm, ImplMetaWriteData* pData ) VersionCompat aCompat(rOStm, STREAM_WRITE, 1); // #i105373# see comment at MetaTransparentAction::Write - PolyPolygon aNoCurvePolyPolygon; + tools::PolyPolygon aNoCurvePolyPolygon; maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon); WritePolyPolygon( rOStm, aNoCurvePolyPolygon ); @@ -3235,7 +3235,7 @@ MetaTransparentAction::MetaTransparentAction() : MetaTransparentAction::~MetaTransparentAction() {} -MetaTransparentAction::MetaTransparentAction( const PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) : +MetaTransparentAction::MetaTransparentAction( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent ) : MetaAction ( META_TRANSPARENT_ACTION ), maPolyPoly ( rPolyPoly ), mnTransPercent ( nTransPercent ) @@ -3275,7 +3275,7 @@ void MetaTransparentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData ) MetaAction::Write(rOStm, pData); VersionCompat aCompat(rOStm, STREAM_WRITE, 1); - // #i105373# The PolyPolygon in this action may be a curve; this + // #i105373# The tools::PolyPolygon in this action may be a curve; this // was ignored until now what is an error. To make older office // versions work with MetaFiles, i opt for applying AdaptiveSubdivide // to the PolyPoylgon. @@ -3284,7 +3284,7 @@ void MetaTransparentAction::Write( SvStream& rOStm, ImplMetaWriteData* pData ) // correctly, but not here :-( ). // The golden solution would be to combine both, but i think it's // not necessary; a good subdivision will be sufficient. - PolyPolygon aNoCurvePolyPolygon; + tools::PolyPolygon aNoCurvePolyPolygon; maPolyPoly.AdaptiveSubdivide(aNoCurvePolyPolygon); WritePolyPolygon( rOStm, aNoCurvePolyPolygon ); @@ -3566,12 +3566,12 @@ void MetaCommentAction::Move( long nXMove, long nYMove ) aPath.Move( nXMove, nYMove ); aStroke.setPath( aPath ); - PolyPolygon aStartArrow; + tools::PolyPolygon aStartArrow; aStroke.getStartArrow(aStartArrow); aStartArrow.Move(nXMove, nYMove); aStroke.setStartArrow(aStartArrow); - PolyPolygon aEndArrow; + tools::PolyPolygon aEndArrow; aStroke.getEndArrow(aEndArrow); aEndArrow.Move(nXMove, nYMove); aStroke.setEndArrow(aEndArrow); @@ -3583,7 +3583,7 @@ void MetaCommentAction::Move( long nXMove, long nYMove ) SvtGraphicFill aFill; ReadSvtGraphicFill( aMemStm, aFill ); - PolyPolygon aPath; + tools::PolyPolygon aPath; aFill.getPath( aPath ); aPath.Move( nXMove, nYMove ); aFill.setPath( aPath ); @@ -3623,7 +3623,7 @@ void MetaCommentAction::Scale( double fXScale, double fYScale ) { SvtGraphicFill aFill; ReadSvtGraphicFill( aMemStm, aFill ); - PolyPolygon aPath; + tools::PolyPolygon aPath; aFill.getPath( aPath ); aPath.Scale( fXScale, fYScale ); aFill.setPath( aPath ); diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index c0f0a695abed..b399d7acefa4 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -166,7 +166,7 @@ void PDFWriter::DrawPolyLine( const Polygon& rPoly, const ExtLineInfo& rInfo ) pImplementation->drawPolyLine( rPoly, rInfo ); } -void PDFWriter::DrawPolyPolygon( const PolyPolygon& rPolyPoly ) +void PDFWriter::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) { pImplementation->drawPolyPolygon( rPolyPoly ); } @@ -186,7 +186,7 @@ void PDFWriter::DrawBitmapEx( const Point& rDestPt, const Size& rDestSize, const pImplementation->drawBitmap( rDestPt, rDestSize, rBitmap ); } -void PDFWriter::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch ) +void PDFWriter::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ) { pImplementation->drawHatch( rPolyPoly, rHatch ); } @@ -196,7 +196,7 @@ void PDFWriter::DrawGradient( const Rectangle& rRect, const Gradient& rGradient pImplementation->drawGradient( rRect, rGradient ); } -void PDFWriter::DrawGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient ) +void PDFWriter::DrawGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ) { pImplementation->push(PUSH_CLIPREGION); pImplementation->setClipRegion( rPolyPoly.getB2DPolyPolygon() ); @@ -209,7 +209,7 @@ void PDFWriter::DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpap pImplementation->drawWallpaper( rRect, rWallpaper ); } -void PDFWriter::DrawTransparent( const PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ) +void PDFWriter::DrawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ) { pImplementation->drawTransparent( rPolyPoly, nTransparencePercent ); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 100685d62aef..96133718a415 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1547,7 +1547,7 @@ void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OS } } -void PDFWriterImpl::PDFPage::appendPolyPolygon( const PolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose ) const +void PDFWriterImpl::PDFPage::appendPolyPolygon( const tools::PolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose ) const { sal_uInt16 nPolygons = rPolyPoly.Count(); for( sal_uInt16 n = 0; n < nPolygons; n++ ) @@ -7708,7 +7708,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool // write eventual emphasis marks if( m_aCurrentPDFState.m_aFont.GetEmphasisMark() & EMPHASISMARK_STYLE ) { - PolyPolygon aEmphPoly; + tools::PolyPolygon aEmphPoly; Rectangle aEmphRect1; Rectangle aEmphRect2; long nEmphYOff; @@ -7795,7 +7795,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool } void PDFWriterImpl::drawEmphasisMark( long nX, long nY, - const PolyPolygon& rPolyPoly, bool bPolyLine, + const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ) { // TODO: pass nWidth as width of this mark @@ -7811,7 +7811,7 @@ void PDFWriterImpl::drawEmphasisMark( long nX, long nY, } else { - PolyPolygon aPolyPoly = rPolyPoly; + tools::PolyPolygon aPolyPoly = rPolyPoly; aPolyPoly.Move( nX, nY ); drawPolyPolygon( aPolyPoly ); } @@ -8539,7 +8539,7 @@ void PDFWriterImpl::drawPolygon( const Polygon& rPoly ) writeBuffer( aLine.getStr(), aLine.getLength() ); } -void PDFWriterImpl::drawPolyPolygon( const PolyPolygon& rPolyPoly ) +void PDFWriterImpl::drawPolyPolygon( const tools::PolyPolygon& rPolyPoly ) { MARK( "drawPolyPolygon" ); @@ -8564,7 +8564,7 @@ void PDFWriterImpl::drawPolyPolygon( const PolyPolygon& rPolyPoly ) writeBuffer( aLine.getStr(), aLine.getLength() ); } -void PDFWriterImpl::drawTransparent( const PolyPolygon& rPolyPoly, sal_uInt32 nTransparentPercent ) +void PDFWriterImpl::drawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt32 nTransparentPercent ) { DBG_ASSERT( nTransparentPercent <= 100, "invalid alpha value" ); nTransparentPercent = nTransparentPercent % 100; @@ -10313,7 +10313,7 @@ void PDFWriterImpl::drawGradient( const Rectangle& rRect, const Gradient& rGradi writeBuffer( aLine.getStr(), aLine.getLength() ); } -void PDFWriterImpl::drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch ) +void PDFWriterImpl::drawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ) { MARK( "drawHatch" ); @@ -10321,7 +10321,7 @@ void PDFWriterImpl::drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch if( rPolyPoly.Count() ) { - PolyPolygon aPolyPoly( rPolyPoly ); + tools::PolyPolygon aPolyPoly( rPolyPoly ); aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME ); push( PUSH_LINECOLOR ); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 655881de8ade..96e096136241 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -149,7 +149,7 @@ public: // appends a polygon optionally closing it void appendPolygon( const basegfx::B2DPolygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const; // appends a polypolygon optionally closing the subpaths - void appendPolyPolygon( const PolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose = true ) const; + void appendPolyPolygon( const tools::PolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose = true ) const; // appends a polypolygon optionally closing the subpaths void appendPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly, OStringBuffer& rBuffer, bool bClose = true ) const; // converts a length (either vertical or horizontal; this @@ -1017,7 +1017,7 @@ i12626 bool checkEmitStructure(); /* draws an emphasis mark */ - void drawEmphasisMark( long nX, long nY, const PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); + void drawEmphasisMark( long nX, long nY, const tools::PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); /* true if PDF/A-1a or PDF/A-1b is output */ bool m_bIsPDF_A1; @@ -1057,7 +1057,7 @@ i12626 bool prepareEncryption( const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >& ); // helper for playMetafile - void implWriteGradient( const PolyPolygon& rPolyPoly, const Gradient& rGradient, + void implWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& ); void implWriteBitmapEx( const Point& rPoint, const Size& rSize, const BitmapEx& rBitmapEx, VirtualDevice* pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& ); @@ -1216,7 +1216,7 @@ public: void drawLine( const Point& rStart, const Point& rStop ); void drawLine( const Point& rStart, const Point& rStop, const LineInfo& rInfo ); void drawPolygon( const Polygon& rPoly ); - void drawPolyPolygon( const PolyPolygon& rPolyPoly ); + void drawPolyPolygon( const tools::PolyPolygon& rPolyPoly ); void drawPolyLine( const Polygon& rPoly ); void drawPolyLine( const Polygon& rPoly, const LineInfo& rInfo ); void drawPolyLine( const Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo ); @@ -1233,9 +1233,9 @@ public: void drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const Size& rSizePixel, const Rectangle& rTargetArea, const Bitmap& rMask ); void drawGradient( const Rectangle& rRect, const Gradient& rGradient ); - void drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch ); + void drawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch& rHatch ); void drawWallpaper( const Rectangle& rRect, const Wallpaper& rWall ); - void drawTransparent( const PolyPolygon& rPolyPoly, sal_uInt32 nTransparentPercent ); + void drawTransparent( const tools::PolyPolygon& rPolyPoly, sal_uInt32 nTransparentPercent ); void beginTransparencyGroup(); void endTransparencyGroup( const Rectangle& rBoundingBox, sal_uInt32 nTransparentPercent ); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 686ebd4b1eab..3c0aaf7f76b5 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -50,7 +50,7 @@ using namespace com::sun::star::beans; static bool lcl_canUsePDFAxialShading(const Gradient& rGradient); -void PDFWriterImpl::implWriteGradient( const PolyPolygon& i_rPolyPoly, const Gradient& i_rGradient, +void PDFWriterImpl::implWriteGradient( const tools::PolyPolygon& i_rPolyPoly, const Gradient& i_rGradient, VirtualDevice* i_pDummyVDev, const vcl::PDFWriter::PlayMetafileContext& i_rContext ) { GDIMetaFile aTmpMtf; @@ -362,7 +362,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa } else { - const PolyPolygon aPolyPoly( pA->GetRect() ); + const tools::PolyPolygon aPolyPoly( pA->GetRect() ); implWriteGradient( aPolyPoly, rGradient, pDummyVDev, i_rContext ); } } @@ -562,8 +562,8 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa Polygon aPath; aStroke.getPath( aPath ); - PolyPolygon aStartArrow; - PolyPolygon aEndArrow; + tools::PolyPolygon aStartArrow; + tools::PolyPolygon aEndArrow; double fTransparency( aStroke.getTransparency() ); double fStrokeWidth( aStroke.getStrokeWidth() ); SvtGraphicStroke::DashArray aDashArray; @@ -649,7 +649,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa double fTransparency = aFill.getTransparency(); if ( fTransparency == 0.0 ) { - PolyPolygon aPath; + tools::PolyPolygon aPath; aFill.getPath( aPath ); bSkipSequence = true; @@ -733,7 +733,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa } // draw polypolygon with pattern fill - PolyPolygon aPath; + tools::PolyPolygon aPath; aFill.getPath( aPath ); m_rOuterFace.DrawPolyPolygon( aPath, nPattern, aFill.getFillRule() == SvtGraphicFill::fillEvenOdd ); diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 3951e5720da3..ae62b3953d1d 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -247,7 +247,7 @@ void Printer::DrawDeviceBitmap( const Point& rDestPt, const Size& rDestSize, } } -void Printer::EmulateDrawTransparent ( const PolyPolygon& rPolyPoly, +void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nTransparencePercent ) { // #110958# Disable alpha VDev, we perform the necessary diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 3f838f129c7c..c8e0524518db 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -790,7 +790,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, } case META_POLYPOLYGON_ACTION: { - const PolyPolygon aPoly( + const tools::PolyPolygon aPoly( static_cast<const MetaPolyPolygonAction*>(pCurrAct)->GetPolyPolygon()); if( aPoly.Count() != 1 || !basegfx::tools::isRectangle( diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index cf011f1c37f6..3f56d0ef6891 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -37,7 +37,7 @@ namespace /** Return <TRUE/> when the given polygon is rectiliner and oriented so that all sides are either horizontal or vertical. */ - bool ImplIsPolygonRectilinear (const PolyPolygon& rPolyPoly) + bool ImplIsPolygonRectilinear (const tools::PolyPolygon& rPolyPoly) { // Iterate over all polygons. const sal_uInt16 nPolyCount = rPolyPoly.Count(); @@ -82,7 +82,7 @@ namespace A new RegionBand object is returned that contains the bands that represent the given poly-polygon. */ - RegionBand* ImplRectilinearPolygonToBands(const PolyPolygon& rPolyPoly) + RegionBand* ImplRectilinearPolygonToBands(const tools::PolyPolygon& rPolyPoly) { OSL_ASSERT(ImplIsPolygonRectilinear (rPolyPoly)); @@ -180,7 +180,7 @@ namespace /** Convert a general polygon (one for which ImplIsPolygonRectilinear() returns <FALSE/>) to bands. */ - RegionBand* ImplGeneralPolygonToBands(const PolyPolygon& rPolyPoly, const Rectangle& rPolygonBoundingBox) + RegionBand* ImplGeneralPolygonToBands(const tools::PolyPolygon& rPolyPoly, const Rectangle& rPolygonBoundingBox) { long nLineID = 0L; @@ -229,7 +229,7 @@ bool vcl::Region::IsEmpty() const } -RegionBand* ImplCreateRegionBandFromPolyPolygon(const PolyPolygon& rPolyPolygon) +RegionBand* ImplCreateRegionBandFromPolyPolygon(const tools::PolyPolygon& rPolyPolygon) { RegionBand* pRetval = 0; @@ -237,7 +237,7 @@ RegionBand* ImplCreateRegionBandFromPolyPolygon(const PolyPolygon& rPolyPolygon) { // ensure to subdivide when bezier segemnts are used, it's going to // be expanded to rectangles - PolyPolygon aPolyPolygon; + tools::PolyPolygon aPolyPolygon; rPolyPolygon.AdaptiveSubdivide(aPolyPolygon); @@ -277,9 +277,9 @@ RegionBand* ImplCreateRegionBandFromPolyPolygon(const PolyPolygon& rPolyPolygon) return pRetval; } -PolyPolygon vcl::Region::ImplCreatePolyPolygonFromRegionBand() const +tools::PolyPolygon vcl::Region::ImplCreatePolyPolygonFromRegionBand() const { - PolyPolygon aRetval; + tools::PolyPolygon aRetval; if(getRegionBand()) { @@ -301,7 +301,7 @@ PolyPolygon vcl::Region::ImplCreatePolyPolygonFromRegionBand() const basegfx::B2DPolyPolygon vcl::Region::ImplCreateB2DPolyPolygonFromRegionBand() const { - PolyPolygon aPoly(ImplCreatePolyPolygonFromRegionBand()); + tools::PolyPolygon aPoly(ImplCreatePolyPolygonFromRegionBand()); return aPoly.getB2DPolyPolygon(); } @@ -336,7 +336,7 @@ Region::Region(const Polygon& rPolygon) } } -Region::Region(const PolyPolygon& rPolyPoly) +Region::Region(const tools::PolyPolygon& rPolyPoly) : mpB2DPolyPolygon(), mpPolyPolygon(), mpRegionBand(), @@ -374,7 +374,7 @@ Region::~Region() { } -void vcl::Region::ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly ) +void vcl::Region::ImplCreatePolyPolyRegion( const tools::PolyPolygon& rPolyPoly ) { const sal_uInt16 nPolyCount = rPolyPoly.Count(); @@ -392,7 +392,7 @@ void vcl::Region::ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly ) } else { - mpPolyPolygon.reset(new PolyPolygon(rPolyPoly)); + mpPolyPolygon.reset(new tools::PolyPolygon(rPolyPoly)); } mbIsNull = false; @@ -434,11 +434,11 @@ void vcl::Region::Move( long nHorzMove, long nVertMove ) } else if(getPolyPolygon()) { - PolyPolygon aPoly(*getPolyPolygon()); + tools::PolyPolygon aPoly(*getPolyPolygon()); aPoly.Move(nHorzMove, nVertMove); mpB2DPolyPolygon.reset(); - mpPolyPolygon.reset(aPoly.Count() ? new PolyPolygon(aPoly) : 0); + mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : 0); mpRegionBand.reset(); } else if(getRegionBand()) @@ -481,11 +481,11 @@ void vcl::Region::Scale( double fScaleX, double fScaleY ) } else if(getPolyPolygon()) { - PolyPolygon aPoly(*getPolyPolygon()); + tools::PolyPolygon aPoly(*getPolyPolygon()); aPoly.Scale(fScaleX, fScaleY); mpB2DPolyPolygon.reset(); - mpPolyPolygon.reset(aPoly.Count() ? new PolyPolygon(aPoly) : 0); + mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : 0); mpRegionBand.reset(); } else if(getRegionBand()) @@ -629,7 +629,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect ) } else // if(getPolyPolygon()) { - PolyPolygon aPoly(*getPolyPolygon()); + tools::PolyPolygon aPoly(*getPolyPolygon()); // use the PolyPolygon::Clip method for rectangles, this is // fairly simple (does not even use GPC) and saves us from @@ -637,7 +637,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect ) aPoly.Clip(rRect); mpB2DPolyPolygon.reset(); - mpPolyPolygon.reset(aPoly.Count() ? new PolyPolygon(aPoly) : 0); + mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : 0); mpRegionBand.reset(); } @@ -1276,7 +1276,7 @@ Rectangle vcl::Region::GetBoundRect() const return Rectangle(); } -const PolyPolygon vcl::Region::GetAsPolyPolygon() const +const tools::PolyPolygon vcl::Region::GetAsPolyPolygon() const { if(getPolyPolygon()) { @@ -1286,8 +1286,8 @@ const PolyPolygon vcl::Region::GetAsPolyPolygon() const if(getB2DPolyPolygon()) { // the polygon needs to be converted, buffer the down converion - const PolyPolygon aPolyPolgon(*getB2DPolyPolygon()); - const_cast< vcl::Region* >(this)->mpPolyPolygon.reset(new PolyPolygon(aPolyPolgon)); + const tools::PolyPolygon aPolyPolgon(*getB2DPolyPolygon()); + const_cast< vcl::Region* >(this)->mpPolyPolygon.reset(new tools::PolyPolygon(aPolyPolgon)); return *getPolyPolygon(); } @@ -1295,13 +1295,13 @@ const PolyPolygon vcl::Region::GetAsPolyPolygon() const if(getRegionBand()) { // the BandRegion needs to be converted, buffer the converion - const PolyPolygon aPolyPolgon(ImplCreatePolyPolygonFromRegionBand()); - const_cast< vcl::Region* >(this)->mpPolyPolygon.reset(new PolyPolygon(aPolyPolgon)); + const tools::PolyPolygon aPolyPolgon(ImplCreatePolyPolygonFromRegionBand()); + const_cast< vcl::Region* >(this)->mpPolyPolygon.reset(new tools::PolyPolygon(aPolyPolgon)); return *getPolyPolygon(); } - return PolyPolygon(); + return tools::PolyPolygon(); } const basegfx::B2DPolyPolygon vcl::Region::GetAsB2DPolyPolygon() const @@ -1339,7 +1339,7 @@ const RegionBand* vcl::Region::GetAsRegionBand() const if(getB2DPolyPolygon()) { // convert B2DPolyPolygon to RegionBand, buffer it and return it - const_cast< vcl::Region* >(this)->mpRegionBand.reset(ImplCreateRegionBandFromPolyPolygon(PolyPolygon(*getB2DPolyPolygon()))); + const_cast< vcl::Region* >(this)->mpRegionBand.reset(ImplCreateRegionBandFromPolyPolygon(tools::PolyPolygon(*getB2DPolyPolygon()))); } else if(getPolyPolygon()) { @@ -1593,7 +1593,7 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& rRegion) if(bHasPolyPolygon) { - PolyPolygon* pNewPoly = new PolyPolygon(); + tools::PolyPolygon* pNewPoly = new tools::PolyPolygon(); ReadPolyPolygon( rIStrm, *pNewPoly ); rRegion.mpPolyPolygon.reset(pNewPoly); } @@ -1669,7 +1669,7 @@ SvStream& WriteRegion( SvStream& rOStrm, const vcl::Region& rRegion ) if(bHasPolyPolygon) { // #i105373# - PolyPolygon aNoCurvePolyPolygon; + tools::PolyPolygon aNoCurvePolyPolygon; rRegion.GetAsPolyPolygon().AdaptiveSubdivide(aNoCurvePolyPolygon); WritePolyPolygon( rOStrm, aNoCurvePolyPolygon ); @@ -1746,7 +1746,7 @@ static inline bool ImplPolygonRectTest( const Polygon& rPoly, Rectangle* pRectOu return bIsRect; } -vcl::Region vcl::Region::GetRegionFromPolyPolygon( const PolyPolygon& rPolyPoly ) +vcl::Region vcl::Region::GetRegionFromPolyPolygon( const tools::PolyPolygon& rPolyPoly ) { //return vcl::Region( rPolyPoly ); |