summaryrefslogtreecommitdiff
path: root/sw/source/ui/envelp
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 /sw/source/ui/envelp
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 'sw/source/ui/envelp')
-rw-r--r--sw/source/ui/envelp/envimg.cxx3
-rw-r--r--sw/source/ui/envelp/labelcfg.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/ui/envelp/envimg.cxx b/sw/source/ui/envelp/envimg.cxx
index 8b29a9c8795d..a93a84943eab 100644
--- a/sw/source/ui/envelp/envimg.cxx
+++ b/sw/source/ui/envelp/envimg.cxx
@@ -29,6 +29,7 @@
#include <hintids.hxx>
+#include <comphelper/string.hxx>
#include <tools/stream.hxx>
#include <tools/resid.hxx>
#include <sfx2/app.hxx>
@@ -65,7 +66,7 @@ SW_DLLPUBLIC String MakeSender()
String sRet;
String sSenderToken(SW_RES(STR_SENDER_TOKENS));
- xub_StrLen nSttPos = 0, nTokenCount = sSenderToken.GetTokenCount(';');
+ xub_StrLen nSttPos = 0, nTokenCount = comphelper::string::getTokenCount(sSenderToken, ';');
sal_Bool bLastLength = sal_True;
for( xub_StrLen i = 0; i < nTokenCount; i++ )
{
diff --git a/sw/source/ui/envelp/labelcfg.cxx b/sw/source/ui/envelp/labelcfg.cxx
index a2a8fb33134d..d8dc95333717 100644
--- a/sw/source/ui/envelp/labelcfg.cxx
+++ b/sw/source/ui/envelp/labelcfg.cxx
@@ -31,6 +31,7 @@
#include <swtypes.hxx>
#include <labelcfg.hxx>
#include <labimp.hxx>
+#include <comphelper/string.hxx>
#include <unotools/configpathes.hxx>
#include <unomid.h>
@@ -89,7 +90,7 @@ SwLabRec* lcl_CreateSwLabRec(Sequence<Any>& rValues, const OUString& rManufactur
//except for the continuous flag ('C'/'S')
pValues[nProp] >>= sTmp;
String sMeasure(sTmp);
- sal_uInt16 nTokenCount = sMeasure.GetTokenCount(';');
+ sal_uInt16 nTokenCount = comphelper::string::getTokenCount(sMeasure, ';');
for(sal_uInt16 i = 0; i < nTokenCount; i++)
{
String sToken(sMeasure.GetToken(i, ';' ));