Kaydet (Commit) aaa6e597 authored tarafından Ivan Timofeev's avatar Ivan Timofeev

treat "-" as entire range

üst ff9da5a0
...@@ -1024,16 +1024,17 @@ bool StringRangeEnumerator::setRange( const rtl::OUString& i_rNewRange, bool i_b ...@@ -1024,16 +1024,17 @@ bool StringRangeEnumerator::setRange( const rtl::OUString& i_rNewRange, bool i_b
aNumberBuf.append( *pInput++ ); aNumberBuf.append( *pInput++ );
if( aNumberBuf.getLength() ) if( aNumberBuf.getLength() )
{ {
if( bSequence && aNumbers.empty() )
aNumbers.push_back( mnMin );
sal_Int32 nNumber = aNumberBuf.makeStringAndClear().toInt32() + mnOffset; sal_Int32 nNumber = aNumberBuf.makeStringAndClear().toInt32() + mnOffset;
aNumbers.push_back( nNumber ); aNumbers.push_back( nNumber );
bSequence = false; bSequence = false;
} }
if( *pInput == sal_Unicode('-') ) if( *pInput == sal_Unicode('-') )
{
bSequence = true; bSequence = true;
if( aNumbers.empty() )
aNumbers.push_back( mnMin );
}
else if( *pInput == sal_Unicode(',') || *pInput == sal_Unicode(';') ) else if( *pInput == sal_Unicode(',') || *pInput == sal_Unicode(';') )
{ {
if( bSequence && !aNumbers.empty() ) if( bSequence && !aNumbers.empty() )
......
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