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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Feb 4 20:53:56 UTC 2019


 sw/source/ui/misc/glossary.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 687932bc898a8a7d6fbf68260cefe789eec9aadf
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Jan 27 19:44:56 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 21:53:31 2019 +0100

    Use indexed getToken()
    
    Change-Id: I0977533e71e070227e19555d140d1de307bf91f4
    Reviewed-on: https://gerrit.libreoffice.org/67307
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index ba79e0d072cc..43c616deece3 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -690,13 +690,14 @@ void SwGlossaryDlg::Init()
         OUString sGroupName(pGlossaryHdl->GetGroupName(nId, &sTitle));
         if(sGroupName.isEmpty())
             continue;
-        const OUString sName{ sGroupName.getToken( 0, GLOS_DELIM ) };
+        sal_Int32 nIdx{ 0 };
+        const OUString sName{ sGroupName.getToken( 0, GLOS_DELIM, nIdx ) };
         if(sTitle.isEmpty())
             sTitle = sName;
         if(sTitle == sMyAutoTextEnglish)
             sTitle = sMyAutoTextTranslated;
         SvTreeListEntry* pEntry = m_pCategoryBox->InsertEntry( sTitle );
-        const sal_Int32 nPath = sGroupName.getToken( 1, GLOS_DELIM ).toInt32();
+        const sal_Int32 nPath = sGroupName.getToken( 0, GLOS_DELIM, nIdx ).toInt32();
 
         GroupUserData* pData = new GroupUserData;
         pData->sGroupName = sName;


More information about the Libreoffice-commits mailing list