diff options
Diffstat (limited to 'tools/source')
-rw-r--r-- | tools/source/memtools/multisel.cxx | 13 |
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 } |