[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 4 19:05:47 UTC 2019
sw/source/ui/misc/glossary.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 930d691d88a33cea32ad08971b034f03e2086b77
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Jan 27 19:40:55 2019 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 20:05:25 2019 +0100
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 at yahoo.com>
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);
More information about the Libreoffice-commits
mailing list