summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2012-05-15 22:11:38 +0200
committerChr. Rossmanith <ChrRossmanith@gmx.de>2012-05-15 22:14:32 +0200
commitbef8e358b6940fd4a976cb346dfd829643e581b8 (patch)
treea62faa1c2f13ae81064fea6ef0019e9f8282c4c2
parent6d1cef5d97aa6695db0874b4da30b952fb1c53ae (diff)
fdo#48068 fix parsing of path d-attribute
Change-Id: I43a5f69a30b3766303e049ba4d66c4fd79b9de30
-rw-r--r--basegfx/source/polygon/b2dsvgpolypolygon.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 86a44c702be4..4c3274481612 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -67,7 +67,8 @@ namespace basegfx
{
const bool bPredicate( (sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar)
|| (bSignAllowed && sal_Unicode('+') == aChar)
- || (bSignAllowed && sal_Unicode('-') == aChar) );
+ || (bSignAllowed && sal_Unicode('-') == aChar)
+ || (sal_Unicode('.') == aChar) );
return bPredicate;
}
@@ -84,6 +85,7 @@ namespace basegfx
{
sal_Unicode aChar( rStr[io_rPos] );
::rtl::OUStringBuffer sNumberString;
+ bool separator_seen=false;
if(sal_Unicode('+') == aChar || sal_Unicode('-') == aChar)
{
@@ -92,8 +94,9 @@ namespace basegfx
}
while((sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar)
- || sal_Unicode('.') == aChar)
+ || (!separator_seen && sal_Unicode('.') == aChar))
{
+ if (sal_Unicode('.') == aChar) separator_seen = true;
sNumberString.append(rStr[io_rPos]);
aChar = rStr[++io_rPos];
}