diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-01-30 07:46:34 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-02-04 22:03:12 +0100 |
commit | dc015ccb07c01a32666b87d2535c9265581b0aeb (patch) | |
tree | ba8171dba765fa668a52e5b0f94e34507be85143 /sw | |
parent | ddc4c93436dc4342bb47004376bb7e8352fbe8d6 (diff) |
Use indexed getToken()
Change-Id: Icc993a7d32d560823bff6b7d636bc6402f4677c5
Reviewed-on: https://gerrit.libreoffice.org/67315
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/fldui/fldref.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
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()); |