diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-08-12 18:55:38 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-09-09 21:07:47 +0200 |
commit | 78c25a457bf62d38c31021f6fe6446dc16ecdb61 (patch) | |
tree | e6db039e90830455679d463c0d6ff39360237a34 /sc/source/ui/optdlg | |
parent | e37992d8c00db08b2dbc64c1fccb0b12aa4d6e9f (diff) |
Avoid getTokenCount and use indexed getToken
Change-Id: I84141b9863225346d2bedfb702468f37bbeb9f64
Diffstat (limited to 'sc/source/ui/optdlg')
-rw-r--r-- | sc/source/ui/optdlg/tpusrlst.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index bc5b96ef428f..89a578dfed16 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -296,14 +296,14 @@ void ScTpUserLists::UpdateEntries( size_t nList ) void ScTpUserLists::MakeListStr( OUString& rListStr ) { - OUStringBuffer aStr; + if (rListStr.isEmpty()) + return; - sal_Int32 nToken = comphelper::string::getTokenCount(rListStr, LF); + OUStringBuffer aStr; - for(sal_Int32 i=0; i<nToken; i++) + for(sal_Int32 nIdx=0; nIdx>=0;) { - OUString aString = comphelper::string::strip(rListStr.getToken(i, LF), ' '); - aStr.append(aString); + aStr.append(comphelper::string::strip(rListStr.getToken(0, LF, nIdx), ' ')); aStr.append(cDelimiter); } |