summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--canvas/source/directx/dx_winstuff.hxx2
-rw-r--r--canvas/source/vcl/canvashelper.cxx2
-rw-r--r--canvas/source/vcl/canvashelper_texturefill.cxx12
-rw-r--r--canvas/source/vcl/impltools.cxx2
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx20
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLine.cxx2
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx20
-rw-r--r--drawinglayer/source/processor2d/vclpixelprocessor2d.cxx2
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--editeng/source/items/svxfont.cxx2
-rw-r--r--editeng/source/misc/txtrange.cxx6
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx10
-rw-r--r--filter/source/flash/swfwriter.cxx8
-rw-r--r--filter/source/flash/swfwriter.hxx8
-rw-r--r--filter/source/flash/swfwriter1.cxx46
-rw-r--r--filter/source/flash/swfwriter2.cxx2
-rw-r--r--filter/source/graphicfilter/eos2met/eos2met.cxx20
-rw-r--r--filter/source/graphicfilter/epict/epict.cxx30
-rw-r--r--filter/source/graphicfilter/eps/eps.cxx26
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx8
-rw-r--r--filter/source/graphicfilter/icgm/class4.cxx16
-rw-r--r--filter/source/graphicfilter/icgm/outact.cxx4
-rw-r--r--filter/source/graphicfilter/icgm/outact.hxx14
-rw-r--r--filter/source/graphicfilter/idxf/dxf2mtf.cxx26
-rw-r--r--filter/source/graphicfilter/ios2met/ios2met.cxx60
-rw-r--r--filter/source/graphicfilter/ipict/ipict.cxx6
-rw-r--r--filter/source/graphicfilter/ipict/shape.cxx2
-rw-r--r--filter/source/graphicfilter/ipict/shape.hxx2
-rw-r--r--filter/source/msfilter/escherex.cxx30
-rw-r--r--filter/source/msfilter/eschesdo.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx6
-rw-r--r--filter/source/svg/svgwriter.cxx54
-rw-r--r--filter/source/svg/svgwriter.hxx6
-rw-r--r--include/basegfx/polygon/b3dpolygon.hxx2
-rw-r--r--include/cppcanvas/vclfactory.hxx6
-rw-r--r--include/filter/msfilter/escherex.hxx4
-rw-r--r--include/filter/msfilter/msdffimp.hxx8
-rw-r--r--include/filter/msfilter/svdfppt.hxx6
-rw-r--r--include/postmac.h1
-rw-r--r--include/postwin.h3
-rw-r--r--include/premac.h1
-rw-r--r--include/prewin.h1
-rw-r--r--include/svtools/imappoly.hxx8
-rw-r--r--include/svtools/ruler.hxx2
-rw-r--r--include/svx/svdocapt.hxx14
-rw-r--r--include/svx/svdtrans.hxx14
-rw-r--r--include/svx/xoutbmp.hxx10
-rw-r--r--include/svx/xpoly.hxx8
-rw-r--r--include/toolkit/helper/vclunohelper.hxx2
-rw-r--r--include/tools/poly.hxx35
-rw-r--r--include/vcl/canvastools.hxx6
-rw-r--r--include/vcl/gdimtf.hxx8
-rw-r--r--include/vcl/graphictools.hxx16
-rw-r--r--include/vcl/metaact.hxx14
-rw-r--r--include/vcl/outdev.hxx28
-rw-r--r--include/vcl/pdfwriter.hxx14
-rw-r--r--include/vcl/region.hxx10
-rw-r--r--include/vcl/window.hxx2
-rw-r--r--oox/source/export/drawingml.cxx2
-rw-r--r--oox/source/export/shapes.cxx2
-rw-r--r--reportdesign/source/ui/report/EndMarker.cxx4
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx4
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx2
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx2
-rw-r--r--sc/source/ui/view/output.cxx16
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx7
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx2
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx2
-rw-r--r--sfx2/source/control/templateabstractview.cxx4
-rw-r--r--sfx2/source/control/templatecontaineritem.cxx18
-rw-r--r--sfx2/source/control/templateviewitem.cxx12
-rw-r--r--sfx2/source/control/thumbnailview.cxx7
-rw-r--r--sfx2/source/control/thumbnailviewitem.cxx12
-rw-r--r--starmath/inc/node.hxx4
-rw-r--r--svtools/source/contnr/imivctl1.cxx2
-rw-r--r--svtools/source/control/ruler.cxx4
-rw-r--r--svtools/source/control/tabbar.cxx4
-rw-r--r--svtools/source/graphic/grfcache.cxx2
-rw-r--r--svtools/source/graphic/grfmgr.cxx8
-rw-r--r--svtools/source/graphic/grfmgr2.cxx8
-rw-r--r--svtools/source/misc/imap.cxx10
-rw-r--r--svtools/source/misc/imap2.cxx11
-rw-r--r--svtools/source/svhtml/htmlout.cxx2
-rw-r--r--svtools/source/toolpanel/toolpaneldrawer.cxx2
-rw-r--r--svtools/source/uno/unoimap.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx2
-rw-r--r--svx/source/customshapes/EnhancedCustomShape3d.cxx4
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx21
-rw-r--r--svx/source/dialog/_contdlg.cxx6
-rw-r--r--svx/source/dialog/framelink.cxx4
-rw-r--r--svx/source/dialog/frmsel.cxx10
-rw-r--r--svx/source/dialog/imapwnd.cxx14
-rw-r--r--svx/source/inc/frmselimpl.hxx2
-rw-r--r--svx/source/svdraw/svdoashp.cxx10
-rw-r--r--svx/source/svdraw/svdocapt.cxx16
-rw-r--r--svx/source/svdraw/svdotext.cxx6
-rw-r--r--svx/source/svdraw/svdotxtr.cxx10
-rw-r--r--svx/source/svdraw/svdpoev.cxx4
-rw-r--r--svx/source/svdraw/svdtrans.cxx14
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx2
-rw-r--r--svx/source/unodraw/unoshap2.cxx14
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx9
-rw-r--r--svx/source/xoutdev/_xpoly.cxx6
-rw-r--r--sw/source/core/docnode/ndnotxt.cxx9
-rw-r--r--sw/source/core/layout/fly.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx12
-rw-r--r--sw/source/core/unocore/unoframe.cxx4
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx10
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx4
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx2
-rw-r--r--test/source/mtfxmldump.cxx4
-rw-r--r--toolkit/source/helper/vclunohelper.cxx5
-rw-r--r--tools/inc/poly.h4
-rw-r--r--tools/source/generic/poly.cxx468
-rw-r--r--tools/source/generic/poly2.cxx46
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx2
-rw-r--r--vcl/inc/openglgdiimpl.hxx2
-rw-r--r--vcl/opengl/gdiimpl.cxx6
-rw-r--r--vcl/source/control/button.cxx6
-rw-r--r--vcl/source/filter/sgvmain.cxx8
-rw-r--r--vcl/source/filter/sgvspln.cxx4
-rw-r--r--vcl/source/filter/sgvspln.hxx4
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx28
-rw-r--r--vcl/source/filter/wmf/emfwr.hxx4
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx14
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx42
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx34
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx6
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx20
-rw-r--r--vcl/source/filter/wmf/wmfwr.hxx4
-rw-r--r--vcl/source/gdi/bitmap.cxx2
-rw-r--r--vcl/source/gdi/cvtsvm.cxx30
-rw-r--r--vcl/source/gdi/gdimetafiletools.cxx38
-rw-r--r--vcl/source/gdi/gdimtf.cxx32
-rw-r--r--vcl/source/gdi/graphictools.cxx6
-rw-r--r--vcl/source/gdi/impvect.cxx39
-rw-r--r--vcl/source/gdi/metaact.cxx22
-rw-r--r--vcl/source/gdi/pdfwriter.cxx8
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx20
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx10
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx6
-rw-r--r--vcl/source/gdi/print2.cxx32
-rw-r--r--vcl/source/gdi/region.cxx16
-rw-r--r--vcl/source/outdev/curvedshapes.cxx8
-rw-r--r--vcl/source/outdev/font.cxx22
-rw-r--r--vcl/source/outdev/gradient.cxx22
-rw-r--r--vcl/source/outdev/hatch.cxx2
-rw-r--r--vcl/source/outdev/line.cxx4
-rw-r--r--vcl/source/outdev/map.cxx30
-rw-r--r--vcl/source/outdev/pixel.cxx4
-rw-r--r--vcl/source/outdev/polygon.cxx18
-rw-r--r--vcl/source/outdev/polyline.cxx20
-rw-r--r--vcl/source/outdev/rect.cxx6
-rw-r--r--vcl/source/outdev/text.cxx10
-rw-r--r--vcl/source/outdev/textline.cxx2
-rw-r--r--vcl/source/outdev/transparent.cxx6
-rw-r--r--vcl/source/window/cursor.cxx4
-rw-r--r--vcl/source/window/paint.cxx4
-rw-r--r--vcl/source/window/split.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx2
-rw-r--r--vcl/source/window/window.cxx4
-rw-r--r--vcl/source/window/window2.cxx4
-rw-r--r--vcl/win/source/gdi/gdiimpl.cxx14
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx2
-rw-r--r--vcl/win/source/gdi/wntgdi.cxx15
-rw-r--r--vcl/workben/outdevgrind.cxx24
-rw-r--r--vcl/workben/vcldemo.cxx12
174 files changed, 1136 insertions, 1130 deletions
diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index 67cf1461f215..5ffd3abb6771 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 73e09487253b..a671520ac5a3 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 7e5828314850..e87a26b217a0 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 fe80ea4dbe28..e930b9ff0b3b 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 54358fb23c6b..c536b7f4731e 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 cdd075cac678..f53be6ff5d76 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 09bc2cc99247..564c6e83a86b 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 e6a12cda3399..22d3c61d22cd 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 825e203116ce..9aa861dc3f41 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 3b651644fd45..209480c79105 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 a2501865bcfa..1a040606494c 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 b78163908c2f..be6191ed7445 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 03d8b21e155d..d2ce4062dca8 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 9f80ca9afaeb..c705cab74981 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 76d25d8ed24a..19e5235ad0cf 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 c321ec05bc55..c51072753963 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 28e8426b3962..f13c63dbae85 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 dac76c9efd06..35561956899b 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 1237e233d176..6807e84f6a48 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 bcbb526d109d..489ff7d3c50f 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 d643c0a1f25d..9f1bed809c41 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 0523ada023ba..8d59f4eeb08c 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 aa64c220308d..c731fbb40815 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 66fc50659447..c38e8196267c 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 613f76f5053f..7ca557a00893 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 f2e0b45ba96c..5ab71b9ce375 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 327b7aa0e6d2..85184104dd26 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 b13cb8aa8f1b..5aca6d47dba8 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 0c4d8995e4d8..1264df4f4b01 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 e9636bfec6b9..5d01ec6b62c2 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 6e0fc27809f5..60db0e529882 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 60018e8c807b..aebe275c41a0 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 abd56349748e..ce0e03bd2d2a 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 33828a7b87d9..928aad0ea132 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 8e29d3a63a69..486c1321fee8 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 ef0777f89a08..76b1269dff90 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 5acd2335b57b..4f390f5a73be 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 6108ab22703e..5c256e8af544 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 4f9b8d8137ae..def0fd11b936 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 a0cc11b34e8d..0b846a93aec3 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 b9ad4cfceea6..769d2e68cbe1 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 f22c1935706d..8bcf6833dc12 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 3ec0312aa222..24dd693254c2 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 547b3866958a..0c6ee47198fc 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 87908e1d8711..4a3ffd2f3148 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);
SVT_DLLPRIVATE void ImplDrawIndents(vcl::RenderContext& rRenderContext,
long nMin, long nMax, long nVirTop, long nVirBottom);
SVT_DLLPRIVATE void ImplDrawTab(vcl::RenderContext& rRenderContext, const Point& rPos, sal_uInt16 nStyle);
diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx
index e7e372866280..07549de5edc9 100644
--- a/include/svx/svdocapt.hxx
+++ b/include/svx/svdocapt.hxx
@@ -41,7 +41,7 @@ namespace sdr { namespace properties {
class SdrCaptObjGeoData : public SdrTextObjGeoData
{
public:
- Polygon aTailPoly;
+ tools::Polygon aTailPoly;
};
@@ -60,18 +60,18 @@ protected:
virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() SAL_OVERRIDE;
private:
- Polygon aTailPoly; // the whole tail polygon
+ tools::Polygon aTailPoly; // the whole tail polygon
bool mbSpecialTextBoxShadow; // for calc special shadow, default FALSE
bool mbFixedTail; // for calc note box fixed tail, default FALSE
Point maFixedTailPos; // for calc note box fixed tail position.
private:
SVX_DLLPRIVATE void ImpGetCaptParams(ImpCaptParams& rPara) const;
- SVX_DLLPRIVATE void ImpCalcTail1(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
- SVX_DLLPRIVATE void ImpCalcTail2(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
- SVX_DLLPRIVATE void ImpCalcTail3(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
- SVX_DLLPRIVATE void ImpCalcTail4(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
- SVX_DLLPRIVATE void ImpCalcTail (const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const;
+ SVX_DLLPRIVATE void ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const;
+ SVX_DLLPRIVATE void ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const;
+ SVX_DLLPRIVATE void ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const;
+ SVX_DLLPRIVATE void ImpCalcTail4(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const;
+ SVX_DLLPRIVATE void ImpCalcTail (const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const;
SVX_DLLPRIVATE void ImpRecalcTail();
public:
diff --git a/include/svx/svdtrans.hxx b/include/svx/svdtrans.hxx
index a3a85e5c0620..7d6c515ed2fb 100644
--- a/include/svx/svdtrans.hxx
+++ b/include/svx/svdtrans.hxx
@@ -54,26 +54,26 @@ inline long Round(double a) { return a>0.0 ? (long)(a+0.5) : -(long)((-a)+0.5);
inline void MoveRect(Rectangle& rRect, const Size& S) { rRect.Move(S.Width(),S.Height()); }
inline void MovePoint(Point& rPnt, const Size& S) { rPnt.X()+=S.Width(); rPnt.Y()+=S.Height(); }
-inline void MovePoly(Polygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); }
+inline void MovePoly(tools::Polygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); }
inline void MovePoly(tools::PolyPolygon& rPoly, const Size& S) { rPoly.Move(S.Width(),S.Height()); }
void MoveXPoly(XPolygon& rPoly, const Size& S);
SVX_DLLPUBLIC void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bNoJustify = false);
inline void ResizePoint(Point& rPnt, const Point& rRef, Fraction xFact, Fraction yFact);
-void ResizePoly(Polygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact);
+void ResizePoly(tools::Polygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact);
void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact);
inline void RotatePoint(Point& rPnt, const Point& rRef, double sn, double cs);
-SVX_DLLPUBLIC void RotatePoly(Polygon& rPoly, const Point& rRef, double sn, double cs);
+SVX_DLLPUBLIC void RotatePoly(tools::Polygon& rPoly, const Point& rRef, double sn, double cs);
void RotateXPoly(XPolygon& rPoly, const Point& rRef, double sn, double cs);
void RotateXPoly(XPolyPolygon& rPoly, const Point& rRef, double sn, double cs);
void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2);
-void MirrorPoly(Polygon& rPoly, const Point& rRef1, const Point& rRef2);
+void MirrorPoly(tools::Polygon& rPoly, const Point& rRef1, const Point& rRef2);
void MirrorXPoly(XPolygon& rPoly, const Point& rRef1, const Point& rRef2);
inline void ShearPoint(Point& rPnt, const Point& rRef, double tn, bool bVShear = false);
-SVX_DLLPUBLIC void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, bool bVShear = false);
+SVX_DLLPUBLIC void ShearPoly(tools::Polygon& rPoly, const Point& rRef, double tn, bool bVShear = false);
void ShearXPoly(XPolygon& rPoly, const Point& rRef, double tn, bool bVShear = false);
/**
@@ -239,8 +239,8 @@ public:
void RecalcTan();
};
-Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo);
-void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo);
+tools::Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo);
+void Poly2Rect(const tools::Polygon& rPol, Rectangle& rRect, GeoStat& rGeo);
SVX_DLLPUBLIC void OrthoDistance8(const Point& rPt0, Point& rPt, bool bBigOrtho);
SVX_DLLPUBLIC void OrthoDistance4(const Point& rPt0, Point& rPt, bool bBigOrtho);
diff --git a/include/svx/xoutbmp.hxx b/include/svx/xoutbmp.hxx
index 25ba5e48c90d..34e03c3f9cc0 100644
--- a/include/svx/xoutbmp.hxx
+++ b/include/svx/xoutbmp.hxx
@@ -41,7 +41,9 @@
class GraphicFilter;
class VirtualDevice;
class INetURLObject;
-class Polygon;
+namespace tools {
+ class Polygon;
+}
class SVX_DLLPUBLIC XOutBitmap
{
@@ -62,9 +64,9 @@ public:
static Bitmap DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold );
- static Polygon GetCountour( const Bitmap& rBmp, const sal_uIntPtr nContourFlags,
- const sal_uInt8 cEdgeDetectThreshold = 50,
- const Rectangle* pWorkRect = NULL );
+ static tools::Polygon GetCountour( const Bitmap& rBmp, const sal_uIntPtr nContourFlags,
+ const sal_uInt8 cEdgeDetectThreshold = 50,
+ const Rectangle* pWorkRect = NULL );
};
SVX_DLLPUBLIC bool DitherBitmap( Bitmap& rBitmap );
diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx
index 499cdc4d62b6..9d96d40a5cec 100644
--- a/include/svx/xpoly.hxx
+++ b/include/svx/xpoly.hxx
@@ -25,8 +25,10 @@
class Point;
class Rectangle;
class SvStream;
-class Polygon;
-namespace tools { class PolyPolygon; }
+namespace tools {
+ class Polygon;
+ class PolyPolygon;
+}
class OutputDevice;
#define XPOLYPOLY_APPEND 0xFFFF
@@ -63,7 +65,7 @@ protected:
public:
XPolygon( sal_uInt16 nSize=16, sal_uInt16 nResize=16 );
XPolygon( const XPolygon& rXPoly );
- XPolygon( const Polygon& rPoly );
+ XPolygon( const tools::Polygon& rPoly );
XPolygon( const Rectangle& rRect, long nRx = 0, long nRy = 0 );
XPolygon( const Point& rCenter, long nRx, long nRy,
sal_uInt16 nStartAngle = 0, sal_uInt16 nEndAngle = 3600,
diff --git a/include/toolkit/helper/vclunohelper.hxx b/include/toolkit/helper/vclunohelper.hxx
index c902e5c9155c..0b3e944be19b 100644
--- a/include/toolkit/helper/vclunohelper.hxx
+++ b/include/toolkit/helper/vclunohelper.hxx
@@ -93,7 +93,7 @@ public:
static vcl::Region GetRegion( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XRegion >& rxRegion );
// Polygon
- static Polygon CreatePolygon( const ::com::sun::star::uno::Sequence< sal_Int32 >& DataX, const ::com::sun::star::uno::Sequence< sal_Int32 >& DataY );
+ static tools::Polygon CreatePolygon( const ::com::sun::star::uno::Sequence< sal_Int32 >& DataX, const ::com::sun::star::uno::Sequence< sal_Int32 >& DataY );
/** convert Font to ::com::sun::star::awt::FontDescriptor
@param rFont Font to be converted
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index ad8ff402426d..83381beded4f 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -88,6 +88,8 @@ namespace basegfx
class B2DPolyPolygon;
}
+namespace tools {
+
class TOOLS_DLLPUBLIC SAL_WARN_UNUSED Polygon
{
private:
@@ -96,7 +98,7 @@ private:
TOOLS_DLLPRIVATE inline void ImplMakeUnique();
public:
- static void ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 nPercent );
+ static void ImplReduceEdges( tools::Polygon& rPoly, const double& rArea, sal_uInt16 nPercent );
void ImplRead( SvStream& rIStream );
void ImplWrite( SvStream& rOStream ) const;
@@ -119,7 +121,7 @@ public:
const Point& rBezPt2, const Point& rCtrlPt2,
sal_uInt16 nPoints = 0 );
- Polygon( const Polygon& rPoly );
+ Polygon( const tools::Polygon& rPoly );
~Polygon();
void SetPoint( const Point& rPt, sal_uInt16 nPos );
@@ -162,7 +164,7 @@ public:
the original polygon is guaranteed to be smaller than one
pixel.
*/
- void AdaptiveSubdivide( Polygon& rResult, const double d = 1.0 ) const;
+ void AdaptiveSubdivide( tools::Polygon& rResult, const double d = 1.0 ) const;
static Polygon SubdivideBezier( const Polygon& rPoly );
void Move( long nHorzMove, long nVertMove );
@@ -172,21 +174,21 @@ public:
void Rotate( const Point& rCenter, sal_uInt16 nAngle10 );
void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags = POLY_NORMAL );
- void Insert( sal_uInt16 nPos, const Polygon& rPoly );
+ void Insert( sal_uInt16 nPos, const tools::Polygon& rPoly );
const Point& operator[]( sal_uInt16 nPos ) const { return GetPoint( nPos ); }
Point& operator[]( sal_uInt16 nPos );
- Polygon& operator=( const Polygon& rPoly );
- bool operator==( const Polygon& rPoly ) const;
- bool operator!=( const Polygon& rPoly ) const
+ tools::Polygon& operator=( const tools::Polygon& rPoly );
+ bool operator==( const tools::Polygon& rPoly ) const;
+ bool operator!=( const tools::Polygon& rPoly ) const
{ return !(Polygon::operator==( rPoly )); }
- bool IsEqual( const Polygon& rPoly ) const;
+ bool IsEqual( const tools::Polygon& rPoly ) const;
// streaming a Polygon does ignore PolyFlags, so use the Write Or Read
// method to take care of PolyFlags
- TOOLS_DLLPUBLIC friend SvStream& ReadPolygon( SvStream& rIStream, Polygon& rPoly );
- TOOLS_DLLPUBLIC friend SvStream& WritePolygon( SvStream& rOStream, const Polygon& rPoly );
+ TOOLS_DLLPUBLIC friend SvStream& ReadPolygon( SvStream& rIStream, tools::Polygon& rPoly );
+ TOOLS_DLLPUBLIC friend SvStream& WritePolygon( SvStream& rOStream, const tools::Polygon& rPoly );
void Read( SvStream& rIStream );
void Write( SvStream& rOStream ) const;
@@ -202,7 +204,6 @@ public:
explicit Polygon(const ::basegfx::B2DPolygon& rPolygon);
};
-namespace tools {
class TOOLS_DLLPUBLIC SAL_WARN_UNUSED PolyPolygon
{
@@ -213,14 +214,14 @@ private:
public:
PolyPolygon( sal_uInt16 nInitSize = 16, sal_uInt16 nResize = 16 );
- PolyPolygon( const Polygon& rPoly );
+ PolyPolygon( const tools::Polygon& rPoly );
PolyPolygon( const tools::PolyPolygon& rPolyPoly );
~PolyPolygon();
- void Insert( const Polygon& rPoly, sal_uInt16 nPos = POLYPOLY_APPEND );
+ void Insert( const tools::Polygon& rPoly, sal_uInt16 nPos = POLYPOLY_APPEND );
void Remove( sal_uInt16 nPos );
void Replace( const Polygon& rPoly, sal_uInt16 nPos );
- const Polygon& GetObject( sal_uInt16 nPos ) const;
+ const tools::Polygon& GetObject( sal_uInt16 nPos ) const;
bool IsRect() const;
@@ -261,10 +262,10 @@ public:
void Rotate( const Point& rCenter, double fSin, double fCos );
void Rotate( const Point& rCenter, sal_uInt16 nAngle10 );
- const Polygon& operator[]( sal_uInt16 nPos ) const { return GetObject( nPos ); }
- Polygon& operator[]( sal_uInt16 nPos );
+ const tools::Polygon& operator[]( sal_uInt16 nPos ) const { return GetObject( nPos ); }
+ tools::Polygon& operator[]( sal_uInt16 nPos );
- tools::PolyPolygon& operator=( const tools::PolyPolygon& rPolyPoly );
+ tools::PolyPolygon& operator=( const tools::PolyPolygon& rPolyPoly );
bool operator==( const tools::PolyPolygon& rPolyPoly ) const;
bool operator!=( const tools::PolyPolygon& rPolyPoly ) const
{ return !(PolyPolygon::operator==( rPolyPoly )); }
diff --git a/include/vcl/canvastools.hxx b/include/vcl/canvastools.hxx
index 08b5b6dba648..96e8ee08301d 100644
--- a/include/vcl/canvastools.hxx
+++ b/include/vcl/canvastools.hxx
@@ -30,8 +30,10 @@
class Point;
class Size;
class Rectangle;
-class Polygon;
-namespace tools { class PolyPolygon; }
+namespace tools {
+ class Polygon;
+ class PolyPolygon;
+}
class Bitmap;
class BitmapEx;
class Color;
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 4a50b6514c81..197d795fa122 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -34,8 +34,10 @@ class MetaCommentAction;
class SvStream;
class Color;
class BitmapEx;
-class Polygon;
-namespace tools { class PolyPolygon; }
+namespace tools {
+ class Polygon;
+ class PolyPolygon;
+}
class Gradient;
@@ -93,7 +95,7 @@ private:
SAL_DLLPRIVATE Point ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos );
- SAL_DLLPRIVATE Polygon ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
+ SAL_DLLPRIVATE tools::Polygon ImplGetRotatedPolygon( const tools::Polygon& rPoly, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos );
SAL_DLLPRIVATE tools::PolyPolygon ImplGetRotatedPolyPolygon( const tools::PolyPolygon& rPoly, const Point& rRotatePt,
const Size& rOffset, double fSin, double fCos );
diff --git a/include/vcl/graphictools.hxx b/include/vcl/graphictools.hxx
index ace82ffa545b..8bcb6710560a 100644
--- a/include/vcl/graphictools.hxx
+++ b/include/vcl/graphictools.hxx
@@ -82,9 +82,9 @@ public:
See accessor method descriptions for argument description
*/
- SvtGraphicStroke( const Polygon& rPath,
- const tools::PolyPolygon& rStartArrow,
- const tools::PolyPolygon& rEndArrow,
+ SvtGraphicStroke( const tools::Polygon& rPath,
+ const tools::PolyPolygon& rStartArrow,
+ const tools::PolyPolygon& rEndArrow,
double fTransparency,
double fStrokeWidth,
CapType aCap,
@@ -94,7 +94,7 @@ public:
// accessors
/// Query path to stroke
- void getPath ( Polygon& ) const;
+ void getPath ( tools::Polygon& ) const;
/** Get the polygon that is put at the start of the line
The polygon is in a special normalized position: the center of
@@ -141,7 +141,7 @@ public:
// mutators
/// Set path to stroke
- void setPath ( const Polygon& );
+ void setPath ( const tools::Polygon& );
/** Set the polygon that is put at the start of the line
The polygon has to be in a special normalized position, and
@@ -178,9 +178,9 @@ private:
VCL_DLLPUBLIC friend SvStream& WriteSvtGraphicStroke( SvStream& rOStm, const SvtGraphicStroke& rClass );
VCL_DLLPUBLIC friend SvStream& ReadSvtGraphicStroke( SvStream& rIStm, SvtGraphicStroke& rClass );
- Polygon maPath;
- tools::PolyPolygon maStartArrow;
- tools::PolyPolygon maEndArrow;
+ tools::Polygon maPath;
+ tools::PolyPolygon maStartArrow;
+ tools::PolyPolygon maEndArrow;
double mfTransparency;
double mfStrokeWidth;
CapType maCapType;
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 2f1f5cecd5d0..84ac05cef8b7 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -338,7 +338,7 @@ class VCL_DLLPUBLIC MetaPolyLineAction : public MetaAction
private:
LineInfo maLineInfo;
- Polygon maPoly;
+ tools::Polygon maPoly;
public:
MetaPolyLineAction();
@@ -350,13 +350,13 @@ public:
virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
- explicit MetaPolyLineAction( const Polygon& );
- explicit MetaPolyLineAction( const Polygon&, const LineInfo& );
+ explicit MetaPolyLineAction( const tools::Polygon& );
+ explicit MetaPolyLineAction( const tools::Polygon&, const LineInfo& );
virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
- const Polygon& GetPolygon() const { return maPoly; }
+ const tools::Polygon& GetPolygon() const { return maPoly; }
const LineInfo& GetLineInfo() const { return maLineInfo; }
};
@@ -364,7 +364,7 @@ class VCL_DLLPUBLIC MetaPolygonAction : public MetaAction
{
private:
- Polygon maPoly;
+ tools::Polygon maPoly;
public:
MetaPolygonAction();
@@ -376,12 +376,12 @@ public:
virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ) SAL_OVERRIDE;
virtual void Read( SvStream& rIStm, ImplMetaReadData* pData ) SAL_OVERRIDE;
- explicit MetaPolygonAction( const Polygon& );
+ explicit MetaPolygonAction( const tools::Polygon& );
virtual void Move( long nHorzMove, long nVertMove ) SAL_OVERRIDE;
virtual void Scale( double fScaleX, double fScaleY ) SAL_OVERRIDE;
- const Polygon& GetPolygon() const { return maPoly; }
+ const tools::Polygon& GetPolygon() const { return maPoly; }
};
class VCL_DLLPUBLIC MetaPolyPolygonAction : public MetaAction
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 3eb6300898d2..339c10ab00f6 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -737,8 +737,8 @@ public:
void DrawPixel( const Point& rPt );
void DrawPixel( const Point& rPt, const Color& rColor );
- void DrawPixel( const Polygon& rPts, const Color* pColors = NULL );
- void DrawPixel( const Polygon& rPts, const Color& rColor );
+ void DrawPixel( const tools::Polygon& rPts, const Color* pColors = NULL );
+ void DrawPixel( const tools::Polygon& rPts, const Color& rColor );
Color GetPixel( const Point& rPt ) const;
///@}
@@ -771,7 +771,7 @@ public:
///@{
public:
void Invert( const Rectangle& rRect, InvertFlags nFlags = InvertFlags::NONE );
- void Invert( const Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
+ void Invert( const tools::Polygon& rPoly, InvertFlags nFlags = InvertFlags::NONE );
///@}
/** @name Line functions
@@ -807,7 +807,7 @@ public:
@see DrawPolygon
@see DrawPolyPolygon
*/
- void DrawPolyLine( const Polygon& rPoly );
+ void DrawPolyLine( const tools::Polygon& rPoly );
void DrawPolyLine(
const basegfx::B2DPolygon&,
@@ -825,7 +825,7 @@ public:
@see DrawPolygon
@see DrawPolyPolygon
*/
- void DrawPolyLine( const Polygon& rPoly,
+ void DrawPolyLine( const tools::Polygon& rPoly,
const LineInfo& rLineInfo );
// #i101491#
@@ -842,7 +842,7 @@ private:
// #i101491#
// Helper which holds the old line geometry creation and is extended to use AA when
// switched on. Advantage is that line geometry is only temporarily used for paint
- SAL_DLLPRIVATE void drawPolyLine(const Polygon& rPoly, const LineInfo& rLineInfo);
+ SAL_DLLPRIVATE void drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo);
///@}
@@ -863,7 +863,7 @@ public:
@see DrawPolyLine
*/
- void DrawPolygon( const Polygon& rPoly );
+ void DrawPolygon( const tools::Polygon& rPoly );
void DrawPolygon( const basegfx::B2DPolygon& );
/** Render the given poly-polygon
@@ -881,7 +881,7 @@ public:
private:
- SAL_DLLPRIVATE void ImplDrawPolygon( const Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = NULL );
+ SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = NULL );
SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly = NULL );
SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolygon& rPolyPoly );
// #i101491#
@@ -1725,17 +1725,17 @@ public:
Point LogicToPixel( const Point& rLogicPt ) const;
Size LogicToPixel( const Size& rLogicSize ) const;
Rectangle LogicToPixel( const Rectangle& rLogicRect ) const;
- Polygon LogicToPixel( const Polygon& rLogicPoly ) const;
+ tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly ) const;
tools::PolyPolygon LogicToPixel( const tools::PolyPolygon& rLogicPolyPoly ) const;
basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly ) const;
- vcl::Region LogicToPixel( const vcl::Region& rLogicRegion )const;
+ vcl::Region LogicToPixel( const vcl::Region& rLogicRegion )const;
Point LogicToPixel( const Point& rLogicPt,
const MapMode& rMapMode ) const;
Size LogicToPixel( const Size& rLogicSize,
const MapMode& rMapMode ) const;
Rectangle LogicToPixel( const Rectangle& rLogicRect,
const MapMode& rMapMode ) const;
- Polygon LogicToPixel( const Polygon& rLogicPoly,
+ tools::Polygon LogicToPixel( const tools::Polygon& rLogicPoly,
const MapMode& rMapMode ) const;
basegfx::B2DPolyPolygon LogicToPixel( const basegfx::B2DPolyPolygon& rLogicPolyPoly,
const MapMode& rMapMode ) const;
@@ -1743,7 +1743,7 @@ public:
Point PixelToLogic( const Point& rDevicePt ) const;
Size PixelToLogic( const Size& rDeviceSize ) const;
Rectangle PixelToLogic( const Rectangle& rDeviceRect ) const;
- Polygon PixelToLogic( const Polygon& rDevicePoly ) const;
+ tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly ) const;
tools::PolyPolygon PixelToLogic( const tools::PolyPolygon& rDevicePolyPoly ) const;
basegfx::B2DPolyPolygon PixelToLogic( const basegfx::B2DPolyPolygon& rDevicePolyPoly ) const;
vcl::Region PixelToLogic( const vcl::Region& rDeviceRegion ) const;
@@ -1753,7 +1753,7 @@ public:
const MapMode& rMapMode ) const;
Rectangle PixelToLogic( const Rectangle& rDeviceRect,
const MapMode& rMapMode ) const;
- Polygon PixelToLogic( const Polygon& rDevicePoly,
+ tools::Polygon PixelToLogic( const tools::Polygon& rDevicePoly,
const MapMode& rMapMode ) const;
basegfx::B2DPolygon PixelToLogic( const basegfx::B2DPolygon& rDevicePoly,
const MapMode& rMapMode ) const;
@@ -1923,7 +1923,7 @@ private:
@returns Polygon based on physical device pixel coordinates and units.
*/
- SAL_DLLPRIVATE Polygon ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const;
+ SAL_DLLPRIVATE tools::Polygon ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const;
/** Convert a logical polypolygon to a polypolygon in physical device pixel units.
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 927b6075fc8b..2a72f9357b75 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -45,9 +45,11 @@ class Point;
class OutputDevice;
class GDIMetaFile;
class MapMode;
-class Polygon;
class LineInfo;
-namespace tools { class PolyPolygon; }
+namespace tools {
+ class Polygon;
+ class PolyPolygon;
+}
class Bitmap;
class BitmapEx;
class Image;
@@ -789,11 +791,11 @@ The following structure describes the permissions used in PDF security
void DrawLine( const Point& rStartPt, const Point& rEndPt );
void DrawLine( const Point& rStartPt, const Point& rEndPt,
const LineInfo& rLineInfo );
- void DrawPolyLine( const Polygon& rPoly );
- void DrawPolyLine( const Polygon& rPoly,
+ void DrawPolyLine( const tools::Polygon& rPoly );
+ void DrawPolyLine( const tools::Polygon& rPoly,
const LineInfo& rLineInfo );
- void DrawPolyLine( const Polygon& rPoly, const ExtLineInfo& rInfo );
- void DrawPolygon( const Polygon& rPoly );
+ void DrawPolyLine( const tools::Polygon& rPoly, const ExtLineInfo& rInfo );
+ void DrawPolygon( const tools::Polygon& rPoly );
void DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
void DrawRect( const Rectangle& rRect );
void DrawRect( const Rectangle& rRect,
diff --git a/include/vcl/region.hxx b/include/vcl/region.hxx
index 4cbca18af40b..c169a615422c 100644
--- a/include/vcl/region.hxx
+++ b/include/vcl/region.hxx
@@ -27,8 +27,12 @@
class ImplRegionBand;
class RegionBand;
-class Polygon;
-namespace tools { class PolyPolygon; }
+
+namespace tools {
+ class Polygon;
+ class PolyPolygon;
+}
+
namespace vcl { class Window; }
class OutputDevice;
class Bitmap;
@@ -66,7 +70,7 @@ public:
explicit Region(bool bIsNull = false); // default creates empty region, with true a null region is created
explicit Region(const Rectangle& rRect);
- explicit Region(const Polygon& rPolygon);
+ explicit Region(const tools::Polygon& rPolygon);
explicit Region(const tools::PolyPolygon& rPolyPoly);
explicit Region(const basegfx::B2DPolyPolygon&);
Region(const vcl::Region& rRegion);
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index d67b8984e23f..a105bddcdc44 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1239,7 +1239,7 @@ public:
void HideTracking();
void InvertTracking( const Rectangle& rRect,
sal_uInt16 nFlags = SHOWTRACK_SMALL );
- void InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags = 0 );
+ void InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags = 0 );
void StartTracking( StartTrackingFlags nFlags = StartTrackingFlags::NONE );
void EndTracking( TrackingEventFlags nFlags = TrackingEventFlags::NONE );
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 01d5cd00ac27..fc48faead30a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2451,7 +2451,7 @@ void DrawingML::WritePolyPolygon( const tools::PolyPolygon& rPolyPolygon )
for( sal_uInt16 i = 0; i < rPolyPolygon.Count(); i ++ )
{
- const Polygon& rPoly = rPolyPolygon[ i ];
+ const tools::Polygon& rPoly = rPolyPolygon[ i ];
Rectangle aRect( rPoly.GetBoundRect() );
mpFS->startElementNS( XML_a, XML_path,
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index f9072e4b7278..7c60a2837157 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -802,7 +802,7 @@ ShapeExport& ShapeExport::WriteLineShape( Reference< XShape > xShape )
tools::PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon( xShape );
if( aPolyPolygon.Count() == 1 && aPolyPolygon[ 0 ].GetSize() == 2)
{
- const Polygon& rPoly = aPolyPolygon[ 0 ];
+ const tools::Polygon& rPoly = aPolyPolygon[ 0 ];
bFlipH = ( rPoly[ 0 ].X() > rPoly[ 1 ].X() );
bFlipV = ( rPoly[ 0 ].Y() > rPoly[ 1 ].Y() );
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx
index a16d89b5b10c..0be8a7341d36 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -53,7 +53,7 @@ void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rR
aSize.Width() += nCornerSpace;
Rectangle aWholeRect(Point(-nCornerSpace,0),aSize);
tools::PolyPolygon aPoly;
- aPoly.Insert(Polygon(aWholeRect,nCornerSpace,nCornerSpace));
+ aPoly.Insert( tools::Polygon(aWholeRect,nCornerSpace,nCornerSpace));
Color aStartColor(m_nColor);
aStartColor.IncreaseLuminance(10);
@@ -73,7 +73,7 @@ void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rR
Size(aSize.Width() - nCornerSpace,
aSize.Height() - nCornerSpace - nCornerSpace));
ColorChanger aColors(this, COL_WHITE, COL_WHITE);
- rRenderContext.DrawPolyLine(Polygon(PixelToLogic(aRect)), LineInfo(LINE_SOLID, 2));
+ rRenderContext.DrawPolyLine( tools::Polygon(PixelToLogic(aRect)), LineInfo(LINE_SOLID, 2));
}
}
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index dc2b4fe8f744..4dde6f5fb5d1 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -127,7 +127,7 @@ void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*
{
const ColorChanger aColors(&rRenderContext, m_nTextBoundaries, m_nColor);
tools::PolyPolygon aPoly;
- aPoly.Insert(Polygon(aWholeRect,nCornerWidth,nCornerWidth));
+ aPoly.Insert( tools::Polygon(aWholeRect,nCornerWidth,nCornerWidth));
Color aStartColor(m_nColor);
aStartColor.IncreaseLuminance(10);
@@ -149,7 +149,7 @@ void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*
Size(aSize.Width() - nCornerWidth - nCornerWidth,
aSize.Height() - nCornerHeight - nCornerHeight));
ColorChanger aColors(&rRenderContext, COL_WHITE, COL_WHITE);
- rRenderContext.DrawPolyLine(Polygon(rRenderContext.PixelToLogic(aRect)),
+ rRenderContext.DrawPolyLine( tools::Polygon(rRenderContext.PixelToLogic(aRect)),
LineInfo(LINE_SOLID, 2));
}
}
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index f020024a99ac..a2375a03a838 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -187,7 +187,7 @@ void ScDPFieldButton::drawPopupButton()
Size aArrowSize(4 * nScaleFactor, 2 * nScaleFactor);
- Polygon aPoly(3);
+ tools::Polygon aPoly(3);
aPoly.SetPoint(Point(aCenter.X() - aArrowSize.Width(), aCenter.Y() - aArrowSize.Height()), 0);
aPoly.SetPoint(Point(aCenter.X() + aArrowSize.Width(), aCenter.Y() - aArrowSize.Height()), 1);
aPoly.SetPoint(Point(aCenter.X(), aCenter.Y() + aArrowSize.Height()), 2);
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 71301e0e4b9a..ad921b7e54cc 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1247,7 +1247,7 @@ void ScCsvGrid::ImplDrawColumnSelection( sal_uInt32 nColIndex )
{
// use transparent active color
mpGridDev->SetFillColor( maSelectColor );
- mpGridDev->DrawTransparent( tools::PolyPolygon( Polygon( aRect ) ), CSV_HDR_TRANSPARENCY );
+ mpGridDev->DrawTransparent( tools::PolyPolygon( tools::Polygon( aRect ) ), CSV_HDR_TRANSPARENCY );
}
// column selection
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index f4378baa6898..f1432c4fdf0e 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1675,7 +1675,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext, const Co
// don't cover the cell contents.
if ( rThisRowInfo.bChanged )
{
- Polygon aPoly( 4, aPoints );
+ tools::Polygon aPoly( 4, aPoints );
// for DrawPolygon, whitout Pen one pixel is left out
// to the right and below...
@@ -1690,7 +1690,7 @@ void ScOutputData::DrawRotatedFrame(vcl::RenderContext& rRenderContext, const Co
}
else
{
- Polygon aPoly( 4, aPoints );
+ tools::Polygon aPoly( 4, aPoints );
const Color* pColor = pInfo->pColorScale.get();
// for DrawPolygon, whitout Pen one pixel is left out
@@ -1946,14 +1946,14 @@ bool ScOutputData::SetChangedClip()
}
else if (bHad)
{
- aPoly.Insert( Polygon( mpDev->PixelToLogic(aDrawingRect) ) );
+ aPoly.Insert( tools::Polygon( mpDev->PixelToLogic(aDrawingRect) ) );
bHad = false;
}
nPosY += pRowInfo[nArrY].nHeight;
}
if (bHad)
- aPoly.Insert( Polygon( mpDev->PixelToLogic(aDrawingRect) ) );
+ aPoly.Insert( tools::Polygon( mpDev->PixelToLogic(aDrawingRect) ) );
bool bRet = (aPoly.Count() != 0);
if (bRet)
@@ -2134,10 +2134,10 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW nRefStartY,
Rectangle aLowerLeft ( aRectMinX1, aRectMaxY1, aRectMinX2, aRectMaxY2 );
Rectangle aUpperRight( aRectMaxX1, aRectMinY1, aRectMaxX2, aRectMinY2 );
- mpDev->DrawTransparent( tools::PolyPolygon( Polygon( aLowerRight ) ), lclCornerRectTransparency );
- mpDev->DrawTransparent( tools::PolyPolygon( Polygon( aUpperLeft ) ), lclCornerRectTransparency );
- mpDev->DrawTransparent( tools::PolyPolygon( Polygon( aLowerLeft ) ), lclCornerRectTransparency );
- mpDev->DrawTransparent( tools::PolyPolygon( Polygon( aUpperRight ) ), lclCornerRectTransparency );
+ mpDev->DrawTransparent( tools::PolyPolygon( tools::Polygon( aLowerRight ) ), lclCornerRectTransparency );
+ mpDev->DrawTransparent( tools::PolyPolygon( tools::Polygon( aUpperLeft ) ), lclCornerRectTransparency );
+ mpDev->DrawTransparent( tools::PolyPolygon( tools::Polygon( aLowerLeft ) ), lclCornerRectTransparency );
+ mpDev->DrawTransparent( tools::PolyPolygon( tools::Polygon( aUpperRight ) ), lclCornerRectTransparency );
}
}
}
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 15d4dd30a894..47f2a694d6f7 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -2409,7 +2409,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
aStart.Y += aCenter.Y;
aEnd.X += aCenter.X;
aEnd.Y += aCenter.Y;
- Polygon aPolygon( aRect, Point( aStart.X, aStart.Y ), Point( aEnd.X, aEnd.Y ), ePolyKind );
+ tools::Polygon aPolygon( aRect, Point( aStart.X, aStart.Y ), Point( aEnd.X, aEnd.Y ), ePolyKind );
bool bNeedText = true;
if ( mnAngle )
{
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index f1bc7948e7ee..9bef488e8301 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -1776,8 +1776,11 @@ bool HtmlExport::CreateHtmlForPresPages()
case IMAP_OBJ_POLYGON:
{
- Polygon aArea(static_cast<IMapPolygonObject*>(pArea)->GetPolygon(false));
- aStr.append(CreateHTMLPolygonArea(::basegfx::B2DPolyPolygon(aArea.getB2DPolygon()), Size(aLogPos.X() - pPage->GetLftBorder(), aLogPos.Y() - pPage->GetUppBorder()), fLogicToPixel, aURL));
+ tools::Polygon aArea(static_cast<IMapPolygonObject*>(pArea)->GetPolygon(false));
+ aStr.append(CreateHTMLPolygonArea(::basegfx::B2DPolyPolygon(aArea.getB2DPolygon()),
+ Size(aLogPos.X() - pPage->GetLftBorder(),
+ aLogPos.Y() - pPage->GetUppBorder()),
+ fLogicToPixel, aURL));
}
break;
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index 587f815e73e1..d47d60ecb93d 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -691,7 +691,7 @@ void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle
else
SetFillColor(COL_BLACK);
SetLineColor();
- DrawPolygon(Polygon(maPopupTriangle));
+ DrawPolygon( ::tools::Polygon(maPopupTriangle));
}
}
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 5335eca582f7..5b40bbab9121 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -211,7 +211,7 @@ IMAPOBJ_SETEVENT:
if( aCoords.size() >=6 )
{
sal_uInt16 nCount = aCoords.size() / 2;
- Polygon aPoly( nCount );
+ tools::Polygon aPoly( nCount );
for( sal_uInt16 i=0; i<nCount; i++ )
aPoly[i] = Point( aCoords[2*i], aCoords[2*i+1] );
IMapPolygonObject aMapPObj( aPoly, aHRef, aAlt, OUString(), aTarget, aName,
diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx
index 3fe237ff32ca..3ecef13f0268 100644
--- a/sfx2/source/control/templateabstractview.cxx
+++ b/sfx2/source/control/templateabstractview.cxx
@@ -307,8 +307,8 @@ void TemplateAbstractView::Paint(vcl::RenderContext& rRenderContext, const Recta
drawinglayer::primitive2d::Primitive2DSequence aSeq(1);
aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
- new PolyPolygonColorPrimitive2D(B2DPolyPolygon(Polygon(aRect).getB2DPolygon()),
- maFillColor.getBColor()));
+ new PolyPolygonColorPrimitive2D(B2DPolyPolygon(::tools::Polygon(aRect).getB2DPolygon()),
+ maFillColor.getBColor()));
const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> mpProcessor(
diff --git a/sfx2/source/control/templatecontaineritem.cxx b/sfx2/source/control/templatecontaineritem.cxx
index b4f2f6322e0e..25bd3a2d9055 100644
--- a/sfx2/source/control/templatecontaineritem.cxx
+++ b/sfx2/source/control/templatecontaineritem.cxx
@@ -76,17 +76,17 @@ void TemplateContainerItem::Paint (drawinglayer::processor2d::BaseProcessor2D *p
if (mbHover)
fTransparence = pAttrs->fHighlightTransparence;
- aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonSelectionPrimitive2D(
- B2DPolyPolygon(Polygon(maDrawArea,5,5).getB2DPolygon()),
- aFillColor,
- fTransparence,
- 0.0,
- true));
+ aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference(
+ new PolyPolygonSelectionPrimitive2D( B2DPolyPolygon( ::tools::Polygon(maDrawArea,5,5).getB2DPolygon()),
+ aFillColor,
+ fTransparence,
+ 0.0,
+ true));
// Create rounded rectangle border
- aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference(new PolygonStrokePrimitive2D(
- Polygon(maThumbnailArea, 5, 5).getB2DPolygon(),
- LineAttribute(BColor(0.5, 0.5, 0.5), 2.0)));
+ aSeq[nCount++] = drawinglayer::primitive2d::Primitive2DReference(
+ new PolygonStrokePrimitive2D( ::tools::Polygon(maThumbnailArea, 5, 5).getB2DPolygon(),
+ LineAttribute(BColor(0.5, 0.5, 0.5), 2.0)));
// Paint the thumbnails side by side on a 2x2 grid
long nThumbPadding = 4;
diff --git a/sfx2/source/control/templateviewitem.cxx b/sfx2/source/control/templateviewitem.cxx
index 05b7ebb1f4fd..59a87120c691 100644
--- a/sfx2/source/control/templateviewitem.cxx
+++ b/sfx2/source/control/templateviewitem.cxx
@@ -79,12 +79,12 @@ void TemplateViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProces
if (mbHover)
fTransparence = pAttrs->fHighlightTransparence;
- aSeq[0] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonSelectionPrimitive2D(
- B2DPolyPolygon(Polygon(maDrawArea,5,5).getB2DPolygon()),
- aFillColor,
- fTransparence,
- 0.0,
- true));
+ aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
+ new PolyPolygonSelectionPrimitive2D( B2DPolyPolygon(::tools::Polygon(maDrawArea,5,5).getB2DPolygon()),
+ aFillColor,
+ fTransparence,
+ 0.0,
+ true));
// Draw thumbnail
Size aImageSize = maPreview1.GetSizePixel();
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index cdd7329fcfa5..0279d9bd1ec3 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -847,9 +847,10 @@ void ThumbnailView::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r
// Draw background
drawinglayer::primitive2d::Primitive2DSequence aSeq(1);
- aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(new PolyPolygonColorPrimitive2D(
- B2DPolyPolygon(Polygon(Rectangle(Point(), GetOutputSizePixel()), 0, 0).getB2DPolygon()),
- maFillColor.getBColor()));
+ aSeq[0] = drawinglayer::primitive2d::Primitive2DReference(
+ new PolyPolygonColorPrimitive2D(
+ B2DPolyPolygon( ::tools::Polygon(Rectangle(Point(), GetOutputSizePixel()), 0, 0).getB2DPolygon()),
+ maFillColor.getBColor()));
// Create the processor and process the primitives
const drawinglayer::geometry::ViewInformation2D aNewViewInfos;
diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx
index 8aaf33f28a29..86354a28a0e8 100644
--- a/sfx2/source/control/thumbnailviewitem.cxx
+++ b/sfx2/source/control/thumbnailviewitem.cxx
@@ -274,12 +274,12 @@ void ThumbnailViewItem::Paint (drawinglayer::processor2d::BaseProcessor2D *pProc
fTransparence = pAttrs->fHighlightTransparence;
sal_uInt32 nPrimitive = 0;
- aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference( new PolyPolygonSelectionPrimitive2D(
- B2DPolyPolygon(Polygon(maDrawArea, THUMBNAILVIEW_ITEM_CORNER, THUMBNAILVIEW_ITEM_CORNER).getB2DPolygon()),
- aFillColor,
- fTransparence,
- 0.0,
- true));
+ aSeq[nPrimitive++] = drawinglayer::primitive2d::Primitive2DReference(
+ new PolyPolygonSelectionPrimitive2D( B2DPolyPolygon(::tools::Polygon(maDrawArea, THUMBNAILVIEW_ITEM_CORNER, THUMBNAILVIEW_ITEM_CORNER).getB2DPolygon()),
+ aFillColor,
+ fTransparence,
+ 0.0,
+ true));
// Draw thumbnail
Point aPos = maPrev1Pos;
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index ff6f797bc105..1ca0db792986 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -416,7 +416,7 @@ public:
*/
class SmPolyLineNode : public SmGraphicNode
{
- Polygon aPoly;
+ tools::Polygon aPoly;
Size aToSize;
long nWidth;
@@ -424,7 +424,7 @@ public:
SmPolyLineNode(const SmToken &rNodeToken);
long GetWidth() const { return nWidth; }
- Polygon &GetPolygon() { return aPoly; }
+ tools::Polygon &GetPolygon() { return aPoly; }
virtual void AdaptToX(const OutputDevice &rDev, sal_uLong nWidth) SAL_OVERRIDE;
virtual void AdaptToY(const OutputDevice &rDev, sal_uLong nHeight) SAL_OVERRIDE;
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 4b3bb7391927..9d1f2a54a484 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -2930,7 +2930,7 @@ void SvxIconChoiceCtrl_Impl::DrawFocusRect(vcl::RenderContext& rRenderContext)
{
rRenderContext.SetLineColor(aFocus.aPenColor);
rRenderContext.SetFillColor();
- Polygon aPolygon (aFocus.aRect);
+ tools::Polygon aPolygon (aFocus.aRect);
LineInfo aLineInfo(LINE_DASH);
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 2d017bd20b63..4dcc834351a2 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -794,7 +794,7 @@ void Ruler::ImplDrawBorders(vcl::RenderContext& rRenderContext, long nMin, long
}
}
-void Ruler::ImplDrawIndent(vcl::RenderContext& rRenderContext, const Polygon& rPoly, sal_uInt16 nStyle, bool bIsHit)
+void Ruler::ImplDrawIndent(vcl::RenderContext& rRenderContext, const tools::Polygon& rPoly, sal_uInt16 nStyle, bool bIsHit)
{
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
@@ -813,7 +813,7 @@ void Ruler::ImplDrawIndents(vcl::RenderContext& rRenderContext, long nMin, long
long nIndentHeight = (mnVirHeight / 2) - 1;
long nIndentWidth2 = nIndentHeight-3;
- Polygon aPoly(5);
+ tools::Polygon aPoly(5);
for (j = 0; j < mpData->pIndents.size(); j++)
{
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 2e00b94413c8..a4cfe4e2d340 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -2460,7 +2460,7 @@ sal_uInt16 TabBar::ShowDropPos(const Point& rPos)
SetFillColor(pItem->maTabTextColor);
}
- Polygon aPoly(3);
+ tools::Polygon aPoly(3);
aPoly.SetPoint(Point(nX, nY), 0);
aPoly.SetPoint(Point(nX + nTriangleWidth, nY - nTriangleWidth), 1);
aPoly.SetPoint(Point(nX + nTriangleWidth, nY + nTriangleWidth), 2);
@@ -2480,7 +2480,7 @@ sal_uInt16 TabBar::ShowDropPos(const Point& rPos)
SetLineColor(pItem->maTabTextColor);
SetFillColor(pItem->maTabTextColor);
}
- Polygon aPoly(3);
+ tools::Polygon aPoly(3);
aPoly.SetPoint(Point(nX, nY), 0);
aPoly.SetPoint(Point(nX - nTriangleWidth, nY - nTriangleWidth), 1);
aPoly.SetPoint(Point(nX - nTriangleWidth, nY + nTriangleWidth), 2);
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index d34c5b7ba6fd..c7b573e772fb 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -794,7 +794,7 @@ void GraphicDisplayCacheEntry::Draw( OutputDevice* pOut, const Point& rPt, const
{
if( maAttr.IsRotated() )
{
- Polygon aPoly( Rectangle( rPt, rSz ) );
+ tools::Polygon aPoly( Rectangle( rPt, rSz ) );
aPoly.Rotate( rPt, maAttr.GetRotation() % 3600 );
const Rectangle aRotBoundRect( aPoly.GetBoundRect() );
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index a36a3f80ddee..e97cb750f8a0 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -270,8 +270,8 @@ bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
if( GetType() != GRAPHIC_NONE )
{
- Polygon aClipPoly( Rectangle( rPt, rSz ) );
- const sal_uInt16 nRot10 = pAttr->GetRotation() % 3600;
+ tools::Polygon aClipPoly( Rectangle( rPt, rSz ) );
+ const sal_uInt16 nRot10 = pAttr->GetRotation() % 3600;
const Point aOldOrigin( rPt );
const MapMode aMap100( MAP_100TH_MM );
Size aSize100;
@@ -318,7 +318,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
if( nRot10 )
{
- Polygon aOriginPoly( 1 );
+ tools::Polygon aOriginPoly( 1 );
aOriginPoly[ 0 ] = rPt;
aOriginPoly.Rotate( aOldOrigin, nRot10 );
@@ -481,7 +481,7 @@ bool GraphicObject::IsCached( OutputDevice* pOut, const Point& rPt, const Size&
if ( pAttr && pAttr->IsCropped() )
{
tools::PolyPolygon aClipPolyPoly;
- bool bRectClip;
+ bool bRectClip;
ImplGetCropParams( pOut, aPt, aSz, pAttr, aClipPolyPoly, bRectClip );
}
bRet = mpMgr->IsInCache( pOut, aPt, aSz, *this, ( pAttr ? *pAttr : GetAttr() ) );
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 986f89414c05..7bd27f5863cd 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -116,7 +116,7 @@ bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size&
if( nRot10 )
{
- Polygon aPoly( Rectangle( aPt, aSz ) );
+ tools::Polygon aPoly( Rectangle( aPt, aSz ) );
aPoly.Rotate( aPt, nRot10 );
const Rectangle aRotBoundRect( aPoly.GetBoundRect() );
@@ -439,7 +439,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib
sal_uInt8 cR0, cG0, cB0, cR1, cG1, cB1;
bool bRet = false;
- Polygon aPoly( Rectangle( Point(), rUnrotatedSzPix ) );
+ tools::Polygon aPoly( Rectangle( Point(), rUnrotatedSzPix ) );
aPoly.Rotate( Point(), nRot10 );
Rectangle aNewBound( aPoly.GetBoundRect() );
@@ -883,7 +883,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice,
if( nRot10 )
{
- Polygon aPoly( Rectangle( rPoint, rSize ) );
+ tools::Polygon aPoly( Rectangle( rPoint, rSize ) );
aPoly.Rotate( rPoint, nRot10 );
const Rectangle aRotBoundRect( aPoly.GetBoundRect() );
aOutputPointPix = pOutputDevice->LogicToPixel( aRotBoundRect.TopLeft() );
@@ -1611,7 +1611,7 @@ void GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt, const Size&
if( nRot10 )
{
- Polygon aPoly( Rectangle( aOutPt, aOutSz ) );
+ tools::Polygon aPoly( Rectangle( aOutPt, aOutSz ) );
aPoly.Rotate( aOutPt, nRot10 );
const Rectangle aRotBoundRect( aPoly.GetBoundRect() );
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 581d3ee276f2..2b7ff4bc8f64 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -378,7 +378,7 @@ bool IMapCircleObject::IsEqual( const IMapCircleObject& rEqObj )
( nRadius == rEqObj.nRadius ) );
}
-IMapPolygonObject::IMapPolygonObject( const Polygon& rPoly,
+IMapPolygonObject::IMapPolygonObject( const tools::Polygon& rPoly,
const OUString& rURL,
const OUString& rAltText,
const OUString& rDesc,
@@ -392,7 +392,7 @@ IMapPolygonObject::IMapPolygonObject( const Polygon& rPoly,
ImpConstruct( rPoly, bPixelCoords );
}
-void IMapPolygonObject::ImpConstruct( const Polygon& rPoly, bool bPixel )
+void IMapPolygonObject::ImpConstruct( const tools::Polygon& rPoly, bool bPixel )
{
if ( bPixel )
aPoly = Application::GetDefaultDevice()->PixelToLogic( rPoly, MapMode( MAP_100TH_MM ) );
@@ -457,9 +457,9 @@ bool IMapPolygonObject::IsHit( const Point& rPoint ) const
return aPoly.IsInside( rPoint );
}
-Polygon IMapPolygonObject::GetPolygon( bool bPixelCoords ) const
+tools::Polygon IMapPolygonObject::GetPolygon( bool bPixelCoords ) const
{
- Polygon aNewPoly;
+ tools::Polygon aNewPoly;
if ( bPixelCoords )
aNewPoly = Application::GetDefaultDevice()->LogicToPixel( aPoly, MapMode( MAP_100TH_MM ) );
@@ -515,7 +515,7 @@ bool IMapPolygonObject::IsEqual( const IMapPolygonObject& rEqObj )
if ( IMapObject::IsEqual( rEqObj ) )
{
- const Polygon& rEqPoly = rEqObj.aPoly;
+ const tools::Polygon& rEqPoly = rEqObj.aPoly;
const sal_uInt16 nCount = aPoly.GetSize();
const sal_uInt16 nEqCount = rEqPoly.GetSize();
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index b88cd658763f..b9fb6ca032e1 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -286,10 +286,9 @@ void ImageMap::ImpReadCERNLine( const OString& rLine, const OUString& rBaseURL
}
else if ( ( aToken == "polygon" ) || ( aToken == "poly" ) )
{
- const sal_uInt16 nCount = comphelper::string::getTokenCount(aStr,
- '(') - 1;
- Polygon aPoly( nCount );
- OUString aURL;
+ const sal_uInt16 nCount = comphelper::string::getTokenCount(aStr, '(') - 1;
+ tools::Polygon aPoly( nCount );
+ OUString aURL;
for ( sal_uInt16 i = 0; i < nCount; i++ )
aPoly[ i ] = ImpReadCERNCoords( &pStr );
@@ -432,8 +431,8 @@ void ImageMap::ImpReadNCSALine( const OString& rLine, const OUString& rBaseURL )
{
const sal_uInt16 nCount = comphelper::string::getTokenCount(aStr,
',') - 1;
- const OUString aURL( ImpReadNCSAURL( &pStr, rBaseURL ) );
- Polygon aPoly( nCount );
+ const OUString aURL( ImpReadNCSAURL( &pStr, rBaseURL ) );
+ tools::Polygon aPoly( nCount );
for ( sal_uInt16 i = 0; i < nCount; i++ )
aPoly[ i ] = ImpReadNCSACoords( &pStr );
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index b79fcd97ec1d..9be535c0f2d1 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -680,7 +680,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
const IMapPolygonObject* pPolyObj =
static_cast<const IMapPolygonObject *>(pObj);
pShape= OOO_STRING_SVTOOLS_HTML_SH_poly;
- Polygon aPoly( pPolyObj->GetPolygon() );
+ tools::Polygon aPoly( pPolyObj->GetPolygon() );
sal_uInt16 nCount = aPoly.GetSize();
OStringBuffer aTmpBuf;
if( nCount>0 )
diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx
index e94da73ef89f..357849bda502 100644
--- a/svtools/source/toolpanel/toolpaneldrawer.cxx
+++ b/svtools/source/toolpanel/toolpaneldrawer.cxx
@@ -210,7 +210,7 @@ namespace svt
aDottedStyle.SetDistance( 1 );
m_pPaintDevice->SetLineColor( COL_BLACK );
- m_pPaintDevice->DrawPolyLine( Polygon( aTextPixelBox ), aDottedStyle );
+ m_pPaintDevice->DrawPolyLine( tools::Polygon( aTextPixelBox ), aDottedStyle );
m_pPaintDevice->EnableMapMode( false );
}
else
diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx
index f74ee95c20ee..a0e9f2c12099 100644
--- a/svtools/source/uno/unoimap.cxx
+++ b/svtools/source/uno/unoimap.cxx
@@ -226,7 +226,7 @@ SvUnoImageMapObject::SvUnoImageMapObject( const IMapObject& rMapObject, const Sv
case IMAP_OBJ_POLYGON:
default:
{
- const Polygon aPoly( static_cast<const IMapPolygonObject*>(&rMapObject)->GetPolygon(false) );
+ const tools::Polygon aPoly( static_cast<const IMapPolygonObject*>(&rMapObject)->GetPolygon(false) );
const sal_uInt16 nCount = aPoly.GetSize();
maPolygon.realloc( nCount );
@@ -283,7 +283,7 @@ IMapObject* SvUnoImageMapObject::createIMapObject() const
{
const sal_uInt16 nCount = (sal_uInt16)maPolygon.getLength();
- Polygon aPoly( nCount );
+ tools::Polygon aPoly( nCount );
for( sal_uInt16 nPoint = 0; nPoint < nCount; nPoint++ )
{
Point aPoint( maPolygon[nPoint].X, maPolygon[nPoint].Y );
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index f53e959cf21d..900a72034e70 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1375,7 +1375,7 @@ static basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStar
}
}
- Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC, bFullCircle );
+ tools::Polygon aTempPoly( aRect, aStart, aEnd, POLY_ARC, bFullCircle );
basegfx::B2DPolygon aRetval;
if ( bClockwise )
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index be54d216df10..2534b94867e7 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -748,7 +748,7 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS
// creating initial bound volume ( without rotation. skewing.and camera )
basegfx::B3DPolygon aBoundVolume;
- const Polygon aPolygon( rBoundRect );
+ const tools::Polygon aPolygon( rBoundRect );
for ( i = 0L; i < 4L; i++ )
{
@@ -787,7 +787,7 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS
if ( aTransformation2D.IsParallel() )
aBoundVolume = aTransformation2D.ApplySkewSettings( aBoundVolume );
- Polygon aTransformed( 8 );
+ tools::Polygon aTransformed( 8 );
for ( i = 0L; i < 8L; i++ )
aTransformed[ (sal_uInt16)i ] = aTransformation2D.Transform2D( aBoundVolume.getB3DPoint( i ) );
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index cfb6fd67909b..27c855f9f8ab 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -130,14 +130,14 @@ static bool InitializeFontWorkData( const SdrObject* pCustomShape, const sal_uIn
return bNoErr;
}
-double GetLength( const Polygon& rPolygon )
+double GetLength( const tools::Polygon& rPolygon )
{
double fLength = 0;
if ( rPolygon.GetSize() > 1 )
{
sal_uInt16 nCount = rPolygon.GetSize();
while( --nCount )
- fLength += ((Polygon&)rPolygon).CalcDistance( nCount, nCount - 1 );
+ fLength += ((tools::Polygon&)rPolygon).CalcDistance( nCount, nCount - 1 );
}
return fLength;
}
@@ -528,14 +528,14 @@ basegfx::B2DPolyPolygon GetOutlinesFromShape2d( const SdrObject* pShape2d )
return aOutlines2d;
}
-void CalcDistances( const Polygon& rPoly, std::vector< double >& rDistances )
+void CalcDistances( const tools::Polygon& rPoly, std::vector< double >& rDistances )
{
sal_uInt16 i, nCount = rPoly.GetSize();
if ( nCount > 1 )
{
for ( i = 0; i < nCount; i++ )
{
- double fDistance = i ? ((Polygon&)rPoly).CalcDistance( i, i - 1 ) : 0.0;
+ double fDistance = i ? ((tools::Polygon&)rPoly).CalcDistance( i, i - 1 ) : 0.0;
rDistances.push_back( fDistance );
}
std::partial_sum( rDistances.begin(), rDistances.end(), rDistances.begin() );
@@ -550,7 +550,8 @@ void CalcDistances( const Polygon& rPoly, std::vector< double >& rDistances )
}
}
-void InsertMissingOutlinePoints( const Polygon& /*rOutlinePoly*/, const std::vector< double >& rDistances, const Rectangle& rTextAreaBoundRect, Polygon& rPoly )
+void InsertMissingOutlinePoints( const tools::Polygon& /*rOutlinePoly*/, const std::vector< double >& rDistances,
+ const Rectangle& rTextAreaBoundRect, tools::Polygon& rPoly )
{
sal_uInt16 nSize = rPoly.GetSize();
if (nSize == 0)
@@ -603,7 +604,7 @@ void InsertMissingOutlinePoints( const Polygon& /*rOutlinePoly*/, const std::vec
}
}
-void GetPoint( const Polygon& rPoly, const std::vector< double >& rDistances, const double& fX, double& fx1, double& fy1 )
+void GetPoint( const tools::Polygon& rPoly, const std::vector< double >& rDistances, const double& fX, double& fx1, double& fy1 )
{
fy1 = fx1 = 0.0;
if ( rPoly.GetSize() > 1 )
@@ -648,7 +649,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa
{
if ( nOutline2dIdx >= aOutlines2d.Count() )
break;
- const Polygon& rOutlinePoly( aOutlines2d[ nOutline2dIdx++ ] );
+ const tools::Polygon& rOutlinePoly( aOutlines2d[ nOutline2dIdx++ ] );
const sal_uInt16 nPointCount = rOutlinePoly.GetSize();
if ( nPointCount > 1 )
{
@@ -708,8 +709,8 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa
{
if ( ( nOutline2dIdx + 1 ) >= aOutlines2d.Count() )
break;
- const Polygon& rOutlinePoly( aOutlines2d[ nOutline2dIdx++ ] );
- const Polygon& rOutlinePoly2( aOutlines2d[ nOutline2dIdx++ ] );
+ const tools::Polygon& rOutlinePoly( aOutlines2d[ nOutline2dIdx++ ] );
+ const tools::Polygon& rOutlinePoly2( aOutlines2d[ nOutline2dIdx++ ] );
const sal_uInt16 nPointCount = rOutlinePoly.GetSize();
const sal_uInt16 nPointCount2 = rOutlinePoly2.GetSize();
if ( ( nPointCount > 1 ) && ( nPointCount2 > 1 ) )
@@ -745,7 +746,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa
}
// create local polygon copy to work on
- Polygon aLocalPoly(aCandidate);
+ tools::Polygon aLocalPoly(aCandidate);
InsertMissingOutlinePoints( rOutlinePoly, vDistances, rTextAreaBoundRect, aLocalPoly );
InsertMissingOutlinePoints( rOutlinePoly2, vDistances2, rTextAreaBoundRect, aLocalPoly );
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index bd442227a72b..6af03409721b 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -350,7 +350,7 @@ void SvxSuperContourDlg::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly )
{
DBG_ASSERT( m_pContourWnd->GetGraphic().GetType() != GRAPHIC_NONE, "Graphic must've been set first!" );
- tools::PolyPolygon aPolyPoly( rPolyPoly );
+ tools::PolyPolygon aPolyPoly( rPolyPoly );
const MapMode aMap100( MAP_100TH_MM );
const MapMode aGrfMap( aGraphic.GetPrefMapMode() );
OutputDevice* pOutDev = Application::GetDefaultDevice();
@@ -358,7 +358,7 @@ void SvxSuperContourDlg::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly )
for ( sal_uInt16 j = 0, nPolyCount = aPolyPoly.Count(); j < nPolyCount; j++ )
{
- Polygon& rPoly = aPolyPoly[ j ];
+ tools::Polygon& rPoly = aPolyPoly[ j ];
for ( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
{
@@ -388,7 +388,7 @@ tools::PolyPolygon SvxSuperContourDlg::GetPolyPolygon( bool bRescaleToGraphic )
for ( sal_uInt16 j = 0, nPolyCount = aRetPolyPoly.Count(); j < nPolyCount; j++ )
{
- Polygon& rPoly = aRetPolyPoly[ j ];
+ tools::Polygon& rPoly = aRetPolyPoly[ j ];
for ( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
{
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index 664d4f7c0356..fd85200dbca5 100644
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -713,9 +713,9 @@ inline Point lclToMapUnit( long nSubXPos, long nSubYPos )
}
/** Returns a polygon constructed from a vector of points. */
-inline Polygon lclCreatePolygon( const PointVec& rPoints )
+inline tools::Polygon lclCreatePolygon( const PointVec& rPoints )
{
- return Polygon( static_cast< sal_uInt16 >( rPoints.size() ), &rPoints[ 0 ] );
+ return tools::Polygon( static_cast< sal_uInt16 >( rPoints.size() ), &rPoints[ 0 ] );
}
/** Returns a polygon constructed from the five passed points. */
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index 825c3ca44739..1aec0e688c91 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -156,7 +156,7 @@ void FrameBorder::SetState( FrameBorderState eState )
}
}
-void FrameBorder::AddFocusPolygon( const Polygon& rFocus )
+void FrameBorder::AddFocusPolygon( const tools::Polygon& rFocus )
{
lclPolyPolyUnion( maFocusArea, rFocus );
}
@@ -168,7 +168,7 @@ void FrameBorder::MergeFocusToPolyPolygon( tools::PolyPolygon& rPPoly ) const
void FrameBorder::AddClickRect( const Rectangle& rRect )
{
- lclPolyPolyUnion( maClickArea, Polygon( rRect ) );
+ lclPolyPolyUnion( maClickArea, tools::Polygon( rRect ) );
}
bool FrameBorder::ContainsClickPoint( const Point& rPos ) const
@@ -404,7 +404,7 @@ void FrameSelectorImpl::InitBorderGeometry()
aFocusVec.push_back( Point( aRect.Right() + mnFocusOffs, aRect.Bottom() - nDiagFocusOffsY ) );
aFocusVec.push_back( Point( aRect.Right() + mnFocusOffs, aRect.Bottom() + mnFocusOffs ) );
aFocusVec.push_back( Point( aRect.Right() - nDiagFocusOffsX, aRect.Bottom() + mnFocusOffs ) );
- maTLBR.AddFocusPolygon( Polygon( static_cast< sal_uInt16 >( aFocusVec.size() ), &aFocusVec[ 0 ] ) );
+ maTLBR.AddFocusPolygon( tools::Polygon( static_cast< sal_uInt16 >( aFocusVec.size() ), &aFocusVec[ 0 ] ) );
aFocusVec.clear();
aFocusVec.push_back( Point( aRect.Right() + mnFocusOffs, aRect.Top() + nDiagFocusOffsY ) );
@@ -413,7 +413,7 @@ void FrameSelectorImpl::InitBorderGeometry()
aFocusVec.push_back( Point( aRect.Left() - mnFocusOffs, aRect.Bottom() - nDiagFocusOffsY ) );
aFocusVec.push_back( Point( aRect.Left() - mnFocusOffs, aRect.Bottom() + mnFocusOffs ) );
aFocusVec.push_back( Point( aRect.Left() + nDiagFocusOffsX, aRect.Bottom() + mnFocusOffs ) );
- maBLTR.AddFocusPolygon( Polygon( static_cast< sal_uInt16 >( aFocusVec.size() ), &aFocusVec[ 0 ] ) );
+ maBLTR.AddFocusPolygon( tools::Polygon( static_cast< sal_uInt16 >( aFocusVec.size() ), &aFocusVec[ 0 ] ) );
}
}
@@ -685,7 +685,7 @@ void FrameSelectorImpl::DrawAllTrackingRects()
}
else
// no frame border selected -> draw tracking rectangle around entire control
- aPPoly.Insert(Polygon(Rectangle(maVirDevPos, mpVirDev->GetOutputSizePixel())));
+ aPPoly.Insert( tools::Polygon(Rectangle(maVirDevPos, mpVirDev->GetOutputSizePixel())));
aPPoly.Optimize(PolyOptimizeFlags::CLOSE);
for(sal_uInt16 nIdx = 0, nCount = aPPoly.Count(); nIdx < nCount; ++nIdx)
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index f7572b6d07f2..464200d2e140 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -240,8 +240,8 @@ SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
}
else
{
- const Polygon& rPoly = pIMapPolyObj->GetPolygon( false );
- Polygon aDrawPoly( rPoly );
+ const tools::Polygon& rPoly = pIMapPolyObj->GetPolygon( false );
+ tools::Polygon aDrawPoly( rPoly );
// clipped on CanvasPane
aDrawPoly.Clip( aClipRect );
@@ -315,10 +315,10 @@ void IMapWindow::SdrObjCreated( const SdrObject& rObj )
{
SdrCircObj* pCircObj = const_cast<SdrCircObj*>( static_cast<const SdrCircObj*>(&rObj) );
SdrPathObj* pPathObj = static_cast<SdrPathObj*>( pCircObj->ConvertToPolyObj( false, false ) );
- Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L));
+ tools::Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L));
delete pPathObj;
- IMapPolygonObject* pObj = new IMapPolygonObject( Polygon(aPoly), "", "", "", "", "", true, false );
+ IMapPolygonObject* pObj = new IMapPolygonObject( tools::Polygon(aPoly), "", "", "", "", "", true, false );
pObj->SetExtraEllipse( aPoly.GetBoundRect() );
pCircObj->AppendUserData( new IMapUserData( IMapObjectPtr(pObj) ) );
}
@@ -334,7 +334,7 @@ void IMapWindow::SdrObjCreated( const SdrObject& rObj )
if ( rXPolyPoly.count() )
{
- Polygon aPoly(rXPolyPoly.getB2DPolygon(0L));
+ tools::Polygon aPoly(rXPolyPoly.getB2DPolygon(0L));
IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, "", "", "", "", "", true, false );
pPathObj->AppendUserData( new IMapUserData( IMapObjectPtr(pObj) ) );
}
@@ -381,7 +381,7 @@ void IMapWindow::SdrObjChanged( const SdrObject& rObj )
{
const SdrCircObj& rCircObj = static_cast<const SdrCircObj&>(rObj);
SdrPathObj* pPathObj = static_cast<SdrPathObj*>( rCircObj.ConvertToPolyObj( false, false ) );
- Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L));
+ tools::Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L));
IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, aAltText, aDesc, aTarget, "", bActive, false );
pObj->SetExtraEllipse( aPoly.GetBoundRect() );
@@ -402,7 +402,7 @@ void IMapWindow::SdrObjChanged( const SdrObject& rObj )
if ( rXPolyPoly.count() )
{
- Polygon aPoly(rPathObj.GetPathPoly().getB2DPolygon(0L));
+ tools::Polygon aPoly(rPathObj.GetPathPoly().getB2DPolygon(0L));
IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, aURL, aAltText, aDesc, aTarget, "", bActive, false );
pUserData->ReplaceObject( IMapObjectPtr(pObj) );
}
diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx
index d03cb350ed0c..34f77ba36e1c 100644
--- a/svx/source/inc/frmselimpl.hxx
+++ b/svx/source/inc/frmselimpl.hxx
@@ -65,7 +65,7 @@ public:
inline const frame::Style& GetUIStyle() const { return maUIStyle; }
inline void ClearFocusArea() { maFocusArea.Clear(); }
- void AddFocusPolygon( const Polygon& rFocus );
+ void AddFocusPolygon( const tools::Polygon& rFocus );
void MergeFocusToPolyPolygon( tools::PolyPolygon& rPPoly ) const;
inline void ClearClickArea() { maClickArea.Clear(); }
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 22d699be4d55..b12a68dfac5f 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -1810,7 +1810,7 @@ void SdrObjCustomShape::ImpCheckCustomGluePointsAreAdded()
if ( aGeo.nRotationAngle || nShearAngle || bMirroredX || bMirroredY )
{
- Polygon aPoly( maRect );
+ tools::Polygon aPoly( maRect );
if( nShearAngle )
{
sal_uInt16 nPointCount=aPoly.GetSize();
@@ -3104,7 +3104,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
if ( bMirroredX )
{
- Polygon aPol = Rect2Poly(maRect, aNewGeo);
+ tools::Polygon aPol = Rect2Poly(maRect, aNewGeo);
Rectangle aBoundRect( aPol.GetBoundRect() );
Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() );
@@ -3116,7 +3116,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
MirrorPoint(aPol[i],aRef1,aRef2);
}
// mirror polygon and move it a bit
- Polygon aPol0(aPol);
+ tools::Polygon aPol0(aPol);
aPol[0]=aPol0[1];
aPol[1]=aPol0[0];
aPol[2]=aPol0[3];
@@ -3126,7 +3126,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
}
if ( bMirroredY )
{
- Polygon aPol( Rect2Poly( aRectangle, aNewGeo ) );
+ tools::Polygon aPol( Rect2Poly( aRectangle, aNewGeo ) );
Rectangle aBoundRect( aPol.GetBoundRect() );
Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 );
@@ -3138,7 +3138,7 @@ bool SdrObjCustomShape::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegf
MirrorPoint(aPol[i],aRef1,aRef2);
}
// mirror polygon and move it a bit
- Polygon aPol0(aPol);
+ tools::Polygon aPol0(aPol);
aPol[0]=aPol0[1]; // This was WRONG for vertical (!)
aPol[1]=aPol0[0]; // #i121932# Despite my own comment above
aPol[2]=aPol0[3]; // it was *not* wrong even when the reordering
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 35a69caa712f..52d37e74b8b5 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -451,9 +451,9 @@ void SdrCaptionObj::ImpRecalcTail()
// tail end pos for SDRCAPT_TYPE1. This sure was the simplest method
// to achieve this, at the cost of making a whole group of const methods
// of this object implicitly change the object's position.
-void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const
{
- Polygon aPol(2);
+ tools::Polygon aPol(2);
Point aTl(rPoly[0]);
aPol[0] = aTl;
@@ -477,9 +477,9 @@ void SdrCaptionObj::ImpCalcTail1(const ImpCaptParams& rPara, Polygon& rPoly, Rec
rPoly = aPol;
}
-void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const
{ // Gap/EscDir/EscPos/Angle
- Polygon aPol(2);
+ tools::Polygon aPol(2);
Point aTl(rPoly[0]);
aPol[0]=aTl;
@@ -494,9 +494,9 @@ void SdrCaptionObj::ImpCalcTail2(const ImpCaptParams& rPara, Polygon& rPoly, Rec
rPoly=aPol;
}
-void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const
{ // Gap/EscDir/EscPos/Angle/LineLen
- Polygon aPol(3);
+ tools::Polygon aPol(3);
Point aTl(rPoly[0]);
aPol[0]=aTl;
@@ -527,12 +527,12 @@ void SdrCaptionObj::ImpCalcTail3(const ImpCaptParams& rPara, Polygon& rPoly, Rec
rPoly=aPol;
}
-void SdrCaptionObj::ImpCalcTail4(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+void SdrCaptionObj::ImpCalcTail4(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const
{
ImpCalcTail3(rPara,rPoly,rRect);
}
-void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, Polygon& rPoly, Rectangle& rRect) const
+void SdrCaptionObj::ImpCalcTail(const ImpCaptParams& rPara, tools::Polygon& rPoly, Rectangle& rRect) const
{
switch (rPara.eType) {
case SDRCAPT_TYPE1: ImpCalcTail1(rPara,rPoly,rRect); break;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 0972b531fd52..6feb8778e41c 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1122,7 +1122,7 @@ SdrTextObj& SdrTextObj::operator=(const SdrTextObj& rObj)
basegfx::B2DPolyPolygon SdrTextObj::TakeXorPoly() const
{
- Polygon aPol(maRect);
+ tools::Polygon aPol(maRect);
if (aGeo.nShearAngle!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.nTan);
if (aGeo.nRotationAngle!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
@@ -1149,7 +1149,7 @@ basegfx::B2DPolyPolygon SdrTextObj::TakeContour() const
rOutliner.Clear();
bool bFitToSize(IsFitToSize());
if (bFitToSize) aR=aAnchor2;
- Polygon aPol(aR);
+ tools::Polygon aPol(aR);
if (aGeo.nRotationAngle!=0) RotatePoly(aPol,aR.TopLeft(),aGeo.nSin,aGeo.nCos);
aRetval.append(aPol.getB2DPolygon());
@@ -1162,7 +1162,7 @@ void SdrTextObj::RecalcSnapRect()
{
if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0)
{
- Polygon aPol(maRect);
+ tools::Polygon aPol(maRect);
if (aGeo.nShearAngle!=0) ShearPoly(aPol,maRect.TopLeft(),aGeo.nTan);
if (aGeo.nRotationAngle!=0) RotatePoly(aPol,maRect.TopLeft(),aGeo.nSin,aGeo.nCos);
maSnapRect=aPol.GetBoundRect();
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index fca3331358c8..ae88eb6afb0b 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -143,7 +143,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
}
else
{
- Polygon aPol(Rect2Poly(maRect,aGeo));
+ tools::Polygon aPol(Rect2Poly(maRect,aGeo));
for(sal_uInt16 a(0); a < aPol.GetSize(); a++)
{
@@ -153,7 +153,7 @@ void SdrTextObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fract
if(bXMirr != bYMirr)
{
// turn polygon and move it a little
- Polygon aPol0(aPol);
+ tools::Polygon aPol0(aPol);
aPol[0] = aPol0[1];
aPol[1] = aPol0[0];
@@ -229,7 +229,7 @@ void SdrTextObj::NbcShear(const Point& rRef, long nAngle, double tn, bool bVShea
SetGlueReallyAbsolute(true);
// when this is a SdrPathObj, aRect may be uninitialized
- Polygon aPol(Rect2Poly(maRect.IsEmpty() ? GetSnapRect() : maRect, aGeo));
+ tools::Polygon aPol(Rect2Poly(maRect.IsEmpty() ? GetSnapRect() : maRect, aGeo));
sal_uInt16 nPointCount=aPol.GetSize();
for (sal_uInt16 i=0; i<nPointCount; i++) {
@@ -256,14 +256,14 @@ void SdrTextObj::NbcMirror(const Point& rRef1, const Point& rRef2)
std::abs(rRef1.X()-rRef2.X())==std::abs(rRef1.Y()-rRef2.Y()))) {
bRota90Merk=aGeo.nRotationAngle % 9000 ==0;
}
- Polygon aPol(Rect2Poly(maRect,aGeo));
+ tools::Polygon aPol(Rect2Poly(maRect,aGeo));
sal_uInt16 i;
sal_uInt16 nPointCount=aPol.GetSize();
for (i=0; i<nPointCount; i++) {
MirrorPoint(aPol[i],rRef1,rRef2);
}
// turn polygon and move it a little
- Polygon aPol0(aPol);
+ tools::Polygon aPol0(aPol);
aPol[0]=aPol0[1];
aPol[1]=aPol0[0];
aPol[2]=aPol0[3];
diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx
index 36bc0c163abe..fd65cfccb3e7 100644
--- a/svx/source/svdraw/svdpoev.cxx
+++ b/svx/source/svdraw/svdpoev.cxx
@@ -447,7 +447,7 @@ bool SdrPolyEditView::IsRipUpAtMarkedPointsPossible() const
{
// #i76617# Do not yet use basegfx::B2DPolygon since curve definitions
// are different and methods need to be changed thoroughly with interaction rework
- const Polygon aPathPolygon(rPathPolyPolygon.getB2DPolygon(0));
+ const tools::Polygon aPathPolygon(rPathPolyPolygon.getB2DPolygon(0));
const sal_uInt16 nPointCount(aPathPolygon.GetSize());
if(nPointCount >= 3)
@@ -489,7 +489,7 @@ bool SdrPolyEditView::IsOpenCloseMarkedObjectsPossible() const
for(sal_uInt16 b(0); !bRetval && b < nPolygonCount; b++)
{
- const Polygon& rPathPolygon = aPathPolyPolygon[b];
+ const tools::Polygon& rPathPolygon = aPathPolyPolygon[b];
const sal_uInt16 nPointCount(rPathPolygon.GetSize());
bRetval = (nPointCount >= 3);
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 424cb91892d7..66a5fb8d9b1b 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -59,7 +59,7 @@ void ResizeRect(Rectangle& rRect, const Point& rRef, const Fraction& rxFact, con
}
-void ResizePoly(Polygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact)
+void ResizePoly(tools::Polygon& rPoly, const Point& rRef, const Fraction& xFact, const Fraction& yFact)
{
sal_uInt16 nCount=rPoly.GetSize();
for (sal_uInt16 i=0; i<nCount; i++) {
@@ -75,7 +75,7 @@ void ResizeXPoly(XPolygon& rPoly, const Point& rRef, const Fraction& xFact, cons
}
}
-void RotatePoly(Polygon& rPoly, const Point& rRef, double sn, double cs)
+void RotatePoly(tools::Polygon& rPoly, const Point& rRef, double sn, double cs)
{
sal_uInt16 nCount=rPoly.GetSize();
for (sal_uInt16 i=0; i<nCount; i++) {
@@ -133,7 +133,7 @@ void MirrorPoint(Point& rPnt, const Point& rRef1, const Point& rRef2)
}
}
-void MirrorPoly(Polygon& rPoly, const Point& rRef1, const Point& rRef2)
+void MirrorPoly(tools::Polygon& rPoly, const Point& rRef1, const Point& rRef2)
{
sal_uInt16 nCount=rPoly.GetSize();
for (sal_uInt16 i=0; i<nCount; i++) {
@@ -149,7 +149,7 @@ void MirrorXPoly(XPolygon& rPoly, const Point& rRef1, const Point& rRef2)
}
}
-void ShearPoly(Polygon& rPoly, const Point& rRef, double tn, bool bVShear)
+void ShearPoly(tools::Polygon& rPoly, const Point& rRef, double tn, bool bVShear)
{
sal_uInt16 nCount=rPoly.GetSize();
for (sal_uInt16 i=0; i<nCount; i++) {
@@ -480,9 +480,9 @@ void GeoStat::RecalcTan()
-Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo)
+tools::Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo)
{
- Polygon aPol(5);
+ tools::Polygon aPol(5);
aPol[0]=rRect.TopLeft();
aPol[1]=rRect.TopRight();
aPol[2]=rRect.BottomRight();
@@ -493,7 +493,7 @@ Polygon Rect2Poly(const Rectangle& rRect, const GeoStat& rGeo)
return aPol;
}
-void Poly2Rect(const Polygon& rPol, Rectangle& rRect, GeoStat& rGeo)
+void Poly2Rect(const tools::Polygon& rPol, Rectangle& rRect, GeoStat& rGeo)
{
rGeo.nRotationAngle=GetAngle(rPol[1]-rPol[0]);
rGeo.nRotationAngle=NormAngle360(rGeo.nRotationAngle);
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 6f434e6834ce..3f17bd999465 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -750,7 +750,7 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
if (aGeo.nRotationAngle!=0 || aGeo.nShearAngle!=0)
{
- Polygon aPol(aNewRect);
+ tools::Polygon aPol(aNewRect);
// also transform origin offset
if (aGeo.nShearAngle!=0)
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index ef13bf94dc61..d6f6017470d7 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1164,7 +1164,11 @@ void SAL_CALL B2DPolyPolygonToSvxPointSequenceSequence( const basegfx::B2DPolyPo
-bool SvxShapePolyPolygon::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, ::com::sun::star::uno::Any& rValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
+bool SvxShapePolyPolygon::getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty,
+ ::com::sun::star::uno::Any& rValue )
+ throw(::com::sun::star::beans::UnknownPropertyException,
+ ::com::sun::star::lang::WrappedTargetException,
+ ::com::sun::star::uno::RuntimeException)
{
switch( pProperty->nWID )
{
@@ -1756,7 +1760,7 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s
GeoStat aNewGeo( aCustomShapeGeoData.aGeo );
if ( bMirroredX )
{
- Polygon aPol( Rect2Poly( aRect, aNewGeo ) );
+ tools::Polygon aPol( Rect2Poly( aRect, aNewGeo ) );
Rectangle aBoundRect( aPol.GetBoundRect() );
Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() );
@@ -1768,7 +1772,7 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s
MirrorPoint(aPol[i],aRef1,aRef2);
}
// turn and move polygon
- Polygon aPol0(aPol);
+ tools::Polygon aPol0(aPol);
aPol[0]=aPol0[1];
aPol[1]=aPol0[0];
aPol[2]=aPol0[3];
@@ -1778,7 +1782,7 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s
}
if ( bMirroredY )
{
- Polygon aPol( Rect2Poly( aRectangle, aNewGeo ) );
+ tools::Polygon aPol( Rect2Poly( aRectangle, aNewGeo ) );
Rectangle aBoundRect( aPol.GetBoundRect() );
Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 );
@@ -1790,7 +1794,7 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException, s
MirrorPoint(aPol[i],aRef1,aRef2);
}
// turn and move polygon
- Polygon aPol0(aPol);
+ tools::Polygon aPol0(aPol);
aPol[0]=aPol0[1];
aPol[1]=aPol0[0];
aPol[2]=aPol0[3];
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index fe581c43c7cf..c6a71ae6edd3 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -479,11 +479,12 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold )
return aRetBmp;
};
-Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
- const sal_uInt8 cEdgeDetectThreshold, const Rectangle* pWorkRectPixel )
+tools::Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
+ const sal_uInt8 cEdgeDetectThreshold,
+ const Rectangle* pWorkRectPixel )
{
Bitmap aWorkBmp;
- Polygon aRetPoly;
+ tools::Polygon aRetPoly;
Point aTmpPoint;
Rectangle aWorkRect( aTmpPoint, rBmp.GetSizePixel() );
@@ -599,7 +600,7 @@ Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const sal_uIntPtr nFlags,
const sal_uInt16 nNewSize1 = nPolyPos << 1;
- aRetPoly = Polygon( nPolyPos, pPoints1.get() );
+ aRetPoly = tools::Polygon( nPolyPos, pPoints1.get() );
aRetPoly.SetSize( nNewSize1 + 1 );
aRetPoly[ nNewSize1 ] = aRetPoly[ 0 ];
diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx
index da4abd4c1b13..cea38481999f 100644
--- a/svx/source/xoutdev/_xpoly.cxx
+++ b/svx/source/xoutdev/_xpoly.cxx
@@ -198,7 +198,7 @@ XPolygon::XPolygon( const XPolygon& rXPoly )
}
/// create a XPolygon out of a standard polygon
-XPolygon::XPolygon( const Polygon& rPoly )
+XPolygon::XPolygon( const tools::Polygon& rPoly )
{
sal_uInt16 nSize = rPoly.GetSize();
@@ -862,7 +862,7 @@ basegfx::B2DPolygon XPolygon::getB2DPolygon() const
// here. This needs one more conversion but avoids different convertors in
// the long run
DBG_ASSERT(pImpXPolygon != 0, "XPolygon::getB2DPolygon(): XPolygon has no implementation incarnated (!)");
- const Polygon aSource(GetPointCount(), pImpXPolygon->pPointAry, pImpXPolygon->pFlagAry);
+ const tools::Polygon aSource(GetPointCount(), pImpXPolygon->pPointAry, pImpXPolygon->pFlagAry);
return aSource.getB2DPolygon();
}
@@ -873,7 +873,7 @@ XPolygon::XPolygon(const basegfx::B2DPolygon& rPolygon)
// here. This needs one more conversion but avoids different convertors in
// the long run
- const Polygon aSource(rPolygon);
+ const tools::Polygon aSource(rPolygon);
sal_uInt16 nSize = aSource.GetSize();
pImpXPolygon = new ImpXPolygon( nSize );
pImpXPolygon->nPoints = nSize;
diff --git a/sw/source/core/docnode/ndnotxt.cxx b/sw/source/core/docnode/ndnotxt.cxx
index 4c891ce2bfaf..9b108233d2a3 100644
--- a/sw/source/core/docnode/ndnotxt.cxx
+++ b/sw/source/core/docnode/ndnotxt.cxx
@@ -116,7 +116,6 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
const MapMode aContourMap( bPixelGrf ? MAP_PIXEL : MAP_100TH_MM );
if( bPixelGrf ? !bPixelContour : aGrfMap != aContourMap )
{
- // #i102238#
double nGrfDPIx = 0.0;
double nGrfDPIy = 0.0;
{
@@ -147,7 +146,7 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
sal_uInt16 nPolyCount = pContour->Count();
for( sal_uInt16 j=0; j<nPolyCount; j++ )
{
- Polygon& rPoly = (*pContour)[j];
+ tools::Polygon& rPoly = (*pContour)[j];
sal_uInt16 nCount = rPoly.GetSize();
for( sal_uInt16 i=0 ; i<nCount; i++ )
@@ -158,7 +157,7 @@ const tools::PolyPolygon *SwNoTextNode::HasContour() const
else if( bPixelContour )
{
rPoly[i] = pOutDev->PixelToLogic( rPoly[i], aGrfMap );
- // #i102238#
+
if ( nGrfDPIx != 0 && nGrfDPIy != 0 )
{
rPoly[i] = Point( rPoly[i].getX() * pOutDev->GetDPIX() / nGrfDPIx,
@@ -214,9 +213,7 @@ bool SwNoTextNode::GetContourAPI( tools::PolyPolygon &rContour ) const
sal_uInt16 nPolyCount = rContour.Count();
for( sal_uInt16 j=0; j<nPolyCount; j++ )
{
- // --> OD #i102238# - use the right <tools::PolyPolygon> instance
- Polygon& rPoly = rContour[j];
- // <--
+ tools::Polygon& rPoly = rContour[j];
sal_uInt16 nCount = rPoly.GetSize();
for( sal_uInt16 i=0 ; i<nCount; i++ )
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index b2f98f11a927..1d054b95ebcd 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -2532,7 +2532,7 @@ bool SwFlyFrm::GetContour( tools::PolyPolygon& rContour,
for ( sal_uInt16 j = 0, nPolyCount = rContour.Count(); j < nPolyCount; j++ )
{
- Polygon& rPoly = rContour[ j ];
+ tools::Polygon& rPoly = rContour[ j ];
for ( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
{
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index aa562093383a..dc5847df166a 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -1929,10 +1929,10 @@ bool DrawFillAttributes(
tools::PolyPolygon tempRegion;
for (size_t i = 0; i < rPaintRegion.size(); ++i)
{
- tempRegion.Insert(Polygon(rPaintRegion[i].SVRect()));
+ tempRegion.Insert( tools::Polygon(rPaintRegion[i].SVRect()));
}
- basegfx::B2DPolyPolygon const maskRegion(
- tempRegion.getB2DPolyPolygon());
+ basegfx::B2DPolyPolygon const maskRegion( tempRegion.getB2DPolyPolygon());
+
primitives.realloc(1);
primitives[0] = new drawinglayer::primitive2d::MaskPrimitive2D(
maskRegion, rSequence);
@@ -2259,7 +2259,7 @@ void DrawGraphic(
aTmpGrf.Intersection( rOut );
if ( aTmpGrf.HasArea() )
{
- Polygon aGrfPoly( aTmpGrf.SVRect() );
+ tools::Polygon aGrfPoly( aTmpGrf.SVRect() );
aDrawPoly.Insert( aGrfPoly );
}
}
@@ -6344,8 +6344,8 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin
/*static*/ void SwPageFrm::PaintNotesSidebarArrows(const Point &aMiddleFirst, const Point &aMiddleSecond, SwViewShell* _pViewShell, const Color& rColorUp, const Color& rColorDown)
{
- Polygon aTriangleUp(3);
- Polygon aTriangleDown(3);
+ tools::Polygon aTriangleUp(3);
+ tools::Polygon aTriangleDown(3);
aTriangleUp.SetPoint(aMiddleFirst + Point(0,_pViewShell->GetOut()->PixelToLogic(Size(0,-3)).Height()),0);
aTriangleUp.SetPoint(aMiddleFirst + Point(_pViewShell->GetOut()->PixelToLogic(Size(-3,0)).Width(),_pViewShell->GetOut()->PixelToLogic(Size(0,3)).Height()),1);
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index eb204b90888b..1c0335b0d153 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1474,7 +1474,7 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
const :: drawing::PointSequence* pPointSeq = aParam.getConstArray();
sal_Int32 nPoints = pPointSeq[i].getLength();
const :: awt::Point* pPoints = pPointSeq[i].getConstArray();
- Polygon aSet( (sal_uInt16)nPoints );
+ tools::Polygon aSet( (sal_uInt16)nPoints );
for(sal_Int32 j = 0; j < nPoints; j++)
{
Point aPoint(pPoints[j].X, pPoints[j].Y);
@@ -2038,7 +2038,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
drawing::PointSequence* pPSeq = aPtSeq.getArray();
for(sal_uInt16 i = 0; i < aContour.Count(); i++)
{
- const Polygon& rPoly = aContour.GetObject(i);
+ const tools::Polygon& rPoly = aContour.GetObject(i);
pPSeq[i].realloc(rPoly.GetSize());
awt::Point* pPoints = pPSeq[i].getArray();
for(sal_uInt16 j = 0; j < rPoly.GetSize(); j++)
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 3d89f7c9bde4..ebbd6f4e5b84 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -684,7 +684,7 @@ void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, cons
m_pImpl->m_pSerializer->startElementNS(XML_wp, XML_wrapPolygon,
XML_edited, "0",
FSEND);
- Polygon aPoly = sw::util::CorrectWordWrapPolygonForExport(*pPolyPoly, pNd);
+ tools::Polygon aPoly = sw::util::CorrectWordWrapPolygonForExport(*pPolyPoly, pNd);
for (sal_uInt16 i = 0; i < aPoly.GetSize(); ++i)
m_pImpl->m_pSerializer->singleElementNS(XML_wp, (i == 0 ? XML_start : XML_lineTo),
XML_x, OString::number(aPoly[i].X()),
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index f2416b47948d..72edde6d85f0 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3803,7 +3803,7 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
const tools::PolyPolygon* pPolyPoly = pNd->HasContour();
if (pPolyPoly && pPolyPoly->Count())
{
- Polygon aPoly = sw::util::CorrectWordWrapPolygonForExport(*pPolyPoly, pNd);
+ tools::Polygon aPoly = sw::util::CorrectWordWrapPolygonForExport(*pPolyPoly, pNd);
OStringBuffer aVerticies;
for (sal_uInt16 i = 0; i < aPoly.GetSize(); ++i)
aVerticies.append(";(").append(aPoly[i].X()).append(",").append(aPoly[i].Y()).append(")");
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index e8db7a7a6092..f7a48f0c17b9 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -637,7 +637,7 @@ namespace sw
return false;
}
- Polygon PolygonFromPolyPolygon(const tools::PolyPolygon &rPolyPoly)
+ tools::Polygon PolygonFromPolyPolygon(const tools::PolyPolygon &rPolyPoly)
{
if(1 == rPolyPoly.Count())
{
@@ -663,12 +663,12 @@ namespace sw
nPointCount = 0x0000ffff;
}
- Polygon aRetval((sal_uInt16)nPointCount);
+ tools::Polygon aRetval((sal_uInt16)nPointCount);
sal_uInt32 nAppendIndex(0L);
for(a = 0; a < rPolyPoly.Count(); a++)
{
- const Polygon& rCandidate = rPolyPoly[a];
+ const tools::Polygon& rCandidate = rPolyPoly[a];
for(sal_uInt16 b(0); nAppendIndex <= nPointCount && b < rCandidate.GetSize(); b++)
{
@@ -680,9 +680,9 @@ namespace sw
}
}
- Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTextNode* pNd)
+ tools::Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTextNode* pNd)
{
- Polygon aPoly(PolygonFromPolyPolygon(rPolyPoly));
+ tools::Polygon aPoly(PolygonFromPolyPolygon(rPolyPoly));
const Size &rOrigSize = pNd->GetGraphic().GetPrefSize();
Fraction aMapPolyX(ww::nWrap100Percent, rOrigSize.Width());
Fraction aMapPolyY(ww::nWrap100Percent, rOrigSize.Height());
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index c80e11990325..c4c9c922d77a 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -743,10 +743,10 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- Polygon PolygonFromPolyPolygon(const tools::PolyPolygon &rPolyPoly);
+ tools::Polygon PolygonFromPolyPolygon(const tools::PolyPolygon &rPolyPoly);
/// Undo all scaling / move tricks of the wrap polygon done during import.
- Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTextNode* pNd);
+ tools::Polygon CorrectWordWrapPolygonForExport(const tools::PolyPolygon& rPolyPoly, const SwNoTextNode* pNd);
/** Make setting a drawing object's layer in a Writer document easy
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index cfd231058376..763fb44b9287 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2127,7 +2127,7 @@ sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, MSO_SPT eS
const tools::PolyPolygon *pPolyPoly = pNd->HasContour();
if (pPolyPoly && pPolyPoly->Count())
{
- Polygon aPoly = CorrectWordWrapPolygonForExport(*pPolyPoly, pNd);
+ tools::Polygon aPoly = CorrectWordWrapPolygonForExport(*pPolyPoly, pNd);
SvMemoryStream aPolyDump;
aPolyDump.SetEndian(SvStreamEndian::LITTLE);
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index c1200bd39f57..39b301eb55d2 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -424,7 +424,7 @@ SdrObject* SwWW8ImplReader::ReadPolyLine(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
if (!bCouldRead)
return 0;
- Polygon aP( nCount );
+ tools::Polygon aP( nCount );
Point aPt;
for (sal_uInt16 i=0; i<nCount; ++i)
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 7898e2da6a51..ca9008218a62 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1071,7 +1071,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
if (bOk)
{
- pImpRec->pWrapPolygon = new Polygon(nNumElemVert);
+ pImpRec->pWrapPolygon = new tools::Polygon(nNumElemVert);
for (sal_uInt16 i = 0; i < nNumElemVert; ++i)
{
sal_Int32 nX(0), nY(0);
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index 2c7ff9b353cb..0d21573cf127 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -77,7 +77,7 @@ void DrawArrow(vcl::RenderContext& rRenderContext, const Point &rP1, const Point
const Color& rFieldTextColor = SwViewOption::GetFontColor();
rRenderContext.SetFillColor(rFieldTextColor);
- rRenderContext.DrawPolygon(Polygon(3, aArr));
+ rRenderContext.DrawPolygon( tools::Polygon(3, aArr));
}
else
{
diff --git a/test/source/mtfxmldump.cxx b/test/source/mtfxmldump.cxx
index 3df33b956820..d95cf642c0a9 100644
--- a/test/source/mtfxmldump.cxx
+++ b/test/source/mtfxmldump.cxx
@@ -471,7 +471,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter)
MetaPolyLineAction* pMetaPolyLineAction = static_cast<MetaPolyLineAction*>(pAction);
rWriter.startElement(sCurrentElementTag);
- Polygon aPolygon = pMetaPolyLineAction->GetPolygon();
+ tools::Polygon aPolygon = pMetaPolyLineAction->GetPolygon();
for (sal_uInt16 i = 0; i < aPolygon.GetSize(); i++)
{
rWriter.startElement("point");
@@ -496,7 +496,7 @@ void MetafileXmlDump::writeXml(const GDIMetaFile& rMetaFile, XmlWriter& rWriter)
MetaPolygonAction* pMetaPolygonAction = static_cast<MetaPolygonAction*>(pAction);
rWriter.startElement(sCurrentElementTag);
- Polygon aPolygon = pMetaPolygonAction->GetPolygon();
+ tools::Polygon aPolygon = pMetaPolygonAction->GetPolygon();
for (sal_uInt16 i = 0; i < aPolygon.GetSize(); i++)
{
rWriter.startElement("point");
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index 8cfb8b3cbc19..1cc223a59e66 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -171,12 +171,13 @@ OutputDevice* VCLUnoHelper::GetOutputDevice( const ::com::sun::star::uno::Refere
return pOutDev;
}
-Polygon VCLUnoHelper::CreatePolygon( const ::com::sun::star::uno::Sequence< sal_Int32 >& DataX, const ::com::sun::star::uno::Sequence< sal_Int32 >& DataY )
+tools::Polygon VCLUnoHelper::CreatePolygon( const ::com::sun::star::uno::Sequence< sal_Int32 >& DataX,
+ const ::com::sun::star::uno::Sequence< sal_Int32 >& DataY )
{
sal_Int32 nLen = DataX.getLength();
const sal_Int32* pDataX = DataX.getConstArray();
const sal_Int32* pDataY = DataY.getConstArray();
- Polygon aPoly( (sal_uInt16) nLen );
+ tools::Polygon aPoly( (sal_uInt16) nLen );
for ( sal_Int32 n = 0; n < nLen; n++ )
{
Point aPnt;
diff --git a/tools/inc/poly.h b/tools/inc/poly.h
index 0a202bca1615..78058734ba34 100644
--- a/tools/inc/poly.h
+++ b/tools/inc/poly.h
@@ -47,12 +47,14 @@ public:
#define MAX_POLYGONS ((sal_uInt16)0x3FF0)
+namespace tools {
class Polygon;
+}
class SAL_WARN_UNUSED ImplPolyPolygon
{
public:
- Polygon** mpPolyAry;
+ tools::Polygon** mpPolyAry;
sal_uIntPtr mnRefCount;
sal_uInt16 mnCount;
sal_uInt16 mnSize;
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 7d14d409ec4b..4f4ee0493bc4 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -280,10 +280,224 @@ void ImplPolygon::ImplCreateFlagArray()
}
}
+inline double ImplGetParameter( const Point& rCenter, const Point& rPt, double fWR, double fHR )
+{
+ const long nDX = rPt.X() - rCenter.X();
+ double fAngle = atan2( -rPt.Y() + rCenter.Y(), ( ( nDX == 0L ) ? 0.000000001 : nDX ) );
+
+ return atan2(fWR*sin(fAngle), fHR*cos(fAngle));
+}
+
+class ImplPointFilter
+{
+public:
+ virtual void LastPoint() = 0;
+ virtual void Input( const Point& rPoint ) = 0;
+
+protected:
+ ~ImplPointFilter() {}
+};
+
+class ImplPolygonPointFilter : public ImplPointFilter
+{
+ std::unique_ptr<ImplPolygon> mxPoly;
+ sal_uInt16 mnSize;
+public:
+ explicit ImplPolygonPointFilter(sal_uInt16 nDestSize)
+ : mxPoly(new ImplPolygon(nDestSize))
+ , mnSize(0)
+ {
+ }
+
+ virtual ~ImplPolygonPointFilter()
+ {
+ }
+
+ virtual void LastPoint() SAL_OVERRIDE;
+ virtual void Input( const Point& rPoint ) SAL_OVERRIDE;
+
+ ImplPolygon* release() { return mxPoly.release(); }
+};
+
+void ImplPolygonPointFilter::Input( const Point& rPoint )
+{
+ if ( !mnSize || (rPoint != mxPoly->mpPointAry[mnSize-1]) )
+ {
+ mnSize++;
+ if ( mnSize > mxPoly->mnPoints )
+ mxPoly->ImplSetSize( mnSize );
+ mxPoly->mpPointAry[mnSize-1] = rPoint;
+ }
+}
+
+void ImplPolygonPointFilter::LastPoint()
+{
+ if ( mnSize < mxPoly->mnPoints )
+ mxPoly->ImplSetSize( mnSize );
+};
+
+class ImplEdgePointFilter : public ImplPointFilter
+{
+ Point maFirstPoint;
+ Point maLastPoint;
+ ImplPointFilter& mrNextFilter;
+ const long mnLow;
+ const long mnHigh;
+ const int mnEdge;
+ int mnLastOutside;
+ bool mbFirst;
+
+public:
+ ImplEdgePointFilter( int nEdge, long nLow, long nHigh,
+ ImplPointFilter& rNextFilter ) :
+ mrNextFilter( rNextFilter ),
+ mnLow( nLow ),
+ mnHigh( nHigh ),
+ mnEdge( nEdge ),
+ mnLastOutside( 0 ),
+ mbFirst( true )
+ {
+ }
+
+ virtual ~ImplEdgePointFilter() {}
+
+ Point EdgeSection( const Point& rPoint, int nEdge ) const;
+ int VisibleSide( const Point& rPoint ) const;
+ bool IsPolygon() const
+ { return maFirstPoint == maLastPoint; }
+
+ virtual void Input( const Point& rPoint ) SAL_OVERRIDE;
+ virtual void LastPoint() SAL_OVERRIDE;
+};
+
+inline int ImplEdgePointFilter::VisibleSide( const Point& rPoint ) const
+{
+ if ( mnEdge & EDGE_HORZ )
+ {
+ return rPoint.X() < mnLow ? EDGE_LEFT :
+ rPoint.X() > mnHigh ? EDGE_RIGHT : 0;
+ }
+ else
+ {
+ return rPoint.Y() < mnLow ? EDGE_TOP :
+ rPoint.Y() > mnHigh ? EDGE_BOTTOM : 0;
+ }
+}
+
+Point ImplEdgePointFilter::EdgeSection( const Point& rPoint, int nEdge ) const
+{
+ long lx = maLastPoint.X();
+ long ly = maLastPoint.Y();
+ long md = rPoint.X() - lx;
+ long mn = rPoint.Y() - ly;
+ long nNewX;
+ long nNewY;
+
+ if ( nEdge & EDGE_VERT )
+ {
+ nNewY = (nEdge == EDGE_TOP) ? mnLow : mnHigh;
+ long dy = nNewY - ly;
+ if ( !md )
+ nNewX = lx;
+ else if ( (LONG_MAX / std::abs(md)) >= std::abs(dy) )
+ nNewX = (dy * md) / mn + lx;
+ else
+ {
+ BigInt ady = dy;
+ ady *= md;
+ if( ady.IsNeg() )
+ if( mn < 0 )
+ ady += mn/2;
+ else
+ ady -= (mn-1)/2;
+ else
+ if( mn < 0 )
+ ady -= (mn+1)/2;
+ else
+ ady += mn/2;
+ ady /= mn;
+ nNewX = (long)ady + lx;
+ }
+ }
+ else
+ {
+ nNewX = (nEdge == EDGE_LEFT) ? mnLow : mnHigh;
+ long dx = nNewX - lx;
+ if ( !mn )
+ nNewY = ly;
+ else if ( (LONG_MAX / std::abs(mn)) >= std::abs(dx) )
+ nNewY = (dx * mn) / md + ly;
+ else
+ {
+ BigInt adx = dx;
+ adx *= mn;
+ if( adx.IsNeg() )
+ if( md < 0 )
+ adx += md/2;
+ else
+ adx -= (md-1)/2;
+ else
+ if( md < 0 )
+ adx -= (md+1)/2;
+ else
+ adx += md/2;
+ adx /= md;
+ nNewY = (long)adx + ly;
+ }
+ }
+
+ return Point( nNewX, nNewY );
+}
+
+void ImplEdgePointFilter::Input( const Point& rPoint )
+{
+ int nOutside = VisibleSide( rPoint );
+
+ if ( mbFirst )
+ {
+ maFirstPoint = rPoint;
+ mbFirst = false;
+ if ( !nOutside )
+ mrNextFilter.Input( rPoint );
+ }
+ else if ( rPoint == maLastPoint )
+ return;
+ else if ( !nOutside )
+ {
+ if ( mnLastOutside )
+ mrNextFilter.Input( EdgeSection( rPoint, mnLastOutside ) );
+ mrNextFilter.Input( rPoint );
+ }
+ else if ( !mnLastOutside )
+ mrNextFilter.Input( EdgeSection( rPoint, nOutside ) );
+ else if ( nOutside != mnLastOutside )
+ {
+ mrNextFilter.Input( EdgeSection( rPoint, mnLastOutside ) );
+ mrNextFilter.Input( EdgeSection( rPoint, nOutside ) );
+ }
+
+ maLastPoint = rPoint;
+ mnLastOutside = nOutside;
+}
+
+void ImplEdgePointFilter::LastPoint()
+{
+ if ( !mbFirst )
+ {
+ int nOutside = VisibleSide( maFirstPoint );
+
+ if ( nOutside != mnLastOutside )
+ Input( maFirstPoint );
+ mrNextFilter.LastPoint();
+ }
+}
+
+namespace tools
+{
-Polygon Polygon::SubdivideBezier( const Polygon& rPoly )
+tools::Polygon Polygon::SubdivideBezier( const tools::Polygon& rPoly )
{
- Polygon aPoly;
+ tools::Polygon aPoly;
// #100127# Use adaptive subdivide instead of fixed 25 segments
rPoly.AdaptiveSubdivide( aPoly );
@@ -303,14 +517,6 @@ inline void Polygon::ImplMakeUnique()
}
}
-inline double ImplGetParameter( const Point& rCenter, const Point& rPt, double fWR, double fHR )
-{
- const long nDX = rPt.X() - rCenter.X();
- double fAngle = atan2( -rPt.Y() + rCenter.Y(), ( ( nDX == 0L ) ? 0.000000001 : nDX ) );
-
- return atan2(fWR*sin(fAngle), fHR*cos(fAngle));
-}
-
Polygon::Polygon()
{
mpImplPolygon = static_cast<ImplPolygon*>(&aStaticImplPolygon);
@@ -334,7 +540,7 @@ Polygon::Polygon( sal_uInt16 nPoints, const Point* pPtAry, const sal_uInt8* pFla
mpImplPolygon = static_cast<ImplPolygon*>(&aStaticImplPolygon);
}
-Polygon::Polygon( const Polygon& rPoly )
+Polygon::Polygon( const tools::Polygon& rPoly )
{
DBG_ASSERT( rPoly.mpImplPolygon->mnRefCount < 0xFFFFFFFE, "Polygon: RefCount overflow" );
@@ -386,13 +592,13 @@ Polygon::Polygon( const Rectangle& rRect, sal_uIntPtr nHorzRound, sal_uIntPtr nV
const Point aTR( aRect.Right() - nHorzRound, aRect.Top() + nVertRound );
const Point aBR( aRect.Right() - nHorzRound, aRect.Bottom() - nVertRound );
const Point aBL( aRect.Left() + nHorzRound, aRect.Bottom() - nVertRound );
- Polygon* pEllipsePoly = new Polygon( Point(), nHorzRound, nVertRound );
- sal_uInt16 i, nEnd, nSize4 = pEllipsePoly->GetSize() >> 2;
+ tools::Polygon* pEllipsePoly = new tools::Polygon( Point(), nHorzRound, nVertRound );
+ sal_uInt16 i, nEnd, nSize4 = pEllipsePoly->GetSize() >> 2;
mpImplPolygon = new ImplPolygon( pEllipsePoly->GetSize() + 1 );
- const Point* pSrcAry = pEllipsePoly->GetConstPointAry();
- Point* pDstAry = mpImplPolygon->mpPointAry;
+ const Point* pSrcAry = pEllipsePoly->GetConstPointAry();
+ Point* pDstAry = mpImplPolygon->mpPointAry;
for( i = 0, nEnd = nSize4; i < nEnd; i++ )
( pDstAry[ i ] = pSrcAry[ i ] ) += aTR;
@@ -717,9 +923,9 @@ void Polygon::Optimize( PolyOptimizeFlags nOptimizeFlags, const PolyOptimizeData
}
else if( nOptimizeFlags & ( PolyOptimizeFlags::REDUCE | PolyOptimizeFlags::NO_SAME ) )
{
- Polygon aNewPoly;
- const Point& rFirst = mpImplPolygon->mpPointAry[ 0 ];
- sal_uIntPtr nReduce;
+ tools::Polygon aNewPoly;
+ const Point& rFirst = mpImplPolygon->mpPointAry[ 0 ];
+ sal_uIntPtr nReduce;
if( nOptimizeFlags & ( PolyOptimizeFlags::REDUCE ) )
nReduce = pData ? pData->GetAbsValue() : 4UL;
@@ -912,12 +1118,12 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
}
// fill result polygon
- rResult = Polygon( (sal_uInt16)aPoints.size() ); // ensure sufficient size for copy
+ rResult = tools::Polygon( (sal_uInt16)aPoints.size() ); // ensure sufficient size for copy
::std::copy(aPoints.begin(), aPoints.end(), rResult.mpImplPolygon->mpPointAry);
}
}
-void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 nPercent )
+void Polygon::ImplReduceEdges( tools::Polygon& rPoly, const double& rArea, sal_uInt16 nPercent )
{
const double fBound = 2000.0 * ( 100 - nPercent ) * 0.01;
sal_uInt16 nNumNoChange = 0,
@@ -926,8 +1132,8 @@ void Polygon::ImplReduceEdges( Polygon& rPoly, const double& rArea, sal_uInt16 n
while( nNumNoChange < 2 )
{
sal_uInt16 nPntCnt = rPoly.GetSize(), nNewPos = 0;
- Polygon aNewPoly( nPntCnt );
- bool bChangeInThisRun = false;
+ tools::Polygon aNewPoly( nPntCnt );
+ bool bChangeInThisRun = false;
for( sal_uInt16 n = 0; n < nPntCnt; n++ )
{
@@ -1084,210 +1290,6 @@ void Polygon::Rotate( const Point& rCenter, double fSin, double fCos )
}
}
-class ImplPointFilter
-{
-public:
- virtual void LastPoint() = 0;
- virtual void Input( const Point& rPoint ) = 0;
-
-protected:
- ~ImplPointFilter() {}
-};
-
-class ImplPolygonPointFilter : public ImplPointFilter
-{
- std::unique_ptr<ImplPolygon> mxPoly;
- sal_uInt16 mnSize;
-public:
- explicit ImplPolygonPointFilter(sal_uInt16 nDestSize)
- : mxPoly(new ImplPolygon(nDestSize))
- , mnSize(0)
- {
- }
-
- virtual ~ImplPolygonPointFilter()
- {
- }
-
- virtual void LastPoint() SAL_OVERRIDE;
- virtual void Input( const Point& rPoint ) SAL_OVERRIDE;
-
- ImplPolygon* release() { return mxPoly.release(); }
-};
-
-void ImplPolygonPointFilter::Input( const Point& rPoint )
-{
- if ( !mnSize || (rPoint != mxPoly->mpPointAry[mnSize-1]) )
- {
- mnSize++;
- if ( mnSize > mxPoly->mnPoints )
- mxPoly->ImplSetSize( mnSize );
- mxPoly->mpPointAry[mnSize-1] = rPoint;
- }
-}
-
-void ImplPolygonPointFilter::LastPoint()
-{
- if ( mnSize < mxPoly->mnPoints )
- mxPoly->ImplSetSize( mnSize );
-};
-
-class ImplEdgePointFilter : public ImplPointFilter
-{
- Point maFirstPoint;
- Point maLastPoint;
- ImplPointFilter& mrNextFilter;
- const long mnLow;
- const long mnHigh;
- const int mnEdge;
- int mnLastOutside;
- bool mbFirst;
-
-public:
- ImplEdgePointFilter( int nEdge, long nLow, long nHigh,
- ImplPointFilter& rNextFilter ) :
- mrNextFilter( rNextFilter ),
- mnLow( nLow ),
- mnHigh( nHigh ),
- mnEdge( nEdge ),
- mnLastOutside( 0 ),
- mbFirst( true )
- {
- }
-
- virtual ~ImplEdgePointFilter() {}
-
- Point EdgeSection( const Point& rPoint, int nEdge ) const;
- int VisibleSide( const Point& rPoint ) const;
- bool IsPolygon() const
- { return maFirstPoint == maLastPoint; }
-
- virtual void Input( const Point& rPoint ) SAL_OVERRIDE;
- virtual void LastPoint() SAL_OVERRIDE;
-};
-
-inline int ImplEdgePointFilter::VisibleSide( const Point& rPoint ) const
-{
- if ( mnEdge & EDGE_HORZ )
- {
- return rPoint.X() < mnLow ? EDGE_LEFT :
- rPoint.X() > mnHigh ? EDGE_RIGHT : 0;
- }
- else
- {
- return rPoint.Y() < mnLow ? EDGE_TOP :
- rPoint.Y() > mnHigh ? EDGE_BOTTOM : 0;
- }
-}
-
-Point ImplEdgePointFilter::EdgeSection( const Point& rPoint, int nEdge ) const
-{
- long lx = maLastPoint.X();
- long ly = maLastPoint.Y();
- long md = rPoint.X() - lx;
- long mn = rPoint.Y() - ly;
- long nNewX;
- long nNewY;
-
- if ( nEdge & EDGE_VERT )
- {
- nNewY = (nEdge == EDGE_TOP) ? mnLow : mnHigh;
- long dy = nNewY - ly;
- if ( !md )
- nNewX = lx;
- else if ( (LONG_MAX / std::abs(md)) >= std::abs(dy) )
- nNewX = (dy * md) / mn + lx;
- else
- {
- BigInt ady = dy;
- ady *= md;
- if( ady.IsNeg() )
- if( mn < 0 )
- ady += mn/2;
- else
- ady -= (mn-1)/2;
- else
- if( mn < 0 )
- ady -= (mn+1)/2;
- else
- ady += mn/2;
- ady /= mn;
- nNewX = (long)ady + lx;
- }
- }
- else
- {
- nNewX = (nEdge == EDGE_LEFT) ? mnLow : mnHigh;
- long dx = nNewX - lx;
- if ( !mn )
- nNewY = ly;
- else if ( (LONG_MAX / std::abs(mn)) >= std::abs(dx) )
- nNewY = (dx * mn) / md + ly;
- else
- {
- BigInt adx = dx;
- adx *= mn;
- if( adx.IsNeg() )
- if( md < 0 )
- adx += md/2;
- else
- adx -= (md-1)/2;
- else
- if( md < 0 )
- adx -= (md+1)/2;
- else
- adx += md/2;
- adx /= md;
- nNewY = (long)adx + ly;
- }
- }
-
- return Point( nNewX, nNewY );
-}
-
-void ImplEdgePointFilter::Input( const Point& rPoint )
-{
- int nOutside = VisibleSide( rPoint );
-
- if ( mbFirst )
- {
- maFirstPoint = rPoint;
- mbFirst = false;
- if ( !nOutside )
- mrNextFilter.Input( rPoint );
- }
- else if ( rPoint == maLastPoint )
- return;
- else if ( !nOutside )
- {
- if ( mnLastOutside )
- mrNextFilter.Input( EdgeSection( rPoint, mnLastOutside ) );
- mrNextFilter.Input( rPoint );
- }
- else if ( !mnLastOutside )
- mrNextFilter.Input( EdgeSection( rPoint, nOutside ) );
- else if ( nOutside != mnLastOutside )
- {
- mrNextFilter.Input( EdgeSection( rPoint, mnLastOutside ) );
- mrNextFilter.Input( EdgeSection( rPoint, nOutside ) );
- }
-
- maLastPoint = rPoint;
- mnLastOutside = nOutside;
-}
-
-void ImplEdgePointFilter::LastPoint()
-{
- if ( !mbFirst )
- {
- int nOutside = VisibleSide( maFirstPoint );
-
- if ( nOutside != mnLastOutside )
- Input( maFirstPoint );
- mrNextFilter.LastPoint();
- }
-}
-
void Polygon::Clip( const Rectangle& rRect, bool bPolygon )
{
// #105251# Justify rect before edge filtering
@@ -1454,7 +1456,7 @@ void Polygon::Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags )
}
}
-void Polygon::Insert( sal_uInt16 nPos, const Polygon& rPoly )
+void Polygon::Insert( sal_uInt16 nPos, const tools::Polygon& rPoly )
{
const sal_uInt16 nInsertCount = rPoly.mpImplPolygon->mnPoints;
@@ -1480,7 +1482,7 @@ Point& Polygon::operator[]( sal_uInt16 nPos )
return mpImplPolygon->mpPointAry[nPos];
}
-Polygon& Polygon::operator=( const Polygon& rPoly )
+tools::Polygon& Polygon::operator=( const tools::Polygon& rPoly )
{
DBG_ASSERT( rPoly.mpImplPolygon->mnRefCount < 0xFFFFFFFE, "Polygon: RefCount overflow" );
@@ -1502,7 +1504,7 @@ Polygon& Polygon::operator=( const Polygon& rPoly )
return *this;
}
-bool Polygon::operator==( const Polygon& rPoly ) const
+bool Polygon::operator==( const tools::Polygon& rPoly ) const
{
if ( (rPoly.mpImplPolygon == mpImplPolygon) )
@@ -1511,7 +1513,7 @@ bool Polygon::operator==( const Polygon& rPoly ) const
return false;
}
-bool Polygon::IsEqual( const Polygon& rPoly ) const
+bool Polygon::IsEqual( const tools::Polygon& rPoly ) const
{
bool bIsEqual = true;
sal_uInt16 i;
@@ -1532,7 +1534,7 @@ bool Polygon::IsEqual( const Polygon& rPoly ) const
return bIsEqual;
}
-SvStream& ReadPolygon( SvStream& rIStream, Polygon& rPoly )
+SvStream& ReadPolygon( SvStream& rIStream, tools::Polygon& rPoly )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "Polygon::>> - Solar-Version not set on rIStream" );
@@ -1583,7 +1585,7 @@ SvStream& ReadPolygon( SvStream& rIStream, Polygon& rPoly )
return rIStream;
}
-SvStream& WritePolygon( SvStream& rOStream, const Polygon& rPoly )
+SvStream& WritePolygon( SvStream& rOStream, const tools::Polygon& rPoly )
{
DBG_ASSERTWARNING( rOStream.GetVersion(), "Polygon::<< - Solar-Version not set on rOStream" );
@@ -1949,4 +1951,6 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
}
}
+} // namespace tools
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 1d36c654d065..6d6b3d888a14 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -41,7 +41,7 @@ ImplPolyPolygon::ImplPolyPolygon( sal_uInt16 nInitSize )
mnCount = nInitSize;
mnSize = nInitSize;
mnResize = 16;
- mpPolyAry = new Polygon*[ nInitSize ];
+ mpPolyAry = new tools::Polygon*[ nInitSize ];
}
ImplPolyPolygon::ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly )
@@ -53,9 +53,9 @@ ImplPolyPolygon::ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly )
if ( rImplPolyPoly.mpPolyAry )
{
- mpPolyAry = new Polygon*[mnSize];
+ mpPolyAry = new tools::Polygon*[mnSize];
for ( sal_uInt16 i = 0; i < mnCount; i++ )
- mpPolyAry[i] = new Polygon( *rImplPolyPoly.mpPolyAry[i] );
+ mpPolyAry[i] = new tools::Polygon( *rImplPolyPoly.mpPolyAry[i] );
}
else
mpPolyAry = NULL;
@@ -86,12 +86,12 @@ PolyPolygon::PolyPolygon( sal_uInt16 nInitSize, sal_uInt16 nResize )
mpImplPolyPolygon = new ImplPolyPolygon( nInitSize, nResize );
}
-PolyPolygon::PolyPolygon( const Polygon& rPoly )
+PolyPolygon::PolyPolygon( const tools::Polygon& rPoly )
{
if ( rPoly.GetSize() )
{
mpImplPolyPolygon = new ImplPolyPolygon( 1 );
- mpImplPolyPolygon->mpPolyAry[0] = new Polygon( rPoly );
+ mpImplPolyPolygon->mpPolyAry[0] = new tools::Polygon( rPoly );
}
else
mpImplPolyPolygon = new ImplPolyPolygon( 16, 16 );
@@ -113,7 +113,7 @@ PolyPolygon::~PolyPolygon()
delete mpImplPolyPolygon;
}
-void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
+void PolyPolygon::Insert( const tools::Polygon& rPoly, sal_uInt16 nPos )
{
if ( mpImplPolyPolygon->mnCount >= MAX_POLYGONS )
return;
@@ -128,16 +128,16 @@ void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
nPos = mpImplPolyPolygon->mnCount;
if ( !mpImplPolyPolygon->mpPolyAry )
- mpImplPolyPolygon->mpPolyAry = new Polygon*[mpImplPolyPolygon->mnSize];
+ mpImplPolyPolygon->mpPolyAry = new tools::Polygon*[mpImplPolyPolygon->mnSize];
else if ( mpImplPolyPolygon->mnCount == mpImplPolyPolygon->mnSize )
{
sal_uInt16 nOldSize = mpImplPolyPolygon->mnSize;
sal_uInt16 nNewSize = nOldSize + mpImplPolyPolygon->mnResize;
- Polygon** pNewAry;
+ tools::Polygon** pNewAry;
if ( nNewSize >= MAX_POLYGONS )
nNewSize = MAX_POLYGONS;
- pNewAry = new Polygon*[nNewSize];
+ pNewAry = new tools::Polygon*[nNewSize];
memcpy( pNewAry, mpImplPolyPolygon->mpPolyAry, nPos*sizeof(Polygon*) );
memcpy( pNewAry+nPos+1, mpImplPolyPolygon->mpPolyAry+nPos,
(nOldSize-nPos)*sizeof(Polygon*) );
@@ -152,7 +152,7 @@ void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
(mpImplPolyPolygon->mnCount-nPos)*sizeof(Polygon*) );
}
- mpImplPolyPolygon->mpPolyAry[nPos] = new Polygon( rPoly );
+ mpImplPolyPolygon->mpPolyAry[nPos] = new tools::Polygon( rPoly );
mpImplPolyPolygon->mnCount++;
}
@@ -173,7 +173,7 @@ void PolyPolygon::Remove( sal_uInt16 nPos )
(mpImplPolyPolygon->mnCount-nPos)*sizeof(Polygon*) );
}
-void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos )
+void PolyPolygon::Replace( const tools::Polygon& rPoly, sal_uInt16 nPos )
{
assert(nPos < Count() && "PolyPolygon::Replace(): nPos >= nSize");
@@ -184,10 +184,10 @@ void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos )
}
delete mpImplPolyPolygon->mpPolyAry[nPos];
- mpImplPolyPolygon->mpPolyAry[nPos] = new Polygon( rPoly );
+ mpImplPolyPolygon->mpPolyAry[nPos] = new tools::Polygon( rPoly );
}
-const Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const
+const tools::Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const
{
assert(nPos < Count() && "PolyPolygon::GetObject(): nPos >= nSize");
@@ -276,7 +276,7 @@ void PolyPolygon::Optimize( PolyOptimizeFlags nOptimizeFlags, const PolyOptimize
if( bEdges )
{
mpImplPolyPolygon->mpPolyAry[ i ]->Optimize( PolyOptimizeFlags::NO_SAME );
- Polygon::ImplReduceEdges( *( mpImplPolyPolygon->mpPolyAry[ i ] ), fArea, nPercent );
+ tools::Polygon::ImplReduceEdges( *( mpImplPolyPolygon->mpPolyAry[ i ] ), fArea, nPercent );
}
if( bool(nOptimizeFlags) )
@@ -290,7 +290,7 @@ void PolyPolygon::AdaptiveSubdivide( tools::PolyPolygon& rResult, const double d
{
rResult.Clear();
- Polygon aPolygon;
+ tools::Polygon aPolygon;
for( sal_uInt16 i = 0; i < mpImplPolyPolygon->mnCount; i++ )
{
@@ -304,7 +304,7 @@ tools::PolyPolygon PolyPolygon::SubdivideBezier( const tools::PolyPolygon& rPoly
sal_uInt16 i, nPolys = rPolyPoly.Count();
tools::PolyPolygon aPolyPoly( nPolys );
for( i=0; i<nPolys; ++i )
- aPolyPoly.Insert( Polygon::SubdivideBezier( rPolyPoly.GetObject(i) ) );
+ aPolyPoly.Insert( tools::Polygon::SubdivideBezier( rPolyPoly.GetObject(i) ) );
return aPolyPoly;
}
@@ -476,7 +476,7 @@ Rectangle PolyPolygon::GetBoundRect() const
for ( sal_uInt16 n = 0; n < nPolyCount; n++ )
{
- const Polygon* pPoly = mpImplPolyPolygon->mpPolyAry[n];
+ const tools::Polygon* pPoly = mpImplPolyPolygon->mpPolyAry[n];
const Point* pAry = pPoly->GetConstPointAry();
sal_uInt16 nPointCount = pPoly->GetSize();
@@ -553,7 +553,7 @@ SvStream& ReadPolyPolygon( SvStream& rIStream, tools::PolyPolygon& rPolyPoly )
{
DBG_ASSERTWARNING( rIStream.GetVersion(), "PolyPolygon::>> - Solar-Version not set on rIStream" );
- Polygon* pPoly;
+ tools::Polygon* pPoly;
sal_uInt16 nPolyCount(0);
// Read number of polygons
@@ -579,7 +579,7 @@ SvStream& ReadPolyPolygon( SvStream& rIStream, tools::PolyPolygon& rPolyPoly )
for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
{
- pPoly = new Polygon;
+ pPoly = new tools::Polygon;
ReadPolygon( rIStream, *pPoly );
rPolyPoly.mpImplPolyPolygon->mpPolyAry[i] = pPoly;
}
@@ -611,7 +611,7 @@ void PolyPolygon::Read( SvStream& rIStream )
DBG_ASSERTWARNING( rIStream.GetVersion(), "PolyPolygon::>> - Solar-Version not set on rIStream" );
- Polygon* pPoly;
+ tools::Polygon* pPoly;
sal_uInt16 nPolyCount(0);
// Read number of polygons
@@ -637,7 +637,7 @@ void PolyPolygon::Read( SvStream& rIStream )
for ( sal_uInt16 i = 0; i < nPolyCount; i++ )
{
- pPoly = new Polygon;
+ pPoly = new tools::Polygon;
pPoly->ImplRead( rIStream );
mpImplPolyPolygon->mpPolyAry[i] = pPoly;
}
@@ -668,7 +668,7 @@ basegfx::B2DPolyPolygon PolyPolygon::getB2DPolyPolygon() const
for(sal_uInt16 a(0); a < mpImplPolyPolygon->mnCount; a++)
{
- Polygon* pCandidate = mpImplPolyPolygon->mpPolyAry[a];
+ tools::Polygon* pCandidate = mpImplPolyPolygon->mpPolyAry[a];
aRetval.append(pCandidate->getB2DPolygon());
}
@@ -689,7 +689,7 @@ PolyPolygon::PolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon)
for(sal_uInt16 a(0); a < nCount; a++)
{
basegfx::B2DPolygon aCandidate(rPolyPolygon.getB2DPolygon(sal_uInt32(a)));
- mpImplPolyPolygon->mpPolyAry[a] = new Polygon( aCandidate );
+ mpImplPolyPolygon->mpPolyAry[a] = new tools::Polygon( aCandidate );
}
}
else
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 1c9d17788837..c35ff9512e84 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -1435,7 +1435,7 @@ void PolyArgs::ClosePolygon()
DBG_ASSERT( (mpFlagAry[0]==POLY_NORMAL), "FTGlyphOutline: PolyFinishFE failed!" );
DBG_ASSERT( (mpFlagAry[mnPoints]==POLY_NORMAL), "FTGlyphOutline: PolyFinishFS failed!" );
- Polygon aPoly( mnPoints, mpPointAry, (bHasOffline ? mpFlagAry : NULL) );
+ tools::Polygon aPoly( mnPoints, mpPointAry, (bHasOffline ? mpFlagAry : NULL) );
// #i35928#
// This may be a invalid polygons, e.g. the last point is a control point.
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index f0338b7b1d46..912b91768176 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -95,7 +95,7 @@ public:
void DrawLinesAA( sal_uInt32 nPoints, const SalPoint* pPtAry, bool bClose );
void DrawEdgeAA( double nX1, double nY1, double nX2, double nY2 );
void DrawConvexPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, bool blockAA = false );
- void DrawConvexPolygon( const Polygon& rPolygon, bool blockAA = false );
+ void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA = false );
void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA = false );
void DrawRect( long nX, long nY, long nWidth, long nHeight );
void DrawRect( const Rectangle& rRect );
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 174563e98dec..02c69fa99e06 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -697,7 +697,7 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( sal_uInt32 nPoints, const SalPoin
CHECK_GL_ERROR();
}
-void OpenGLSalGraphicsImpl::DrawConvexPolygon( const Polygon& rPolygon, bool blockAA )
+void OpenGLSalGraphicsImpl::DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA )
{
sal_uInt16 nPoints = rPolygon.GetSize() - 1;
std::vector<GLfloat> aVertices(nPoints * 2);
@@ -1057,7 +1057,7 @@ void OpenGLSalGraphicsImpl::DrawLinearGradient( const Gradient& rGradient, const
Rectangle aBoundRect;
Point aCenter;
rGradient.GetBoundRect( rRect, aBoundRect, aCenter );
- Polygon aPoly( aBoundRect );
+ tools::Polygon aPoly( aBoundRect );
aPoly.Rotate( aCenter, rGradient.GetAngle() % 3600 );
GLfloat aTexCoord[8] = { 0, 1, 1, 1, 1, 0, 0, 0 };
@@ -1100,7 +1100,7 @@ void OpenGLSalGraphicsImpl::DrawAxialGradient( const Gradient& rGradient, const
Point aPt0( aRect.Left(), (aRect.Top() + aRect.Bottom() + 1) / 2 );
Point aPt3( aRect.Right(), (aRect.Top() + aRect.Bottom() + 1) / 2 );
- Polygon aPoly( 7 );
+ tools::Polygon aPoly( 7 );
aPoly.SetPoint( aPt0, 0 );
aPoly.SetPoint( aRect.TopLeft(), 1 );
aPoly.SetPoint( aRect.TopRight(), 2 );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index dadb241fa25d..0157b7ddd589 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2500,11 +2500,11 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
pDev->SetLineColor();
pDev->SetFillColor( Color( COL_BLACK ) );
- pDev->DrawPolygon( Polygon( aCenterPos, nRadX, nRadY ) );
+ pDev->DrawPolygon( tools::Polygon( aCenterPos, nRadX, nRadY ) );
nRadX -= aBrd1Size.Width();
nRadY -= aBrd1Size.Height();
pDev->SetFillColor( Color( COL_WHITE ) );
- pDev->DrawPolygon( Polygon( aCenterPos, nRadX, nRadY ) );
+ pDev->DrawPolygon( tools::Polygon( aCenterPos, nRadX, nRadY ) );
if ( mbChecked )
{
nRadX -= aBrd1Size.Width();
@@ -2514,7 +2514,7 @@ void RadioButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize
if ( !nRadY )
nRadY = 1;
pDev->SetFillColor( Color( COL_BLACK ) );
- pDev->DrawPolygon( Polygon( aCenterPos, nRadX, nRadY ) );
+ pDev->DrawPolygon( tools::Polygon( aCenterPos, nRadX, nRadY ) );
}
pDev->Pop();
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index ca754c28e4d9..fe318a0dc3c2 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -470,7 +470,7 @@ void RectType::Draw(OutputDevice& rOut)
RotatePoint(aPts[i],Pos1.x,Pos1.y,sn,cs);
}
SetLine(L,rOut);
- Polygon aPoly(4,aPts);
+ tools::Polygon aPoly(4,aPts);
rOut.DrawPolygon(aPoly);
}
}
@@ -479,7 +479,7 @@ void PolyType::Draw(OutputDevice& rOut)
{
if ((Flags & PolyClosBit) !=0) SetArea(F,rOut);
SetLine(L,rOut);
- Polygon aPoly(nPoints);
+ tools::Polygon aPoly(nPoints);
sal_uInt16 i;
for(i=0;i<nPoints;i++) aPoly.SetPoint(Point(EckP[i].x,EckP[i].y),i);
if ((Flags & PolyClosBit) !=0) {
@@ -493,8 +493,8 @@ void SplnType::Draw(OutputDevice& rOut)
{
if ((Flags & PolyClosBit) !=0) SetArea(F,rOut);
SetLine(L,rOut);
- Polygon aPoly(0);
- Polygon aSpln(nPoints);
+ tools::Polygon aPoly(0);
+ tools::Polygon aSpln(nPoints);
sal_uInt16 i;
for(i=0;i<nPoints;i++) aSpln.SetPoint(Point(EckP[i].x,EckP[i].y),i);
if ((Flags & PolyClosBit) !=0) {
diff --git a/vcl/source/filter/sgvspln.cxx b/vcl/source/filter/sgvspln.cxx
index 27ee2be09817..341ffa5bae1e 100644
--- a/vcl/source/filter/sgvspln.cxx
+++ b/vcl/source/filter/sgvspln.cxx
@@ -606,7 +606,7 @@ sal_uInt16 ParaSpline(sal_uInt16 n, double* x, double* y, sal_uInt8 MargCond,
return 0;
}
-bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
+bool CalcSpline(tools::Polygon& rPoly, bool Periodic, sal_uInt16& n,
double*& ax, double*& ay, double*& bx, double*& by,
double*& cx, double*& cy, double*& dx, double*& dy, double*& T)
{
@@ -675,7 +675,7 @@ bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
return bRet;
}
-bool Spline2Poly(Polygon& rSpln, bool Periodic, Polygon& rPoly)
+bool Spline2Poly(tools::Polygon& rSpln, bool Periodic, tools::Polygon& rPoly)
{
short MinKoord=-32000; // to prevent
short MaxKoord=32000; // overflows
diff --git a/vcl/source/filter/sgvspln.hxx b/vcl/source/filter/sgvspln.hxx
index 4eb822e854a4..906dbe2c6f47 100644
--- a/vcl/source/filter/sgvspln.hxx
+++ b/vcl/source/filter/sgvspln.hxx
@@ -28,7 +28,7 @@
* coefficient array has been allocated, which can be freed by the caller
* using a delete.
*/
-bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
+bool CalcSpline(tools::Polygon& rPoly, bool Periodic, sal_uInt16& n,
double*& ax, double*& ay, double*& bx, double*& by,
double*& cx, double*& cy, double*& dx, double*& dy, double*& T);
@@ -39,7 +39,7 @@ bool CalcSpline(Polygon& rPoly, bool Periodic, sal_uInt16& n,
* In the first case the polygon has 0, in the second case PolyMax points.
* To prevent coordinate overflows we limit them to +/-32000.
*/
-bool Spline2Poly(Polygon& rSpln, bool Periodic, Polygon& rPoly);
+bool Spline2Poly(tools::Polygon& rSpln, bool Periodic, tools::Polygon& rPoly);
#endif // INCLUDED_VCL_SOURCE_FILTER_SGVSPLN_HXX
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 16b3d60ff7a5..2d022b27f3b3 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -270,7 +270,7 @@ void EMFWriter::ImplWritePlusPoint( const Point& rPoint )
m_rStm.WriteUInt16( aPoint.X() ).WriteUInt16( aPoint.Y() );
}
-void EMFWriter::ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_uInt32& nTrans )
+void EMFWriter::ImplWritePlusFillPolygonRecord( const tools::Polygon& rPoly, const sal_uInt32& nTrans )
{
ImplBeginCommentRecord( WIN_EMR_COMMENT_EMFPLUS );
if( rPoly.GetSize() )
@@ -664,7 +664,7 @@ void EMFWriter::ImplWriteRect( const Rectangle& rRect )
.WriteInt32( aRect.Bottom() );
}
-void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, bool bClose )
+void EMFWriter::ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose )
{
if( rPoly.GetSize() )
{
@@ -726,7 +726,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly
for( i = 0; i < nPolyCount; i++ )
{
- const Polygon& rPoly = rPolyPoly[ i ];
+ const tools::Polygon& rPoly = rPolyPoly[ i ];
for( n = 0; n < rPoly.GetSize(); n++ )
ImplWritePoint( rPoly[ n ] );
@@ -751,7 +751,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed
for ( i = 0; i < nPolyCount; i++ )
{
n = 0;
- const Polygon& rPoly = rPolyPoly[ i ];
+ const tools::Polygon& rPoly = rPolyPoly[ i ];
while ( n < rPoly.GetSize() )
{
if( n == 0 )
@@ -771,7 +771,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed
if ( nBezPoints )
{
ImplBeginRecord( WIN_EMR_POLYBEZIERTO );
- Polygon aNewPoly( nBezPoints + 1 );
+ tools::Polygon aNewPoly( nBezPoints + 1 );
aNewPoly[ 0 ] = rPoly[ n - 1 ];
for ( o = 0; o < nBezPoints; o++ )
aNewPoly[ o + 1 ] = rPoly[ n + o ];
@@ -791,7 +791,7 @@ void EMFWriter::ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClosed
if ( nPoints > 1 )
{
ImplBeginRecord( WIN_EMR_POLYLINETO );
- Polygon aNewPoly( nPoints + 1 );
+ tools::Polygon aNewPoly( nPoints + 1 );
aNewPoly[ 0 ] = rPoly[ n - 1];
for ( o = 1; o <= nPoints; o++ )
aNewPoly[ o ] = rPoly[ n - 1 + o ];
@@ -969,7 +969,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a));
- ImplWritePolygonRecord( Polygon(aCandidate), false );
+ ImplWritePolygonRecord( tools::Polygon(aCandidate), false );
}
}
@@ -983,8 +983,8 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas
for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++)
{
- const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
- ImplWritePolyPolygonRecord(tools::PolyPolygon(Polygon(aPolygon)));
+ const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
+ ImplWritePolyPolygonRecord(tools::PolyPolygon( tools::Polygon(aPolygon) ));
}
maVDev->SetLineColor(aOldLineColor);
@@ -1120,28 +1120,28 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
{
if( maVDev->IsLineColor() || maVDev->IsFillColor() )
{
- 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;
@@ -1161,7 +1161,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
if( maVDev->IsLineColor() )
{
const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pAction);
- const Polygon& rPoly = pA->GetPolygon();
+ const tools::Polygon& rPoly = pA->GetPolygon();
if( rPoly.GetSize() )
{
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index 80fc6e39ec89..35506c209b36 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -74,7 +74,7 @@ private:
void ImplWriteSize( const Size& rSize);
void ImplWriteRect( const Rectangle& rRect );
void ImplWritePath( const tools::PolyPolygon& rPolyPoly, bool bClose );
- void ImplWritePolygonRecord( const Polygon& rPoly, bool bClose );
+ void ImplWritePolygonRecord( const tools::Polygon& rPoly, bool bClose );
void ImplWritePolyPolygonRecord( const tools::PolyPolygon& rPolyPoly );
void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP );
void ImplWriteTextRecord( const Point& rPos, const OUString& rText, const long* pDXArray, sal_uInt32 nWidth );
@@ -83,7 +83,7 @@ private:
void ImplWrite( const GDIMetaFile& rMtf );
void WriteEMFPlusHeader( const Size &rMtfSizePix, const Size &rMtfSizeLog );
void ImplWritePlusEOF();
- void ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_uInt32& nTrans );
+ void ImplWritePlusFillPolygonRecord( const tools::Polygon& rPoly, const sal_uInt32& nTrans );
void ImplWritePlusColor( const Color& rColor, const sal_uInt32& nTrans );
void ImplWritePlusPoint( const Point& rPoint );
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 7f880d0ea8f9..96cbac64a4fc 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -381,7 +381,7 @@ static bool ImplReadRegion( tools::PolyPolygon& rPolyPoly, SvStream& rStream, sa
Rectangle aRectangle(Point(nx1, ny1), Point(nx2, ny2));
- Polygon aPolygon(aRectangle);
+ tools::Polygon aPolygon(aRectangle);
tools::PolyPolygon aPolyPolyOr1(aPolygon);
tools::PolyPolygon aPolyPolyOr2(rPolyPoly);
rPolyPoly.GetUnion(aPolyPolyOr1, aPolyPolyOr2);
@@ -485,7 +485,7 @@ void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const bool skipFirst)
nStartIndex ++;
}
- Polygon aPolygon = ReadPolygon<T>(nStartIndex, nPoints);
+ tools::Polygon aPolygon = ReadPolygon<T>(nStartIndex, nPoints);
drawer(pOut, aPolygon, skipFirst, bRecordPath);
}
@@ -497,14 +497,14 @@ void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const bool skipFirst)
* pWMF: the stream containings the polygons
* */
template <class T>
-Polygon EnhWMFReader::ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints)
+tools::Polygon EnhWMFReader::ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints)
{
bool bRecordOk = nPoints <= SAL_MAX_UINT16;
SAL_WARN_IF(!bRecordOk, "vcl.filter", "polygon record has more polygons than we can handle");
if (!bRecordOk)
- return Polygon();
+ return tools::Polygon();
- Polygon aPolygon(nPoints);
+ tools::Polygon aPolygon(nPoints);
for (sal_uInt16 i = nStartIndex ; i < nPoints && pWMF->good(); i++ )
{
T nX, nY;
@@ -545,7 +545,7 @@ void EnhWMFReader::ReadAndDrawPolyLine()
// Get polygon points:
for ( i = 0; ( i < nPoly ) && pWMF->good(); i++ )
{
- Polygon aPolygon = ReadPolygon<T>(0, pnPoints[i]);
+ tools::Polygon aPolygon = ReadPolygon<T>(0, pnPoints[i]);
pOut->DrawPolyLine( aPolygon, false, bRecordPath );
}
}
@@ -603,7 +603,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon()
++nReadPoints;
}
- aPolyPoly.Insert(Polygon(nPointCount, pPtAry.get()));
+ aPolyPoly.Insert( tools::Polygon(nPointCount, pPtAry.get()) );
}
pOut->DrawPolyPolygon( aPolyPoly, bRecordPath );
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index d4bdaa86cb8b..74a0774a458a 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -97,22 +97,22 @@ basegfx::B2DPolyPolygon WinMtfClipPath::getClipPath() const
void WinMtfPathObj::AddPoint( const Point& rPoint )
{
if ( bClosed )
- Insert( Polygon() );
- Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
+ Insert( tools::Polygon() );
+ tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
rPoly.Insert( rPoly.GetSize(), rPoint );
bClosed = false;
}
-void WinMtfPathObj::AddPolyLine( const Polygon& rPolyLine )
+void WinMtfPathObj::AddPolyLine( const tools::Polygon& rPolyLine )
{
if ( bClosed )
- Insert( Polygon() );
- Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
+ Insert( tools::Polygon() );
+ tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
rPoly.Insert( rPoly.GetSize(), rPolyLine );
bClosed = false;
}
-void WinMtfPathObj::AddPolygon( const Polygon& rPoly )
+void WinMtfPathObj::AddPolygon( const tools::Polygon& rPoly )
{
Insert( rPoly );
bClosed = true;
@@ -130,7 +130,7 @@ void WinMtfPathObj::ClosePath()
{
if ( Count() )
{
- Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
+ tools::Polygon& rPoly = ((tools::PolyPolygon&)*this)[ Count() - 1 ];
if ( rPoly.GetSize() > 2 )
{
Point aFirst( rPoly[ 0 ] );
@@ -483,7 +483,7 @@ void WinMtfOutput::ImplMap( vcl::Font& rFont )
rFont.SetOrientation( 3600 - rFont.GetOrientation() );
}
-Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
+tools::Polygon& WinMtfOutput::ImplMap( tools::Polygon& rPolygon )
{
sal_uInt16 nPoints = rPolygon.GetSize();
for ( sal_uInt16 i = 0; i < nPoints; i++ )
@@ -493,7 +493,7 @@ Polygon& WinMtfOutput::ImplMap( Polygon& rPolygon )
return rPolygon;
}
-Polygon& WinMtfOutput::ImplScale( Polygon& rPolygon )
+tools::Polygon& WinMtfOutput::ImplScale( tools::Polygon& rPolygon )
{
sal_uInt16 nPoints = rPolygon.GetSize();
for ( sal_uInt16 i = 0; i < nPoints; i++ )
@@ -653,7 +653,7 @@ void WinMtfOutput::ImplDrawClippedPolyPolygon( const tools::PolyPolygon& rPolyPo
mpGDIMetaFile->AddAction( new MetaRectAction( rPolyPoly.GetBoundRect() ) );
else
{
- Polygon aPoly( rPolyPoly[ 0 ] );
+ tools::Polygon aPoly( rPolyPoly[ 0 ] );
sal_uInt16 nCount = aPoly.GetSize();
if ( nCount )
{
@@ -1022,7 +1022,7 @@ void WinMtfOutput::MoveTo( const Point& rPoint, bool bRecordPath )
// fdo#57353 create new subpath for subsequent moves
if ( aPathObj.Count() )
if ( aPathObj[ aPathObj.Count() - 1 ].GetSize() )
- aPathObj.Insert( Polygon() );
+ aPathObj.Insert( tools::Polygon() );
aPathObj.AddPoint( aDest );
}
maActPos = aDest;
@@ -1049,7 +1049,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge )
if ( mbComplexClip )
{
- Polygon aPoly( ImplMap( rRect ) );
+ tools::Polygon aPoly( ImplMap( rRect ) );
tools::PolyPolygon aPolyPolyRect( aPoly );
tools::PolyPolygon aDest;
tools::PolyPolygon(aClipPath.getClipPath()).GetIntersection( aPolyPolyRect, aDest );
@@ -1064,7 +1064,7 @@ void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge )
ImplSetNonPersistentLineColorTransparenz();
mpGDIMetaFile->AddAction( new MetaRectAction( ImplMap( rRect ) ) );
UpdateLineStyle();
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( ImplMap( rRect ) ),maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( ImplMap( rRect ) ),maLineStyle.aLineInfo ) );
}
else
{
@@ -1101,7 +1101,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect )
ImplSetNonPersistentLineColorTransparenz();
mpGDIMetaFile->AddAction( new MetaEllipseAction( ImplMap( rRect ) ) );
UpdateLineStyle();
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) );
}
else
{
@@ -1127,10 +1127,10 @@ void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const P
Point aCenter( aRect.Center() );
Size aRad( aRect.GetWidth() / 2, aRect.GetHeight() / 2 );
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aCenter, aRad.Width(), aRad.Height() ), maLineStyle.aLineInfo ) );
}
else
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_ARC ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_ARC ), maLineStyle.aLineInfo ) );
}
else
mpGDIMetaFile->AddAction( new MetaArcAction( aRect, aStart, aEnd ) );
@@ -1153,7 +1153,7 @@ void WinMtfOutput::DrawPie( const Rectangle& rRect, const Point& rStart, const P
ImplSetNonPersistentLineColorTransparenz();
mpGDIMetaFile->AddAction( new MetaPieAction( aRect, aStart, aEnd ) );
UpdateLineStyle();
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_PIE ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_PIE ), maLineStyle.aLineInfo ) );
}
else
{
@@ -1176,7 +1176,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const
ImplSetNonPersistentLineColorTransparenz();
mpGDIMetaFile->AddAction( new MetaChordAction( aRect, aStart, aEnd ) );
UpdateLineStyle();
- mpGDIMetaFile->AddAction( new MetaPolyLineAction( Polygon( aRect, aStart, aEnd, POLY_CHORD ), maLineStyle.aLineInfo ) );
+ mpGDIMetaFile->AddAction( new MetaPolyLineAction( tools::Polygon( aRect, aStart, aEnd, POLY_CHORD ), maLineStyle.aLineInfo ) );
}
else
{
@@ -1185,7 +1185,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const
}
}
-void WinMtfOutput::DrawPolygon( Polygon& rPolygon, bool bRecordPath )
+void WinMtfOutput::DrawPolygon( tools::Polygon& rPolygon, bool bRecordPath )
{
UpdateClipRegion();
ImplMap( rPolygon );
@@ -1290,7 +1290,7 @@ void WinMtfOutput::DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon, bool bReco
}
}
-void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, bool bTo, bool bRecordPath )
+void WinMtfOutput::DrawPolyLine( tools::Polygon& rPolygon, bool bTo, bool bRecordPath )
{
UpdateClipRegion();
@@ -1313,7 +1313,7 @@ void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, bool bTo, bool bRecordPath )
}
}
-void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, bool bTo, bool bRecordPath )
+void WinMtfOutput::DrawPolyBezier( tools::Polygon& rPolygon, bool bTo, bool bRecordPath )
{
UpdateClipRegion();
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index b68b9acfb30d..bf933632f008 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -278,8 +278,8 @@ public:
void ClosePath();
void AddPoint( const Point& rPoint );
- void AddPolygon( const Polygon& rPoly );
- void AddPolyLine( const Polygon& rPoly );
+ void AddPolygon( const tools::Polygon& rPoly );
+ void AddPolyLine( const tools::Polygon& rPoly );
void AddPolyPolygon( const tools::PolyPolygon& rPolyPolygon );
};
@@ -598,10 +598,10 @@ class WinMtfOutput
Size ImplMap( const Size& rSize, bool bDoWorldTransform = true);
Rectangle ImplMap( const Rectangle& rRectangle );
void ImplMap( vcl::Font& rFont );
- Polygon& ImplMap( Polygon& rPolygon );
- tools::PolyPolygon& ImplMap( tools::PolyPolygon& rPolyPolygon );
- Polygon& ImplScale( Polygon& rPolygon );
- tools::PolyPolygon& ImplScale( tools::PolyPolygon& rPolyPolygon );
+ tools::Polygon& ImplMap( tools::Polygon& rPolygon );
+ tools::PolyPolygon& ImplMap( tools::PolyPolygon& rPolyPolygon );
+ tools::Polygon& ImplScale( tools::Polygon& rPolygon );
+ tools::PolyPolygon& ImplScale( tools::PolyPolygon& rPolyPolygon );
void ImplResizeObjectArry( sal_uInt32 nNewEntry );
void ImplSetNonPersistentLineColorTransparenz();
void ImplDrawClippedPolyPolygon( const tools::PolyPolygon& rPolyPoly );
@@ -654,7 +654,7 @@ public:
void ClearPath(){ aPathObj.Init(); };
void ClosePath(){ aPathObj.ClosePath(); };
- const tools::PolyPolygon& GetPathObj(){ return aPathObj; };
+ const tools::PolyPolygon& GetPathObj(){ return aPathObj; };
void MoveTo( const Point& rPoint, bool bRecordPath = false );
void LineTo( const Point& rPoint, bool bRecordPath = false );
@@ -678,22 +678,20 @@ public:
const Point& rStartAngle,
const Point& rEndAngle
);
- void DrawPolygon( Polygon& rPolygon, bool bRecordPath = false );
- void DrawPolygon( Polygon& rPolygon, bool /*bDrawTo*/, bool bRecordPath)
+ void DrawPolygon( tools::Polygon& rPolygon, bool bRecordPath = false );
+ void DrawPolygon( tools::Polygon& rPolygon, bool /*bDrawTo*/, bool bRecordPath)
{
//For ReadAndDrawPolygon template compatibility
DrawPolygon(rPolygon, bRecordPath);
}
void DrawPolyPolygon( tools::PolyPolygon& rPolyPolygon, bool bRecordPath = false );
- void DrawPolyLine(
- Polygon& rPolygon,
- bool bDrawTo = false,
- bool bRecordPath = false
+ void DrawPolyLine( tools::Polygon& rPolygon,
+ bool bDrawTo = false,
+ bool bRecordPath = false
);
- void DrawPolyBezier(
- Polygon& rPolygin,
- bool bDrawTo = false,
- bool bRecordPath = false
+ void DrawPolyBezier( tools::Polygon& rPolygin,
+ bool bDrawTo = false,
+ bool bRecordPath = false
);
void DrawText( Point& rPosition,
OUString& rString,
@@ -768,7 +766,7 @@ public:
private:
template <class T> void ReadAndDrawPolyPolygon();
template <class T> void ReadAndDrawPolyLine();
- template <class T> Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints);
+ template <class T> tools::Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints);
template <class T, class Drawer> void ReadAndDrawPolygon(Drawer drawer, const bool skipFirst);
Rectangle ReadRectangle();
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 52f228ef1c99..a379d8bd9bc4 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -350,7 +350,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
}
else
{
- Polygon aPoly(nPoints);
+ tools::Polygon aPoly(nPoints);
for (sal_uInt16 i(0); i < nPoints && pWMF->good(); ++i)
aPoly[ i ] = ReadPoint();
pOut->DrawPolygon(aPoly);
@@ -429,7 +429,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
pPtAry[b] = ReadPoint();
}
- aPolyPoly.Insert(Polygon(nPointCount, pPtAry));
+ aPolyPoly.Insert( tools::Polygon(nPointCount, pPtAry) );
}
bRecordOk &= pWMF->good();
@@ -458,7 +458,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
}
else
{
- Polygon aPoly(nPoints);
+ tools::Polygon aPoly(nPoints);
for (sal_uInt16 i(0); i < nPoints && pWMF->good(); ++i)
aPoly[ i ] = ReadPoint();
pOut->DrawPolyLine( aPoly );
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index 623f0cd2d8d9..bdcf8701445e 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -611,9 +611,9 @@ void WMFWriter::WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, c
WriteRectangle(rRect);
}
-void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
+void WMFWriter::WMFRecord_Polygon(const tools::Polygon & rPoly)
{
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
if ( rPoly.HasFlags() )
rPoly.AdaptiveSubdivide( aSimplePoly );
else
@@ -625,9 +625,9 @@ void WMFWriter::WMFRecord_Polygon(const Polygon & rPoly)
WritePointXY(aSimplePoly.GetPoint(i));
}
-void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly)
+void WMFWriter::WMFRecord_PolyLine(const tools::Polygon & rPoly)
{
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
if ( rPoly.HasFlags() )
rPoly.AdaptiveSubdivide( aSimplePoly );
else
@@ -641,7 +641,7 @@ void WMFWriter::WMFRecord_PolyLine(const Polygon & rPoly)
void WMFWriter::WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly)
{
- const Polygon * pPoly;
+ const tools::Polygon * pPoly;
sal_uInt16 nCount,nSize,i,j;
nCount=rPolyPoly.Count();
@@ -650,7 +650,7 @@ void WMFWriter::WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly)
{
if ( aSimplePolyPoly[ i ].HasFlags() )
{
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
aSimplePolyPoly[ i ].AdaptiveSubdivide( aSimplePoly );
aSimplePolyPoly[ i ] = aSimplePoly;
}
@@ -981,7 +981,7 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx:
for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++)
{
const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a));
- WMFRecord_PolyLine(Polygon(aCandidate));
+ WMFRecord_PolyLine( tools::Polygon(aCandidate) );
}
}
@@ -996,8 +996,8 @@ void WMFWriter::HandleLineInfoPolyPolygons(const LineInfo& rInfo, const basegfx:
for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++)
{
- const Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
- WMFRecord_Polygon(Polygon(aPolygon));
+ const tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
+ WMFRecord_Polygon( tools::Polygon(aPolygon) );
}
aSrcLineColor = aOldLineColor;
@@ -1119,7 +1119,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
case MetaActionType::POLYLINE:
{
const MetaPolyLineAction* pA = static_cast<const MetaPolyLineAction*>(pMA);
- const Polygon& rPoly = pA->GetPolygon();
+ const tools::Polygon& rPoly = pA->GetPolygon();
if( rPoly.GetSize() )
{
diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx
index 1acbc4e4f4e0..d26cac01ecc7 100644
--- a/vcl/source/filter/wmf/wmfwr.hxx
+++ b/vcl/source/filter/wmf/wmfwr.hxx
@@ -152,8 +152,8 @@ private:
void WMFRecord_LineTo(const Point & rPoint);
void WMFRecord_MoveTo(const Point & rPoint);
void WMFRecord_Pie(const Rectangle & rRect, const Point & rStartPt, const Point & rEndPt);
- void WMFRecord_Polygon(const Polygon & rPoly);
- void WMFRecord_PolyLine(const Polygon & rPoly);
+ void WMFRecord_Polygon(const tools::Polygon & rPoly);
+ void WMFRecord_PolyLine(const tools::Polygon & rPoly);
void WMFRecord_PolyPolygon(const tools::PolyPolygon & rPolyPoly);
void WMFRecord_Rectangle(const Rectangle & rRect);
void WMFRecord_RestoreDC();
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index 69a5860a0188..16e300c19de5 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -711,7 +711,7 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor )
{
Point aTmpPoint;
Rectangle aTmpRectangle( aTmpPoint, aSizePix );
- Polygon aPoly( aTmpRectangle );
+ tools::Polygon aPoly( aTmpRectangle );
aPoly.Rotate( aTmpPoint, (sal_uInt16) nAngle10 );
Rectangle aNewBound( aPoly.GetBoundRect() );
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index a7821224fdf7..2d939bb5f66e 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -51,12 +51,12 @@ void ImplWriteRect( SvStream& rOStm, const Rectangle& rRect )
WritePair( rOStm, rRect.BottomRight() );
}
-void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
+void ImplReadPoly( SvStream& rIStm, tools::Polygon& rPoly )
{
sal_Int32 nSize;
rIStm.ReadInt32( nSize );
- rPoly = Polygon( (sal_uInt16) nSize );
+ rPoly = tools::Polygon( (sal_uInt16) nSize );
for( sal_uInt16 i = 0; i < (sal_uInt16) nSize; i++ )
ReadPair( rIStm, rPoly[ i ] );
@@ -64,7 +64,7 @@ void ImplReadPoly( SvStream& rIStm, Polygon& rPoly )
void ImplReadPolyPoly( SvStream& rIStm, tools::PolyPolygon& rPolyPoly )
{
- Polygon aPoly;
+ tools::Polygon aPoly;
sal_Int32 nPolyCount;
rIStm.ReadInt32( nPolyCount );
@@ -94,7 +94,7 @@ void ImplWritePolyPolyAction( SvStream& rOStm, const tools::PolyPolygon& rPolyPo
// #i102224# Here the possible curved nature of Polygon was
// ignored (for all those years). Adapted to at least write
// a polygon representing the curve as good as possible
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
rPolyPoly[n].AdaptiveSubdivide(aSimplePoly);
const sal_uInt16 nSize(aSimplePoly.GetSize());
@@ -325,7 +325,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygo
for(a = 0; a < nPolygonCount; a++)
{
- const Polygon& rCandidate = rPolyPolygon.GetObject(a);
+ const tools::Polygon& rCandidate = rPolyPolygon.GetObject(a);
const sal_uInt16 nPointCount(rCandidate.GetSize());
if(nPointCount)
@@ -357,7 +357,7 @@ bool ImplWriteExtendedPolyPolygonAction(SvStream& rOStm, const tools::PolyPolygo
for(a = 0; a < nPolygonCount; a++)
{
- const Polygon& rCandidate = rPolyPolygon.GetObject(a);
+ const tools::Polygon& rCandidate = rPolyPolygon.GetObject(a);
const sal_uInt16 nPointCount(rCandidate.GetSize());
if(nPointCount)
@@ -424,7 +424,7 @@ void ImplReadExtendedPolyPolygonAction(SvStream& rIStm, tools::PolyPolygon& rPol
nPointCount = nMaxPolygons;
}
- Polygon aCandidate(nPointCount);
+ tools::Polygon aCandidate(nPointCount);
if (nPointCount)
{
@@ -504,7 +504,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
// TODO: fix reindentation below if you can accept being blamed by the SCM
MapMode aMapMode;
- Polygon aActionPoly;
+ tools::Polygon aActionPoly;
Rectangle aRect;
Point aPt, aPt1;
Size aSz;
@@ -683,7 +683,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- const Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
+ const tools::Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
@@ -704,7 +704,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- const Polygon aPoly( aRect, aPt, aPt1, POLY_ARC );
+ const tools::Polygon aPoly( aRect, aPt, aPt1, POLY_ARC );
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
@@ -725,7 +725,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
if( bFatLine )
{
- const Polygon aPoly( aRect, aPt, aPt1, POLY_PIE );
+ const tools::Polygon aPoly( aRect, aPt, aPt1, POLY_PIE );
rMtf.AddAction( new MetaPushAction( PushFlags::LINECOLOR ) );
rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) );
@@ -1578,8 +1578,8 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
case( MetaActionType::CHORD ):
{
const MetaChordAction* pAct = static_cast<const MetaChordAction*>(pAction);
- Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
- pAct->GetEndPoint(), POLY_CHORD );
+ tools::Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(),
+ pAct->GetEndPoint(), POLY_CHORD );
const sal_uInt16 nPoints = aChordPoly.GetSize();
rOStm.WriteInt16( GDI_POLYGON_ACTION );
@@ -1599,7 +1599,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// #i102224# Here the possible curved nature of Polygon was
// ignored (for all those years). Adapted to at least write
// a polygon representing the curve as good as possible
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
const LineInfo& rInfo = pAct->GetLineInfo();
const sal_uInt16 nPoints(aSimplePoly.GetSize());
@@ -1685,7 +1685,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
// #i102224# Here the possible curved nature of Polygon was
// ignored (for all those years). Adapted to at least write
// a polygon representing the curve as good as possible
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
pAct->GetPolygon().AdaptiveSubdivide(aSimplePoly);
const sal_uInt16 nPoints(aSimplePoly.GetSize());
diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx
index b0d99c54405a..745c9d6146f1 100644
--- a/vcl/source/gdi/gdimetafiletools.cxx
+++ b/vcl/source/gdi/gdimetafiletools.cxx
@@ -62,7 +62,7 @@ namespace
{
rTarget.AddAction(
new MetaPolyLineAction(
- Polygon(aResult.getB2DPolygon(a))));
+ tools::Polygon(aResult.getB2DPolygon(a))));
}
}
else
@@ -599,11 +599,11 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
}
else
{
- const Polygon aToolsPoly(
- rRect,
- pA->GetStartPoint(),
- pA->GetEndPoint(),
- POLY_ARC);
+ const tools::Polygon aToolsPoly(
+ rRect,
+ pA->GetStartPoint(),
+ pA->GetEndPoint(),
+ POLY_ARC);
bDone = handleGeometricContent(
aClips.back(),
@@ -625,11 +625,11 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
}
else
{
- const Polygon aToolsPoly(
- rRect,
- pA->GetStartPoint(),
- pA->GetEndPoint(),
- POLY_PIE);
+ const tools::Polygon aToolsPoly(
+ rRect,
+ pA->GetStartPoint(),
+ pA->GetEndPoint(),
+ POLY_PIE);
bDone = handleGeometricContent(
aClips.back(),
@@ -651,11 +651,11 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
}
else
{
- const Polygon aToolsPoly(
- rRect,
- pA->GetStartPoint(),
- pA->GetEndPoint(),
- POLY_CHORD);
+ const tools::Polygon aToolsPoly(
+ rRect,
+ pA->GetStartPoint(),
+ pA->GetEndPoint(),
+ POLY_CHORD);
bDone = handleGeometricContent(
aClips.back(),
@@ -913,7 +913,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
else if(rComment.equalsIgnoreAsciiCase("XPATHSTROKE_SEQ_BEGIN"))
{
SvtGraphicStroke aStroke;
- Polygon aPath;
+ tools::Polygon aPath;
{ // read SvtGraphicFill
SvMemoryStream aMemStm(const_cast<sal_uInt8 *>(pA->GetData()), pA->GetDataSize(),StreamMode::READ);
@@ -939,7 +939,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
// add clipped geometry
for(sal_uInt32 a(0); a < aResult.count(); a++)
{
- aStroke.setPath(Polygon(aResult.getB2DPolygon(a)));
+ aStroke.setPath(tools::Polygon(aResult.getB2DPolygon(a)));
addSvtGraphicStroke(aStroke, aTarget);
}
@@ -949,7 +949,7 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource)
else
{
// exchange with empty polygon
- aStroke.setPath(Polygon());
+ aStroke.setPath(tools::Polygon());
addSvtGraphicStroke(aStroke, aTarget);
bDone = true;
}
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index fcb661159c2e..55cb26bf05f7 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -864,10 +864,10 @@ Point GDIMetaFile::ImplGetRotatedPoint( const Point& rPt, const Point& rRotatePt
-FRound( fSin * nX - fCos * nY ) + rRotatePt.Y() + rOffset.Height() );
}
-Polygon GDIMetaFile::ImplGetRotatedPolygon( const Polygon& rPoly, const Point& rRotatePt,
- const Size& rOffset, double fSin, double fCos )
+tools::Polygon GDIMetaFile::ImplGetRotatedPolygon( const tools::Polygon& rPoly, const Point& rRotatePt,
+ const Size& rOffset, double fSin, double fCos )
{
- Polygon aRet( rPoly );
+ tools::Polygon aRet( rPoly );
aRet.Rotate( rRotatePt, fSin, fCos );
aRet.Move( rOffset.Width(), rOffset.Height() );
@@ -922,7 +922,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
const double fSin = sin( fAngle );
const double fCos = cos( fAngle );
Rectangle aRect=Rectangle( Point(), GetPrefSize() );
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
aPoly.Rotate( Point(), fSin, fCos );
@@ -977,7 +977,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::ROUNDRECT ):
{
MetaRoundRectAction* pAct = static_cast<MetaRoundRectAction*>(pAction);
- const Polygon aRoundRectPoly( pAct->GetRect(), pAct->GetHorzRound(), pAct->GetVertRound() );
+ const tools::Polygon aRoundRectPoly( pAct->GetRect(), pAct->GetHorzRound(), pAct->GetVertRound() );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aRoundRectPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -986,7 +986,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::ELLIPSE ):
{
MetaEllipseAction* pAct = static_cast<MetaEllipseAction*>(pAction);
- const Polygon aEllipsePoly( pAct->GetRect().Center(), pAct->GetRect().GetWidth() >> 1, pAct->GetRect().GetHeight() >> 1 );
+ const tools::Polygon aEllipsePoly( pAct->GetRect().Center(), pAct->GetRect().GetWidth() >> 1, pAct->GetRect().GetHeight() >> 1 );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aEllipsePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -995,7 +995,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::ARC ):
{
MetaArcAction* pAct = static_cast<MetaArcAction*>(pAction);
- const Polygon aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_ARC );
+ const tools::Polygon aArcPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_ARC );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aArcPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -1004,7 +1004,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::PIE ):
{
MetaPieAction* pAct = static_cast<MetaPieAction*>(pAction);
- const Polygon aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_PIE );
+ const tools::Polygon aPiePoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_PIE );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aPiePoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -1013,7 +1013,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::CHORD ):
{
MetaChordAction* pAct = static_cast<MetaChordAction*>(pAction);
- const Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_CHORD );
+ const tools::Polygon aChordPoly( pAct->GetRect(), pAct->GetStartPoint(), pAct->GetEndPoint(), POLY_CHORD );
aMtf.AddAction( new MetaPolygonAction( ImplGetRotatedPolygon( aChordPoly, aRotAnchor, aRotOffset, fSin, fCos ) ) );
}
@@ -1075,7 +1075,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPSCALE ):
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
- Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmap() );
@@ -1088,7 +1088,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPSCALEPART ):
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
- Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmap() );
@@ -1102,7 +1102,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPEXSCALE ):
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
- Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmapEx() );
@@ -1115,7 +1115,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
case( MetaActionType::BMPEXSCALEPART ):
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
- Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aBmpPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetDestPoint(), pAct->GetDestSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aBmpRect( aBmpPoly.GetBoundRect() );
BitmapEx aBmpEx( pAct->GetBitmapEx() );
@@ -1202,7 +1202,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
SvtGraphicStroke aStroke;
ReadSvtGraphicStroke( aMemStm, aStroke );
- Polygon aPath;
+ tools::Polygon aPath;
aStroke.getPath( aPath );
aStroke.setPath( ImplGetRotatedPolygon( aPath, aRotAnchor, aRotOffset, fSin, fCos ) );
WriteSvtGraphicStroke( aDest, aStroke );
@@ -1256,7 +1256,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
MetaFloatTransparentAction* pAct = static_cast<MetaFloatTransparentAction*>(pAction);
GDIMetaFile aTransMtf( pAct->GetGDIMetaFile() );
- Polygon aMtfPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aMtfPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aMtfRect( aMtfPoly.GetBoundRect() );
aTransMtf.Rotate( nAngle10 );
@@ -1269,7 +1269,7 @@ void GDIMetaFile::Rotate( long nAngle10 )
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
GDIMetaFile aEPSMtf( pAct->GetSubstitute() );
- Polygon aEPSPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
+ tools::Polygon aEPSPoly( ImplGetRotatedPolygon( Rectangle( pAct->GetPoint(), pAct->GetSize() ), aRotAnchor, aRotOffset, fSin, fCos ) );
Rectangle aEPSRect( aEPSPoly.GetBoundRect() );
aEPSMtf.Rotate( nAngle10 );
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 8dfc8f3e2a5f..bc60fa093bf8 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -40,7 +40,7 @@ SvtGraphicStroke::SvtGraphicStroke() :
{
}
-SvtGraphicStroke::SvtGraphicStroke( const Polygon& rPath,
+SvtGraphicStroke::SvtGraphicStroke( const tools::Polygon& rPath,
const tools::PolyPolygon& rStartArrow,
const tools::PolyPolygon& rEndArrow,
double fTransparency,
@@ -61,7 +61,7 @@ SvtGraphicStroke::SvtGraphicStroke( const Polygon& rPath,
{
}
-void SvtGraphicStroke::getPath( Polygon& rPath ) const
+void SvtGraphicStroke::getPath( tools::Polygon& rPath ) const
{
rPath = maPath;
}
@@ -86,7 +86,7 @@ void SvtGraphicStroke::getDashArray( DashArray& rDashArray ) const
rDashArray = maDashArray;
}
-void SvtGraphicStroke::setPath( const Polygon& rPoly )
+void SvtGraphicStroke::setPath( const tools::Polygon& rPoly )
{
maPath = rPoly;
}
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 4db6d4939e99..0b3b70dee1a6 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -123,24 +123,23 @@ extern "C" int SAL_CALL ImplColorSetCmpFnc( const void* p1, const void* p2 )
class ImplPointArray
{
- Point* mpArray;
- sal_uLong mnSize;
- sal_uLong mnRealSize;
+ Point* mpArray;
+ sal_uLong mnSize;
+ sal_uLong mnRealSize;
public:
- ImplPointArray();
- ~ImplPointArray();
+ ImplPointArray();
+ ~ImplPointArray();
- void ImplSetSize( sal_uLong nSize );
+ void ImplSetSize( sal_uLong nSize );
+ sal_uLong ImplGetRealSize() const { return mnRealSize; }
+ void ImplSetRealSize( sal_uLong nRealSize ) { mnRealSize = nRealSize; }
+ void ImplCreatePoly( tools::Polygon& rPoly ) const;
- sal_uLong ImplGetRealSize() const { return mnRealSize; }
- void ImplSetRealSize( sal_uLong nRealSize ) { mnRealSize = nRealSize; }
-
- inline Point& operator[]( sal_uLong nPos );
+ inline Point& operator[]( sal_uLong nPos );
inline const Point& operator[]( sal_uLong nPos ) const;
- void ImplCreatePoly( Polygon& rPoly ) const;
};
ImplPointArray::ImplPointArray() :
@@ -183,9 +182,9 @@ inline const Point& ImplPointArray::operator[]( sal_uLong nPos ) const
return mpArray[ nPos ];
}
-void ImplPointArray::ImplCreatePoly( Polygon& rPoly ) const
+void ImplPointArray::ImplCreatePoly( tools::Polygon& rPoly ) const
{
- rPoly = Polygon( sal::static_int_cast<sal_uInt16>(mnRealSize), mpArray );
+ rPoly = tools::Polygon( sal::static_int_cast<sal_uInt16>(mnRealSize), mpArray );
}
class ImplVectMap
@@ -265,7 +264,7 @@ class ImplChain
{
private:
- Polygon maPoly;
+ tools::Polygon maPoly;
Point maStartPt;
sal_uLong mnArraySize;
sal_uLong mnCount;
@@ -285,7 +284,7 @@ public:
inline void ImplAdd( sal_uInt8 nCode );
void ImplEndAdd( sal_uLong nTypeFlag );
- const Polygon& ImplGetPoly() const { return maPoly; }
+ const tools::Polygon& ImplGetPoly() const { return maPoly; }
};
ImplChain::ImplChain( sal_uLong nInitCount, long nResize ) :
@@ -316,7 +315,7 @@ void ImplChain::ImplGetSpace()
void ImplChain::ImplBeginAdd( const Point& rStartPt )
{
- maPoly = Polygon();
+ maPoly = tools::Polygon();
maStartPt = rStartPt;
mnCount = 0UL;
}
@@ -776,7 +775,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp,
for( ; nCurPoly < nCount; ++nCurPoly )
{
- const Polygon& rPoly = rPolyPoly.GetObject( nCurPoly );
+ const tools::Polygon& rPoly = rPolyPoly.GetObject( nCurPoly );
const sal_uInt16 nSize( rPoly.GetSize() );
sal_uInt16 nDepth( 0 ), i( 0 );
const bool bRight( rPoly.IsRightOrientated() );
@@ -789,7 +788,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp,
if( nSize && ( ( !bRight && !bHole ) || ( bRight && bHole ) ) )
{
- Polygon aNewPoly( nSize );
+ tools::Polygon aNewPoly( nSize );
sal_uInt16 nPrim( 0 ), nSec( nSize - 1 );
if( rPoly.HasFlags() )
@@ -814,7 +813,7 @@ bool ImplVectorize( const Bitmap& rMonoBmp,
// put outmost polygon to the front
if( nFirstPoly > 0 )
{
- const Polygon aFirst( rPolyPoly.GetObject( static_cast< sal_uInt16 >( nFirstPoly ) ) );
+ const tools::Polygon aFirst( rPolyPoly.GetObject( static_cast< sal_uInt16 >( nFirstPoly ) ) );
rPolyPoly.Remove( static_cast< sal_uInt16 >( nFirstPoly ) );
rPolyPoly.Insert( aFirst, 0 );
@@ -980,7 +979,7 @@ void ImplCalculate( ImplVectMap* pMap, tools::PolyPolygon& rPolyPoly, sal_uInt8
else
aChain.ImplEndAdd( bInner ? VECT_POLY_OUTLINE_INNER : VECT_POLY_OUTLINE_OUTER );
- const Polygon& rPoly = aChain.ImplGetPoly();
+ const tools::Polygon& rPoly = aChain.ImplGetPoly();
if( rPoly.GetSize() > 2 )
{
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 0888653bfd85..0d1bb1ba831c 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -125,7 +125,7 @@ inline void ImplScaleRect( Rectangle& rRect, double fScaleX, double fScaleY )
rRect.Justify();
}
-inline void ImplScalePoly( Polygon& rPoly, double fScaleX, double fScaleY )
+inline void ImplScalePoly( tools::Polygon& rPoly, double fScaleX, double fScaleY )
{
for( sal_uInt16 i = 0, nCount = rPoly.GetSize(); i < nCount; i++ )
ImplScalePoint( rPoly[ i ], fScaleX, fScaleY );
@@ -769,12 +769,12 @@ MetaPolyLineAction::MetaPolyLineAction() :
MetaPolyLineAction::~MetaPolyLineAction()
{}
-MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly ) :
+MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly ) :
MetaAction ( MetaActionType::POLYLINE ),
maPoly ( rPoly )
{}
-MetaPolyLineAction::MetaPolyLineAction( const Polygon& rPoly, const LineInfo& rLineInfo ) :
+MetaPolyLineAction::MetaPolyLineAction( const tools::Polygon& rPoly, const LineInfo& rLineInfo ) :
MetaAction ( MetaActionType::POLYLINE ),
maLineInfo ( rLineInfo ),
maPoly ( rPoly )
@@ -811,7 +811,7 @@ void MetaPolyLineAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, StreamMode::WRITE, 3);
- Polygon aSimplePoly;
+ tools::Polygon aSimplePoly;
maPoly.AdaptiveSubdivide( aSimplePoly );
WritePolygon( rOStm, aSimplePoly ); // Version 1
@@ -849,7 +849,7 @@ MetaPolygonAction::MetaPolygonAction() :
MetaPolygonAction::~MetaPolygonAction()
{}
-MetaPolygonAction::MetaPolygonAction( const Polygon& rPoly ) :
+MetaPolygonAction::MetaPolygonAction( const tools::Polygon& rPoly ) :
MetaAction ( MetaActionType::POLYGON ),
maPoly ( rPoly )
{}
@@ -881,7 +881,7 @@ void MetaPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
MetaAction::Write(rOStm, pData);
VersionCompat aCompat(rOStm, StreamMode::WRITE, 2);
- Polygon aSimplePoly; // Version 1
+ tools::Polygon aSimplePoly; // Version 1
maPoly.AdaptiveSubdivide( aSimplePoly );
WritePolygon( rOStm, aSimplePoly );
@@ -949,11 +949,11 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
sal_uInt16 nNumberOfComplexPolygons = 0;
sal_uInt16 i, nPolyCount = maPolyPoly.Count();
- Polygon aSimplePoly; // Version 1
+ tools::Polygon aSimplePoly; // Version 1
rOStm.WriteUInt16( nPolyCount );
for ( i = 0; i < nPolyCount; i++ )
{
- const Polygon& rPoly = maPolyPoly.GetObject( i );
+ const tools::Polygon& rPoly = maPolyPoly.GetObject( i );
if ( rPoly.HasFlags() )
nNumberOfComplexPolygons++;
rPoly.AdaptiveSubdivide( aSimplePoly );
@@ -963,7 +963,7 @@ void MetaPolyPolygonAction::Write( SvStream& rOStm, ImplMetaWriteData* pData )
rOStm.WriteUInt16( nNumberOfComplexPolygons ); // Version 2
for ( i = 0; nNumberOfComplexPolygons && ( i < nPolyCount ); i++ )
{
- const Polygon& rPoly = maPolyPoly.GetObject( i );
+ const tools::Polygon& rPoly = maPolyPoly.GetObject( i );
if ( rPoly.HasFlags() )
{
rOStm.WriteUInt16( i );
@@ -995,7 +995,7 @@ void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
{
sal_uInt16 nIndex(0);
rIStm.ReadUInt16( nIndex );
- Polygon aPoly;
+ tools::Polygon aPoly;
aPoly.Read( rIStm );
if (nIndex >= maPolyPoly.Count())
{
@@ -3238,7 +3238,7 @@ void MetaCommentAction::Move( long nXMove, long nYMove )
SvtGraphicStroke aStroke;
ReadSvtGraphicStroke( aMemStm, aStroke );
- Polygon aPath;
+ tools::Polygon aPath;
aStroke.getPath( aPath );
aPath.Move( nXMove, nYMove );
aStroke.setPath( aPath );
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 85fae2d4b181..885bf7160acd 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -116,12 +116,12 @@ void PDFWriter::DrawLine( const Point& rStart, const Point& rStop, const LineInf
xImplementation->drawLine( rStart, rStop, rInfo );
}
-void PDFWriter::DrawPolygon( const Polygon& rPoly )
+void PDFWriter::DrawPolygon( const tools::Polygon& rPoly )
{
xImplementation->drawPolygon( rPoly );
}
-void PDFWriter::DrawPolyLine( const Polygon& rPoly )
+void PDFWriter::DrawPolyLine( const tools::Polygon& rPoly )
{
xImplementation->drawPolyLine( rPoly );
}
@@ -156,12 +156,12 @@ void PDFWriter::DrawChord( const Rectangle& rRect, const Point& rStart, const Po
xImplementation->drawArc( rRect, rStart, rStop, false, true );
}
-void PDFWriter::DrawPolyLine( const Polygon& rPoly, const LineInfo& rInfo )
+void PDFWriter::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rInfo )
{
xImplementation->drawPolyLine( rPoly, rInfo );
}
-void PDFWriter::DrawPolyLine( const Polygon& rPoly, const ExtLineInfo& rInfo )
+void PDFWriter::DrawPolyLine( const tools::Polygon& rPoly, const ExtLineInfo& rInfo )
{
xImplementation->drawPolyLine( rPoly, rInfo );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index d8fb926be439..36d96e9e3741 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -337,7 +337,7 @@ void doTestCode()
Point aLIPoints[] = { Point( 4000, 10000 ),
Point( 8000, 12000 ),
Point( 3000, 19000 ) };
- Polygon aLIPoly( 3, aLIPoints );
+ tools::Polygon aLIPoly( 3, aLIPoints );
aWriter.SetLineColor( Color( COL_BLUE ) );
aWriter.SetFillColor();
aWriter.DrawPolyLine( aLIPoly, aLI );
@@ -1458,7 +1458,7 @@ void PDFWriterImpl::PDFPage::convertRect( Rectangle& rRect ) const
rRect.Bottom() = rRect.Top() + aSize.Height();
}
-void PDFWriterImpl::PDFPage::appendPolygon( const Polygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const
+void PDFWriterImpl::PDFPage::appendPolygon( const tools::Polygon& rPoly, OStringBuffer& rBuffer, bool bClose ) const
{
sal_uInt16 nPoints = rPoly.GetSize();
/*
@@ -9241,7 +9241,7 @@ void PDFWriterImpl::drawEmphasisMark( long nX, long nY,
{
if ( bPolyLine )
{
- Polygon aPoly = rPolyPoly.GetObject( 0 );
+ tools::Polygon aPoly = rPolyPoly.GetObject( 0 );
aPoly.Move( nX, nY );
drawPolyLine( aPoly );
}
@@ -9498,7 +9498,7 @@ void PDFWriterImpl::drawLine( const Point& rStart, const Point& rStop, const Lin
PDFWriter::ExtLineInfo aInfo;
convertLineInfoToExtLineInfo( rInfo, aInfo );
Point aPolyPoints[2] = { rStart, rStop };
- Polygon aPoly( 2, aPolyPoints );
+ tools::Polygon aPoly( 2, aPolyPoints );
drawPolyLine( aPoly, aInfo );
}
}
@@ -9847,7 +9847,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik
ImplFontEntry* pFontEntry = m_pReferenceDevice->mpFontEntry;
if (pFontEntry->mnOrientation)
{
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
aPoly.Rotate( rPos, pFontEntry->mnOrientation);
aRect = aPoly.GetBoundRect();
}
@@ -9952,7 +9952,7 @@ void PDFWriterImpl::drawTextLine( const Point& rPos, long nWidth, FontStrikeout
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-void PDFWriterImpl::drawPolygon( const Polygon& rPoly )
+void PDFWriterImpl::drawPolygon( const tools::Polygon& rPoly )
{
MARK( "drawPolygon" );
@@ -10480,7 +10480,7 @@ void PDFWriterImpl::drawArc( const Rectangle& rRect, const Point& rStart, const
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-void PDFWriterImpl::drawPolyLine( const Polygon& rPoly )
+void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly )
{
MARK( "drawPolyLine" );
@@ -10500,7 +10500,7 @@ void PDFWriterImpl::drawPolyLine( const Polygon& rPoly )
writeBuffer( aLine.getStr(), aLine.getLength() );
}
-void PDFWriterImpl::drawPolyLine( const Polygon& rPoly, const LineInfo& rInfo )
+void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const LineInfo& rInfo )
{
MARK( "drawPolyLine with LineInfo" );
@@ -10598,7 +10598,7 @@ void PDFWriterImpl::convertLineInfoToExtLineInfo( const LineInfo& rIn, PDFWriter
}
}
-void PDFWriterImpl::drawPolyLine( const Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo )
+void PDFWriterImpl::drawPolyLine( const tools::Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo )
{
MARK( "drawPolyLine with ExtLineInfo" );
@@ -11079,7 +11079,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
{
aLine.append("/Domain[ 0 1 ]\n"
"/Coords[ " );
- Polygon aPoly( 2 );
+ tools::Polygon aPoly( 2 );
aPoly[0] = aBoundRect.BottomCenter();
aPoly[1] = aBoundRect.TopCenter();
aPoly.Rotate( aCenter, 3600 - nAngle );
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index ccd8ada7ce18..aa941d9eb369 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -145,7 +145,7 @@ public:
// converts a rectangle to 10th points page space
void convertRect( Rectangle& rRect ) const;
// appends a polygon optionally closing it
- void appendPolygon( const Polygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const;
+ void appendPolygon( const tools::Polygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const;
// appends a polygon optionally closing it
void appendPolygon( const basegfx::B2DPolygon& rPoly, OStringBuffer& rBuffer, bool bClose = true ) const;
// appends a polypolygon optionally closing the subpaths
@@ -1215,11 +1215,11 @@ public:
void drawLine( const Point& rStart, const Point& rStop );
void drawLine( const Point& rStart, const Point& rStop, const LineInfo& rInfo );
- void drawPolygon( const Polygon& rPoly );
+ void drawPolygon( const tools::Polygon& rPoly );
void drawPolyPolygon( const tools::PolyPolygon& rPolyPoly );
- void drawPolyLine( const Polygon& rPoly );
- void drawPolyLine( const Polygon& rPoly, const LineInfo& rInfo );
- void drawPolyLine( const Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo );
+ void drawPolyLine( const tools::Polygon& rPoly );
+ void drawPolyLine( const tools::Polygon& rPoly, const LineInfo& rInfo );
+ void drawPolyLine( const tools::Polygon& rPoly, const PDFWriter::ExtLineInfo& rInfo );
void drawPixel( const Point& rPt, const Color& rColor );
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index cf734cc95a07..95f07fa94855 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -560,7 +560,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
SvtGraphicStroke aStroke;
ReadSvtGraphicStroke( aMemStm, aStroke );
- Polygon aPath;
+ tools::Polygon aPath;
aStroke.getPath( aPath );
tools::PolyPolygon aStartArrow;
@@ -619,7 +619,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
&& POLY_NORMAL != aPath.GetFlags(a + 2)
&& a + 3 < nPoints)
{
- const Polygon aSnippet(4,
+ const tools::Polygon aSnippet(4,
aPath.GetConstPointAry() + a,
aPath.GetConstFlagAry() + a);
m_rOuterFace.DrawPolyLine( aSnippet, aInfo );
@@ -627,7 +627,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
}
else
{
- const Polygon aSnippet(2,
+ const tools::Polygon aSnippet(2,
aPath.GetConstPointAry() + a);
m_rOuterFace.DrawPolyLine( aSnippet, aInfo );
}
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index c07d3ebb857c..1bb93c90e353 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -429,36 +429,36 @@ Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevice& rOut
break;
case MetaActionType::ROUNDRECT:
- aActionBounds = Polygon( static_cast<const MetaRoundRectAction&>(rAct).GetRect(),
- static_cast<const MetaRoundRectAction&>(rAct).GetHorzRound(),
- static_cast<const MetaRoundRectAction&>(rAct).GetVertRound() ).GetBoundRect();
+ aActionBounds = tools::Polygon( static_cast<const MetaRoundRectAction&>(rAct).GetRect(),
+ static_cast<const MetaRoundRectAction&>(rAct).GetHorzRound(),
+ static_cast<const MetaRoundRectAction&>(rAct).GetVertRound() ).GetBoundRect();
break;
case MetaActionType::ELLIPSE:
{
const Rectangle& rRect = static_cast<const MetaEllipseAction&>(rAct).GetRect();
- aActionBounds = Polygon( rRect.Center(),
- rRect.GetWidth() >> 1,
- rRect.GetHeight() >> 1 ).GetBoundRect();
+ aActionBounds = tools::Polygon( rRect.Center(),
+ rRect.GetWidth() >> 1,
+ rRect.GetHeight() >> 1 ).GetBoundRect();
break;
}
case MetaActionType::ARC:
- aActionBounds = Polygon( static_cast<const MetaArcAction&>(rAct).GetRect(),
- static_cast<const MetaArcAction&>(rAct).GetStartPoint(),
- static_cast<const MetaArcAction&>(rAct).GetEndPoint(), POLY_ARC ).GetBoundRect();
+ aActionBounds = tools::Polygon( static_cast<const MetaArcAction&>(rAct).GetRect(),
+ static_cast<const MetaArcAction&>(rAct).GetStartPoint(),
+ static_cast<const MetaArcAction&>(rAct).GetEndPoint(), POLY_ARC ).GetBoundRect();
break;
case MetaActionType::PIE:
- aActionBounds = Polygon( static_cast<const MetaPieAction&>(rAct).GetRect(),
- static_cast<const MetaPieAction&>(rAct).GetStartPoint(),
- static_cast<const MetaPieAction&>(rAct).GetEndPoint(), POLY_PIE ).GetBoundRect();
+ aActionBounds = tools::Polygon( static_cast<const MetaPieAction&>(rAct).GetRect(),
+ static_cast<const MetaPieAction&>(rAct).GetStartPoint(),
+ static_cast<const MetaPieAction&>(rAct).GetEndPoint(), POLY_PIE ).GetBoundRect();
break;
case MetaActionType::CHORD:
- aActionBounds = Polygon( static_cast<const MetaChordAction&>(rAct).GetRect(),
- static_cast<const MetaChordAction&>(rAct).GetStartPoint(),
- static_cast<const MetaChordAction&>(rAct).GetEndPoint(), POLY_CHORD ).GetBoundRect();
+ aActionBounds = tools::Polygon( static_cast<const MetaChordAction&>(rAct).GetRect(),
+ static_cast<const MetaChordAction&>(rAct).GetStartPoint(),
+ static_cast<const MetaChordAction&>(rAct).GetEndPoint(), POLY_CHORD ).GetBoundRect();
break;
case MetaActionType::POLYLINE:
@@ -774,7 +774,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
}
case MetaActionType::POLYGON:
{
- const Polygon aPoly(
+ const tools::Polygon aPoly(
static_cast<const MetaPolygonAction*>(pCurrAct)->GetPolygon());
if( !basegfx::tools::isRectangle(
aPoly.getB2DPolygon()) ||
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 493a02204255..0991ac46b34b 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -44,7 +44,7 @@ namespace
const sal_uInt16 nPolyCount = rPolyPoly.Count();
for (sal_uInt16 nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
- const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
+ const tools::Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
const sal_uInt16 nSize = aPoly.GetSize();
@@ -95,7 +95,7 @@ namespace
const sal_uInt16 nPolyCount = rPolyPoly.Count();
for (sal_uInt16 nPoly = 0; nPoly < nPolyCount; ++nPoly)
{
- const Polygon& aPoly = rPolyPoly.GetObject(nPoly);
+ const tools::Polygon& aPoly = rPolyPoly.GetObject(nPoly);
// Iterate over all edges of the current polygon.
const sal_uInt16 nSize = aPoly.GetSize();
@@ -195,7 +195,7 @@ namespace
for ( sal_uInt16 nPoly = 0; nPoly < nPolyCount; nPoly++ )
{
// get reference to current polygon
- const Polygon& aPoly = rPolyPoly.GetObject( nPoly );
+ const tools::Polygon& aPoly = rPolyPoly.GetObject( nPoly );
const sal_uInt16 nSize = aPoly.GetSize();
// not enough points ( <= 2 )? -> nothing to do!
@@ -289,7 +289,7 @@ tools::PolyPolygon vcl::Region::ImplCreatePolyPolygonFromRegionBand() const
for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); ++aRectIter)
{
- aRetval.Insert(Polygon(*aRectIter));
+ aRetval.Insert( tools::Polygon(*aRectIter) );
}
}
else
@@ -324,7 +324,7 @@ Region::Region(const Rectangle& rRect)
mpRegionBand.reset(rRect.IsEmpty() ? 0 : new RegionBand(rRect));
}
-Region::Region(const Polygon& rPolygon)
+Region::Region(const tools::Polygon& rPolygon)
: mpB2DPolyPolygon(),
mpPolyPolygon(),
mpRegionBand(),
@@ -1682,7 +1682,7 @@ void vcl::Region::GetRegionRectangles(RectangleVector& rTarget) const
}
}
-static inline bool ImplPolygonRectTest( const Polygon& rPoly, Rectangle* pRectOut = NULL )
+static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, Rectangle* pRectOut = NULL )
{
bool bIsRect = false;
const Point* pPoints = rPoly.GetConstPointAry();
@@ -1748,7 +1748,7 @@ vcl::Region vcl::Region::GetRegionFromPolyPolygon( const tools::PolyPolygon& rPo
for( int i = 0; i < nPolygons; i++ )
{
- const Polygon& rPoly = rPolyPoly[i];
+ const tools::Polygon& rPoly = rPolyPoly[i];
if( ImplPolygonRectTest( rPoly ) )
{
@@ -1770,7 +1770,7 @@ vcl::Region vcl::Region::GetRegionFromPolyPolygon( const tools::PolyPolygon& rPo
for( int i = 0; i < nPolygons; i++ )
{
- const Polygon& rPoly = rPolyPoly[i];
+ const tools::Polygon& rPoly = rPolyPoly[i];
if( ImplPolygonRectTest( rPoly, &aRect ) )
{
diff --git a/vcl/source/outdev/curvedshapes.cxx b/vcl/source/outdev/curvedshapes.cxx
index 342d5e8ba8b8..a086a81f76f6 100644
--- a/vcl/source/outdev/curvedshapes.cxx
+++ b/vcl/source/outdev/curvedshapes.cxx
@@ -54,7 +54,7 @@ void OutputDevice::DrawEllipse( const Rectangle& rRect )
if ( mbInitLineColor )
InitLineColor();
- Polygon aRectPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
+ tools::Polygon aRectPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
if ( aRectPoly.GetSize() >= 2 )
{
const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(aRectPoly.GetConstPointAry());
@@ -104,7 +104,7 @@ void OutputDevice::DrawArc( const Rectangle& rRect,
const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aArcPoly( aRect, aStart, aEnd, POLY_ARC );
+ tools::Polygon aArcPoly( aRect, aStart, aEnd, POLY_ARC );
if ( aArcPoly.GetSize() >= 2 )
{
@@ -148,7 +148,7 @@ void OutputDevice::DrawPie( const Rectangle& rRect,
const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aPiePoly( aRect, aStart, aEnd, POLY_PIE );
+ tools::Polygon aPiePoly( aRect, aStart, aEnd, POLY_PIE );
if ( aPiePoly.GetSize() >= 2 )
{
@@ -199,7 +199,7 @@ void OutputDevice::DrawChord( const Rectangle& rRect,
const Point aStart( ImplLogicToDevicePixel( rStartPt ) );
const Point aEnd( ImplLogicToDevicePixel( rEndPt ) );
- Polygon aChordPoly( aRect, aStart, aEnd, POLY_CHORD );
+ tools::Polygon aChordPoly( aRect, aStart, aEnd, POLY_CHORD );
if ( aChordPoly.GetSize() >= 2 )
{
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 9f2884cebdf9..a28ff0668530 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -358,7 +358,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
else
{
long nRad = nDotSize/2;
- Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
+ tools::Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
rPolyPoly.Insert( aPoly );
}
rYOff = ((nHeight*250)/1000)/2; // Center to the another EmphasisMarks
@@ -375,7 +375,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
else
{
long nRad = nDotSize/2;
- Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
+ tools::Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
rPolyPoly.Insert( aPoly );
// BorderWidth is 15%
long nBorder = (nDotSize*150)/1000;
@@ -383,8 +383,8 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
rPolyLine = true;
else
{
- Polygon aPoly2( Point( nRad, nRad ),
- nRad-nBorder, nRad-nBorder );
+ tools::Polygon aPoly2( Point( nRad, nRad ),
+ nRad-nBorder, nRad-nBorder );
rPolyPoly.Insert( aPoly2 );
}
}
@@ -401,7 +401,7 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
else
{
long nRad = nDotSize/2;
- Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
+ tools::Polygon aPoly( Point( nRad, nRad ), nRad, nRad );
rPolyPoly.Insert( aPoly );
}
rWidth = nDotSize;
@@ -427,12 +427,12 @@ void OutputDevice::ImplGetEmphasisMark( tools::PolyPolygon& rPolyPoly, bool& rPo
}
else
{
- Polygon aPoly( sizeof( aAccentPos ) / sizeof( long ) / 2,
- reinterpret_cast<const Point*>(aAccentPos),
- aAccentPolyFlags );
+ tools::Polygon aPoly( sizeof( aAccentPos ) / sizeof( long ) / 2,
+ reinterpret_cast<const Point*>(aAccentPos),
+ aAccentPolyFlags );
double dScale = ((double)nDotSize)/1000.0;
aPoly.Scale( dScale, dScale );
- Polygon aTemp;
+ tools::Polygon aTemp;
aPoly.AdaptiveSubdivide( aTemp );
Rectangle aBoundRect = aTemp.GetBoundRect();
rWidth = aBoundRect.GetWidth();
@@ -1918,7 +1918,7 @@ void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY,
{
if ( bPolyLine )
{
- Polygon aPoly = rPolyPoly.GetObject( 0 );
+ tools::Polygon aPoly = rPolyPoly.GetObject( 0 );
aPoly.Move( nX, nY );
DrawPolyLine( aPoly );
}
@@ -1956,7 +1956,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
EnableMapMode( false );
FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont );
- tools::PolyPolygon aPolyPoly;
+ tools::PolyPolygon aPolyPoly;
Rectangle aRect1;
Rectangle aRect2;
long nEmphasisYOff;
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 75520bee5111..5222c1e60dca 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -37,7 +37,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
assert(!is_double_buffered_window());
// Convert rectangle to a tools::PolyPolygon by first converting to a Polygon
- Polygon aPolygon ( rRect );
+ tools::Polygon aPolygon ( rRect );
tools::PolyPolygon aPolyPoly ( aPolygon );
DrawGradient ( aPolyPoly, rGradient );
@@ -323,7 +323,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
// Create border
Rectangle aBorderRect = aRect;
- Polygon aPoly( 4 );
+ tools::Polygon aPoly( 4 );
if (fBorder > 0.0)
{
nRed = (sal_uInt8)nStartRed;
@@ -498,7 +498,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
nSteps = 1;
// determine output limits and stepsizes for all directions
- Polygon aPoly;
+ tools::Polygon aPoly;
double fScanLeft = aRect.Left();
double fScanTop = aRect.Top();
double fScanRight = aRect.Right();
@@ -550,9 +550,9 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
break;
if( rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL )
- aPoly = Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
+ aPoly = tools::Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
else
- aPoly = Polygon( aRect );
+ aPoly = tools::Polygon( aRect );
aPoly.Rotate( aCenter, nAngle );
@@ -593,7 +593,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
// we should draw last inner Polygon if we output PolyPolygon
if( xPolyPoly )
{
- const Polygon& rPoly = xPolyPoly->GetObject( 1 );
+ const tools::Polygon& rPoly = xPolyPoly->GetObject( 1 );
if( !rPoly.GetBoundRect().IsEmpty() )
{
@@ -677,7 +677,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect,
// Create border
Rectangle aBorderRect = aRect;
- Polygon aPoly( 4 );
+ tools::Polygon aPoly( 4 );
if (fBorder > 0.0)
{
nRed = (sal_uInt8)nStartRed;
@@ -842,7 +842,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
nSteps = 1;
// determine output limits and stepsizes for all directions
- Polygon aPoly;
+ tools::Polygon aPoly;
double fScanLeft = aRect.Left();
double fScanTop = aRect.Top();
double fScanRight = aRect.Right();
@@ -879,9 +879,9 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
break;
if( rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL )
- aPoly = Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
+ aPoly = tools::Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
else
- aPoly = Polygon( aRect );
+ aPoly = tools::Polygon( aRect );
aPoly.Rotate( aCenter, nAngle );
@@ -908,7 +908,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) );
}
- const Polygon& rPoly = xPolyPoly->GetObject( 1 );
+ const tools::Polygon& rPoly = xPolyPoly->GetObject( 1 );
if( !rPoly.GetBoundRect().IsEmpty() )
{
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 4c992b6f476e..076ff8b46742 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -331,7 +331,7 @@ void OutputDevice::DrawHatchLine( const Line& rLine, const tools::PolyPolygon& r
for( long nPoly = 0, nPolyCount = rPolyPoly.Count(); nPoly < nPolyCount; nPoly++ )
{
- const Polygon& rPoly = rPolyPoly[ (sal_uInt16) nPoly ];
+ const tools::Polygon& rPoly = rPolyPoly[ (sal_uInt16) nPoly ];
if( rPoly.GetSize() > 1 )
{
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index 1a8a3f5536e8..2e76acf2ef7d 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -241,7 +241,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
if(!bDone)
{
- const Polygon aPolygon(aCandidate);
+ const tools::Polygon aPolygon(aCandidate);
mpGraphics->DrawPolyLine(aPolygon.GetSize(), reinterpret_cast<const SalPoint*>(aPolygon.GetConstPointAry()), this);
}
}
@@ -268,7 +268,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
{
for(sal_uInt32 a(0); a < aFillPolyPolygon.count(); a++)
{
- Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
+ tools::Polygon aPolygon(aFillPolyPolygon.getB2DPolygon(a));
// need to subdivide, mpGraphics->DrawPolygon ignores curves
aPolygon.AdaptiveSubdivide(aPolygon);
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index b90f7e75bb15..96d96e43ec02 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -540,14 +540,14 @@ Rectangle OutputDevice::ImplLogicToDevicePixel( const Rectangle& rLogicRect ) co
maThresRes.mnThresLogToPixY )+mnOutOffY+mnOutOffOrigY );
}
-Polygon OutputDevice::ImplLogicToDevicePixel( const Polygon& rLogicPoly ) const
+tools::Polygon OutputDevice::ImplLogicToDevicePixel( const tools::Polygon& rLogicPoly ) const
{
if ( !mbMap && !mnOutOffX && !mnOutOffY )
return rLogicPoly;
sal_uInt16 i;
sal_uInt16 nPoints = rLogicPoly.GetSize();
- Polygon aPoly( rLogicPoly );
+ tools::Polygon aPoly( rLogicPoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
@@ -590,7 +590,7 @@ tools::PolyPolygon OutputDevice::ImplLogicToDevicePixel( const tools::PolyPolygo
sal_uInt16 nPoly = aPolyPoly.Count();
for( sal_uInt16 i = 0; i < nPoly; i++ )
{
- Polygon& rPoly = aPolyPoly[i];
+ tools::Polygon& rPoly = aPolyPoly[i];
rPoly = ImplLogicToDevicePixel( rPoly );
}
return aPolyPoly;
@@ -1009,7 +1009,7 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect ) const
maThresRes.mnThresLogToPixY )+mnOutOffOrigY );
}
-Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly ) const
+tools::Polygon OutputDevice::LogicToPixel( const tools::Polygon& rLogicPoly ) const
{
if ( !mbMap )
@@ -1017,7 +1017,7 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly ) const
sal_uInt16 i;
sal_uInt16 nPoints = rLogicPoly.GetSize();
- Polygon aPoly( rLogicPoly );
+ tools::Polygon aPoly( rLogicPoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
@@ -1048,7 +1048,7 @@ tools::PolyPolygon OutputDevice::LogicToPixel( const tools::PolyPolygon& rLogicP
sal_uInt16 nPoly = aPolyPoly.Count();
for( sal_uInt16 i = 0; i < nPoly; i++ )
{
- Polygon& rPoly = aPolyPoly[i];
+ tools::Polygon& rPoly = aPolyPoly[i];
rPoly = LogicToPixel( rPoly );
}
return aPolyPoly;
@@ -1162,8 +1162,8 @@ Rectangle OutputDevice::LogicToPixel( const Rectangle& rLogicRect,
aThresRes.mnThresLogToPixY )+mnOutOffOrigY );
}
-Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
- const MapMode& rMapMode ) const
+tools::Polygon OutputDevice::LogicToPixel( const tools::Polygon& rLogicPoly,
+ const MapMode& rMapMode ) const
{
if ( rMapMode.IsDefault() )
@@ -1176,7 +1176,7 @@ Polygon OutputDevice::LogicToPixel( const Polygon& rLogicPoly,
sal_uInt16 i;
sal_uInt16 nPoints = rLogicPoly.GetSize();
- Polygon aPoly( rLogicPoly );
+ tools::Polygon aPoly( rLogicPoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
@@ -1254,7 +1254,7 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect ) const
maThresRes.mnThresPixToLogY ) - maMapRes.mnMapOfsY - mnOutOffLogicY );
}
-Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly ) const
+tools::Polygon OutputDevice::PixelToLogic( const tools::Polygon& rDevicePoly ) const
{
if ( !mbMap )
@@ -1262,7 +1262,7 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly ) const
sal_uInt16 i;
sal_uInt16 nPoints = rDevicePoly.GetSize();
- Polygon aPoly( rDevicePoly );
+ tools::Polygon aPoly( rDevicePoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
@@ -1293,7 +1293,7 @@ tools::PolyPolygon OutputDevice::PixelToLogic( const tools::PolyPolygon& rDevice
sal_uInt16 nPoly = aPolyPoly.Count();
for( sal_uInt16 i = 0; i < nPoly; i++ )
{
- Polygon& rPoly = aPolyPoly[i];
+ tools::Polygon& rPoly = aPolyPoly[i];
rPoly = PixelToLogic( rPoly );
}
return aPolyPoly;
@@ -1410,8 +1410,8 @@ Rectangle OutputDevice::PixelToLogic( const Rectangle& rDeviceRect,
aThresRes.mnThresPixToLogY ) - aMapRes.mnMapOfsY - mnOutOffLogicY );
}
-Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly,
- const MapMode& rMapMode ) const
+tools::Polygon OutputDevice::PixelToLogic( const tools::Polygon& rDevicePoly,
+ const MapMode& rMapMode ) const
{
// calculate nothing if default-MapMode
@@ -1425,7 +1425,7 @@ Polygon OutputDevice::PixelToLogic( const Polygon& rDevicePoly,
sal_uInt16 i;
sal_uInt16 nPoints = rDevicePoly.GetSize();
- Polygon aPoly( rDevicePoly );
+ tools::Polygon aPoly( rDevicePoly );
// get pointer to Point-array (copy data)
const Point* pPointAry = aPoly.GetConstPointAry();
diff --git a/vcl/source/outdev/pixel.cxx b/vcl/source/outdev/pixel.cxx
index bfa838430c70..ff9772aff3e3 100644
--- a/vcl/source/outdev/pixel.cxx
+++ b/vcl/source/outdev/pixel.cxx
@@ -111,7 +111,7 @@ void OutputDevice::DrawPixel( const Point& rPt, const Color& rColor )
mpAlphaVDev->DrawPixel( rPt );
}
-void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
+void OutputDevice::DrawPixel( const tools::Polygon& rPts, const Color* pColors )
{
assert(!is_double_buffered_window());
@@ -158,7 +158,7 @@ void OutputDevice::DrawPixel( const Polygon& rPts, const Color* pColors )
mpAlphaVDev->DrawPixel( rPts, pColors );
}
-void OutputDevice::DrawPixel( const Polygon& rPts, const Color& rColor )
+void OutputDevice::DrawPixel( const tools::Polygon& rPts, const Color& rColor )
{
assert(!is_double_buffered_window());
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index b5b790fe1c5d..dca527b004ee 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -110,7 +110,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
if ( nPoly == 1 )
{
// #100127# Map to DrawPolygon
- Polygon aPoly = rPolyPoly.GetObject( 0 );
+ tools::Polygon aPoly = rPolyPoly.GetObject( 0 );
if( aPoly.GetSize() >= 2 )
{
GDIMetaFile* pOldMF = mpMetaFile;
@@ -144,7 +144,7 @@ void OutputDevice::DrawPolygon( const basegfx::B2DPolygon& rB2DPolygon)
}
}
-void OutputDevice::DrawPolygon( const Polygon& rPoly )
+void OutputDevice::DrawPolygon( const tools::Polygon& rPoly )
{
assert(!is_double_buffered_window());
@@ -214,7 +214,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
}
}
- Polygon aPoly = ImplLogicToDevicePixel( rPoly );
+ tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly );
const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
// #100127# Forward beziers to sal, if any
@@ -223,7 +223,7 @@ void OutputDevice::DrawPolygon( const Polygon& rPoly )
const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry();
if( !mpGraphics->DrawPolygonBezier( nPoints, pPtAry, pFlgAry, this ) )
{
- aPoly = Polygon::SubdivideBezier(aPoly);
+ aPoly = tools::Polygon::SubdivideBezier(aPoly);
pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
mpGraphics->DrawPolygon( aPoly.GetSize(), pPtAry, this );
}
@@ -355,7 +355,7 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
do
{
- const Polygon& rPoly = rPolyPoly.GetObject( i );
+ const tools::Polygon& rPoly = rPolyPoly.GetObject( i );
sal_uInt16 nSize = rPoly.GetSize();
if ( nSize )
{
@@ -380,7 +380,7 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
{
if( !mpGraphics->DrawPolygonBezier( *pPointAry, *pPointAryAry, *pFlagAryAry, this ) )
{
- Polygon aPoly = Polygon::SubdivideBezier( rPolyPoly.GetObject( last ) );
+ tools::Polygon aPoly = tools::Polygon::SubdivideBezier( rPolyPoly.GetObject( last ) );
mpGraphics->DrawPolygon( aPoly.GetSize(), reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry()), this );
}
}
@@ -414,7 +414,7 @@ void OutputDevice::ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolyg
}
}
-void OutputDevice::ImplDrawPolygon( const Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly )
+void OutputDevice::ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly )
{
if( pClipPolyPoly )
{
@@ -447,7 +447,7 @@ void OutputDevice::ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, con
}
if( pPolyPoly->Count() == 1 )
{
- const Polygon rPoly = pPolyPoly->GetObject( 0 );
+ const tools::Polygon rPoly = pPolyPoly->GetObject( 0 );
sal_uInt16 nSize = rPoly.GetSize();
if( nSize >= 2 )
@@ -464,7 +464,7 @@ void OutputDevice::ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, con
sal_uInt16 i = 0;
do
{
- const Polygon& rPoly = pPolyPoly->GetObject( i );
+ const tools::Polygon& rPoly = pPolyPoly->GetObject( i );
sal_uInt16 nSize = rPoly.GetSize();
if ( nSize )
{
diff --git a/vcl/source/outdev/polyline.cxx b/vcl/source/outdev/polyline.cxx
index 72af39df2d37..18f5d625a6b0 100644
--- a/vcl/source/outdev/polyline.cxx
+++ b/vcl/source/outdev/polyline.cxx
@@ -32,7 +32,7 @@
#include "salgdi.hxx"
-void OutputDevice::DrawPolyLine( const Polygon& rPoly )
+void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly )
{
assert(!is_double_buffered_window());
@@ -79,7 +79,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
}
}
- Polygon aPoly = ImplLogicToDevicePixel( rPoly );
+ tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly );
const SalPoint* pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
// #100127# Forward beziers to sal, if any
@@ -88,7 +88,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
const sal_uInt8* pFlgAry = aPoly.GetConstFlagAry();
if( !mpGraphics->DrawPolyLineBezier( nPoints, pPtAry, pFlgAry, this ) )
{
- aPoly = Polygon::SubdivideBezier(aPoly);
+ aPoly = tools::Polygon::SubdivideBezier(aPoly);
pPtAry = reinterpret_cast<const SalPoint*>(aPoly.GetConstPointAry());
mpGraphics->DrawPolyLine( aPoly.GetSize(), pPtAry, this );
}
@@ -102,7 +102,7 @@ void OutputDevice::DrawPolyLine( const Polygon& rPoly )
mpAlphaVDev->DrawPolyLine( rPoly );
}
-void OutputDevice::DrawPolyLine( const Polygon& rPoly, const LineInfo& rLineInfo )
+void OutputDevice::DrawPolyLine( const tools::Polygon& rPoly, const LineInfo& rLineInfo )
{
assert(!is_double_buffered_window());
@@ -140,7 +140,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
if( fLineWidth != 0.0 )
aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
- const Polygon aToolsPolygon( rB2DPolygon );
+ const tools::Polygon aToolsPolygon( rB2DPolygon );
mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) );
}
@@ -214,7 +214,7 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
else
{
// fallback to old polygon drawing if needed
- const Polygon aToolsPolygon( rB2DPolygon );
+ const tools::Polygon aToolsPolygon( rB2DPolygon );
LineInfo aLineInfo;
if( fLineWidth != 0.0 )
aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
@@ -223,14 +223,14 @@ void OutputDevice::DrawPolyLine( const basegfx::B2DPolygon& rB2DPolygon,
}
}
-void OutputDevice::drawPolyLine(const Polygon& rPoly, const LineInfo& rLineInfo)
+void OutputDevice::drawPolyLine(const tools::Polygon& rPoly, const LineInfo& rLineInfo)
{
sal_uInt16 nPoints(rPoly.GetSize());
if ( !IsDeviceOutputNecessary() || !mbLineColor || ( nPoints < 2 ) || ( LINE_NONE == rLineInfo.GetStyle() ) || ImplIsRecordLayout() )
return;
- Polygon aPoly = ImplLogicToDevicePixel( rPoly );
+ tools::Polygon aPoly = ImplLogicToDevicePixel( rPoly );
// we need a graphics
if ( !mpGraphics && !AcquireGraphics() )
@@ -260,7 +260,7 @@ void OutputDevice::drawPolyLine(const Polygon& rPoly, const LineInfo& rLineInfo)
// NO way to find out there that it's a curve.
if( aPoly.HasFlags() )
{
- aPoly = Polygon::SubdivideBezier( aPoly );
+ aPoly = tools::Polygon::SubdivideBezier( aPoly );
nPoints = aPoly.GetSize();
}
@@ -345,7 +345,7 @@ bool OutputDevice::DrawPolyLineDirect( const basegfx::B2DPolygon& rB2DPolygon,
if( fLineWidth != 0.0 )
aLineInfo.SetWidth( static_cast<long>(fLineWidth+0.5) );
- const Polygon aToolsPolygon( rB2DPolygon );
+ const tools::Polygon aToolsPolygon( rB2DPolygon );
mpMetaFile->AddAction( new MetaPolyLineAction( aToolsPolygon, aLineInfo ) );
}
return true;
diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx
index e8ecf440de50..1dc728a64cdc 100644
--- a/vcl/source/outdev/rect.cxx
+++ b/vcl/source/outdev/rect.cxx
@@ -112,7 +112,7 @@ void OutputDevice::DrawRect( const Rectangle& rRect,
}
else
{
- const Polygon aRoundRectPoly( aRect, nHorzRound, nVertRound );
+ const tools::Polygon aRoundRectPoly( aRect, nHorzRound, nVertRound );
if ( aRoundRectPoly.GetSize() >= 2 )
{
@@ -162,7 +162,7 @@ void OutputDevice::Invert( const Rectangle& rRect, InvertFlags nFlags )
mpGraphics->Invert( aRect.Left(), aRect.Top(), aRect.GetWidth(), aRect.GetHeight(), nSalFlags, this );
}
-void OutputDevice::Invert( const Polygon& rPoly, InvertFlags nFlags )
+void OutputDevice::Invert( const tools::Polygon& rPoly, InvertFlags nFlags )
{
assert(!is_double_buffered_window());
if ( !IsDeviceOutputNecessary() )
@@ -173,7 +173,7 @@ void OutputDevice::Invert( const Polygon& rPoly, InvertFlags nFlags )
if ( nPoints < 2 )
return;
- Polygon aPoly( ImplLogicToDevicePixel( rPoly ) );
+ tools::Polygon aPoly( ImplLogicToDevicePixel( rPoly ) );
// we need a graphics
if ( !mpGraphics )
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 51ca684bba20..ceffc84fbbe9 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -147,7 +147,7 @@ void OutputDevice::ImplDrawTextRect( long nBaseX, long nBaseY,
nY += nBaseY;
// inflate because polygons are drawn smaller
Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontEntry->mnOrientation );
ImplDrawPolygon( aPoly );
return;
@@ -209,7 +209,7 @@ Rectangle OutputDevice::ImplGetTextBoundRect( const SalLayout& rSalLayout )
{
// inflate by +1+1 because polygons are drawn smaller
Rectangle aRect( Point( nX, nY ), Size( nWidth+1, nHeight+1 ) );
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
aPoly.Rotate( Point( nBaseX, nBaseY ), mpFontEntry->mnOrientation );
return aPoly.GetBoundRect();
}
@@ -263,7 +263,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
return false;
// calculate rotation offset
- Polygon aPoly( aBoundRect );
+ tools::Polygon aPoly( aBoundRect );
aPoly.Rotate( Point(), mpFontEntry->mnOwnOrientation );
Point aPoint = aPoly.GetBoundRect().TopLeft();
aPoint += Point( nX, nY );
@@ -2818,7 +2818,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// convert units to logical width
for (sal_uInt16 j = 0; j < aPolyPoly.Count(); ++j)
{
- Polygon& rPoly = aPolyPoly[j];
+ tools::Polygon& rPoly = aPolyPoly[j];
for (sal_uInt16 k = 0; k < rPoly.GetSize(); ++k)
{
Point& rPt = rPoly[k];
@@ -2903,7 +2903,7 @@ bool OutputDevice::GetTextOutline( tools::PolyPolygon& rPolyPoly, const OUString
::basegfx::B2DPolyPolygonVector::const_iterator aIt = aB2DPolyPolyVector.begin();
for(; aIt != aB2DPolyPolyVector.end(); ++aIt )
for( unsigned int i = 0; i < aIt->count(); ++i )
- rPolyPoly.Insert(Polygon((*aIt).getB2DPolygon( i ))); // #i76339#
+ rPolyPoly.Insert(tools::Polygon((*aIt).getB2DPolygon( i ))); // #i76339#
return true;
}
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 52be910dcefe..f83e28375b1d 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -659,7 +659,7 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
if (mpFontEntry->mnOrientation)
{
- Polygon aPoly( aPixelRect );
+ tools::Polygon aPoly( aPixelRect );
aPoly.Rotate( Point(nBaseX+mnTextOffX, nBaseY+mnTextOffY), mpFontEntry->mnOrientation);
aPixelRect = aPoly.GetBoundRect();
}
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index a47b93cece47..910b7c530d38 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -40,7 +40,7 @@ namespace
* coordinates to integer coordinates, to ensure that it has at least 2
* pixels in both X and Y directions.
*/
- Polygon toPolygon( const basegfx::B2DPolygon& rPoly )
+ tools::Polygon toPolygon( const basegfx::B2DPolygon& rPoly )
{
basegfx::B2DRange aRange = rPoly.getB2DRange();
double fW = aRange.getWidth(), fH = aRange.getHeight();
@@ -52,7 +52,7 @@ namespace
double nW = std::max<double>(1.0, rtl::math::round(fW));
double nH = std::max<double>(1.0, rtl::math::round(fH));
- Polygon aTarget;
+ tools::Polygon aTarget;
aTarget.Insert(0, Point(nX, nY));
aTarget.Insert(1, Point(nX+nW, nY));
aTarget.Insert(2, Point(nX+nW, nY+nH));
@@ -60,7 +60,7 @@ namespace
aTarget.Insert(4, Point(nX, nY));
return aTarget;
}
- return Polygon(rPoly);
+ return tools::Polygon(rPoly);
}
tools::PolyPolygon toPolyPolygon( const basegfx::B2DPolyPolygon& rPolyPoly )
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index d022aaa87093..3b75897903c7 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -58,7 +58,7 @@ static void ImplCursorInvert( ImplCursorData* pData )
Rectangle aRect( pData->maPixPos, pData->maPixSize );
if ( pData->mnDirection != CursorDirection::NONE || pData->mnOrientation || pData->mnPixSlant )
{
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
if( aPoly.GetSize() == 5 )
{
aPoly[1].X() += 1; // include the right border
@@ -105,7 +105,7 @@ static void ImplCursorInvert( ImplCursorData* pData )
pAry[5].X() -= delta;
pAry[6] = aPoly.GetPoint( 4 );
}
- aPoly = Polygon( 7, pAry);
+ aPoly = tools::Polygon( 7, pAry);
}
if ( pData->mnOrientation )
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index a11e318b6200..2edcd09e12da 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -445,13 +445,13 @@ void RenderTools::DrawSelectionBackground(vcl::RenderContext& rRenderContext, vc
{
if (bRoundEdges)
{
- Polygon aPoly(aRect, nCornerRadius, nCornerRadius);
+ tools::Polygon aPoly(aRect, nCornerRadius, nCornerRadius);
tools::PolyPolygon aPolyPoly(aPoly);
rRenderContext.DrawTransparent(aPolyPoly, nPercent);
}
else
{
- Polygon aPoly(aRect);
+ tools::Polygon aPoly(aRect);
tools::PolyPolygon aPolyPoly(aPoly);
rRenderContext.DrawTransparent(aPolyPoly, nPercent);
}
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 002a0e06a9e0..af33e4f5d98c 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -701,7 +701,7 @@ void Splitter::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rPaint
{
rRenderContext.DrawRect(rPaintRect);
- Polygon aPoly(rPaintRect);
+ tools::Polygon aPoly(rPaintRect);
tools::PolyPolygon aPolyPoly(aPoly);
rRenderContext.DrawTransparent(aPolyPoly, 85);
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index fc5cc4730dd3..830a449c0561 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1925,7 +1925,7 @@ void SplitWindow::ImplDrawGrip(vcl::RenderContext& rRenderContext, const Rectang
rRenderContext.SetLineColor(aColor);
rRenderContext.SetFillColor(aColor);
- Polygon aPoly(3);
+ tools::Polygon aPoly(3);
if (bHorizontal)
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index f3caef5e2c37..7dce25b0f525 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3594,13 +3594,13 @@ void Window::DrawSelectionBackground( const Rectangle& rRect,
{
if( bRoundEdges )
{
- Polygon aPoly( aRect, nCornerRadius, nCornerRadius );
+ tools::Polygon aPoly( aRect, nCornerRadius, nCornerRadius );
tools::PolyPolygon aPolyPoly( aPoly );
DrawTransparent( aPolyPoly, nPercent );
}
else
{
- Polygon aPoly( aRect );
+ tools::Polygon aPoly( aRect );
tools::PolyPolygon aPolyPoly( aPoly );
DrawTransparent( aPolyPoly, nPercent );
}
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index bba4ecd42a39..e90569b2163a 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -226,7 +226,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags )
}
}
-void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags )
+void Window::InvertTracking( const tools::Polygon& rPoly, sal_uInt16 nFlags )
{
sal_uInt16 nPoints = rPoly.GetSize();
@@ -235,7 +235,7 @@ void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags )
OutputDevice *pOutDev = GetOutDev();
- Polygon aPoly( pOutDev->ImplLogicToDevicePixel( rPoly ) );
+ tools::Polygon aPoly( pOutDev->ImplLogicToDevicePixel( rPoly ) );
SalGraphics* pGraphics;
diff --git a/vcl/win/source/gdi/gdiimpl.cxx b/vcl/win/source/gdi/gdiimpl.cxx
index fbe386cf63ad..ec55573ac0a6 100644
--- a/vcl/win/source/gdi/gdiimpl.cxx
+++ b/vcl/win/source/gdi/gdiimpl.cxx
@@ -997,8 +997,8 @@ void WinSalGraphicsImpl::invert( sal_uInt32 nPoints, const SalPoint* pPtAry, Sal
}
else
{
- if ( !WIN_Polygon( mrParent.getHDC(), pWinPtAry, (int)nPoints ) && (nPoints > MAX_64KSALPOINTS) )
- WIN_Polygon( mrParent.getHDC(), pWinPtAry, MAX_64KSALPOINTS );
+ if ( !Polygon( mrParent.getHDC(), pWinPtAry, (int)nPoints ) && (nPoints > MAX_64KSALPOINTS) )
+ Polygon( mrParent.getHDC(), pWinPtAry, MAX_64KSALPOINTS );
}
SetROP2( mrParent.getHDC(), nOldROP );
@@ -1653,8 +1653,8 @@ void WinSalGraphicsImpl::drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry
POINT* pWinPtAry = (POINT*)pPtAry;
// for Windows 95 and its maximum number of points
- if ( !WIN_Polygon( mrParent.getHDC(), pWinPtAry, (int)nPoints ) && (nPoints > MAX_64KSALPOINTS) )
- WIN_Polygon( mrParent.getHDC(), pWinPtAry, MAX_64KSALPOINTS );
+ if ( !Polygon( mrParent.getHDC(), pWinPtAry, (int)nPoints ) && (nPoints > MAX_64KSALPOINTS) )
+ Polygon( mrParent.getHDC(), pWinPtAry, MAX_64KSALPOINTS );
}
void WinSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints,
@@ -1697,7 +1697,7 @@ void WinSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pP
n += nPoints;
}
- if ( !WIN_PolyPolygon( mrParent.getHDC(), pWinPointAryAry, (int*)pWinPointAry, (UINT)nPoly ) &&
+ if ( !PolyPolygon( mrParent.getHDC(), pWinPointAryAry, (int*)pWinPointAry, (UINT)nPoly ) &&
(nPolyPolyPoints > MAX_64KSALPOINTS) )
{
nPolyPolyPoints = 0;
@@ -1712,9 +1712,9 @@ void WinSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pP
if ( pWinPointAry[(UINT)nPoly] > MAX_64KSALPOINTS )
pWinPointAry[(UINT)nPoly] = MAX_64KSALPOINTS;
if ( nPoly == 1 )
- WIN_Polygon( mrParent.getHDC(), pWinPointAryAry, *pWinPointAry );
+ Polygon( mrParent.getHDC(), pWinPointAryAry, *pWinPointAry );
else
- WIN_PolyPolygon( mrParent.getHDC(), pWinPointAryAry, (int*)pWinPointAry, nPoly );
+ PolyPolygon( mrParent.getHDC(), pWinPointAryAry, (int*)pWinPointAry, nPoly );
}
if ( pWinPointAry != aWinPointAry )
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 78f105579287..f61d878f8323 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2316,7 +2316,7 @@ bool WinSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId,
pPoints[i].Y() = -pPoints[i].Y();
// insert into polypolygon
- Polygon aPoly( nPnt, pPoints, (bHasOfflinePoints ? pFlags : NULL) );
+ tools::Polygon aPoly( nPnt, pPoints, (bHasOfflinePoints ? pFlags : NULL) );
// convert to B2DPolyPolygon
// TODO: get rid of the intermediate PolyPolygon
rB2DPolyPoly.append( aPoly.getB2DPolygon() );
diff --git a/vcl/win/source/gdi/wntgdi.cxx b/vcl/win/source/gdi/wntgdi.cxx
index 7beb176814bd..bf0ad25fe860 100644
--- a/vcl/win/source/gdi/wntgdi.cxx
+++ b/vcl/win/source/gdi/wntgdi.cxx
@@ -33,20 +33,5 @@ BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 )
}
}
-extern "C"
-{
-BOOL WINAPI WIN_Polygon( HDC hDC, CONST POINT * ppt, int ncnt )
-{
- return Polygon( hDC, ppt, ncnt );
-}
-}
-
-extern "C"
-{
-BOOL WINAPI WIN_PolyPolygon( HDC hDC, CONST POINT * ppt, LPINT npcnt, int ncnt )
-{
- return PolyPolygon( hDC, ppt, npcnt, ncnt );
-}
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 91dc1165b44b..451c4c550ce8 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -97,16 +97,14 @@ void setupMethodStubs( functor_vector_type& res )
const Point aPt3(0,0);
const Point aPt4(450,450);
- const Rectangle aRect(aPt1,aPt2);
+ const Rectangle aRect(aPt1,aPt2);
const Rectangle aRect2(aPt3,aPt4);
- const Polygon aPoly(aRect);
- const Polygon aPoly2(aRect2);
- tools::PolyPolygon aPolyPoly(aPoly);
+ const tools::Polygon aPoly(aRect);
+ const tools::Polygon aPoly2(aRect2);
+ tools::PolyPolygon aPolyPoly(aPoly);
aPolyPoly.Insert( aPoly2 );
- Polygon aPoly3(aPoly2);
- aPoly3.Rotate( aPoly3.GetBoundRect().Center(),
- 900 );
-
+ tools::Polygon aPoly3(aPoly2);
+ aPoly3.Rotate( aPoly3.GetBoundRect().Center(), 900 );
const LineInfo aLineInfo(LINE_SOLID,5);
#ifdef FIXME_VDEV
@@ -193,7 +191,7 @@ void setupMethodStubs( functor_vector_type& res )
add(res,
"DrawPolyLine",
boost::bind(
- (void (OutputDevice::*)( const Polygon& ))(
+ (void (OutputDevice::*)( const tools::Polygon& ))(
&OutputDevice::DrawPolyLine),
_1,
aPoly ));
@@ -204,7 +202,7 @@ void setupMethodStubs( functor_vector_type& res )
add(res,
"DrawPolyLine(LineInfo)",
boost::bind(
- (void (OutputDevice::*)( const Polygon&, const LineInfo& ))(
+ (void (OutputDevice::*)( const tools::Polygon&, const LineInfo& ))(
&OutputDevice::DrawPolyLine),
_1,
aPoly, aLineInfo ));
@@ -213,7 +211,7 @@ void setupMethodStubs( functor_vector_type& res )
add(res,
"DrawPolygon",
boost::bind(
- (void (OutputDevice::*)( const Polygon& ))
+ (void (OutputDevice::*)( const tools::Polygon& ))
&OutputDevice::DrawPolygon,
_1,
aPoly ));
@@ -830,8 +828,8 @@ void outDevGrind(vcl::RenderContext& rTarget, sal_Int32 nTurns = 100)
setupMethodStubs( aMethods );
const Rectangle aClipRect(10,10,1000,1000);
- const Polygon aPoly1( aClipRect );
- Polygon aPoly2( aClipRect );
+ const tools::Polygon aPoly1( aClipRect );
+ tools::Polygon aPoly2( aClipRect );
aPoly2.Rotate(aClipRect.Center(),450);
tools::PolyPolygon aClipPoly(aPoly1);
aClipPoly.Insert(aPoly2);
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 33cb4f430d8e..c58ae4e9309e 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -492,7 +492,7 @@ public:
break;
case 2:
{
- Polygon aPoly(aSub);
+ tools::Polygon aPoly(aSub);
aPoly.Rotate(aSub.Center(), 450);
aPoly.Clip(aSmaller);
aRegion = vcl::Region(aPoly);
@@ -504,11 +504,11 @@ public:
sal_Int32 nTW = aSub.GetWidth()/6;
sal_Int32 nTH = aSub.GetHeight()/6;
Rectangle aTiny(Point(4, 4), Size(nTW*2, nTH*2));
- aPolyPoly.Insert(Polygon(aTiny));
+ aPolyPoly.Insert( tools::Polygon(aTiny));
aTiny.Move(nTW*3, nTH*3);
- aPolyPoly.Insert(Polygon(aTiny));
+ aPolyPoly.Insert( tools::Polygon(aTiny));
aTiny.Move(nTW, nTH);
- aPolyPoly.Insert(Polygon(aTiny));
+ aPolyPoly.Insert( tools::Polygon(aTiny));
aRegion = vcl::Region(aPolyPoly);
break;
@@ -541,7 +541,7 @@ public:
aShrunk.Move(nDx, nDy);
aShrunk.SetSize(Size(r.GetWidth()-nDx*2,
r.GetHeight()-nDy*2));
- Polygon aPoly(aShrunk);
+ tools::Polygon aPoly(aShrunk);
tools::PolyPolygon aPPoly(aPoly);
rDev.SetLineColor(Color(COL_RED));
rDev.SetFillColor(Color(COL_RED));
@@ -737,7 +737,7 @@ public:
Rectangle aSubRect(r);
aSubRect.Move(x * r.GetWidth()/3, y * r.GetHeight()/3);
aSubRect.SetSize(Size(r.GetWidth()/2, r.GetHeight()/4));
- Polygon aPoly(SAL_N_ELEMENTS(aPoints));
+ tools::Polygon aPoly(SAL_N_ELEMENTS(aPoints));
for (size_t v = 0; v < SAL_N_ELEMENTS(aPoints); v++)
{
aPoly.SetPoint(Point(aSubRect.Left() +