summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-02-17 18:25:28 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-03-05 22:28:13 +0100
commit3cf1467379b2bad76a23e239051aa3a7852d786c (patch)
tree3d51d463d26ab31a1ef8e17f1c6aeecd582044df /sc/source/filter/oox
parent9e1dfe405cd597c80d63a2138c36cebd4e98400e (diff)
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>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r--sc/source/filter/oox/formulabase.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index d540fbf12cb3..e4cefc504b06 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -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 )