[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 4 21:03:37 UTC 2019
sw/source/ui/fldui/fldref.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit dc015ccb07c01a32666b87d2535c9265581b0aeb
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Wed Jan 30 07:46:34 2019 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 22:03:12 2019 +0100
Use indexed getToken()
Change-Id: Icc993a7d32d560823bff6b7d636bc6402f4677c5
Reviewed-on: https://gerrit.libreoffice.org/67315
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 1b37b588d4c5..4ece72e1a1a4 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -268,11 +268,12 @@ void SwFieldRefPage::Reset(const SfxItemSet* )
sal_uInt16 nFormatBoxPosition = USHRT_MAX;
if( !IsRefresh() )
{
+ sal_Int32 nIdx{ 0 };
OUString sUserData = GetUserData();
- if(!IsRefresh() && sUserData.getToken(0, ';').
+ if(!IsRefresh() && sUserData.getToken(0, ';', nIdx).
equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
{
- OUString sVal = sUserData.getToken(1, ';');
+ OUString sVal = sUserData.getToken(0, ';', nIdx);
const sal_uInt16 nVal = static_cast< sal_uInt16 >(sVal.toInt32());
if(nVal != USHRT_MAX)
{
@@ -284,7 +285,7 @@ void SwFieldRefPage::Reset(const SfxItemSet* )
break;
}
}
- sVal = sUserData.getToken(2, ';');
+ sVal = sUserData.getToken(0, ';', nIdx);
if(!sVal.isEmpty())
{
nFormatBoxPosition = static_cast< sal_uInt16 >(sVal.toInt32());
More information about the Libreoffice-commits
mailing list