summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-05-01 10:58:16 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2018-06-03 12:17:44 +0200
commitc4fb67f712ddde0e31bda0f22ef4e4247d63ea9a (patch)
tree2a82df5d50d3fc50d59f221de9a2792e9f3e38a2
parent7723926deb6dcea1049faf49c2b34e27297a8bda (diff)
Simplify: not empty OUString has at least one token
Change-Id: Iae1ce8dc951f394effb942cba0f19a531b42aea0
-rw-r--r--sw/source/ui/vba/vbaselection.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 0edfc055cd12..55e16e70490b 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -27,7 +27,6 @@
#include <com/sun/star/text/ControlCharacter.hpp>
#include <com/sun/star/table/XCell.hpp>
#include <basic/sberrors.hxx>
-#include <comphelper/string.hxx>
#include <ooo/vba/word/WdUnits.hpp>
#include <ooo/vba/word/WdMovementType.hpp>
#include <ooo/vba/word/WdGoToItem.hpp>
@@ -976,11 +975,12 @@ void SwVbaSelection::GetSelectedCellRange( OUString& sTLName, OUString& sBRName
uno::Reference< text::XTextTableCursor > xTextTableCursor( mxModel->getCurrentSelection(), uno::UNO_QUERY );
if( xTextTableCursor.is() )
{
- OUString sRange( xTextTableCursor->getRangeName() );
- if( comphelper::string::getTokenCount(sRange, ':') > 0 )
+ const OUString sRange( xTextTableCursor->getRangeName() );
+ if (!sRange.isEmpty())
{
- sTLName = sRange.getToken(0, ':');
- sBRName = sRange.getToken(1, ':');
+ sal_Int32 nIdx{0};
+ sTLName = sRange.getToken(0, ':', nIdx);
+ sBRName = sRange.getToken(0, ':', nIdx);
}
}
if( sTLName.isEmpty() )