From bef8e358b6940fd4a976cb346dfd829643e581b8 Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Tue, 15 May 2012 22:11:38 +0200 Subject: fdo#48068 fix parsing of path d-attribute Change-Id: I43a5f69a30b3766303e049ba4d66c4fd79b9de30 --- basegfx/source/polygon/b2dsvgpolypolygon.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'basegfx/source/polygon') 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]; } -- cgit v1.2.3