diff options
author | David Tardon <dtardon@redhat.com> | 2011-01-25 14:45:21 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-01-25 14:45:50 +0100 |
commit | 8f40db8e8ecfd6280f22e15d6449cb7c13dc2e7b (patch) | |
tree | e225873fa46f8d946cab55d4a6363a7fc7ddac46 /xmloff/source/draw | |
parent | 96b6b643159577beb756b2f1baa441f93d067628 (diff) |
make the test for "-" more robust
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/ximpcustomshape.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index a17eef0f1aa3..fab4c37d8862 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -320,6 +320,7 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter sal_Int32 nEIndex = 0; // index of "E" in double sal_Bool bE = sal_False; // set if a double is including a "E" statement + sal_Bool bENum = sal_False; // there is at least one number after "E" sal_Bool bDot = sal_False; // set if there is a dot included sal_Bool bEnd = sal_False; // set for each value that can not be part of a double/integer @@ -345,7 +346,19 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter if ( bMustBePositiveWholeNumbered ) bValid = sal_False; else - bValid = ( nStartIndex == nIndex ) || ( bE && ( nEIndex + 1 == nIndex ) ); + { + if ( nStartIndex == nIndex ) + bValid = sal_True; + else if ( bE ) + { + if ( nEIndex + 1 == nIndex ) + bValid = sal_True; + else if ( bENum ) + bEnd = sal_True; + else + bValid = sal_False; + } + } } break; @@ -376,6 +389,10 @@ sal_Bool GetNextParameter( com::sun::star::drawing::EnhancedCustomShapeParameter case '7' : case '8' : case '9' : + { + if ( bE && ! bENum ) + bENum = sal_True; + } break; default: bEnd = sal_True; |