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 /editeng | |
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 'editeng')
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 77e6e85c1317..37a569e5948d 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -27,6 +27,7 @@ ************************************************************************/ +#include <comphelper/string.hxx> #include <svl/intitem.hxx> #include <editeng/editeng.hxx> #include <editeng/editview.hxx> @@ -410,7 +411,7 @@ void Outliner::SetText( const XubString& rText, Paragraph* pPara ) if( aText.GetChar( aText.Len()-1 ) == '\x0A' ) aText.Erase( aText.Len()-1, 1 ); // Delete the last break - sal_uInt16 nCount = aText.GetTokenCount( '\x0A' ); + sal_uInt16 nCount = comphelper::string::getTokenCount(aText, '\x0A'); sal_uInt16 nPos = 0; sal_uInt16 nInsPos = nPara+1; while( nCount > nPos ) |