summaryrefslogtreecommitdiff
path: root/filter/source
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-03-13 23:45:42 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-04-06 23:41:49 +0200
commit736a481af5c6b7e7d4a652048be14ad0ebbd45e4 (patch)
tree193ad8856e0a66f79e3176e032a73e4d6eb1618c /filter/source
parentcca2e42926a14ec27c663cd0f495dccb7607d6f9 (diff)
Avoid using index for single getToken() call
Change-Id: I76eaf140b153199b62606ac3336d712a64205dcc Reviewed-on: https://gerrit.libreoffice.org/69246 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/msfilter/msvbahelper.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx
index fa258ea7f93c..3a6e0a378706 100644
--- a/filter/source/msfilter/msvbahelper.cxx
+++ b/filter/source/msfilter/msvbahelper.cxx
@@ -115,9 +115,7 @@ static SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath )
uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW );
xProps->getPropertyValue("Title") >>= aName;
- sal_Int32 pos = 0;
- aName = aName.getToken(0,'-',pos);
- aName = aName.trim();
+ aName = aName.getToken(0, '-').trim();
if( sMacroURLOrPath.lastIndexOf( aName ) >= 0 )
{
pFoundShell = pShell;