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 /filter/source/flash | |
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 'filter/source/flash')
-rw-r--r-- | filter/source/flash/swfwriter.cxx | 6 | ||||
-rw-r--r-- | filter/source/flash/swfwriter.hxx | 18 | ||||
-rw-r--r-- | filter/source/flash/swfwriter1.cxx | 34 | ||||
-rw-r--r-- | filter/source/flash/swfwriter2.cxx | 2 |
4 files changed, 30 insertions, 30 deletions
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index de866c4dac6d..ded932b424ac 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -334,13 +334,13 @@ sal_uInt16 Writer::defineShape( const GDIMetaFile& rMtf, sal_Int16 x, sal_Int16 sal_uInt16 Writer::defineShape( const Polygon& rPoly, const FillStyle& rFillStyle ) { - const PolyPolygon aPolyPoly( rPoly ); + const tools::PolyPolygon aPolyPoly( rPoly ); return defineShape( aPolyPoly, rFillStyle ); } -sal_uInt16 Writer::defineShape( const PolyPolygon& rPolyPoly, const FillStyle& rFillStyle ) +sal_uInt16 Writer::defineShape( const tools::PolyPolygon& rPolyPoly, const FillStyle& rFillStyle ) { sal_uInt16 nShapeId = createID(); @@ -384,7 +384,7 @@ sal_uInt16 Writer::defineShape( const PolyPolygon& rPolyPoly, const FillStyle& r -sal_uInt16 Writer::defineShape( const PolyPolygon& rPolyPoly, sal_uInt16 nLineWidth, const Color& rLineColor ) +sal_uInt16 Writer::defineShape( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nLineWidth, const Color& rLineColor ) { sal_uInt16 nShapeId = createID(); diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx index 9e63078ecc85..efa22470216b 100644 --- a/filter/source/flash/swfwriter.hxx +++ b/filter/source/flash/swfwriter.hxx @@ -41,7 +41,7 @@ class GDIMetaFile; class BitmapEx; -class PolyPolygon; +namespace tools { class PolyPolygon; } class Gradient; class SvtGraphicFill; class SvtGraphicStroke; @@ -273,7 +273,7 @@ public: void storeTo( com::sun::star::uno::Reference< com::sun::star::io::XOutputStream > &xOutStream ); // geometry - void setClipping( const PolyPolygon* pClipPolyPolygon ); + void setClipping( const tools::PolyPolygon* pClipPolyPolygon ); /** defines a flash shape from a filled polygon. The coordinates must be in twips */ @@ -281,11 +281,11 @@ public: /** defines a flash shape from a filled polypolygon. The coordinates must be in twips */ - sal_uInt16 defineShape( const PolyPolygon& rPolyPoly, const FillStyle& rFillStyle ); + sal_uInt16 defineShape( const tools::PolyPolygon& rPolyPoly, const FillStyle& rFillStyle ); /** defines a flash shape from a outlined polypolygon. The coordinates must be in twips */ - sal_uInt16 defineShape( const PolyPolygon& rPolyPoly, sal_uInt16 nLineWidth, const Color& rLineColor ); + sal_uInt16 defineShape( const tools::PolyPolygon& rPolyPoly, sal_uInt16 nLineWidth, const Color& rLineColor ); /** defines a flash shape from a vcl metafile. The mapmode of the metafile is used to map all coordinates to twips. @@ -329,7 +329,7 @@ public: private: Point map( const Point& rPoint ) const; Size map( const Size& rSize ) const; - void map( PolyPolygon& rPolyPolygon ) const; + void map( tools::PolyPolygon& rPolyPolygon ) const; sal_Int32 mapRelative( sal_Int32 n100thMM ) const; void startTag( sal_uInt8 nTagId ); @@ -343,11 +343,11 @@ private: void Impl_writeActions( const GDIMetaFile& rMtf ); void Impl_writePolygon( const Polygon& rPoly, bool bFilled ); void Impl_writePolygon( const Polygon& rPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor ); - void Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, bool bFilled, sal_uInt8 nTransparence = 0); - void Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor ); + void Impl_writePolyPolygon( const tools::PolyPolygon& rPolyPoly, bool bFilled, sal_uInt8 nTransparence = 0); + void Impl_writePolyPolygon( const tools::PolyPolygon& rPolyPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor ); void Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth ); void Impl_writeText( const Point& rPos, const OUString& rText, const long* pDXArray, long nWidth, Color aTextColor ); - void Impl_writeGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient ); + void Impl_writeGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ); void Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL ); void Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY ); void Impl_writeEllipse( const Point& rCenter, long nRadX, long nRadY ); @@ -397,7 +397,7 @@ private: VirtualDevice* mpVDev; - const PolyPolygon* mpClipPolyPolygon; + const tools::PolyPolygon* mpClipPolyPolygon; /** holds the information of the objects defined in the movie stream while executing defineShape diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 89c0c22cc2f4..f2cf9e65b6b5 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -84,7 +84,7 @@ Size Writer::map( const Size& rSize ) const -void Writer::map( PolyPolygon& rPolyPolygon ) const +void Writer::map( tools::PolyPolygon& rPolyPolygon ) const { const sal_uInt16 nPolyCount = rPolyPolygon.Count(); if( nPolyCount ) @@ -262,7 +262,7 @@ void Writer::Impl_addEndShapeRecord( BitStream& rBits ) void Writer::Impl_writePolygon( const Polygon& rPoly, bool bFilled ) { - PolyPolygon aPolyPoly( rPoly ); + tools::PolyPolygon aPolyPoly( rPoly ); Impl_writePolyPolygon( aPolyPoly, bFilled ); } @@ -270,13 +270,13 @@ void Writer::Impl_writePolygon( const Polygon& rPoly, bool bFilled ) void Writer::Impl_writePolygon( const Polygon& rPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor ) { - PolyPolygon aPolyPoly( rPoly ); + tools::PolyPolygon aPolyPoly( rPoly ); Impl_writePolyPolygon( aPolyPoly, bFilled, rFillColor, rLineColor ); } -void Writer::Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, bool bFilled, sal_uInt8 nTransparence /* = 0 */ ) +void Writer::Impl_writePolyPolygon( const tools::PolyPolygon& rPolyPoly, bool bFilled, sal_uInt8 nTransparence /* = 0 */ ) { Color aLineColor( mpVDev->GetLineColor() ); if( 0 == aLineColor.GetTransparency() ) @@ -289,9 +289,9 @@ void Writer::Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, bool bFilled, -void Writer::Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor ) +void Writer::Impl_writePolyPolygon( const tools::PolyPolygon& rPolyPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor ) { - PolyPolygon aPolyPoly( rPolyPoly ); + tools::PolyPolygon aPolyPoly( rPolyPoly ); if( aPolyPoly.Count() ) { @@ -325,11 +325,11 @@ void Writer::Impl_writePolyPolygon( const PolyPolygon& rPolyPoly, bool bFilled, /** A gradient is a transition from one color to another, rendered inside a given polypolygon */ -void Writer::Impl_writeGradientEx( const PolyPolygon& rPolyPoly, const Gradient& rGradient ) +void Writer::Impl_writeGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient ) { if( rPolyPoly.Count() ) { - PolyPolygon aPolyPolygon( rPolyPoly ); + tools::PolyPolygon aPolyPolygon( rPolyPoly ); map( aPolyPolygon ); if( (rGradient.GetStyle() == GradientStyle_LINEAR && rGradient.GetAngle() == 900) || (rGradient.GetStyle() == GradientStyle_RADIAL) ) @@ -359,7 +359,7 @@ void Writer::Impl_writeGradientEx( const PolyPolygon& rPolyPoly, const Gradient& -void Writer::setClipping( const PolyPolygon* pClipPolyPolygon ) +void Writer::setClipping( const tools::PolyPolygon* pClipPolyPolygon ) { mpClipPolyPolygon = pClipPolyPolygon; } @@ -516,7 +516,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon if( bRTL || (nScriptType != ScriptType::LATIN) ) { // todo: optimize me as this will generate a huge amount of duplicate polygons - PolyPolygon aPolyPoygon; + tools::PolyPolygon aPolyPoygon; mpVDev->GetTextOutline( aPolyPoygon, rText, 0, 0, (sal_uInt16)nLen, true, nWidth, pDXArray ); aPolyPoygon.Translate( rPos ); Impl_writePolyPolygon( aPolyPoygon, true, aTextColor, aTextColor ); @@ -1173,7 +1173,7 @@ bool Writer::Impl_writeStroke( SvtGraphicStroke& rStroke ) { Polygon aPolygon; rStroke.getPath( aPolygon ); - PolyPolygon aPolyPolygon( aPolygon ); + tools::PolyPolygon aPolyPolygon( aPolygon ); map( aPolyPolygon ); @@ -1183,12 +1183,12 @@ bool Writer::Impl_writeStroke( SvtGraphicStroke& rStroke ) if(SvtGraphicStroke::joinRound != rStroke.getJoinType()) return false; - PolyPolygon aStartArrow; + tools::PolyPolygon aStartArrow; rStroke.getStartArrow( aStartArrow ); if( 0 != aStartArrow.Count() ) return false; // todo: Implement line ends - PolyPolygon aEndArrow; + tools::PolyPolygon aEndArrow; rStroke.getEndArrow( aEndArrow ); if( 0 != aEndArrow.Count() ) return false; // todo: Implement line ends @@ -1215,7 +1215,7 @@ bool Writer::Impl_writeStroke( SvtGraphicStroke& rStroke ) */ bool Writer::Impl_writeFilling( SvtGraphicFill& rFilling ) { - PolyPolygon aPolyPolygon; + tools::PolyPolygon aPolyPolygon; rFilling.getPath( aPolyPolygon ); Rectangle aOldRect( aPolyPolygon.GetBoundRect() ); @@ -1365,7 +1365,7 @@ void Writer::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegf for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++) { const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a)); - Impl_writePolyPolygon(PolyPolygon(Polygon(aPolygon)), true ); + Impl_writePolyPolygon(tools::PolyPolygon(Polygon(aPolygon)), true ); } mpVDev->SetLineColor(aOldLineColor); @@ -1510,7 +1510,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) case( META_POLYPOLYGON_ACTION ): { const MetaPolyPolygonAction* pA = (const MetaPolyPolygonAction*) pAction; - const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); + const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); if( rPolyPoly.Count() ) Impl_writePolyPolygon( rPolyPoly, true ); @@ -1546,7 +1546,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf ) case( META_TRANSPARENT_ACTION ): { const MetaTransparentAction* pA = (const MetaTransparentAction*) pAction; - const PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); + const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon(); if( rPolyPoly.Count() ) { diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx index 0e6110c96a60..b1fe002071a3 100644 --- a/filter/source/flash/swfwriter2.cxx +++ b/filter/source/flash/swfwriter2.cxx @@ -459,7 +459,7 @@ sal_uInt16 FlashFont::getGlyph( sal_uInt16 nChar, VirtualDevice* pVDev ) aOldFont.SetOrientation(0); // let the virtual device convert the character to polygons - PolyPolygon aPolyPoly; + tools::PolyPolygon aPolyPoly; pVDev->GetTextOutline( aPolyPoly, OUString(nChar) ); maGlyphOffsets.push_back( _uInt16( maGlyphData.getOffset() ) ); |