Index returned by getToken is always lower than string length

Change-Id: I7de7a3eaf7b4ae6ef97b0c23fb755ad108db19e6
Reviewed-on: https://gerrit.libreoffice.org/68118
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
This commit is contained in:
Matteo Casalin 2019-02-17 18:25:28 +01:00
parent 9e1dfe405c
commit 3cf1467379

View File

@ -1685,9 +1685,7 @@ void FormulaProcessorBase::convertStringToStringList(
if( extractString( aString, orTokens ) && !aString.isEmpty() )
{
::std::vector< ApiToken > aNewTokens;
sal_Int32 nPos = 0;
sal_Int32 nLen = aString.getLength();
while( (0 <= nPos) && (nPos < nLen) )
for( sal_Int32 nPos{ 0 }; nPos>=0; )
{
OUString aEntry = aString.getToken( 0, cStringSep, nPos );
if( bTrimLeadingSpaces )