diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-08-12 23:01:03 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-09-09 21:07:52 +0200 |
commit | 8a5d742accb7ec316bfc66743d9c3cba0fa9a9b4 (patch) | |
tree | 34ae84d8a439e31f960452c6a81af55d6e6b3fd4 /sc | |
parent | 416bedb92a3e4f57f3da243e8befd42e1be101a1 (diff) |
Avoid getTokenCount and use indexed getToken
Change-Id: If4aec143168febe9a0f48831752a4114bdea0cbd
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/globalx.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/globalx.cxx b/sc/source/core/data/globalx.cxx index cdd7acac3a71..a4a328313174 100644 --- a/sc/source/core/data/globalx.cxx +++ b/sc/source/core/data/globalx.cxx @@ -33,7 +33,6 @@ #include <com/sun/star/i18n/OrdinalSuffix.hpp> #include <comphelper/processfactory.hxx> -#include <comphelper/string.hxx> #include <unotools/configmgr.hxx> #include <unotools/localedatawrapper.hxx> @@ -52,10 +51,10 @@ void ScGlobal::InitAddIns() if (aMultiPath.isEmpty()) return; - sal_Int32 nTokens = comphelper::string::getTokenCount(aMultiPath, ';'); - for (sal_Int32 j = 0; j < nTokens; ++j) + sal_Int32 nIdx {0}; + do { - OUString aPath = aMultiPath.getToken(j, ';'); + OUString aPath = aMultiPath.getToken(0, ';', nIdx); if (aPath.isEmpty()) continue; @@ -114,6 +113,7 @@ void ScGlobal::InitAddIns() OSL_FAIL( "unexpected exception caught!" ); } } + while (nIdx>0); } OUString ScGlobal::GetOrdinalSuffix( sal_Int32 nNumber) |