summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-08-12 18:56:56 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2018-09-09 21:07:48 +0200
commit68b3eb1372aa9728673d3c334880d70a75e42b21 (patch)
tree96a63256cbbc0b15a6439742f71f14829e1342a0 /sc/source/ui
parent78c25a457bf62d38c31021f6fe6446dc16ecdb61 (diff)
Avoid getTokenCount and use indexed getToken
Change-Id: Icd6253b09aacfdf63696f4292e1ac4ed8be8242c
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index e8eb369d39bc..d0909c63f34b 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -19,7 +19,6 @@
#undef SC_DLLIMPLEMENTATION
-#include <comphelper/string.hxx>
#include <sfx2/app.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
@@ -149,11 +148,14 @@ void ScLinkedAreaDlg::InitFromOldLink( const OUString& rFile, const OUString& rF
UpdateSourceRanges();
- sal_Int32 nRangeCount = comphelper::string::getTokenCount(rSource, ';');
- for ( sal_Int32 i=0; i<nRangeCount; i++ )
+ if (!rSource.isEmpty())
{
- OUString aRange = rSource.getToken(i,';');
- m_xLbRanges->select_text(aRange);
+ sal_Int32 nIdx {0};
+ do
+ {
+ m_xLbRanges->select_text(rSource.getToken(0, ';', nIdx));
+ }
+ while (nIdx>0);
}
bool bDoRefresh = (nRefresh != 0);