filter/source/msfilter/msvbahelper.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit 736a481af5c6b7e7d4a652048be14ad0ebbd45e4 Author: Matteo Casalin <matteo.casa...@yahoo.com> AuthorDate: Wed Mar 13 23:45:42 2019 +0100 Commit: Matteo Casalin <matteo.casa...@yahoo.com> CommitDate: Sat Apr 6 23:41:49 2019 +0200 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.casa...@yahoo.com> 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits