summaryrefslogtreecommitdiff
path: root/sw/source/ui/misc/glosbib.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-01-27 20:17:43 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-02-04 22:00:29 +0100
commitd166dc5a1a5962411026a362c3552ecc4660c1dd (patch)
treefc11be2738a351bb589329504fdffa9a7b65131f /sw/source/ui/misc/glosbib.cxx
parent148bc64fce5c7980e13de4743f67c0ef65412b7f (diff)
Use indexed getToken()
Change-Id: I84b75dcc2e5b32fe456c1ecd1a8524d4fb25ebc7 Reviewed-on: https://gerrit.libreoffice.org/67312 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sw/source/ui/misc/glosbib.cxx')
-rw-r--r--sw/source/ui/misc/glosbib.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index d32df5c3e2d8..aa47f32c06d4 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -147,7 +147,8 @@ void SwGlossaryGroupDlg::Apply()
for (const auto& removedStr : m_RemovedArr)
{
- const OUString sDelGroup = removedStr.getToken(0, '\t');
+ sal_Int32 nIdx{ 0 };
+ const OUString sDelGroup = removedStr.getToken(0, '\t', nIdx);
if( sDelGroup == aActGroup )
{
//when the current group is deleted, the current group has to be relocated
@@ -157,7 +158,7 @@ void SwGlossaryGroupDlg::Apply()
pGlosHdl->SetCurGroup(pUserData->sGroupName);
}
}
- OUString sTitle( removedStr.getToken(1, '\t') );
+ OUString sTitle( removedStr.getToken(0, '\t', nIdx) );
const OUString sMsg(SwResId(STR_QUERY_DELETE_GROUP1)
+ sTitle
+ SwResId(STR_QUERY_DELETE_GROUP2));
@@ -172,9 +173,10 @@ void SwGlossaryGroupDlg::Apply()
//don't rename before there was one
for (auto it(m_RenamedArr.cbegin()); it != m_RenamedArr.cend(); ++it)
{
- OUString const sOld(it->getToken(0, RENAME_TOKEN_DELIM));
- OUString sNew(it->getToken(1, RENAME_TOKEN_DELIM));
- OUString const sTitle(it->getToken(2, RENAME_TOKEN_DELIM));
+ sal_Int32 nIdx{ 0 };
+ OUString const sOld(it->getToken(0, RENAME_TOKEN_DELIM, nIdx));
+ OUString sNew(it->getToken(0, RENAME_TOKEN_DELIM, nIdx));
+ OUString const sTitle(it->getToken(0, RENAME_TOKEN_DELIM, nIdx));
pGlosHdl->RenameGroup(sOld, sNew, sTitle);
if (it == m_RenamedArr.begin())
{