[Libreoffice-commits] core.git: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Feb 17 15:59:52 UTC 2019
sd/source/ui/unoidl/unoobj.cxx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 841619900d8e148ec5ec8f54b7816ff60a5367fe
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Feb 10 16:34:16 2019 +0100
Commit: Matteo Casalin <matteo.casalin at 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.casalin at 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 );
More information about the Libreoffice-commits
mailing list