diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-02 10:55:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-05 09:18:19 +0000 |
commit | bacfd2dc4cea1a5d87658ed8592116acd931e000 (patch) | |
tree | d22172a33fdd13a440b6882a28c23ea2d639bbad /filter | |
parent | 6281eb0e0792da0194c07da18296e94dd944b8e5 (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 'filter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 3 | ||||
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index b8d64f794097..5aac23ddbdd5 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -89,6 +89,7 @@ #include <unotools/ucbstreamhelper.hxx> #include <unotools/localfilehelper.hxx> #include <comphelper/extract.hxx> +#include <comphelper/string.hxx> #include <toolkit/unohlp.hxx> #include <vcl/virdev.hxx> #include <rtl/crc.h> @@ -781,7 +782,7 @@ sal_Bool EscherPropertyContainer::GetLineArrow( const sal_Bool bLineStart, else if ( aApiName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Arrow" ) ) ) reLineEnd = ESCHER_LineArrowEnd; } - else if ( aArrowStartName.GetTokenCount( ' ' ) == 2 ) + else if ( comphelper::string::getTokenCount(aArrowStartName, ' ') == 2 ) { sal_Bool b = sal_True; String aArrowName( aArrowStartName.GetToken( 0, ' ' ) ); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 038dcbe0b12f..86d5b4f064d8 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -40,6 +40,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <unotools/streamwrap.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/string.hxx> #include <sot/exchange.hxx> #include <sot/storinfo.hxx> #include <vcl/cvtgrf.hxx> @@ -3973,7 +3974,7 @@ bool SvxMSDffManager::ReadObjText(SvStream& rSt, SdrObject* pObj) rOutliner.SetText( aText, rOutliner.GetParagraph( 0 ) ); // SHIFT-Ret ersetzen im Outliner - if(aText.GetTokenCount(0x0B) > 1) + if (comphelper::string::getTokenCount(aText, 0x0B) > 1) { sal_uInt32 nParaCount = rOutliner.GetParagraphCount(); for(sal_uInt16 a=0;a<nParaCount;a++) |