summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2009-07-13 14:32:36 +0000
committerPhilipp Lohmann <pl@openoffice.org>2009-07-13 14:32:36 +0000
commit8bfc2b0cc011bdadf085ca8cc08b7a3c1243a9fb (patch)
tree417c0bc02b016e621c21175a0cf32af72465d4d3 /tools/source
parent47f3d03c02cbf7b07bc4710352d0dd034776c2a5 (diff)
fix number at end, change behaviour for empty string
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/memtools/multisel.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/source/memtools/multisel.cxx b/tools/source/memtools/multisel.cxx
index 6187343a54..3a0d3a9e21 100644
--- a/tools/source/memtools/multisel.cxx
+++ b/tools/source/memtools/multisel.cxx
@@ -951,6 +951,16 @@ bool StringRangeEnumerator::setRange( const rtl::OUString& i_rNewRange )
{
mnCount = 0;
maSequence.clear();
+
+ // we love special cases
+ if( i_rNewRange.getLength() == 0 )
+ {
+ if( mnMin >= 0 && mnMax >= 0 )
+ {
+ insertRange( mnMin, mnMax, mnMin != mnMax );
+ }
+ return true;
+ }
const sal_Unicode* pInput = i_rNewRange.getStr();
rtl::OUStringBuffer aNumberBuf( 16 );
@@ -998,8 +1008,9 @@ bool StringRangeEnumerator::setRange( const rtl::OUString& i_rNewRange )
}
else if( *pInput == sal_Unicode(',') || *pInput == sal_Unicode(';') )
bInsertRange = true;
- else
+ else if( *pInput )
{
+
bSuccess = false;
break; // parse error
}