summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview/view.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 /sw/source/ui/uiview/view.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 'sw/source/ui/uiview/view.cxx')
-rw-r--r--sw/source/ui/uiview/view.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index b3bbf8755095..738758f9296d 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -30,6 +30,7 @@
#include <string>
#include <stdlib.h>
#include <hintids.hxx>
+#include <comphelper/string.hxx>
#include <rtl/logfile.hxx>
#include <vcl/graph.hxx>
#include <vcl/inputctx.hxx>
@@ -1144,7 +1145,7 @@ bool lcl_IsOwnDocument( SwView& rView )
void SwView::ReadUserData( const String &rUserData, sal_Bool bBrowse )
{
- if ( rUserData.GetTokenCount() > 1 &&
+ if ( comphelper::string::getTokenCount(rUserData, ';') > 1 &&
//Fuer Dokumente ohne Layout nur im OnlineLayout oder beim
//Forward/Backward
(!pWrtShell->IsNewLayout() || pWrtShell->GetViewOptions()->getBrowseMode() || bBrowse) )