[Libreoffice-commits] core.git: sfx2/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Feb 13 06:48:07 UTC 2019
sfx2/source/doc/doctemplates.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 2e0f6635d6136622a00c04ce7041969f4d7f4348
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sat Feb 9 18:27:11 2019 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Wed Feb 13 07:47:40 2019 +0100
Use indexed getToken()
Change-Id: I393c53d7501afc6cd75a4c463031db94574b4ec7
Reviewed-on: https://gerrit.libreoffice.org/67629
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 085205a36a1a..b8711f6f25cd 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -553,10 +553,11 @@ void SfxDocTplService_Impl::getDirList()
const OUString aPrefix(
"vnd.sun.star.expand:" );
+ sal_Int32 nIdx{ 0 };
for (sal_Int32 i = 0; i < nCount; ++i)
{
aURL.SetSmartProtocol( INetProtocol::File );
- aURL.SetURL( aDirs.getToken( i, C_DELIM ) );
+ aURL.SetURL( aDirs.getToken( 0, C_DELIM, nIdx ) );
maTemplateDirs[i] = aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE );
sal_Int32 nIndex = maTemplateDirs[i].indexOf( aPrefix );
More information about the Libreoffice-commits
mailing list