[Libreoffice-commits] core.git: filter/source

Matteo Casalin (via logerrit) logerrit at kemper.freedesktop.org
Sat Apr 6 21:42:09 UTC 2019


 filter/source/msfilter/msvbahelper.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 736a481af5c6b7e7d4a652048be14ad0ebbd45e4
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Wed Mar 13 23:45:42 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at 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.casalin at 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;


More information about the Libreoffice-commits mailing list