summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui/csvruler.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-02 10:55:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-05 09:18:19 +0000
commitbacfd2dc4cea1a5d87658ed8592116acd931e000 (patch)
treed22172a33fdd13a440b6882a28c23ea2d639bbad /sc/source/ui/dbgui/csvruler.cxx
parent6281eb0e0792da0194c07da18296e94dd944b8e5 (diff)
add a comphelper::string::getTokenCount
suitable for conversion from [Byte]String::GetTokenCount converted low-hanging variants to rtl::O[UString]::getToken loops added unit test
Diffstat (limited to 'sc/source/ui/dbgui/csvruler.cxx')
-rw-r--r--sc/source/ui/dbgui/csvruler.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index 1b2dc4c1fbfd..53e77d61e988 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -36,6 +36,7 @@
#include <optutil.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
+#include <comphelper/string.hxx>
#include "miscuno.hxx"
using namespace com::sun::star::uno;
@@ -74,7 +75,7 @@ static void load_FixedWidthList(ScCsvSplits &aSplits)
sSplits = String( sFixedWidthLists );
// String ends with a semi-colon so there is no 'int' after the last one.
- xub_StrLen n = sSplits.GetTokenCount() - 1;
+ xub_StrLen n = comphelper::string::getTokenCount(sSplits, ';') - 1;
for (xub_StrLen i = 0; i < n; ++i)
aSplits.Insert( sSplits.GetToken(i).ToInt32() );
}