diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-09-15 00:05:49 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-10-27 13:59:06 +0100 |
commit | 1353be80b6770c3d48c607e18a1093b6955c7356 (patch) | |
tree | 0bce422c00fec77aafaf0827003a7b50f1958a36 /sc/source | |
parent | 6b520a337828daeb244f31f0386d177656e1ea4d (diff) |
Use getToken with start position in lcl_decodeSepString
Change-Id: I16fba233346b807a4c216da70a71e66f2bb0e0a3
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/dbgui/asciiopt.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sc/source/ui/dbgui/asciiopt.cxx b/sc/source/ui/dbgui/asciiopt.cxx index 931febaabe20..2c8a46e5aeb8 100644 --- a/sc/source/ui/dbgui/asciiopt.cxx +++ b/sc/source/ui/dbgui/asciiopt.cxx @@ -171,10 +171,13 @@ bool ScAsciiOptions::operator==( const ScAsciiOptions& rCmp ) const static OUString lcl_decodeSepString( const OUString & rSepNums, bool & o_bMergeFieldSeps ) { OUString aFieldSeps; - sal_Int32 nSub = comphelper::string::getTokenCount( rSepNums, '/'); - for (sal_Int32 i=0; i<nSub; ++i) + if ( rSepNums.isEmpty() ) + return aFieldSeps; + + sal_Int32 nPos = 0; + do { - OUString aCode = rSepNums.getToken( i, '/' ); + const OUString aCode = rSepNums.getToken( 0, '/', nPos ); if ( aCode == pStrMrg ) o_bMergeFieldSeps = true; else @@ -184,6 +187,8 @@ static OUString lcl_decodeSepString( const OUString & rSepNums, bool & o_bMergeF aFieldSeps += OUString((sal_Unicode) nVal); } } + while ( nPos >= 0 ); + return aFieldSeps; } |