[Libreoffice-commits] core.git: sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 5 21:28:40 UTC 2019


 sc/source/filter/oox/formulabase.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 3cf1467379b2bad76a23e239051aa3a7852d786c
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Feb 17 18:25:28 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Tue Mar 5 22:28:13 2019 +0100

    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 at yahoo.com>

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 )


More information about the Libreoffice-commits mailing list