summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2012-03-26 12:55:44 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2012-03-26 13:08:57 +0200
commitb8fb2df5491937ccc7eb422544e25f18a6bc787c (patch)
tree426dcb600f7ca7a045f15128bddd41b64bce548c /basegfx
parentdb3597cef07a0f659be5617d9148069c7fb4a5a8 (diff)
Compatibility option for incorrect relative moves after closePath (fdo#47406)
Signed-off-by: Thorsten Behrens <tbehrens@suse.com>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx7
-rw-r--r--basegfx/source/polygon/b2dsvgpolypolygon.cxx4
2 files changed, 8 insertions, 3 deletions
diff --git a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx
index 37d2cb553814..5a59c3a8ef40 100644
--- a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx
+++ b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx
@@ -131,10 +131,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 863adf54a568..29283641e31a 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -210,7 +210,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());
@@ -241,7 +241,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();