diff options
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx | 7 | ||||
-rw-r--r-- | basegfx/source/polygon/b2dsvgpolypolygon.cxx | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx index 54437bafd0a2..091614ac7ff4 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx @@ -118,10 +118,15 @@ namespace basegfx @param rSvgDAttribute A valid SVG-D attribute string + @param rWrongPositionAfterZ + Indicates wheter the generator interprets wrongly + the position in the path after Z or z elements + https://bugs.freedesktop.org/show_bug.cgi?id=47406 + @return true, if the string was successfully parsed */ BASEGFX_DLLPUBLIC bool importFromSvgD( B2DPolyPolygon& o_rPolyPoly, - const ::rtl::OUString& rSvgDAttribute ); + const ::rtl::OUString& rSvgDAttribute, bool bWrongPositionAfterZ = false ); /** Read poly-polygon from SVG. diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx index 590b8db8f56f..e3e60cd22095 100644 --- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx +++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx @@ -209,7 +209,7 @@ namespace basegfx } } - bool importFromSvgD(B2DPolyPolygon& o_rPolyPolygon, const ::rtl::OUString& rSvgDStatement) + bool importFromSvgD(B2DPolyPolygon& o_rPolyPolygon, const ::rtl::OUString& rSvgDStatement, bool bWrongPositionAfterZ) { o_rPolyPolygon.clear(); const sal_Int32 nLen(rSvgDStatement.getLength()); @@ -240,7 +240,7 @@ namespace basegfx bIsClosed = true; // update current point - we're back at the start - if( aCurrPoly.count() ) + if( aCurrPoly.count() && !bWrongPositionAfterZ) { const B2DPoint aFirst( aCurrPoly.getB2DPoint(0) ); nLastX = aFirst.getX(); |