diff options
-rw-r--r-- | basegfx/source/polygon/b2dsvgpolypolygon.cxx | 7 |
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]; } |