diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-02-10 16:34:16 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-02-17 16:59:31 +0100 |
commit | 841619900d8e148ec5ec8f54b7816ff60a5367fe (patch) | |
tree | a8f568b53f3d1a9c063ce5d898a39e4dcc3382da /sd/source/ui/unoidl/unoobj.cxx | |
parent | 437e210e2a11928d4bea0b5af532a00d2e060311 (diff) |
Use indexed getToken()
Change-Id: Idea363ebc0948c83d739b5f9ed8fbf44c734935c
Reviewed-on: https://gerrit.libreoffice.org/67643
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sd/source/ui/unoidl/unoobj.cxx')
-rw-r--r-- | sd/source/ui/unoidl/unoobj.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
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 ); |