summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-01-27 19:40:55 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-02-04 20:05:25 +0100
commit930d691d88a33cea32ad08971b034f03e2086b77 (patch)
treec360322c830b0168e36a2b7385a1331e7ea1bc69 /sw
parent579a2ff4e108aefffc1a06b2a7379beebc58f1d4 (diff)
Don't get the same token twice
Change-Id: I81e3b909529a48a60c80f55b3644f3477a77418a Reviewed-on: https://gerrit.libreoffice.org/67306 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/misc/glossary.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 91c54d997261..ba79e0d072cc 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -690,15 +690,16 @@ void SwGlossaryDlg::Init()
OUString sGroupName(pGlossaryHdl->GetGroupName(nId, &sTitle));
if(sGroupName.isEmpty())
continue;
+ const OUString sName{ sGroupName.getToken( 0, GLOS_DELIM ) };
if(sTitle.isEmpty())
- sTitle = sGroupName.getToken( 0, GLOS_DELIM );
+ sTitle = sName;
if(sTitle == sMyAutoTextEnglish)
sTitle = sMyAutoTextTranslated;
SvTreeListEntry* pEntry = m_pCategoryBox->InsertEntry( sTitle );
const sal_Int32 nPath = sGroupName.getToken( 1, GLOS_DELIM ).toInt32();
GroupUserData* pData = new GroupUserData;
- pData->sGroupName = sGroupName.getToken(0, GLOS_DELIM);
+ pData->sGroupName = sName;
pData->nPathIdx = static_cast< sal_uInt16 >(nPath);
pData->bReadonly = pGlossaryHdl->IsReadOnly(&sGroupName);