Kaydet (Commit) bef8e358 authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith

fdo#48068 fix parsing of path d-attribute

Change-Id: I43a5f69a30b3766303e049ba4d66c4fd79b9de30
üst 6d1cef5d
...@@ -67,7 +67,8 @@ namespace basegfx ...@@ -67,7 +67,8 @@ namespace basegfx
{ {
const bool bPredicate( (sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar) const bool bPredicate( (sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar)
|| (bSignAllowed && sal_Unicode('+') == aChar) || (bSignAllowed && sal_Unicode('+') == aChar)
|| (bSignAllowed && sal_Unicode('-') == aChar) ); || (bSignAllowed && sal_Unicode('-') == aChar)
|| (sal_Unicode('.') == aChar) );
return bPredicate; return bPredicate;
} }
...@@ -84,6 +85,7 @@ namespace basegfx ...@@ -84,6 +85,7 @@ namespace basegfx
{ {
sal_Unicode aChar( rStr[io_rPos] ); sal_Unicode aChar( rStr[io_rPos] );
::rtl::OUStringBuffer sNumberString; ::rtl::OUStringBuffer sNumberString;
bool separator_seen=false;
if(sal_Unicode('+') == aChar || sal_Unicode('-') == aChar) if(sal_Unicode('+') == aChar || sal_Unicode('-') == aChar)
{ {
...@@ -92,8 +94,9 @@ namespace basegfx ...@@ -92,8 +94,9 @@ namespace basegfx
} }
while((sal_Unicode('0') <= aChar && sal_Unicode('9') >= aChar) 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]); sNumberString.append(rStr[io_rPos]);
aChar = rStr[++io_rPos]; aChar = rStr[++io_rPos];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment