sd/source/ui/unoidl/unoobj.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
New commits: commit 841619900d8e148ec5ec8f54b7816ff60a5367fe Author: Matteo Casalin <matteo.casa...@yahoo.com> AuthorDate: Sun Feb 10 16:34:16 2019 +0100 Commit: Matteo Casalin <matteo.casa...@yahoo.com> CommitDate: Sun Feb 17 16:59:31 2019 +0100 Use indexed getToken() Change-Id: Idea363ebc0948c83d739b5f9ed8fbf44c734935c Reviewed-on: https://gerrit.libreoffice.org/67643 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casa...@yahoo.com> diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index b62efec9c7f6..39d3898ef91a 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -1354,9 +1354,10 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno } else { - OUString aLibName = aStrMacro.getToken(0, '.'); - OUString aModulName = aStrMacro.getToken(1, '.'); - OUString aMacroName = aStrMacro.getToken(2, '.'); + sal_Int32 nIdx{ 0 }; + const OUString aLibName = aStrMacro.getToken(0, '.', nIdx); + const OUString aModulName = aStrMacro.getToken(0, '.', nIdx); + const OUString aMacroName = aStrMacro.getToken(0, '.', nIdx); OUStringBuffer sBuffer; sBuffer.append( aMacroName ); @@ -1468,9 +1469,10 @@ uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName ) // aMacro has got following format: // "Macroname.Modulname.Libname.Documentname" or // "Macroname.Modulname.Libname.Applicationname" - OUString aMacroName = aMacro.getToken(0, '.'); - OUString aModulName = aMacro.getToken(1, '.'); - OUString aLibName = aMacro.getToken(2, '.'); + sal_Int32 nIdx{ 0 }; + const OUString aMacroName = aMacro.getToken(0, '.', nIdx); + const OUString aModulName = aMacro.getToken(0, '.', nIdx); + const OUString aLibName = aMacro.getToken(0, '.', nIdx); OUStringBuffer sBuffer; sBuffer.append( aLibName ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits