diff options
author | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2012-05-15 22:11:38 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-05-23 16:34:41 +0200 |
commit | de4b790fa928f92bf40b2e2b2c2acb622f9ebd8b (patch) | |
tree | ff0127954e818e8fa47d09755ed8435c8ad705ed | |
parent | 4d69337c172c2f24af5c0795449ec52f959747e1 (diff) |
fdo#48068 fix parsing of path d-attribute
Change-Id: I43a5f69a30b3766303e049ba4d66c4fd79b9de30
Signed-off-by: Petr Mladek <pmladek@suse.cz>
-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 fa9e18491373..238a283652ad 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; } @@ -85,6 +86,7 @@ namespace basegfx { sal_Unicode aChar( rStr[io_rPos] ); ::rtl::OUStringBuffer sNumberString; + bool separator_seen=false; if(sal_Unicode('+') == aChar || sal_Unicode('-') == aChar) { @@ -93,8 +95,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]; } |