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 12:55:59 +0200
commit7a19798c73fd39d8d69ff6364f0696e68cdd1381 (patch)
tree683fa6cb8d20d69e3bd9c8bfa499ff8f93c16a39 /basegfx
parenta2ee8055e9c136923f0244fe289cac6377933c31 (diff)
Compatibility option for incorrect relative moves after closePath (fdo#47406)
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 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();