[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 4 21:07:34 UTC 2019
sw/source/ui/fldui/fldfunc.cxx | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 9cb73d627a0c6df7c4e01ac1c90e24baf82adc6c
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Wed Jan 30 08:03:33 2019 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 22:07:11 2019 +0100
Use indexed getToken()
Change-Id: Id3f8352fd367645fffb81fe1c08c3be8fb35cb07
Reviewed-on: https://gerrit.libreoffice.org/67319
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index f70a551c3034..d617524a1502 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -183,11 +183,11 @@ void SwFieldFuncPage::Reset(const SfxItemSet* )
if( !IsRefresh() )
{
- OUString sUserData = GetUserData();
- if(sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
+ const OUString sUserData = GetUserData();
+ sal_Int32 nIdx{ 0 };
+ if(sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
{
- OUString sVal = sUserData.getToken(1, ';');
- const sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.toInt32());
+ const sal_uInt16 nVal = static_cast< sal_uInt16 >(sUserData.getToken(0, ';', nIdx).toInt32());
if(nVal != USHRT_MAX)
{
for(sal_Int32 i = 0; i < m_pTypeLB->GetEntryCount(); i++)
@@ -361,8 +361,9 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, ListBox&, void)
m_pNameED->SetDropEnable(true);
if (IsFieldEdit())
{
- m_pCond1ED->SetText(GetCurField()->GetPar2().getToken(0, '|'));
- m_pCond2ED->SetText(GetCurField()->GetPar2().getToken(1, '|'));
+ sal_Int32 nIdx{ 0 };
+ m_pCond1ED->SetText(GetCurField()->GetPar2().getToken(0, '|', nIdx));
+ m_pCond2ED->SetText(GetCurField()->GetPar2().getToken(0, '|', nIdx));
}
bName = bValue = true;
More information about the Libreoffice-commits
mailing list