[Libreoffice-commits] .: basegfx/source
Christina Rossmanith
crossmanith at kemper.freedesktop.org
Tue May 15 13:15:09 PDT 2012
basegfx/source/polygon/b2dsvgpolypolygon.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit bef8e358b6940fd4a976cb346dfd829643e581b8
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Tue May 15 22:11:38 2012 +0200
fdo#48068 fix parsing of path d-attribute
Change-Id: I43a5f69a30b3766303e049ba4d66c4fd79b9de30
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 86a44c7..4c32744 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];
}
More information about the Libreoffice-commits
mailing list