[Libreoffice-commits] core.git: canvas/source cppcanvas/source dbaccess/source drawinglayer/source editeng/source extensions/source filter/source include/basegfx include/cppcanvas include/filter include/postmac.h include/postwin.h include/premac.h include/prewin.h include/svtools include/svx include/toolkit include/tools include/vcl oox/source reportdesign/source sc/source sd/source sfx2/source starmath/inc svtools/source svx/source sw/source test/source toolkit/source tools/inc tools/source vcl/generic vcl/inc vcl/opengl vcl/source vcl/win vcl/workben

Norbert Thiebaud nthiebaud at gmail.com
Sun Aug 16 19:08:09 PDT 2015


 canvas/source/directx/dx_winstuff.hxx                      |    2 
 canvas/source/vcl/canvashelper.cxx                         |    2 
 canvas/source/vcl/canvashelper_texturefill.cxx             |   12 
 canvas/source/vcl/impltools.cxx                            |    2 
 cppcanvas/source/mtfrenderer/implrenderer.cxx              |   20 
 dbaccess/source/ui/querydesign/ConnectionLine.cxx          |    2 
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx    |    6 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |   20 
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx    |    2 
 editeng/source/editeng/impedit.cxx                         |    2 
 editeng/source/items/svxfont.cxx                           |    2 
 editeng/source/misc/txtrange.cxx                           |    6 
 extensions/source/update/ui/updatecheckui.cxx              |   10 
 filter/source/flash/swfwriter.cxx                          |    8 
 filter/source/flash/swfwriter.hxx                          |    8 
 filter/source/flash/swfwriter1.cxx                         |   46 -
 filter/source/flash/swfwriter2.cxx                         |    2 
 filter/source/graphicfilter/eos2met/eos2met.cxx            |   20 
 filter/source/graphicfilter/epict/epict.cxx                |   30 
 filter/source/graphicfilter/eps/eps.cxx                    |   26 
 filter/source/graphicfilter/icgm/actimpr.cxx               |    8 
 filter/source/graphicfilter/icgm/class4.cxx                |   16 
 filter/source/graphicfilter/icgm/outact.cxx                |    4 
 filter/source/graphicfilter/icgm/outact.hxx                |   14 
 filter/source/graphicfilter/idxf/dxf2mtf.cxx               |   26 
 filter/source/graphicfilter/ios2met/ios2met.cxx            |   60 -
 filter/source/graphicfilter/ipict/ipict.cxx                |    6 
 filter/source/graphicfilter/ipict/shape.cxx                |    2 
 filter/source/graphicfilter/ipict/shape.hxx                |    2 
 filter/source/msfilter/escherex.cxx                        |   30 
 filter/source/msfilter/eschesdo.cxx                        |    2 
 filter/source/msfilter/msdffimp.cxx                        |    6 
 filter/source/svg/svgwriter.cxx                            |   54 -
 filter/source/svg/svgwriter.hxx                            |    6 
 include/basegfx/polygon/b3dpolygon.hxx                     |    2 
 include/cppcanvas/vclfactory.hxx                           |    6 
 include/filter/msfilter/escherex.hxx                       |    4 
 include/filter/msfilter/msdffimp.hxx                       |    8 
 include/filter/msfilter/svdfppt.hxx                        |    6 
 include/postmac.h                                          |    1 
 include/postwin.h                                          |    3 
 include/premac.h                                           |    1 
 include/prewin.h                                           |    1 
 include/svtools/imappoly.hxx                               |    8 
 include/svtools/ruler.hxx                                  |    2 
 include/svx/svdocapt.hxx                                   |   14 
 include/svx/svdtrans.hxx                                   |   14 
 include/svx/xoutbmp.hxx                                    |   10 
 include/svx/xpoly.hxx                                      |    8 
 include/toolkit/helper/vclunohelper.hxx                    |    2 
 include/tools/poly.hxx                                     |   35 
 include/vcl/canvastools.hxx                                |    6 
 include/vcl/gdimtf.hxx                                     |    8 
 include/vcl/graphictools.hxx                               |   16 
 include/vcl/metaact.hxx                                    |   14 
 include/vcl/outdev.hxx                                     |   28 
 include/vcl/pdfwriter.hxx                                  |   14 
 include/vcl/region.hxx                                     |   10 
 include/vcl/window.hxx                                     |    2 
 oox/source/export/drawingml.cxx                            |    2 
 oox/source/export/shapes.cxx                               |    2 
 reportdesign/source/ui/report/EndMarker.cxx                |    4 
 reportdesign/source/ui/report/StartMarker.cxx              |    4 
 sc/source/ui/cctrl/dpcontrol.cxx                           |    2 
 sc/source/ui/dbgui/csvgrid.cxx                             |    2 
 sc/source/ui/view/output.cxx                               |   16 
 sd/source/filter/eppt/epptso.cxx                           |    2 
 sd/source/filter/html/htmlex.cxx                           |    7 
 sd/source/ui/annotations/annotationwindow.cxx              |    2 
 sfx2/source/bastyp/sfxhtml.cxx                             |    2 
 sfx2/source/control/templateabstractview.cxx               |    4 
 sfx2/source/control/templatecontaineritem.cxx              |   18 
 sfx2/source/control/templateviewitem.cxx                   |   12 
 sfx2/source/control/thumbnailview.cxx                      |    7 
 sfx2/source/control/thumbnailviewitem.cxx                  |   12 
 starmath/inc/node.hxx                                      |    4 
 svtools/source/contnr/imivctl1.cxx                         |    2 
 svtools/source/control/ruler.cxx                           |    4 
 svtools/source/control/tabbar.cxx                          |    4 
 svtools/source/graphic/grfcache.cxx                        |    2 
 svtools/source/graphic/grfmgr.cxx                          |    8 
 svtools/source/graphic/grfmgr2.cxx                         |    8 
 svtools/source/misc/imap.cxx                               |   10 
 svtools/source/misc/imap2.cxx                              |   11 
 svtools/source/svhtml/htmlout.cxx                          |    2 
 svtools/source/toolpanel/toolpaneldrawer.cxx               |    2 
 svtools/source/uno/unoimap.cxx                             |    4 
 svx/source/customshapes/EnhancedCustomShape2d.cxx          |    2 
 svx/source/customshapes/EnhancedCustomShape3d.cxx          |    4 
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx    |   21 
 svx/source/dialog/_contdlg.cxx                             |    6 
 svx/source/dialog/framelink.cxx                            |    4 
 svx/source/dialog/frmsel.cxx                               |   10 
 svx/source/dialog/imapwnd.cxx                              |   14 
 svx/source/inc/frmselimpl.hxx                              |    2 
 svx/source/svdraw/svdoashp.cxx                             |   10 
 svx/source/svdraw/svdocapt.cxx                             |   16 
 svx/source/svdraw/svdotext.cxx                             |    6 
 svx/source/svdraw/svdotxtr.cxx                             |   10 
 svx/source/svdraw/svdpoev.cxx                              |    4 
 svx/source/svdraw/svdtrans.cxx                             |   14 
 svx/source/tbxctrls/grafctrl.cxx                           |    2 
 svx/source/unodraw/unoshap2.cxx                            |   14 
 svx/source/xoutdev/_xoutbmp.cxx                            |    9 
 svx/source/xoutdev/_xpoly.cxx                              |    6 
 sw/source/core/docnode/ndnotxt.cxx                         |    9 
 sw/source/core/layout/fly.cxx                              |    2 
 sw/source/core/layout/paintfrm.cxx                         |   12 
 sw/source/core/unocore/unoframe.cxx                        |    4 
 sw/source/filter/ww8/docxsdrexport.cxx                     |    2 
 sw/source/filter/ww8/rtfattributeoutput.cxx                |    2 
 sw/source/filter/ww8/writerhelper.cxx                      |   10 
 sw/source/filter/ww8/writerhelper.hxx                      |    4 
 sw/source/filter/ww8/wrtw8esh.cxx                          |    2 
 sw/source/filter/ww8/ww8graf.cxx                           |    2 
 sw/source/filter/ww8/ww8par.cxx                            |    2 
 sw/source/ui/envelp/labfmt.cxx                             |    2 
 test/source/mtfxmldump.cxx                                 |    4 
 toolkit/source/helper/vclunohelper.cxx                     |    5 
 tools/inc/poly.h                                           |    4 
 tools/source/generic/poly.cxx                              |  468 ++++++-------
 tools/source/generic/poly2.cxx                             |   46 -
 vcl/generic/glyphs/gcach_ftyp.cxx                          |    2 
 vcl/inc/openglgdiimpl.hxx                                  |    2 
 vcl/opengl/gdiimpl.cxx                                     |    6 
 vcl/source/control/button.cxx                              |    6 
 vcl/source/filter/sgvmain.cxx                              |    8 
 vcl/source/filter/sgvspln.cxx                              |    4 
 vcl/source/filter/sgvspln.hxx                              |    4 
 vcl/source/filter/wmf/emfwr.cxx                            |   28 
 vcl/source/filter/wmf/emfwr.hxx                            |    4 
 vcl/source/filter/wmf/enhwmf.cxx                           |   14 
 vcl/source/filter/wmf/winmtf.cxx                           |   42 -
 vcl/source/filter/wmf/winmtf.hxx                           |   34 
 vcl/source/filter/wmf/winwmf.cxx                           |    6 
 vcl/source/filter/wmf/wmfwr.cxx                            |   20 
 vcl/source/filter/wmf/wmfwr.hxx                            |    4 
 vcl/source/gdi/bitmap.cxx                                  |    2 
 vcl/source/gdi/cvtsvm.cxx                                  |   30 
 vcl/source/gdi/gdimetafiletools.cxx                        |   38 -
 vcl/source/gdi/gdimtf.cxx                                  |   32 
 vcl/source/gdi/graphictools.cxx                            |    6 
 vcl/source/gdi/impvect.cxx                                 |   39 -
 vcl/source/gdi/metaact.cxx                                 |   22 
 vcl/source/gdi/pdfwriter.cxx                               |    8 
 vcl/source/gdi/pdfwriter_impl.cxx                          |   20 
 vcl/source/gdi/pdfwriter_impl.hxx                          |   10 
 vcl/source/gdi/pdfwriter_impl2.cxx                         |    6 
 vcl/source/gdi/print2.cxx                                  |   32 
 vcl/source/gdi/region.cxx                                  |   16 
 vcl/source/outdev/curvedshapes.cxx                         |    8 
 vcl/source/outdev/font.cxx                                 |   22 
 vcl/source/outdev/gradient.cxx                             |   22 
 vcl/source/outdev/hatch.cxx                                |    2 
 vcl/source/outdev/line.cxx                                 |    4 
 vcl/source/outdev/map.cxx                                  |   30 
 vcl/source/outdev/pixel.cxx                                |    4 
 vcl/source/outdev/polygon.cxx                              |   18 
 vcl/source/outdev/polyline.cxx                             |   20 
 vcl/source/outdev/rect.cxx                                 |    6 
 vcl/source/outdev/text.cxx                                 |   10 
 vcl/source/outdev/textline.cxx                             |    2 
 vcl/source/outdev/transparent.cxx                          |    6 
 vcl/source/window/cursor.cxx                               |    4 
 vcl/source/window/paint.cxx                                |    4 
 vcl/source/window/split.cxx                                |    2 
 vcl/source/window/splitwin.cxx                             |    2 
 vcl/source/window/window.cxx                               |    4 
 vcl/source/window/window2.cxx                              |    4 
 vcl/win/source/gdi/gdiimpl.cxx                             |   14 
 vcl/win/source/gdi/salgdi3.cxx                             |    2 
 vcl/win/source/gdi/wntgdi.cxx                              |   15 
 vcl/workben/outdevgrind.cxx                                |   24 
 vcl/workben/vcldemo.cxx                                    |   12 
 174 files changed, 1136 insertions(+), 1130 deletions(-)

New commits:
commit ef46917ff3163d3fdd5152bda5d16c4503b6ab69
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Sun Aug 16 16:45:12 2015 -0500

    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 at libreoffice.org>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index 67cf146..5ffd3ab 100644
--- a/canvas/source/directx/dx_winstuff.hxx
+++ b/canvas/source/directx/dx_winstuff.hxx
@@ -46,7 +46,6 @@
 
 
 #define GradientStyle_RECT win32GradientStyle_RECT
-#define Polygon win32Polygon
 #undef WB_LEFT
 #undef WB_RIGHT
 
@@ -174,7 +173,6 @@ namespace dxcanvas
 
 #undef DELETE
 #undef GradientStyle_RECT
-#undef Polygon
 
 #endif // INCLUDED_CANVAS_SOURCE_DIRECTX_DX_WINSTUFF_HXX
 
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 73e0948..a671520 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -259,7 +259,7 @@ namespace vclcanvas
             const Point& rEndPoint( tools::mapRealPoint2D( _aEndPoint,
                                                            viewState, renderState ) );
 
-            ::Polygon aPoly(4);
+            ::tools::Polygon aPoly(4);
             aPoly.SetPoint( rStartPoint, 0 );
             aPoly.SetFlags( 0, POLY_NORMAL );
             aPoly.SetPoint( rCtrlPoint1, 1 );
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 7e58283..e87a26b 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -163,7 +163,7 @@ namespace vclcanvas
             // vertex values in the loop below (as ::Polygon is a
             // pimpl class, creating one every loop turn would really
             // stress the mem allocator)
-            ::Polygon aTempPoly( static_cast<sal_uInt16>(5) );
+            ::tools::Polygon aTempPoly( static_cast<sal_uInt16>(5) );
 
             OSL_ENSURE( nStepCount >= 3,
                         "fillLinearGradient(): stepcount smaller than 3" );
@@ -335,7 +335,7 @@ namespace vclcanvas
 
 
             const sal_uInt32 nNumPoints( aOuterPoly.count() );
-            ::Polygon        aTempPoly( static_cast<sal_uInt16>(nNumPoints+1) );
+            ::tools::Polygon aTempPoly( static_cast<sal_uInt16>(nNumPoints+1) );
 
             // increase number of steps by one: polygonal gradients have
             // the outermost polygon rendered in rColor2, and the
@@ -412,8 +412,8 @@ namespace vclcanvas
                 // here, keep it all the way and only change the vertex values
                 // in the loop below (as ::Polygon is a pimpl class, creating
                 // one every loop turn would really stress the mem allocator)
-                ::tools::PolyPolygon    aTempPolyPoly;
-                ::Polygon               aTempPoly2( static_cast<sal_uInt16>(nNumPoints+1) );
+                ::tools::PolyPolygon aTempPolyPoly;
+                ::tools::Polygon aTempPoly2( static_cast<sal_uInt16>(nNumPoints+1) );
 
                 aTempPoly2[0] = rBounds.TopLeft();
                 aTempPoly2[1] = rBounds.TopRight();
@@ -641,11 +641,11 @@ namespace vclcanvas
                 rOutDev.DrawRect( vcl::unotools::rectangleFromB2DRectangle( aTextureDeviceRect ) );
 
                 rOutDev.SetLineColor( COL_BLUE );
-                ::Polygon aPoly1(
+                ::tools::Polygon aPoly1(
                     vcl::unotools::rectangleFromB2DRectangle( aRect ));
                 ::basegfx::B2DPolygon aPoly2( aPoly1.getB2DPolygon() );
                 aPoly2.transform( aTextureTransform );
-                ::Polygon aPoly3( aPoly2 );
+                ::tools::Polygon aPoly3( aPoly2 );
                 rOutDev.DrawPolygon( aPoly3 );
             }
 #endif
diff --git a/canvas/source/vcl/impltools.cxx b/canvas/source/vcl/impltools.cxx
index fe80ea4..e930b9ff 100644
--- a/canvas/source/vcl/impltools.cxx
+++ b/canvas/source/vcl/impltools.cxx
@@ -152,7 +152,7 @@ namespace vclcanvas
             if( rPolyPoly.Count() != 1 )
                 return false;
 
-            const ::Polygon& rPoly( rPolyPoly[0] );
+            const ::tools::Polygon& rPoly( rPolyPoly[0] );
 
             sal_uInt16 nCount( rPoly.GetSize() );
             if( nCount < 4 )
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 54358fb..c536b7f 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1547,7 +1547,7 @@ namespace cppcanvas
                     case MetaActionType::GRADIENT:
                     {
                         MetaGradientAction* pGradAct = static_cast<MetaGradientAction*>(pCurrAct);
-                        createGradientAction( ::Polygon( pGradAct->GetRect() ),
+                        createGradientAction( ::tools::Polygon( pGradAct->GetRect() ),
                                               pGradAct->GetGradient(),
                                               rFactoryParms,
                                               true,
@@ -2009,9 +2009,9 @@ namespace cppcanvas
                     case MetaActionType::ARC:
                     {
                         // TODO(F1): Missing basegfx functionality. Mind empty rects!
-                        const Polygon aToolsPoly( static_cast<MetaArcAction*>(pCurrAct)->GetRect(),
-                                                  static_cast<MetaArcAction*>(pCurrAct)->GetStartPoint(),
-                                                  static_cast<MetaArcAction*>(pCurrAct)->GetEndPoint(), POLY_ARC );
+                        const ::tools::Polygon aToolsPoly( static_cast<MetaArcAction*>(pCurrAct)->GetRect(),
+                                                         static_cast<MetaArcAction*>(pCurrAct)->GetStartPoint(),
+                                                         static_cast<MetaArcAction*>(pCurrAct)->GetEndPoint(), POLY_ARC );
                         ::basegfx::B2DPolygon aPoly( aToolsPoly.getB2DPolygon() );
                         aPoly.transform( rStates.getState().mapModeTransform );
 
@@ -2023,9 +2023,9 @@ namespace cppcanvas
                     case MetaActionType::PIE:
                     {
                         // TODO(F1): Missing basegfx functionality. Mind empty rects!
-                        const Polygon aToolsPoly( static_cast<MetaPieAction*>(pCurrAct)->GetRect(),
-                                                  static_cast<MetaPieAction*>(pCurrAct)->GetStartPoint(),
-                                                  static_cast<MetaPieAction*>(pCurrAct)->GetEndPoint(), POLY_PIE );
+                        const ::tools::Polygon aToolsPoly( static_cast<MetaPieAction*>(pCurrAct)->GetRect(),
+                                                         static_cast<MetaPieAction*>(pCurrAct)->GetStartPoint(),
+                                                         static_cast<MetaPieAction*>(pCurrAct)->GetEndPoint(), POLY_PIE );
                         ::basegfx::B2DPolygon aPoly( aToolsPoly.getB2DPolygon() );
                         aPoly.transform( rStates.getState().mapModeTransform );
 
@@ -2037,9 +2037,9 @@ namespace cppcanvas
                     case MetaActionType::CHORD:
                     {
                         // TODO(F1): Missing basegfx functionality. Mind empty rects!
-                        const Polygon aToolsPoly( static_cast<MetaChordAction*>(pCurrAct)->GetRect(),
-                                                  static_cast<MetaChordAction*>(pCurrAct)->GetStartPoint(),
-                                                  static_cast<MetaChordAction*>(pCurrAct)->GetEndPoint(), POLY_CHORD );
+                        const ::tools::Polygon aToolsPoly( static_cast<MetaChordAction*>(pCurrAct)->GetRect(),
+                                                         static_cast<MetaChordAction*>(pCurrAct)->GetStartPoint(),
+                                                         static_cast<MetaChordAction*>(pCurrAct)->GetEndPoint(), POLY_CHORD );
                         ::basegfx::B2DPolygon aPoly( aToolsPoly.getB2DPolygon() );
                         aPoly.transform( rStates.getState().mapModeTransform );
 
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
index cdd075c..f53be6f 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx
@@ -272,7 +272,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev )
     LineInfo aLineInfo;
     if ( m_pTabConn->IsSelected() )
         aLineInfo.SetWidth(3);
-    Polygon aPoly;
+    tools::Polygon aPoly;
     aPoly.Insert(0,m_aSourceDescrLinePos);
     aPoly.Insert(1,m_aSourceConnPos);
     aPoly.Insert(2,m_aDestConnPos);
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 09bc2cc..564c6e8 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -1858,7 +1858,7 @@ namespace
                     if(rPropertyHolders.Current().getLineColorActive())
                     {
                         const MetaArcAction* pA = static_cast<const MetaArcAction*>(pAction);
-                        const Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC);
+                        const tools::Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_ARC);
                         const basegfx::B2DPolygon aOutline(aToolsPoly.getB2DPolygon());
 
                         createHairlinePrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current());
@@ -1872,7 +1872,7 @@ namespace
                     if(rPropertyHolders.Current().getLineOrFillActive())
                     {
                         const MetaPieAction* pA = static_cast<const MetaPieAction*>(pAction);
-                        const Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE);
+                        const tools::Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_PIE);
                         const basegfx::B2DPolygon aOutline(aToolsPoly.getB2DPolygon());
 
                         createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current());
@@ -1886,7 +1886,7 @@ namespace
                     if(rPropertyHolders.Current().getLineOrFillActive())
                     {
                         const MetaChordAction* pA = static_cast<const MetaChordAction*>(pAction);
-                        const Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD);
+                        const tools::Polygon aToolsPoly(pA->GetRect(), pA->GetStartPoint(), pA->GetEndPoint(), POLY_CHORD);
                         const basegfx::B2DPolygon aOutline(aToolsPoly.getB2DPolygon());
 
                         createHairlineAndFillPrimitive(aOutline, rTargetHolders.Current(), rPropertyHolders.Current());
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index e6a12cd..22d3c61 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -519,15 +519,15 @@ namespace drawinglayer
                 aEndArrow.transform(maCurrentTransformation);
 
                 pRetval = new SvtGraphicStroke(
-                    Polygon(aLocalPolygon),
-                    tools::PolyPolygon(aStartArrow),
-                    tools::PolyPolygon(aEndArrow),
-                    mfCurrentUnifiedTransparence,
-                    fLineWidth,
-                    eCap,
-                    eJoin,
-                    fMiterLength,
-                    aDashArray);
+                        tools::Polygon(aLocalPolygon),
+                        tools::PolyPolygon(aStartArrow),
+                        tools::PolyPolygon(aEndArrow),
+                        mfCurrentUnifiedTransparence,
+                        fLineWidth,
+                        eCap,
+                        eJoin,
+                        fMiterLength,
+                        aDashArray);
             }
 
             return pRetval;
@@ -1266,7 +1266,7 @@ namespace drawinglayer
 
                                 if(aCandidate.count() > 1)
                                 {
-                                    const Polygon aToolsPolygon(aCandidate);
+                                    const tools::Polygon aToolsPolygon(aCandidate);
 
                                     mpMetaFile->AddAction(new MetaPolyLineAction(aToolsPolygon, aLineInfo));
                                 }
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 825e203..9aa861d 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -1146,7 +1146,7 @@ namespace drawinglayer
                         ::Hatch aVCLHatch(eHatchStyle, Color(rFillHatchAttributes.getColor()), nDistance, nAngle10);
 
                         // draw hatch using VCL
-                        mpOutputDevice->DrawHatch(tools::PolyPolygon(Polygon(aHatchPolygon)), aVCLHatch);
+                        mpOutputDevice->DrawHatch(tools::PolyPolygon(tools::Polygon(aHatchPolygon)), aVCLHatch);
                     }
                     break;
                 }
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 3b65164..209480c 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -402,7 +402,7 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rD
         Rectangle aRect( aPnt1, aPnt2 );
         if ( pPolyPoly )
         {
-            Polygon aTmpPoly( 4 );
+            tools::Polygon aTmpPoly( 4 );
             aTmpPoly[0] = aRect.TopLeft();
             aTmpPoly[1] = aRect.TopRight();
             aTmpPoly[2] = aRect.BottomRight();
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index a250186..1a04060 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -73,7 +73,7 @@ void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
         nTop = rRect.Top();
         nBottom = rRect.Bottom();
     }
-    Polygon aPoly;
+    tools::Polygon aPoly;
     Point aTmp( bLeft ? nLeft : nRight, nMid );
     Point aNxt( bLeft ? nRight : nLeft, nTop );
     aPoly.Insert( 0, aTmp );
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index b781639..be6191e 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -50,7 +50,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon,
     {
         const basegfx::B2DPolygon aCandidate(rPolyPolygon.getB2DPolygon(i).getDefaultAdaptiveSubdivision());
         nPointCount += aCandidate.count();
-        mpPolyPolygon->Insert( Polygon(aCandidate), (sal_uInt16)i );
+        mpPolyPolygon->Insert( tools::Polygon(aCandidate), (sal_uInt16)i );
     }
 
     if( pLinePolyPolygon )
@@ -62,7 +62,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon,
         {
             const basegfx::B2DPolygon aCandidate(pLinePolyPolygon->getB2DPolygon(i).getDefaultAdaptiveSubdivision());
             nPointCount += aCandidate.count();
-            mpLinePolyPolygon->Insert( Polygon(aCandidate), (sal_uInt16)i );
+            mpLinePolyPolygon->Insert( tools::Polygon(aCandidate), (sal_uInt16)i );
         }
     }
     else
@@ -306,7 +306,7 @@ void SvxBoundArgs::Calc( const tools::PolyPolygon& rPoly )
     nAct = 0;
     for( sal_uInt16 i = 0; i < rPoly.Count(); ++i )
     {
-        const Polygon& rPol = rPoly[ i ];
+        const tools::Polygon& rPol = rPoly[ i ];
         nCount = rPol.GetSize();
         if( nCount )
         {
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 03d8b21..d2ce406 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -90,9 +90,9 @@ namespace
 class BubbleWindow : public FloatingWindow
 {
     Point           maTipPos;
-    vcl::Region          maBounds;
-    Polygon         maRectPoly;
-    Polygon         maTriPoly;
+    vcl::Region     maBounds;
+    tools::Polygon  maRectPoly;
+    tools::Polygon  maTriPoly;
     OUString        maBubbleTitle;
     OUString        maBubbleText;
     Image           maBubbleImage;
@@ -785,7 +785,7 @@ void BubbleWindow::Resize()
         return;
 
     Rectangle aRect( 0, TIP_HEIGHT, aSize.Width(), aSize.Height() - TIP_HEIGHT );
-    maRectPoly = Polygon( aRect, 6, 6 );
+    maRectPoly = tools::Polygon( aRect, 6, 6 );
     vcl::Region aRegion( maRectPoly );
     long nTipOffset = aSize.Width() - TIP_RIGHT_OFFSET + mnTipOffset;
 
@@ -794,7 +794,7 @@ void BubbleWindow::Resize()
     aPointArr[1] = Point( nTipOffset, 0 );
     aPointArr[2] = Point( nTipOffset + TIP_WIDTH , TIP_HEIGHT );
     aPointArr[3] = Point( nTipOffset, TIP_HEIGHT );
-     maTriPoly = Polygon( 4, aPointArr );
+    maTriPoly = tools::Polygon( 4, aPointArr );
     vcl::Region aTriRegion( maTriPoly );
 
     aRegion.Union( aTriRegion);
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index 9f80ca9..c705cab7 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -67,7 +67,7 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int
 
     // define an invisible button with the size of a page
     Rectangle aRect( 0, 0, (long)( mnDocWidth * mnDocXScale ), (long)( mnDocHeight * mnDocYScale ) );
-    Polygon aPoly( aRect );
+    tools::Polygon aPoly( aRect );
     FillStyle aFill = FillStyle( Color(COL_WHITE) );
     mnWhiteBackgroundShapeId = defineShape( aPoly, aFill );
 
@@ -331,7 +331,7 @@ sal_uInt16 Writer::defineShape( const GDIMetaFile& rMtf, sal_Int16 x, sal_Int16
 
 
 
-sal_uInt16 Writer::defineShape( const Polygon& rPoly, const FillStyle& rFillStyle )
+sal_uInt16 Writer::defineShape( const tools::Polygon& rPoly, const FillStyle& rFillStyle )
 {
     const tools::PolyPolygon aPolyPoly( rPoly );
     return defineShape( aPolyPoly, rFillStyle );
@@ -368,7 +368,7 @@ sal_uInt16 Writer::defineShape( const tools::PolyPolygon& rPolyPoly, const FillS
     sal_uInt16 i;
     for( i = 0; i < nCount; i++ )
     {
-        const Polygon& rPoly = rPolyPoly[ i ];
+        const tools::Polygon& rPoly = rPolyPoly[ i ];
         if( rPoly.GetSize() )
             Impl_addPolygon( aBits, rPoly, true );
     }
@@ -413,7 +413,7 @@ sal_uInt16 Writer::defineShape( const tools::PolyPolygon& rPolyPoly, sal_uInt16
     sal_uInt16 i;
     for( i = 0; i < nCount; i++ )
     {
-        const Polygon& rPoly = rPolyPoly[ i ];
+        const tools::Polygon& rPoly = rPolyPoly[ i ];
         if( rPoly.GetSize() )
             Impl_addPolygon( aBits, rPoly, false );
     }
diff --git a/filter/source/flash/swfwriter.hxx b/filter/source/flash/swfwriter.hxx
index 76d25d8..19e5235 100644
--- a/filter/source/flash/swfwriter.hxx
+++ b/filter/source/flash/swfwriter.hxx
@@ -273,7 +273,7 @@ public:
 
     /** defines a flash shape from a filled polygon.
         The coordinates must be in twips */
-    sal_uInt16 defineShape( const Polygon& rPoly, const FillStyle& rFillStyle );
+    sal_uInt16 defineShape( const tools::Polygon& rPoly, const FillStyle& rFillStyle );
 
     /** defines a flash shape from a filled polypolygon.
         The coordinates must be in twips */
@@ -337,8 +337,8 @@ private:
     void Impl_writeJPEG(sal_uInt16 nBitmapId, const sal_uInt8* pJpgData, sal_uInt32 nJpgDataLength, sal_uInt8 *pCompressed, sal_uInt32 compressed_size );
     void Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx::B2DPolygon& rLinePolygon);
     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_writePolygon( const tools::Polygon& rPoly, bool bFilled );
+    void Impl_writePolygon( const tools::Polygon& rPoly, 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 );
@@ -352,7 +352,7 @@ private:
 
     FlashFont& Impl_getFont( const vcl::Font& rFont );
 
-    static void Impl_addPolygon( BitStream& rBits, const Polygon& rPoly, bool bFilled );
+    static void Impl_addPolygon( BitStream& rBits, const tools::Polygon& rPoly, bool bFilled );
 
     static void Impl_addShapeRecordChange( BitStream& rBits, sal_Int16 dx, sal_Int16 dy, bool bFilled );
     static void Impl_addStraightEdgeRecord( BitStream& rBits, sal_Int16 dx, sal_Int16 dy );
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index c321ec0..c510727 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -91,7 +91,7 @@ void Writer::map( tools::PolyPolygon& rPolyPolygon ) const
         sal_uInt16 nPoly, nPoint, nPointCount;
         for( nPoly = 0; nPoly < nPolyCount; nPoly++ )
         {
-            Polygon& rPoly = rPolyPolygon[nPoly];
+            tools::Polygon& rPoly = rPolyPolygon[nPoly];
             nPointCount = rPoly.GetSize();
 
             for( nPoint = 0; nPoint < nPointCount; nPoint++ )
@@ -115,7 +115,7 @@ sal_Int32 Writer::mapRelative( sal_Int32 n100thMM ) const
 
 
 
-void Writer::Impl_addPolygon( BitStream& rBits, const Polygon& rPoly, bool bFilled )
+void Writer::Impl_addPolygon( BitStream& rBits, const tools::Polygon& rPoly, bool bFilled )
 {
     Point aLastPoint( rPoly[0] );
 
@@ -259,7 +259,7 @@ void Writer::Impl_addEndShapeRecord( BitStream& rBits )
 
 
 
-void Writer::Impl_writePolygon( const Polygon& rPoly, bool bFilled )
+void Writer::Impl_writePolygon( const tools::Polygon& rPoly, bool bFilled )
 {
     tools::PolyPolygon aPolyPoly( rPoly );
     Impl_writePolyPolygon( aPolyPoly, bFilled );
@@ -267,7 +267,7 @@ void Writer::Impl_writePolygon( const Polygon& rPoly, bool bFilled )
 
 
 
-void Writer::Impl_writePolygon( const Polygon& rPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor )
+void Writer::Impl_writePolygon( const tools::Polygon& rPoly, bool bFilled, const Color& rFillColor, const Color& rLineColor )
 {
     tools::PolyPolygon aPolyPoly( rPoly );
     Impl_writePolyPolygon( aPolyPoly, bFilled, rFillColor, rLineColor );
@@ -588,9 +588,9 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
 
 #if 0 // makes the calculated bound rect visible for debugging
 {
-        Polygon aTmpPoly( aPoly );
-        sal_uInt16 nID = FlashGeometryExporter::writePolygonShape( aMovieStream, aTmpPoly, false, Color(COL_MAGENTA), Color(COL_MAGENTA), mpClipPolyPolygon  );
-        ImplPlaceObject( nID );
+    tools::Polygon aTmpPoly( aPoly );
+    sal_uInt16 nID = FlashGeometryExporter::writePolygonShape( aMovieStream, aTmpPoly, false, Color(COL_MAGENTA), Color(COL_MAGENTA), mpClipPolyPolygon  );
+    ImplPlaceObject( nID );
 }
 #endif
 
@@ -679,7 +679,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
         //  fancy lines (like dashes).
         if( ( aOldFont.GetStrikeout() != STRIKEOUT_NONE ) || ( aOldFont.GetUnderline() != UNDERLINE_NONE ) )
         {
-            Polygon     aPoly( 4 );
+            tools::Polygon aPoly( 4 );
             const long  nLineHeight = std::max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 );
 
             if( aOldFont.GetStrikeout() != STRIKEOUT_NONE )
@@ -955,7 +955,7 @@ void Writer::Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Si
 
             sal_uInt16 nBitmapId = defineBitmap(bmpSource, nJPEGQuality);
 
-            Polygon aPoly( destRect );
+            tools::Polygon aPoly( destRect );
 
             // AS: Since images are being cropped now, no translation is normally necessary.
             //  However, some things like graphical bullet points still get translated.
@@ -1134,7 +1134,7 @@ void Writer::Impl_writeLine( const Point& rPt1, const Point& rPt2, const Color*
         mpVDev->SetLineColor( *pLineColor );
 
     const Point aPtAry[2] = { rPt1, rPt2 };
-    Polygon aPoly( 2, aPtAry );
+    tools::Polygon aPoly( 2, aPtAry );
     Impl_writePolyPolygon( aPoly, false );
 
     mpVDev->SetLineColor( aOldColor );
@@ -1151,7 +1151,7 @@ void Writer::Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY )
     }
     else
     {
-        Polygon aPoly( rRect, nRadX, nRadY );
+        tools::Polygon aPoly( rRect, nRadX, nRadY );
         Impl_writePolyPolygon( aPoly, true );
     }
 }
@@ -1160,7 +1160,7 @@ void Writer::Impl_writeRect( const Rectangle& rRect, long nRadX, long nRadY )
 
 void Writer::Impl_writeEllipse( const Point& rCenter, long nRadX, long nRadY )
 {
-    Polygon aPoly( rCenter, nRadX, nRadY );
+    tools::Polygon aPoly( rCenter, nRadX, nRadY );
     Impl_writePolyPolygon( aPoly, false );
 }
 
@@ -1170,7 +1170,7 @@ void Writer::Impl_writeEllipse( const Point& rCenter, long nRadX, long nRadY )
 */
 bool Writer::Impl_writeStroke( SvtGraphicStroke& rStroke )
 {
-    Polygon aPolygon;
+    tools::Polygon aPolygon;
     rStroke.getPath( aPolygon );
     tools::PolyPolygon aPolyPolygon( aPolygon );
 
@@ -1349,7 +1349,7 @@ void Writer::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const basegf
             for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
             {
                 const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a));
-                Impl_writePolygon(Polygon(aCandidate), false );
+                Impl_writePolygon( tools::Polygon(aCandidate), false );
             }
         }
 
@@ -1363,8 +1363,8 @@ 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(tools::PolyPolygon(Polygon(aPolygon)), true );
+                const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
+                Impl_writePolyPolygon(tools::PolyPolygon(tools::Polygon(aPolygon)), true );
             }
 
             mpVDev->SetLineColor(aOldLineColor);
@@ -1449,28 +1449,28 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
             case( MetaActionType::CHORD ):
             case( MetaActionType::POLYGON ):
             {
-                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;
 
@@ -1489,8 +1489,8 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
 
             case( MetaActionType::POLYLINE ):
             {
-                const MetaPolyLineAction*   pA = static_cast<const MetaPolyLineAction*>(pAction);
-                const Polygon&              rPoly = pA->GetPolygon();
+                const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction);
+                const tools::Polygon& rPoly = pA->GetPolygon();
 
                 if( rPoly.GetSize() )
                 {
@@ -1521,7 +1521,7 @@ void Writer::Impl_writeActions( const GDIMetaFile& rMtf )
             {
                 const MetaGradientAction*   pA = static_cast<const MetaGradientAction*>(pAction);
 
-                Polygon aPoly( pA->GetRect() );
+                tools::Polygon aPoly( pA->GetRect() );
                 Impl_writeGradientEx( aPoly, pA->GetGradient() );
             }
             break;
diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx
index 28e8426..f13c63d 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -471,7 +471,7 @@ sal_uInt16 FlashFont::getGlyph( sal_uInt16 nChar, VirtualDevice* pVDev )
     sal_uInt16 i,n;
     for( i = 0; i < nCount; i++ )
     {
-        Polygon& rPoly = aPolyPoly[ i ];
+        tools::Polygon& rPoly = aPolyPoly[ i ];
 
         const sal_uInt16 nSize = rPoly.GetSize();
         if( nSize )
diff --git a/filter/source/graphicfilter/eos2met/eos2met.cxx b/filter/source/graphicfilter/eos2met/eos2met.cxx
index dac76c9..3556195 100644
--- a/filter/source/graphicfilter/eos2met/eos2met.cxx
+++ b/filter/source/graphicfilter/eos2met/eos2met.cxx
@@ -207,7 +207,7 @@ private:
     void METCloseFigure();
     void METMove(Point aPt);
     void METLine(Point aPt1, Point aPt2);
-    void METLine(const Polygon & rPolygon);
+    void METLine(const tools::Polygon & rPolygon);
     void METLine(const tools::PolyPolygon & rPolyPolygon);
     void METLineAtCurPos(Point aPt);
     void METBox(bool bFill, bool bBoundary,
@@ -297,7 +297,7 @@ void METWriter::WriteClipRect( const Rectangle& rRect )
     sal_uInt32 nPathId = ( rRect.IsEmpty() ) ? 0 : 1;
     if ( nPathId )
     {
-        Polygon aPoly( rRect );
+        tools::Polygon aPoly( rRect );
         METBeginPath( nPathId );
         METLine( aPoly );
         METEndPath();
@@ -1289,7 +1289,7 @@ void METWriter::METLine(Point aPt1, Point aPt2)
 }
 
 
-void METWriter::METLine(const Polygon & rPolygon)
+void METWriter::METLine(const tools::Polygon & rPolygon)
 {
     sal_uInt16 nNumPoints,i,j,nOrderPoints;
     bool bFirstOrder;
@@ -1761,8 +1761,8 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
                     METSetMix(eGDIRasterOp);
                     METSetColor(aGDILineColor);
                     METBeginPath(1);
-                    Polygon aSimplePoly;
-                    const Polygon& rPoly = pA->GetPolygon();
+                    tools::Polygon aSimplePoly;
+                    const tools::Polygon& rPoly = pA->GetPolygon();
                     if ( rPoly.HasFlags() )
                         rPoly.AdaptiveSubdivide( aSimplePoly );
                     else
@@ -1780,8 +1780,8 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
             case MetaActionType::POLYGON:
             {
                 const MetaPolygonAction* pA = static_cast<const MetaPolygonAction*>(pMA);
-                Polygon aSimplePoly;
-                const Polygon& rPoly = pA->GetPolygon();
+                tools::Polygon aSimplePoly;
+                const tools::Polygon& rPoly = pA->GetPolygon();
                 if ( rPoly.HasFlags() )
                     rPoly.AdaptiveSubdivide( aSimplePoly );
                 else
@@ -1819,7 +1819,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
                 {
                     if ( aSimplePolyPoly[ i ].HasFlags() )
                     {
-                        Polygon aSimplePoly;
+                        tools::Polygon aSimplePoly;
                         aSimplePolyPoly[ i ].AdaptiveSubdivide( aSimplePoly );
                         aSimplePolyPoly[ i ] = aSimplePoly;
                     }
@@ -1877,7 +1877,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
                 const MetaTextArrayAction*  pA = static_cast<const MetaTextArrayAction*>(pMA);
                 sal_uInt16                  i;
                 OUString                    aStr;
-                Polygon                     aPolyDummy(1);
+                tools::Polygon aPolyDummy(1);
                 short                       nOrientation;
                 Point                       aPt( pA->GetPoint() );
 
@@ -1930,7 +1930,7 @@ void METWriter::WriteOrders( const GDIMetaFile* pMTF )
                 sal_uInt16                          i;
                 sal_Int32                       nNormSize;
                 OUString                        aStr;
-                Polygon                         aPolyDummy(1);
+                tools::Polygon aPolyDummy(1);
                 short                           nOrientation;
                 Point                           aPt( pA->GetPoint() );
                 Point                           aPt2;
diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx
index 1237e23..6807e84 100644
--- a/filter/source/graphicfilter/epict/epict.cxx
+++ b/filter/source/graphicfilter/epict/epict.cxx
@@ -111,7 +111,7 @@ private:
         // counts the bitmaps and actions (nNumberOfActions and nNumberOfBitmaps
         // have to be set to 0 at the beginning, since this method is recursive)
 
-    static Polygon PolyPolygonToPolygon(const tools::PolyPolygon & rPoly);
+    static tools::Polygon PolyPolygonToPolygon(const tools::PolyPolygon & rPoly);
         // generates a relatively sane polygon on the basis of a PolyPolygon
 
     Rectangle MapRectangle( const Rectangle& rRect );
@@ -120,7 +120,7 @@ private:
     void WriteRGBColor(const Color & rColor);
     void WriteString( const OUString & rString );
     void WriteRectangle(const Rectangle & rRect);
-    void WritePolygon(const Polygon & rPoly);
+    void WritePolygon(const tools::Polygon & rPoly);
     void WriteArcAngles(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
 
     static void ConvertLinePattern(PictPattern & rPat, bool bVisible);
@@ -151,7 +151,7 @@ private:
                          const Point & rStartPt, const Point & rEndPt);
     void WriteOpcode_SameArc(PictDrawingMethod eMethod, const Rectangle & rRect,
                              const Point & rStartPt, const Point & rEndPt);
-    void WriteOpcode_Poly(PictDrawingMethod eMethod, const Polygon & rPoly);
+    void WriteOpcode_Poly(PictDrawingMethod eMethod, const tools::Polygon & rPoly);
     void WriteOpcode_BitsRect(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap);
     void WriteOpcode_EndOfFile();
 
@@ -220,15 +220,15 @@ void PictWriter::CountActionsAndBitmaps(const GDIMetaFile & rMTF)
 }
 
 
-Polygon PictWriter::PolyPolygonToPolygon(const tools::PolyPolygon & rPolyPoly)
+tools::Polygon PictWriter::PolyPolygonToPolygon(const tools::PolyPolygon & rPolyPoly)
 {
     sal_uInt16 nCount,nSize1,nSize2,np,i1,i2,i3,nBestIdx1,nBestIdx2;
     long nDistSqr;
     Point aP1,aPRel;
-    Polygon aPoly1, aPoly2, aPoly3;
+    tools::Polygon aPoly1, aPoly2, aPoly3;
 
     nCount=rPolyPoly.Count();
-    if (nCount==0) return Polygon(0);
+    if (nCount==0) return tools::Polygon(0);
 
     aPoly1=rPolyPoly.GetObject(0);
     for (np=1; np<nCount; np++) {
@@ -332,11 +332,11 @@ void PictWriter::WriteRectangle(const Rectangle & rRect)
            .WriteInt16( aRect.Bottom() ).WriteInt16( aRect.Right() );
 }
 
-void PictWriter::WritePolygon(const Polygon & rPoly)
+void PictWriter::WritePolygon(const tools::Polygon & rPoly)
 {
     sal_uInt16 nDataSize,i,nSize;
     short nMinX = 0, nMinY = 0, nMaxX = 0, nMaxY = 0;
-    Polygon aPoly(rPoly);
+    tools::Polygon aPoly(rPoly);
 
     nSize=aPoly.GetSize();
 
@@ -846,7 +846,7 @@ void PictWriter::WriteOpcode_SameArc(PictDrawingMethod eMethod, const Rectangle
 }
 
 
-void PictWriter::WriteOpcode_Poly(PictDrawingMethod eMethod, const Polygon & rPoly)
+void PictWriter::WriteOpcode_Poly(PictDrawingMethod eMethod, const tools::Polygon & rPoly)
 {
     sal_uInt16 oc;
 
@@ -1380,7 +1380,7 @@ void PictWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx
 
             for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++)
             {
-                const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a).getDefaultAdaptiveSubdivision());
+                const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a).getDefaultAdaptiveSubdivision());
                 WriteOpcode_Poly(PDM_PAINT, aPolygon);
             }
 
@@ -1598,13 +1598,13 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
 
                 if( aLineColor!=Color( COL_TRANSPARENT ) )
                 {
-                    const Polygon&  rPoly = pA->GetPolygon();
+                    const tools::Polygon&  rPoly = pA->GetPolygon();
 
                     if( rPoly.GetSize() )
                     {
                         if(pA->GetLineInfo().IsDefault())
                         {
-                            Polygon aSimplePoly;
+                            tools::Polygon aSimplePoly;
                             if ( rPoly.HasFlags() )
                                 rPoly.AdaptiveSubdivide( aSimplePoly );
                             else
@@ -1639,9 +1639,9 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
             {
                 const MetaPolygonAction* pA = static_cast<const MetaPolygonAction*>(pMA);
 
-                const Polygon& rPoly = pA->GetPolygon();
+                const tools::Polygon& rPoly = pA->GetPolygon();
 
-                Polygon aSimplePoly;
+                tools::Polygon aSimplePoly;
                 if ( rPoly.HasFlags() )
                     rPoly.AdaptiveSubdivide( aSimplePoly );
                 else
@@ -1671,7 +1671,7 @@ void PictWriter::WriteOpcodes( const GDIMetaFile & rMTF )
                 {
                     if ( aSimplePolyPoly[ i ].HasFlags() )
                     {
-                        Polygon aSimplePoly;
+                        tools::Polygon aSimplePoly;
                         aSimplePolyPoly[ i ].AdaptiveSubdivide( aSimplePoly );
                         aSimplePolyPoly[ i ] = aSimplePoly;
                     }
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index bcbb526..489ff7d 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -197,7 +197,7 @@ private:
     void                ImplTranslate( const double& fX, const double& fY, sal_uInt32 nMode = PS_RET );
     void                ImplScale( const double& fX, const double& fY, sal_uInt32 nMode = PS_RET );
 
-    void                ImplAddPath( const Polygon & rPolygon );
+    void                ImplAddPath( const tools::Polygon & rPolygon );
     void                ImplWriteLineInfo( double fLineWidth, double fMiterLimit, SvtGraphicStroke::CapType eLineCap,
                                     SvtGraphicStroke::JoinType eJoinType, SvtGraphicStroke::DashArray& rDashArray );
     void                ImplWriteLineInfo( const LineInfo& rLineInfo );
@@ -206,7 +206,7 @@ private:
     void                ImplWriteGradient( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, VirtualDevice& rVDev );
     void                ImplIntersect( const tools::PolyPolygon& rPolyPoly );
     void                ImplPolyPoly( const tools::PolyPolygon & rPolyPolygon, bool bTextOutline = false );
-    void                ImplPolyLine( const Polygon & rPolygon );
+    void                ImplPolyLine( const tools::Polygon & rPolygon );
 
     void                ImplSetClipRegion( vcl::Region& rRegion );
     void                ImplBmp( Bitmap*, Bitmap*, const Point &, double nWidth, double nHeight );
@@ -714,7 +714,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
             {
                 Rectangle   aRect = static_cast<const MetaEllipseAction*>(pMA)->GetRect();
                 Point       aCenter = aRect.Center();
-                Polygon     aPoly( aCenter, aRect.GetWidth() / 2, aRect.GetHeight() / 2 );
+                tools::Polygon aPoly( aCenter, aRect.GetWidth() / 2, aRect.GetHeight() / 2 );
                 tools::PolyPolygon aPolyPoly( aPoly );
                 ImplPolyPoly( aPolyPoly );
             }
@@ -722,7 +722,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
 
             case MetaActionType::ARC :
             {
-                Polygon aPoly( static_cast<const MetaArcAction*>(pMA)->GetRect(), static_cast<const MetaArcAction*>(pMA)->GetStartPoint(),
+                tools::Polygon aPoly( static_cast<const MetaArcAction*>(pMA)->GetRect(), static_cast<const MetaArcAction*>(pMA)->GetStartPoint(),
                     static_cast<const MetaArcAction*>(pMA)->GetEndPoint(), POLY_ARC );
                 tools::PolyPolygon aPolyPoly( aPoly );
                 ImplPolyPoly( aPolyPoly );
@@ -731,7 +731,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
 
             case MetaActionType::PIE :
             {
-                Polygon aPoly( static_cast<const MetaPieAction*>(pMA)->GetRect(), static_cast<const MetaPieAction*>(pMA)->GetStartPoint(),
+                tools::Polygon aPoly( static_cast<const MetaPieAction*>(pMA)->GetRect(), static_cast<const MetaPieAction*>(pMA)->GetStartPoint(),
                     static_cast<const MetaPieAction*>(pMA)->GetEndPoint(), POLY_PIE );
                 tools::PolyPolygon aPolyPoly( aPoly );
                 ImplPolyPoly( aPolyPoly );
@@ -740,7 +740,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
 
             case MetaActionType::CHORD :
             {
-                Polygon aPoly( static_cast<const MetaChordAction*>(pMA)->GetRect(), static_cast<const MetaChordAction*>(pMA)->GetStartPoint(),
+                tools::Polygon aPoly( static_cast<const MetaChordAction*>(pMA)->GetRect(), static_cast<const MetaChordAction*>(pMA)->GetStartPoint(),
                     static_cast<const MetaChordAction*>(pMA)->GetEndPoint(), POLY_CHORD );
                 tools::PolyPolygon aPolyPoly( aPoly );
                 ImplPolyPoly( aPolyPoly );
@@ -749,7 +749,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
 
             case MetaActionType::POLYLINE :
             {
-                Polygon aPoly( static_cast<const MetaPolyLineAction*>(pMA)->GetPolygon() );
+                tools::Polygon aPoly( static_cast<const MetaPolyLineAction*>(pMA)->GetPolygon() );
                 const LineInfo& rLineInfo = static_cast<const MetaPolyLineAction*>(pMA)->GetLineInfo();
                 ImplWriteLineInfo( rLineInfo );
 
@@ -768,7 +768,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
                             && POLY_NORMAL != aPoly.GetFlags(a + 2)
                             && a + 3 < nPoints)
                         {
-                            const Polygon aSnippet(4,
+                            const tools::Polygon aSnippet(4,
                                 aPoly.GetConstPointAry() + a,
                                 aPoly.GetConstFlagAry() + a);
                             ImplPolyLine(aSnippet);
@@ -776,7 +776,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
                         }
                         else
                         {
-                            const Polygon aSnippet(2,
+                            const tools::Polygon aSnippet(2,
                                 aPoly.GetConstPointAry() + a);
                             ImplPolyLine(aSnippet);
                         }
@@ -1301,7 +1301,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev )
                             SvtGraphicStroke aStroke;
                             ReadSvtGraphicStroke( aMemStm, aStroke );
 
-                            Polygon aPath;
+                            tools::Polygon aPath;
                             aStroke.getPath( aPath );
 
                             tools::PolyPolygon aStartArrow;
@@ -1565,7 +1565,7 @@ void PSWriter::ImplRectFill( const Rectangle & rRect )
 
 
 
-void PSWriter::ImplAddPath( const Polygon & rPolygon )
+void PSWriter::ImplAddPath( const tools::Polygon & rPolygon )
 {
     sal_uInt16 nPointCount = rPolygon.GetSize();
     if ( nPointCount > 1 )
@@ -1656,7 +1656,7 @@ void PSWriter::ImplPolyPoly( const tools::PolyPolygon & rPolyPoly, bool bTextOut
 
 
 
-void PSWriter::ImplPolyLine( const Polygon & rPoly )
+void PSWriter::ImplPolyLine( const tools::Polygon & rPoly )
 {
     if ( bLineColor )
     {
@@ -2149,7 +2149,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const lo
         pVirDev->SetTextAlign( eTextAlign );
 
         sal_Int16 nRotation = maFont.GetOrientation();
-        Polygon aPolyDummy( 1 );
+        tools::Polygon aPolyDummy( 1 );
 
         Point aPos( rPos );
         if ( nRotation )
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index d643c0a..9f1bed8 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -593,7 +593,7 @@ void CGMImpressOutAct::DrawBitmap( CGMBitmapDescriptor* pBmpDesc )
     }
 }
 
-void CGMImpressOutAct::DrawPolygon( Polygon& rPoly )
+void CGMImpressOutAct::DrawPolygon( tools::Polygon& rPoly )
 {
     sal_uInt16 nPoints = rPoly.GetSize();
 
@@ -623,7 +623,7 @@ void CGMImpressOutAct::DrawPolygon( Polygon& rPoly )
     }
 }
 
-void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly )
+void CGMImpressOutAct::DrawPolyLine( tools::Polygon& rPoly )
 {
     sal_uInt16 nPoints = rPoly.GetSize();
 
@@ -653,7 +653,7 @@ void CGMImpressOutAct::DrawPolyLine( Polygon& rPoly )
     }
 }
 
-void CGMImpressOutAct::DrawPolybezier( Polygon& rPolygon )
+void CGMImpressOutAct::DrawPolybezier( tools::Polygon& rPolygon )
 {
     sal_uInt16 nPoints = rPolygon.GetSize();
     if ( ( nPoints > 1 ) && ImplCreateShape( "com.sun.star.drawing.OpenBezierShape" ) )
@@ -703,7 +703,7 @@ void CGMImpressOutAct::DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon )
 
         for( sal_uInt32 a = 0; a < nNumPolys; a++ )
         {
-            Polygon aPolygon( rPolyPolygon.GetObject( a ) );
+            tools::Polygon aPolygon( rPolyPolygon.GetObject( a ) );
             sal_uInt32 nNumPoints = aPolygon.GetSize();
 
             // make room in arrays
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index 0523ada..8d59f4e 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -126,7 +126,7 @@ void CGM::ImplDoClass4()
             case 0x01 : /*PolyLine*/
             {
                 sal_uInt32 nPoints = mnElementSize / ImplGetPointSize();
-                Polygon aPolygon( (sal_uInt16)nPoints );
+                tools::Polygon aPolygon( (sal_uInt16)nPoints );
                 for ( sal_uInt32 i = 0; i < nPoints; i++)
                 {
                     FloatPoint  aFloatPoint;
@@ -150,7 +150,7 @@ void CGM::ImplDoClass4()
                     FloatPoint  aFloatPoint;
                     if ( mbFigure )
                     {
-                        Polygon aPolygon( nPoints );
+                        tools::Polygon aPolygon( nPoints );
                         for ( sal_uInt16 i = 0; i < nPoints; i++ )
                         {
                             ImplGetPoint( aFloatPoint, true );
@@ -161,7 +161,7 @@ void CGM::ImplDoClass4()
                     else
                     {
                         mpOutAct->BeginGroup();
-                        Polygon aPolygon( (sal_uInt16)2 );
+                        tools::Polygon aPolygon( (sal_uInt16)2 );
                         for ( sal_uInt16 i = 0; i < nPoints; i++ )
                         {
                             ImplGetPoint( aFloatPoint, true );
@@ -254,7 +254,7 @@ void CGM::ImplDoClass4()
 
                 sal_uInt16 nPoints = sal::static_int_cast< sal_uInt16 >(
                     mnElementSize / ImplGetPointSize());
-                Polygon aPolygon( nPoints );
+                tools::Polygon aPolygon( nPoints );
                 for ( sal_uInt16 i = 0; i < nPoints; i++)
                 {
                     FloatPoint  aFloatPoint;
@@ -283,7 +283,7 @@ void CGM::ImplDoClass4()
                     pPoints[ nPoints++ ] = Point( (long)aFloatPoint.X, (long)aFloatPoint.Y );
                     if ( ( nEdgeFlag & 2 ) || ( mnParaSize == mnElementSize ) )
                     {
-                        Polygon aPolygon( nPoints );
+                        tools::Polygon aPolygon( nPoints );
                         for ( sal_uInt16 i = 0; i < nPoints; i++ )
                         {
                             aPolygon.SetPoint( pPoints[ i ], i );
@@ -408,7 +408,7 @@ void CGM::ImplDoClass4()
                     {
                         Rectangle aBoundingBox( Point( (long)( aCenterPoint.X - fRadius ), long( aCenterPoint.Y - fRadius ) ),
                             Size( ( static_cast< long >( 2 * fRadius ) ), (long)( 2 * fRadius) ) );
-                        Polygon aPolygon( aBoundingBox, Point( (long)aStartingPoint.X, (long)aStartingPoint.Y ) ,Point( (long)aEndingPoint.X, (long)aEndingPoint.Y ), POLY_ARC );
+                        tools::Polygon aPolygon( aBoundingBox, Point( (long)aStartingPoint.X, (long)aStartingPoint.Y ) ,Point( (long)aEndingPoint.X, (long)aEndingPoint.Y ), POLY_ARC );
                         if ( nSwitch )
                             mpOutAct->RegPolyLine( aPolygon, true );
                         else
@@ -525,7 +525,7 @@ void CGM::ImplDoClass4()
                     Rectangle aBoundingBox(
                         Point( (long)( aCenter.X - aRadius.X ), long( aCenter.Y - aRadius.X ) ),
                         Size( static_cast< long >( 2 * aRadius.X ), (long)( 2 * aRadius.X ) ) );
-                    Polygon aPolygon( aBoundingBox,
+                    tools::Polygon aPolygon( aBoundingBox,
                         Point( (long)vector[ 0 ], (long)vector[ 1 ] ),
                         Point( (long)vector[ 2 ], (long)vector[ 3 ] ), POLY_ARC );
                     mpOutAct->RegPolyLine( aPolygon );
@@ -704,7 +704,7 @@ void CGM::ImplDoClass4()
 
                 sal_uInt16 nNumberOfPoints = sal::static_int_cast< sal_uInt16 >(( mnElementSize - pElement->nIntegerPrecision ) / ImplGetPointSize());
 
-                Polygon aPolygon( nNumberOfPoints );
+                tools::Polygon aPolygon( nNumberOfPoints );
 
                 for ( sal_uInt16 i = 0; i < nNumberOfPoints; i++)
                 {
diff --git a/filter/source/graphicfilter/icgm/outact.cxx b/filter/source/graphicfilter/icgm/outact.cxx
index aa64c22..c731fbb 100644
--- a/filter/source/graphicfilter/icgm/outact.cxx
+++ b/filter/source/graphicfilter/icgm/outact.cxx
@@ -67,7 +67,7 @@ void CGMOutAct::NewRegion()
 {
     if ( mnIndex > 2 )
     {
-        Polygon aPolygon( mnIndex, mpPoints, mpFlags );
+        tools::Polygon aPolygon( mnIndex, mpPoints, mpFlags );
         maPolyPolygon.Insert( aPolygon );
     }
     mnIndex = 0;
@@ -82,7 +82,7 @@ void CGMOutAct::EndFigure()
     mnIndex = 0;
 }
 
-void CGMOutAct::RegPolyLine( Polygon& rPolygon, bool bReverse )
+void CGMOutAct::RegPolyLine( tools::Polygon& rPolygon, bool bReverse )
 {
     sal_uInt16 nPoints = rPolygon.GetSize();
     if ( nPoints )
diff --git a/filter/source/graphicfilter/icgm/outact.hxx b/filter/source/graphicfilter/icgm/outact.hxx
index 66fc506..c38e819 100644
--- a/filter/source/graphicfilter/icgm/outact.hxx
+++ b/filter/source/graphicfilter/icgm/outact.hxx
@@ -72,7 +72,7 @@ public:
     void                        CloseRegion() ;
     void                        NewRegion() ;
     void                        EndFigure() ;
-    void                        RegPolyLine( Polygon&, bool bReverse = false ) ;
+    void                        RegPolyLine( tools::Polygon&, bool bReverse = false ) ;
     void                        SetGradientOffset( long nHorzOfs, long nVertOfs, sal_uInt32 nType );
     void                        SetGradientAngle( long nAngle );
     void                        SetGradientDescriptor( sal_uInt32 nColorFrom, sal_uInt32 nColorTo );
@@ -82,9 +82,9 @@ public:
     virtual void                DrawEllipticalArc( FloatPoint&, FloatPoint&, double&,
                                     sal_uInt32, double&, double&) {} ;
     virtual void                DrawBitmap( CGMBitmapDescriptor* ) {} ;
-    virtual void                DrawPolygon( Polygon& ) {} ;
-    virtual void                DrawPolyLine( Polygon& ) {} ;
-    virtual void                DrawPolybezier( Polygon& ) {} ;
+    virtual void                DrawPolygon( tools::Polygon& ) {} ;
+    virtual void                DrawPolyLine( tools::Polygon& ) {} ;
+    virtual void                DrawPolybezier( tools::Polygon& ) {} ;
     virtual void                DrawPolyPolygon( tools::PolyPolygon& ) {} ;
     virtual void                DrawText( ::com::sun::star::awt::Point&, ::com::sun::star::awt::Size&, char*, sal_uInt32, FinalFlag ) {} ;
     virtual void                AppendText( char*, sal_uInt32, FinalFlag ) {} ;
@@ -122,9 +122,9 @@ public:
     virtual void                DrawEllipticalArc( FloatPoint& center, FloatPoint& size, double& orientation,
                                     sal_uInt32 etype, double& startangle, double& endangle ) SAL_OVERRIDE ;
     virtual void                DrawBitmap( CGMBitmapDescriptor* ) SAL_OVERRIDE ;
-    virtual void                DrawPolygon( Polygon& ) SAL_OVERRIDE ;
-    virtual void                DrawPolyLine( Polygon& ) SAL_OVERRIDE ;
-    virtual void                DrawPolybezier( Polygon& ) SAL_OVERRIDE ;
+    virtual void                DrawPolygon( tools::Polygon& ) SAL_OVERRIDE ;
+    virtual void                DrawPolyLine( tools::Polygon& ) SAL_OVERRIDE ;
+    virtual void                DrawPolybezier( tools::Polygon& ) SAL_OVERRIDE ;
     virtual void                DrawPolyPolygon( tools::PolyPolygon& ) SAL_OVERRIDE ;
     virtual void                DrawText( ::com::sun::star::awt::Point& TextRectPos, ::com::sun::star::awt::Size& TextRectSize, char* String, sal_uInt32 StringSize, FinalFlag ) SAL_OVERRIDE ;
     virtual void                AppendText( char* String, sal_uInt32 StringSize, FinalFlag ) SAL_OVERRIDE ;
diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
index 613f76f..7ca557a 100644
--- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx
+++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx
@@ -271,7 +271,7 @@ void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTran
     else {
         double fAng;
         nPoints=OptPointsPerCircle;
-        Polygon aPoly(nPoints);
+        tools::Polygon aPoly(nPoints);
         for (i=0; i<nPoints; i++) {
             fAng=2*3.14159265359/(double)(nPoints-1)*(double)i;
             rTransform.Transform(
@@ -281,7 +281,7 @@ void DXF2GDIMetaFile::DrawCircleEntity(const DXFCircleEntity & rE, const DXFTran
         }
         pVirDev->DrawPolyLine(aPoly);
         if (rE.fThickness!=0) {
-            Polygon aPoly2(nPoints);
+            tools::Polygon aPoly2(nPoints);
             for (i=0; i<nPoints; i++) {
                 fAng=2*3.14159265359/(double)(nPoints-1)*(double)i;
                 rTransform.Transform(
@@ -335,7 +335,7 @@ void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & rE, const DXFTransform
         double fAng;
         nPoints=(sal_uInt16)(fdA/360.0*(double)OptPointsPerCircle+0.5);
         if (nPoints<2) nPoints=2;
-        Polygon aPoly(nPoints);
+        tools::Polygon aPoly(nPoints);
         for (i=0; i<nPoints; i++) {
             fAng=3.14159265359/180.0 * ( fA1 + fdA/(double)(nPoints-1)*(double)i );
             rTransform.Transform(
@@ -345,7 +345,7 @@ void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & rE, const DXFTransform
         }
         pVirDev->DrawPolyLine(aPoly);
         if (rE.fThickness!=0) {
-            Polygon aPoly2(nPoints);
+            tools::Polygon aPoly2(nPoints);
             for (i=0; i<nPoints; i++) {
                 fAng=3.14159265359/180.0 * ( fA1 + fdA/(double)(nPoints-1)*(double)i );
                 rTransform.Transform(
@@ -363,7 +363,7 @@ void DXF2GDIMetaFile::DrawArcEntity(const DXFArcEntity & rE, const DXFTransform
 void DXF2GDIMetaFile::DrawTraceEntity(const DXFTraceEntity & rE, const DXFTransform & rTransform)
 {
     if (SetLineAttribute(rE)) {
-        Polygon aPoly(4);
+        tools::Polygon aPoly(4);
         rTransform.Transform(rE.aP0,aPoly[0]);
         rTransform.Transform(rE.aP1,aPoly[1]);
         rTransform.Transform(rE.aP3,aPoly[2]);
@@ -371,7 +371,7 @@ void DXF2GDIMetaFile::DrawTraceEntity(const DXFTraceEntity & rE, const DXFTransf
         pVirDev->DrawPolygon(aPoly);
         if (rE.fThickness!=0) {
             sal_uInt16 i;
-            Polygon aPoly2(4);
+            tools::Polygon aPoly2(4);
             DXFVector aVAdd(0,0,rE.fThickness);
             rTransform.Transform(rE.aP0+aVAdd,aPoly2[0]);
             rTransform.Transform(rE.aP1+aVAdd,aPoly2[1]);
@@ -389,14 +389,14 @@ void DXF2GDIMetaFile::DrawSolidEntity(const DXFSolidEntity & rE, const DXFTransf
     if (SetAreaAttribute(rE)) {
         sal_uInt16 nN;
         if (rE.aP2==rE.aP3) nN=3; else nN=4;
-        Polygon aPoly(nN);
+        tools::Polygon aPoly(nN);
         rTransform.Transform(rE.aP0,aPoly[0]);
         rTransform.Transform(rE.aP1,aPoly[1]);
         rTransform.Transform(rE.aP3,aPoly[2]);
         if (nN>3) rTransform.Transform(rE.aP2,aPoly[3]);
         pVirDev->DrawPolygon(aPoly);
         if (rE.fThickness!=0) {
-            Polygon aPoly2(nN);
+            tools::Polygon aPoly2(nN);
             DXFVector aVAdd(0,0,rE.fThickness);
             rTransform.Transform(rE.aP0+aVAdd,aPoly2[0]);
             rTransform.Transform(rE.aP1+aVAdd,aPoly2[1]);
@@ -506,7 +506,7 @@ void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXF
         pBE=pBE->pSucc;
     }
     if (nPolySize<2) return;
-    Polygon aPoly(nPolySize);
+    tools::Polygon aPoly(nPolySize);
     fW=0.0;
     pBE=rE.pSucc;
     for (i=0; i<nPolySize; i++) {
@@ -526,7 +526,7 @@ void DXF2GDIMetaFile::DrawPolyLineEntity(const DXFPolyLineEntity & rE, const DXF
         if ((rE.nFlags&1)!=0) pVirDev->DrawPolygon(aPoly);
         else pVirDev->DrawPolyLine(aPoly);
         if (rE.fThickness!=0) {
-            Polygon aPoly2(nPolySize);
+            tools::Polygon aPoly2(nPolySize);
             pBE=rE.pSucc;
             for (i=0; i<nPolySize; i++) {
                 rTransform.Transform(
@@ -547,7 +547,7 @@ void DXF2GDIMetaFile::DrawLWPolyLineEntity(const DXFLWPolyLineEntity & rE, const
     sal_Int32 i, nPolySize = rE.nCount;
     if ( nPolySize && rE.pP )
     {
-        Polygon aPoly( (sal_uInt16)nPolySize);
+        tools::Polygon aPoly( (sal_uInt16)nPolySize);
         for ( i = 0; i < nPolySize; i++ )
         {
             rTransform.Transform( rE.pP[ (sal_uInt16)i ], aPoly[ (sal_uInt16)i ] );
@@ -611,7 +611,7 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
             sal_uInt16 i, nSize = (sal_uInt16)aPtAry.size();
             if ( nSize )
             {
-                Polygon aPoly( nSize );
+                tools::Polygon aPoly( nSize );
                 for ( i = 0; i < nSize; i++ )
                     aPoly[ i ] = aPtAry[ i ];
                 aPolyPoly.Insert( aPoly );
@@ -627,7 +627,7 @@ void DXF2GDIMetaFile::Draw3DFaceEntity(const DXF3DFaceEntity & rE, const DXFTran
     sal_uInt16 nN,i;
     if (SetLineAttribute(rE)) {
         if (rE.aP2==rE.aP3) nN=3; else nN=4;
-        Polygon aPoly(nN);
+        tools::Polygon aPoly(nN);
         rTransform.Transform(rE.aP0,aPoly[0]);
         rTransform.Transform(rE.aP1,aPoly[1]);
         rTransform.Transform(rE.aP2,aPoly[2]);
diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx
index f2e0b45..5ab71b9 100644
--- a/filter/source/graphicfilter/ios2met/ios2met.cxx
+++ b/filter/source/graphicfilter/ios2met/ios2met.cxx
@@ -373,8 +373,8 @@ private:
 
     SvStream * pOrdFile;
 
-    void AddPointsToPath(const Polygon & rPoly);
-    void AddPointsToArea(const Polygon & rPoly);
+    void AddPointsToPath(const tools::Polygon & rPoly);
+    void AddPointsToArea(const tools::Polygon & rPoly);
     void CloseFigure();
     void PushAttr(sal_uInt16 nPushOrder);
     void PopAttr();
@@ -391,8 +391,8 @@ private:
 
 
     bool    IsLineInfo();
-    void        DrawPolyLine( const Polygon& rPolygon );
-    void        DrawPolygon( const Polygon& rPolygon );
+    void        DrawPolyLine( const tools::Polygon& rPolygon );
+    void        DrawPolygon( const tools::Polygon& rPolygon );
     void        DrawPolyPolygon( const tools::PolyPolygon& rPolygon );
     sal_uInt16  ReadBigEndianWord();
     sal_uLong   ReadBigEndian3BytesLong();
@@ -463,7 +463,7 @@ bool OS2METReader::IsLineInfo()
     return ( ! ( aLineInfo.IsDefault() || ( aLineInfo.GetStyle() == LINE_NONE ) || ( pVirDev->GetLineColor() == COL_TRANSPARENT ) ) );
 }
 
-void OS2METReader::DrawPolyLine( const Polygon& rPolygon )
+void OS2METReader::DrawPolyLine( const tools::Polygon& rPolygon )
 {
     if ( aLineInfo.GetStyle() == LINE_DASH || ( aLineInfo.GetWidth() > 1 ) )
         pVirDev->DrawPolyLine( rPolygon, aLineInfo );
@@ -471,7 +471,7 @@ void OS2METReader::DrawPolyLine( const Polygon& rPolygon )
         pVirDev->DrawPolyLine( rPolygon );
 }
 
-void OS2METReader::DrawPolygon( const Polygon& rPolygon )
+void OS2METReader::DrawPolygon( const tools::Polygon& rPolygon )
 {
     if ( IsLineInfo() )
     {
@@ -500,7 +500,7 @@ void OS2METReader::DrawPolyPolygon( const tools::PolyPolygon& rPolyPolygon )
         pVirDev->DrawPolyPolygon( rPolyPolygon );
 }
 
-void OS2METReader::AddPointsToArea(const Polygon & rPoly)
+void OS2METReader::AddPointsToArea(const tools::Polygon & rPoly)
 {
     sal_uInt16 nOldSize, nNewSize,i;
 
@@ -508,7 +508,7 @@ void OS2METReader::AddPointsToArea(const Polygon & rPoly)
     tools::PolyPolygon * pPP=&(pAreaStack->aPPoly);
     if (pPP->Count()==0 || pAreaStack->bClosed) pPP->Insert(rPoly);
     else {
-        Polygon aLastPoly(pPP->GetObject(pPP->Count()-1));
+        tools::Polygon aLastPoly(pPP->GetObject(pPP->Count()-1));
         nOldSize=aLastPoly.GetSize();
         if (aLastPoly.GetPoint(nOldSize-1)==rPoly.GetPoint(0)) nOldSize--;
         nNewSize=nOldSize+rPoly.GetSize();
@@ -521,7 +521,7 @@ void OS2METReader::AddPointsToArea(const Polygon & rPoly)
     pAreaStack->bClosed=false;
 }
 
-void OS2METReader::AddPointsToPath(const Polygon & rPoly)
+void OS2METReader::AddPointsToPath(const tools::Polygon & rPoly)
 {
     sal_uInt16 nOldSize, nNewSize,i;
 
@@ -529,7 +529,7 @@ void OS2METReader::AddPointsToPath(const Polygon & rPoly)
     tools::PolyPolygon * pPP=&(pPathStack->aPPoly);
     if (pPP->Count()==0 /*|| pPathStack->bClosed==sal_True*/) pPP->Insert(rPoly);
     else {
-        Polygon aLastPoly(pPP->GetObject(pPP->Count()-1));
+        tools::Polygon aLastPoly(pPP->GetObject(pPP->Count()-1));
         nOldSize=aLastPoly.GetSize();
         if (aLastPoly.GetPoint(nOldSize-1)!=rPoly.GetPoint(0)) pPP->Insert(rPoly);
         else {
@@ -828,7 +828,7 @@ void OS2METReader::ReadLine(bool bGivenPos, sal_uInt16 nOrderLen)
     if (bCoord32) nPolySize=nOrderLen/8; else nPolySize=nOrderLen/4;
     if (!bGivenPos) nPolySize++;
     if (nPolySize==0) return;
-    Polygon aPolygon(nPolySize);
+    tools::Polygon aPolygon(nPolySize);
     for (i=0; i<nPolySize; i++) {
         if (i==0 && !bGivenPos) aPolygon.SetPoint(aAttr.aCurPos,i);
         else aPolygon.SetPoint(ReadPoint(),i);
@@ -857,7 +857,7 @@ void OS2METReader::ReadRelLine(bool bGivenPos, sal_uInt16 nOrderLen)
     else aP0=aAttr.aCurPos;
     nPolySize=nOrderLen/2;
     if (nPolySize==0) return;
-    Polygon aPolygon(nPolySize);
+    tools::Polygon aPolygon(nPolySize);
     for (i=0; i<nPolySize; i++) {
 #if defined SOLARIS && defined PPC
         sal_uInt8 nunsignedbyte;
@@ -903,9 +903,9 @@ void OS2METReader::ReadBox(bool bGivenPos)
     Rectangle aBoxRect( P0, aAttr.aCurPos );
 
     if ( pAreaStack )
-        AddPointsToArea( Polygon( aBoxRect ) );
+        AddPointsToArea( tools::Polygon( aBoxRect ) );
     else if ( pPathStack )
-        AddPointsToPath( Polygon( aBoxRect ) );
+        AddPointsToPath( tools::Polygon( aBoxRect ) );
     else
     {
         if ( nFlags & 0x20 )
@@ -926,7 +926,7 @@ void OS2METReader::ReadBox(bool bGivenPos)
 
         if ( IsLineInfo() )
         {
-            Polygon aPolygon( aBoxRect, nHRound, nVRound );
+            tools::Polygon aPolygon( aBoxRect, nHRound, nVRound );
             if ( nFlags & 0x40 )
             {
                 pVirDev->Push( PushFlags::LINECOLOR );
@@ -1024,7 +1024,7 @@ void OS2METReader::ReadChrStr(bool bGivenPos, bool bMove, bool bExtra, sal_uInt1
     }
     else
     {
-        Polygon aDummyPoly(4);
+        tools::Polygon aDummyPoly(4);
 
         aDummyPoly.SetPoint( Point( aP0.X(), aP0.Y() ), 0);                                 // TOP LEFT
         aDummyPoly.SetPoint( Point( aP0.X(), aP0.Y() - aSize.Height() ), 1);                // BOTTOM LEFT
@@ -1174,7 +1174,7 @@ void OS2METReader::ReadPartialArc(bool bGivenPos, sal_uInt16 nOrderSize)
 void OS2METReader::ReadPolygons()
 {
     tools::PolyPolygon aPolyPoly;
-    Polygon aPoly;
+    tools::Polygon aPoly;
     Point aPoint;
 
     sal_uInt8 nFlags(0);
@@ -1231,7 +1231,7 @@ void OS2METReader::ReadBezier(bool bGivenPos, sal_uInt16 nOrderLen)
     if( !nNumPoints )
         return;
 
-    Polygon aPolygon( nNumPoints );
+    tools::Polygon aPolygon( nNumPoints );
 
     for( i=0; i < nNumPoints; i++ )
     {
@@ -1244,16 +1244,16 @@ void OS2METReader::ReadBezier(bool bGivenPos, sal_uInt16 nOrderLen)
     if( !( nNumPoints % 4 ) )
     {
         // create bezier polygon
-        const sal_uInt16    nSegPoints = 25;
-        const sal_uInt16    nSegments = aPolygon.GetSize() >> 2;
-        Polygon         aBezPoly( nSegments * nSegPoints );
+        const sal_uInt16 nSegPoints = 25;
+        const sal_uInt16 nSegments = aPolygon.GetSize() >> 2;
+        tools::Polygon aBezPoly( nSegments * nSegPoints );
 
         sal_uInt16 nSeg, nBezPos, nStartPos;
         for( nSeg = 0, nBezPos = 0, nStartPos = 0; nSeg < nSegments; nSeg++, nStartPos += 4 )
         {
-            const Polygon aSegPoly( aPolygon[ nStartPos ], aPolygon[ nStartPos + 1 ],
-                                    aPolygon[ nStartPos + 3 ], aPolygon[ nStartPos + 2 ],
-                                    nSegPoints );
+            const tools::Polygon aSegPoly( aPolygon[ nStartPos ], aPolygon[ nStartPos + 1 ],
+                                           aPolygon[ nStartPos + 3 ], aPolygon[ nStartPos + 2 ],
+                                           nSegPoints );
 
             for( sal_uInt16 nSegPos = 0; nSegPos < nSegPoints; )
                 aBezPoly[ nBezPos++ ] = aSegPoly[ nSegPos++ ];
@@ -1288,7 +1288,7 @@ void OS2METReader::ReadFillet(bool bGivenPos, sal_uInt16 nOrderLen)
     if (bCoord32) nNumPoints=nOrderLen/8; else nNumPoints=nOrderLen/4;
     if (!bGivenPos) nNumPoints++;
     if (nNumPoints==0) return;
-    Polygon aPolygon(nNumPoints);
+    tools::Polygon aPolygon(nNumPoints);
     for (i=0; i<nNumPoints; i++) {
         if (i==0 && !bGivenPos) aPolygon.SetPoint(aAttr.aCurPos,i);
         else aPolygon.SetPoint(ReadPoint(),i);
@@ -1313,7 +1313,7 @@ void OS2METReader::ReadFilletSharp(bool bGivenPos, sal_uInt16 nOrderLen)
     }
     if (bCoord32) nNumPoints=1+nOrderLen/10;
     else nNumPoints=1+nOrderLen/6;
-    Polygon aPolygon(nNumPoints);
+    tools::Polygon aPolygon(nNumPoints);
     aPolygon.SetPoint(aAttr.aCurPos,0);
     for (i=1; i<nNumPoints; i++) aPolygon.SetPoint(ReadPoint(),i);
     aAttr.aCurPos=aPolygon.GetPoint(nNumPoints-1);
@@ -1355,7 +1355,7 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen)
                 break;
             case  3:   // DIAMOND
             case  7: { // SOLIDDIAMOND
-                Polygon aPoly(4);
+                tools::Polygon aPoly(4);
                 aPoly.SetPoint(Point(x,y+4),0);
                 aPoly.SetPoint(Point(x+4,y),1);
                 aPoly.SetPoint(Point(x,y-4),2);
@@ -1365,7 +1365,7 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen)
             }
             case  4:   // SQARE
             case  8: { // SOLIDSUARE
-                Polygon aPoly(4);
+                tools::Polygon aPoly(4);
                 aPoly.SetPoint(Point(x+4,y+4),0);
                 aPoly.SetPoint(Point(x+4,y-4),1);
                 aPoly.SetPoint(Point(x-4,y-4),2);
@@ -1374,7 +1374,7 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen)
                 break;
             }
             case  5: { // SIXPOINTSTAR
-                Polygon aPoly(12);
+                tools::Polygon aPoly(12);
                 aPoly.SetPoint(Point(x  ,y-4),0);
                 aPoly.SetPoint(Point(x+2,y-2),1);
                 aPoly.SetPoint(Point(x+4,y-2),2);
@@ -1391,7 +1391,7 @@ void OS2METReader::ReadMarker(bool bGivenPos, sal_uInt16 nOrderLen)
                 break;
             }
             case  6: { // EIGHTPOINTSTAR
-                Polygon aPoly(16);
+                tools::Polygon aPoly(16);
                 aPoly.SetPoint(Point(x  ,y-4),0);
                 aPoly.SetPoint(Point(x+1,y-2),1);
                 aPoly.SetPoint(Point(x+3,y-3),2);
diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx
index 327b7aa0..8518410 100644
--- a/filter/source/graphicfilter/ipict/ipict.cxx
+++ b/filter/source/graphicfilter/ipict/ipict.cxx
@@ -186,7 +186,7 @@ private:
 
     void ReadRectangle(Rectangle & rRect);
 
-    sal_uLong ReadPolygon(Polygon & rPoly);
+    sal_uLong ReadPolygon(tools::Polygon & rPoly);
 
     sal_uLong ReadPixPattern(Pattern &pattern);
 
@@ -202,7 +202,7 @@ private:
     sal_uLong ReadAndDrawOval(PictDrawingMethod eMethod);
     sal_uLong ReadAndDrawSameOval(PictDrawingMethod eMethod);
 
-    Polygon aLastPolygon;
+    tools::Polygon aLastPolygon;
     sal_uLong ReadAndDrawPolygon(PictDrawingMethod eMethod);
     sal_uLong ReadAndDrawSamePolygon(PictDrawingMethod eMethod);
 
@@ -459,7 +459,7 @@ void PictReader::ReadRectangle(Rectangle & rRect)
 }
 
 
-sal_uLong PictReader::ReadPolygon(Polygon & rPoly)
+sal_uLong PictReader::ReadPolygon(tools::Polygon & rPoly)
 {
     sal_uInt16 nSize,i;
     sal_uLong nDataSize;
diff --git a/filter/source/graphicfilter/ipict/shape.cxx b/filter/source/graphicfilter/ipict/shape.cxx
index b13cb8a..5aca6d47 100644
--- a/filter/source/graphicfilter/ipict/shape.cxx
+++ b/filter/source/graphicfilter/ipict/shape.cxx
@@ -216,7 +216,7 @@ namespace PictReaderShape {
   }
 
   //--------------------  draws a polygon --------------------
-  void drawPolygon(VirtualDevice *dev, bool drawFrame, Polygon const &orig, Size const &pSize) {
+void drawPolygon(VirtualDevice *dev, bool drawFrame, tools::Polygon const &orig, Size const &pSize) {
     int penSize=(pSize.Width()+pSize.Height())/2;
     long decalTL[2] = {0, 0}, decalBR[2] = { pSize.Width(), pSize.Height()};
     if (drawFrame) {
diff --git a/filter/source/graphicfilter/ipict/shape.hxx b/filter/source/graphicfilter/ipict/shape.hxx
index 0c4d899..1264df4 100644
--- a/filter/source/graphicfilter/ipict/shape.hxx
+++ b/filter/source/graphicfilter/ipict/shape.hxx
@@ -36,7 +36,7 @@ namespace PictReaderShape {
   void drawRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &rect, Size const &pSize);
 
   /** draws a polygon knowing penSize */
-  void drawPolygon(VirtualDevice *dev, bool drawFrame, Polygon const &rect, Size const &pSize);
+void drawPolygon(VirtualDevice *dev, bool drawFrame, tools::Polygon const &rect, Size const &pSize);
 
   /** draws an ellipse knowing penSize */
   void drawEllipse(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &pSize);
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index e9636bf..5d01ec6 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1794,7 +1794,7 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st
 {
     bool bNoError = true;
 
-    Polygon aPolygon;
+    tools::Polygon aPolygon;
     tools::PolyPolygon aPolyPolygon;
 
     if ( rAny.getValueType() == cppu::UnoType<com::sun::star::drawing::PolyPolygonBezierCoords>::get())
@@ -1829,7 +1829,7 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st
                     if ( pArray && pFlags )
                     {
                         nInnerSequenceCount = (sal_uInt16)pInnerSequence->getLength();
-                        aPolygon = Polygon( nInnerSequenceCount );
+                        aPolygon = tools::Polygon( nInnerSequenceCount );
                         for( b = 0; b < nInnerSequenceCount; b++)
                         {
                             css::drawing::PolygonFlags ePolyFlags = *pFlags++;
@@ -1872,7 +1872,7 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st
                     if ( pArray != NULL )
                     {
                         nInnerSequenceCount = (sal_uInt16)pInnerSequence->getLength();
-                        aPolygon = Polygon( nInnerSequenceCount );
+                        aPolygon = tools::Polygon( nInnerSequenceCount );
                         for( b = 0; b < nInnerSequenceCount; b++)
                         {
                             aPolygon[ b ] = Point( pArray->X, pArray->Y );
@@ -1899,7 +1899,7 @@ tools::PolyPolygon EscherPropertyContainer::GetPolyPolygon( const ::com::sun::st
             if ( pArray != NULL )
             {
                 nInnerSequenceCount = (sal_uInt16)pInnerSequence->getLength();
-                aPolygon = Polygon( nInnerSequenceCount );
+                aPolygon = tools::Polygon( nInnerSequenceCount );
                 for( a = 0; a < nInnerSequenceCount; a++)
                 {
                     aPolygon[ a ] = Point( pArray->X, pArray->Y );
@@ -1917,7 +1917,7 @@ bool EscherPropertyContainer::CreatePolygonProperties(
           sal_uInt32 nFlags,
           bool bBezier,
           ::com::sun::star::awt::Rectangle& rGeoRect,
-          Polygon* pPolygon )
+    tools::Polygon* pPolygon )
 {
     static const char sPolyPolygonBezier [] = "PolyPolygonBezier";
     static const char sPolyPolygon       [] = "PolyPolygon";
@@ -1946,7 +1946,7 @@ bool EscherPropertyContainer::CreatePolygonProperties(
         {
             if ( ( aPolyPolygon.Count() == 1 ) && ( aPolyPolygon[ 0 ].GetSize() == 2 ) )
             {
-                const Polygon& rPoly = aPolyPolygon[ 0 ];
+                const tools::Polygon& rPoly = aPolyPolygon[ 0 ];
                 rGeoRect = ::com::sun::star::awt::Rectangle(
                     rPoly[ 0 ].X(),
                         rPoly[ 0 ].Y(),
@@ -1958,7 +1958,7 @@ bool EscherPropertyContainer::CreatePolygonProperties(
         }
         else
         {
-            Polygon aPolygon;
+            tools::Polygon aPolygon;
 
             sal_uInt16 nPolyCount = aPolyPolygon.Count();
             sal_uInt32 nTotalPoints(0), nTotalBezPoints(0);
@@ -2166,7 +2166,7 @@ void lcl_Rotate(sal_Int32 nAngle, Point center, Point& pt)
 Generally, draw the connector from top to bottom, from left to right when meet the adjust value,
 but when (X1>X2 or Y1>Y2),the draw director must be reverse, FlipV or FlipH should be set to true.
 */
-bool lcl_GetAngle(Polygon &rPoly,sal_uInt16& rShapeFlags,sal_Int32& nAngle )
+bool lcl_GetAngle(tools::Polygon &rPoly,sal_uInt16& rShapeFlags,sal_Int32& nAngle )
 {
     Point aStart = rPoly[0];
     Point aEnd = rPoly[rPoly.GetSize()-1];
@@ -2288,7 +2288,7 @@ bool EscherPropertyContainer::CreateConnectorProperties(
                                     if ( EscherPropertyValueHelper::GetPropertyValue( aAny, aXPropSet, sEdgePath ) )
                                     {
                                         tools::PolyPolygon aPolyPolygon = GetPolyPolygon( aAny );
-                                        Polygon aPoly;
+                                        tools::Polygon aPoly;
                                         if ( aPolyPolygon.Count() > 0 )
                                         {
                                             AddOpt( ESCHER_Prop_cxstyle, ESCHER_cxstyleBent );
@@ -4499,7 +4499,7 @@ struct EscherShapeListEntry
                                         n_EscherId  ( nId ) {}
 };
 
-sal_uInt32 EscherConnectorListEntry::GetClosestPoint( const Polygon& rPoly, const ::com::sun::star::awt::Point& rPoint )
+sal_uInt32 EscherConnectorListEntry::GetClosestPoint( const tools::Polygon& rPoly, const ::com::sun::star::awt::Point& rPoint )
 {
     sal_uInt16 nCount = rPoly.GetSize();
     sal_uInt16 nClosest = nCount;
@@ -4670,7 +4670,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
                     const SdrGluePointList* pList = pCustoShape->GetGluePointList();
                     if ( pList )
                     {
-                        Polygon aPoly;
+                        tools::Polygon aPoly;
                         sal_uInt16 nNum, nAnz = pList->GetCount();
                         if ( nAnz )
                         {
@@ -4699,7 +4699,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
 
                         for ( a = 0; a < aPolyPoly.Count(); a++ )
                         {
-                            const Polygon& rPoly = aPolyPoly.GetObject( a );
+                            const tools::Polygon& rPoly = aPolyPoly.GetObject( a );
                             for ( b = 0; b < rPoly.GetSize(); b++ )
                             {
                                 if ( rPoly.GetFlags( b ) != POLY_NORMAL )
@@ -4725,9 +4725,9 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
             ::com::sun::star::awt::Point aPoint( aXShape->getPosition() );
             ::com::sun::star::awt::Size  aSize( aXShape->getSize() );
 
-            Rectangle   aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) );
-            Point       aCenter( aRect.Center() );
-            Polygon     aPoly( 4 );
+            Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) );
+            Point aCenter( aRect.Center() );
+            tools::Polygon aPoly( 4 );
 
             aPoly[ 0 ] = Point( aCenter.X(), aRect.Top() );
             aPoly[ 1 ] = Point( aRect.Left(), aCenter.Y() );
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index 6e0fc27..60db0e5 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -393,7 +393,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
                 aStart.Y() += aCenter.Y();
                 aEnd.X() += aCenter.X();
                 aEnd.Y() += aCenter.Y();
-                Polygon aPolygon( rRect, aStart, aEnd, ePolyKind );
+                tools::Polygon aPolygon( rRect, aStart, aEnd, ePolyKind );
                 if( rObj.GetAngle() )
                 {
                     aPolygon.Rotate( rRect.TopLeft(), (sal_uInt16)( rObj.GetAngle() / 10 ) );
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 60018e8..aebe275 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -539,7 +539,7 @@ void SvxMSDffManager::SolveSolver( const SvxMSDffSolverContainer& rSolver )
                                                 sal_uInt32  nPointCount = 0;
                                                 for ( k = 0; bNotFound && ( k < nPolySize ); k++ )
                                                 {
-                                                    const Polygon& rPolygon = aPolyPoly.GetObject( k );
+                                                    const tools::Polygon& rPolygon = aPolyPoly.GetObject( k );
                                                     for ( j = 0; bNotFound && ( j < rPolygon.GetSize() ); j++ )
                                                     {
                                                         PolyFlags eFlags = rPolygon.GetFlags( j );
@@ -5381,7 +5381,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
             }
             if (bOk)
             {
-                pTextImpRec->pWrapPolygon = new Polygon(nNumElemVert);
+                pTextImpRec->pWrapPolygon = new tools::Polygon(nNumElemVert);
                 for (sal_uInt16 i = 0; i < nNumElemVert; ++i)
                 {
                     sal_Int32 nX(0), nY(0);
@@ -7353,7 +7353,7 @@ SvxMSDffImportRec::SvxMSDffImportRec(const SvxMSDffImportRec& rCopy)
         pClientDataBuffer = 0;
 
     if (rCopy.pWrapPolygon)
-        pWrapPolygon = new Polygon(*rCopy.pWrapPolygon);
+        pWrapPolygon = new tools::Polygon(*rCopy.pWrapPolygon);
     else
         pWrapPolygon = 0;
 }
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index abd5634..ce0e03b 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -172,12 +172,12 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
         ( rGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL ||
           rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL ) )
     {
-        SvXMLElementExport  aDesc( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, true, true );
-        Color               aStartColor( rGradient.GetStartColor() ), aEndColor( rGradient.GetEndColor() );
-        sal_uInt16          nAngle = rGradient.GetAngle() % 3600;
-        Point               aObjRectCenter( rObjRect.Center() );
-        Polygon             aPoly( rObjRect );
-        static sal_Int32    nCurGradientId = 1;
+        SvXMLElementExport aDesc( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, true, true );
+        Color aStartColor( rGradient.GetStartColor() ), aEndColor( rGradient.GetEndColor() );
+        sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
+        Point aObjRectCenter( rObjRect.Center() );
+        tools::Polygon aPoly( rObjRect );
+        static sal_Int32 nCurGradientId = 1;
 
         aPoly.Rotate( aObjRectCenter, nAngle );
         Rectangle aRect( aPoly.GetBoundRect() );
@@ -200,7 +200,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
 
             if( rGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL )
             {
-                Polygon aLinePoly( 2 );
+                tools::Polygon aLinePoly( 2 );
 
                 aLinePoly[ 0 ] = Point( aObjRectCenter.X(), aRect.Top() );
                 aLinePoly[ 1 ] = Point( aObjRectCenter.X(), aRect.Bottom() );
@@ -1687,9 +1687,9 @@ Rectangle& SVGActionWriter::ImplMap( const Rectangle& rRect, Rectangle& rDstRect
     return( rDstRect = Rectangle( ImplMap( aTL, aTL ), ImplMap( aSz, aSz ) ) );
 }
 
-Polygon& SVGActionWriter::ImplMap( const Polygon& rPoly, Polygon& rDstPoly ) const
+tools::Polygon& SVGActionWriter::ImplMap( const tools::Polygon& rPoly, tools::Polygon& rDstPoly ) const
 {
-    rDstPoly = Polygon( rPoly.GetSize() );
+    rDstPoly = tools::Polygon( rPoly.GetSize() );
 
     for( sal_uInt16 i = 0, nSize = rPoly.GetSize(); i < nSize; ++i )
     {
@@ -1702,7 +1702,7 @@ Polygon& SVGActionWriter::ImplMap( const Polygon& rPoly, Polygon& rDstPoly ) con
 
 tools::PolyPolygon& SVGActionWriter::ImplMap( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rDstPolyPoly ) const
 {
-    Polygon aPoly;
+    tools::Polygon aPoly;
 
     rDstPolyPoly = tools::PolyPolygon();
 
@@ -1723,7 +1723,7 @@ OUString SVGActionWriter::GetPathString( const tools::PolyPolygon& rPolyPoly, bo
 
     for( long i = 0, nCount = rPolyPoly.Count(); i < nCount; i++ )
     {
-        const Polygon&  rPoly = rPolyPoly[ (sal_uInt16) i ];
+        const tools::Polygon&  rPoly = rPolyPoly[ (sal_uInt16) i ];
         sal_uInt16 n = 1, nSize = rPoly.GetSize();
 
         if( nSize > 1 )
@@ -2124,7 +2124,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo
                 ImplMap( aTmpCenter, aCenter );
                 const sal_uInt16 nAngle = rGradient.GetAngle() % 3600;
 
-                Polygon aPoly( 2 );
+                tools::Polygon aPoly( 2 );
                 // Setting x value of a gradient vector to rotation center to
                 // place a gradient vector in a target polygon.
                 // This would help editing it in SVG editors like inkscape.
@@ -2555,7 +2555,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
     {
         if( rFont.GetStrikeout() != STRIKEOUT_NONE || rFont.GetUnderline() != UNDERLINE_NONE )
         {
-            Polygon     aPoly( 4 );
+            tools::Polygon aPoly( 4 );
             const long  nLineHeight = std::max( (long) FRound( aMetric.GetLineHeight() * 0.05 ), (long) 1 );
 
             if( rFont.GetStrikeout() )
@@ -2799,28 +2799,28 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
             {
                 if( nWriteFlags & SVGWRITER_WRITE_FILL )
                 {
-                    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;
 
@@ -2843,8 +2843,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
             {
                 if( nWriteFlags & SVGWRITER_WRITE_FILL )
                 {
-                    const MetaPolyLineAction*   pA = static_cast<const MetaPolyLineAction*>(pAction);
-                    const Polygon&              rPoly = pA->GetPolygon();
+                    const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction);
+                    const tools::Polygon& rPoly = pA->GetPolygon();
 
                     if( rPoly.GetSize() )
                     {
@@ -2876,9 +2876,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
             {
                 if( nWriteFlags & SVGWRITER_WRITE_FILL )
                 {
-                    const MetaGradientAction*   pA = static_cast<const MetaGradientAction*>(pAction);
-                    const Polygon               aRectPoly( pA->GetRect() );
-                    const tools::PolyPolygon           aRectPolyPoly( aRectPoly );
+                    const MetaGradientAction* pA = static_cast<const MetaGradientAction*>(pAction);
+                    const tools::Polygon aRectPoly( pA->GetRect() );
+                    const tools::PolyPolygon aRectPolyPoly( aRectPoly );
 
                     ImplWriteGradientEx( aRectPolyPoly, pA->GetGradient(), nWriteFlags );
                 }
@@ -2910,7 +2910,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
                 if( nWriteFlags & SVGWRITER_WRITE_FILL )
                 {
                     const MetaTransparentAction*    pA = static_cast<const MetaTransparentAction*>(pAction);
-                    const tools::PolyPolygon&              rPolyPoly = pA->GetPolyPolygon();
+                    const tools::PolyPolygon& rPolyPoly = pA->GetPolyPolygon();
 
                     if( rPolyPoly.Count() )
                     {
@@ -3077,9 +3077,9 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
                          ( nWriteFlags & SVGWRITER_WRITE_FILL ) && !( nWriteFlags & SVGWRITER_NO_SHAPE_COMMENTS ) &&
                          pA->GetDataSize() )
                 {
-                    SvMemoryStream      aMemStm( const_cast<sal_uInt8 *>(pA->GetData()), pA->GetDataSize(), StreamMode::READ );
-                    SvtGraphicStroke    aStroke;
-                    tools::PolyPolygon         aStartArrow, aEndArrow;
+                    SvMemoryStream aMemStm( const_cast<sal_uInt8 *>(pA->GetData()), pA->GetDataSize(), StreamMode::READ );
+                    SvtGraphicStroke aStroke;
+                    tools::PolyPolygon aStartArrow, aEndArrow;
 
                     ReadSvtGraphicStroke( aMemStm, aStroke );
                     aStroke.getStartArrow( aStartArrow );
@@ -3087,7 +3087,7 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
 
                     // Currently no support for strokes with start/end arrow(s)
                     // added that support
-                    Polygon aPoly;
+                    tools::Polygon aPoly;
 
                     aStroke.getPath(aPoly);
 
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index 33828a7..928aad0ea 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -125,7 +125,7 @@ public:
 
 struct SVGShapeDescriptor
 {
-    tools::PolyPolygon                 maShapePolyPoly;
+    tools::PolyPolygon          maShapePolyPoly;
     Color                       maShapeFillColor;
     Color                       maShapeLineColor;
     sal_Int32                   mnStrokeWidth;
@@ -320,8 +320,8 @@ private:
     Point&                  ImplMap( const Point& rPt, Point& rDstPt ) const;
     Size&                   ImplMap( const Size& rSz, Size& rDstSz ) const;
     Rectangle&              ImplMap( const Rectangle& rRect, Rectangle& rDstRect ) const;
-    Polygon&                ImplMap( const Polygon& rPoly, Polygon& rDstPoly ) const;
-    tools::PolyPolygon&            ImplMap( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rDstPolyPoly ) const;
+    tools::Polygon&         ImplMap( const tools::Polygon& rPoly, tools::Polygon& rDstPoly ) const;
+    tools::PolyPolygon&     ImplMap( const tools::PolyPolygon& rPolyPoly, tools::PolyPolygon& rDstPolyPoly ) const;
 
     void                    ImplWriteLine( const Point& rPt1, const Point& rPt2, const Color* pLineColor = NULL,
                                            bool bApplyMapping = true );
diff --git a/include/basegfx/polygon/b3dpolygon.hxx b/include/basegfx/polygon/b3dpolygon.hxx
index 8e29d3a..486c132 100644
--- a/include/basegfx/polygon/b3dpolygon.hxx
+++ b/include/basegfx/polygon/b3dpolygon.hxx
@@ -46,7 +46,7 @@ namespace basegfx
 
     private:
         // internal data.
-        ImplType                                    mpPolygon;
+        ImplType mpPolygon;
 
     public:
         B3DPolygon();
diff --git a/include/cppcanvas/vclfactory.hxx b/include/cppcanvas/vclfactory.hxx
index ef0777f..76b1269 100644
--- a/include/cppcanvas/vclfactory.hxx
+++ b/include/cppcanvas/vclfactory.hxx
@@ -33,8 +33,10 @@
 namespace vcl { class Window; }
 class Bitmap;
 class BitmapEx;
-class Polygon;
-namespace tools { class PolyPolygon; }
+namespace tools {
+    class Polygon;
+    class PolyPolygon;
+}
 class Size;
 class Graphic;
 class GDIMetaFile;
diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx
index 5acd233..4f390f5 100644
--- a/include/filter/msfilter/escherex.hxx
+++ b/include/filter/msfilter/escherex.hxx
@@ -590,7 +590,7 @@ struct MSFILTER_DLLPUBLIC EscherConnectorListEntry
                                             maPointB    ( rPB ),
                                             mXConnectToB( rSB ) {}
 
-    static sal_uInt32 GetClosestPoint( const Polygon& rPoly, const ::com::sun::star::awt::Point& rP );
+                    static sal_uInt32 GetClosestPoint( const tools::Polygon& rPoly, const ::com::sun::star::awt::Point& rP );
 };
 
 struct MSFILTER_DLLPUBLIC EscherExContainer
@@ -885,7 +885,7 @@ public:
                     sal_uInt32 nFlags,
                     bool bBezier,
                     ::com::sun::star::awt::Rectangle& rGeoRect,
-                    Polygon* pPolygon = NULL
+                    tools::Polygon* pPolygon = NULL
                 );
 
     static sal_uInt32 GetGradientColor(
diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx
index 6108ab2..5c256e8 100644
--- a/include/filter/msfilter/msdffimp.hxx
+++ b/include/filter/msfilter/msdffimp.hxx
@@ -48,8 +48,10 @@ class SotStorage;
 class SvStream;
 class SdrObject;
 class SdrOle2Obj;
-class Polygon;
-namespace tools { class PolyPolygon; }
+namespace tools {
+    class Polygon;
+    class PolyPolygon;
+}
 class FmFormModel;
 class SdrModel;
 class SwFlyFrameFormat;
@@ -212,7 +214,7 @@ struct MSFILTER_DLLPUBLIC SvxMSDffImportRec
     static const int RELTO_DEFAULT = 2;
 
     SdrObject*      pObj;
-    Polygon*        pWrapPolygon;
+    tools::Polygon* pWrapPolygon;
     char*           pClientAnchorBuffer;
     sal_uInt32      nClientAnchorLen;
     char*           pClientDataBuffer;
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 4f9b8d8..def0fd1 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -45,8 +45,10 @@ class SdPage;
 class SdrPage;
 class SdrObject;
 class SvStream;
-class Polygon;
-namespace tools { class PolyPolygon; }
+namespace tools {
+    class Polygon;
+    class PolyPolygon;
+}
 class SfxItemSet;
 class Outliner;
 class Graphic;
diff --git a/include/postmac.h b/include/postmac.h
index a0cc11b..0b846a9 100644
--- a/include/postmac.h
+++ b/include/postmac.h
@@ -19,7 +19,6 @@
 
 #undef Line
 #undef Point
-#undef Polygon
 #undef Size
 #undef TimeValue
 
diff --git a/include/postwin.h b/include/postwin.h
index b9ad4cf..769d2e6 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -19,7 +19,6 @@
 
 /* not protected, do only include once! */
 
-#undef Polygon
 #undef Rectangle
 #undef DELETE
 #undef OPTIONAL
@@ -79,8 +78,6 @@
 extern "C"
 {
 BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
-BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt );
-BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/premac.h b/include/premac.h
index f22c193..8bcf683 100644
--- a/include/premac.h
+++ b/include/premac.h
@@ -19,7 +19,6 @@
 
 #define Line MacOSLine
 #define Point MacOSPoint
-#define Polygon MacOSPolygon
 #define Size MacOSSize
 #define TimeValue MacOSTimeValue
 
diff --git a/include/prewin.h b/include/prewin.h
index 3ec0312..24dd693 100644
--- a/include/prewin.h
+++ b/include/prewin.h
@@ -22,7 +22,6 @@
 #if defined WNT
 
 #define Rectangle    BLA_Rectangle
-#define Polygon      BLA_Polygon
 #define Folder       WIN_Folder
 #define GradientStyle_RECT  WIN_GradientStyle_RECT
 
diff --git a/include/svtools/imappoly.hxx b/include/svtools/imappoly.hxx
index 547b386..0c6ee47 100644
--- a/include/svtools/imappoly.hxx
+++ b/include/svtools/imappoly.hxx
@@ -28,11 +28,11 @@ class Fraction;
 
 class SVT_DLLPUBLIC IMapPolygonObject : public IMapObject
 {
-    Polygon             aPoly;
+    tools::Polygon aPoly;
     Rectangle           aEllipse;
     bool                bEllipse;
 
-    SVT_DLLPRIVATE void             ImpConstruct( const Polygon& rPoly, bool bPixel );
+    SVT_DLLPRIVATE void ImpConstruct( const tools::Polygon& rPoly, bool bPixel );
 
 protected:
 
@@ -42,7 +42,7 @@ protected:
 
 public:
                         IMapPolygonObject() : bEllipse(false) {}
-                        IMapPolygonObject( const Polygon& rPoly,
+                        IMapPolygonObject( const tools::Polygon& rPoly,
                                            const OUString& rURL,
                                            const OUString& rAltText,
                                            const OUString& rDesc,
@@ -55,7 +55,7 @@ public:
     virtual sal_uInt16      GetType() const SAL_OVERRIDE;
     virtual bool        IsHit( const Point& rPoint ) const SAL_OVERRIDE;
 
-    Polygon             GetPolygon( bool bPixelCoords = true ) const;
+    tools::Polygon      GetPolygon( bool bPixelCoords = true ) const;
 
     bool                HasExtraEllipse() const { return bEllipse; }
     const Rectangle&    GetExtraEllipse() const { return aEllipse; }
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx
index 87908e1..4a3ffd2 100644
--- a/include/svtools/ruler.hxx
+++ b/include/svtools/ruler.hxx
@@ -673,7 +673,7 @@ private:
     SVT_DLLPRIVATE void ImplDrawBorders(vcl::RenderContext& rRenderContext,
                                         long nMin, long nMax, long nVirTop, long nVirBottom);
     SVT_DLLPRIVATE void ImplDrawIndent(vcl::RenderContext& rRenderContext,
-                                       const Polygon& rPoly, sal_uInt16 nStyle, bool bIsHit = false);
+                                       const tools::Polygon& rPoly, sal_uInt16 nStyle, bool bIsHit = false);

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list