diff options
author | Philipp Lohmann <pl@openoffice.org> | 2009-07-13 14:32:36 +0000 |
---|---|---|
committer | Philipp Lohmann <pl@openoffice.org> | 2009-07-13 14:32:36 +0000 |
commit | 8bfc2b0cc011bdadf085ca8cc08b7a3c1243a9fb (patch) | |
tree | 417c0bc02b016e621c21175a0cf32af72465d4d3 /tools/source | |
parent | 47f3d03c02cbf7b07bc4710352d0dd034776c2a5 (diff) |
fix number at end, change behaviour for empty string
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 } |