diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-01-27 23:19:26 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2019-02-04 22:02:39 +0100 |
commit | ddc4c93436dc4342bb47004376bb7e8352fbe8d6 (patch) | |
tree | 62da8f17e662565377334f032c6c84f4db8ba3c0 /sw/source/ui | |
parent | ed4a4b87595c1ca8eea4f356560e2b33665e7288 (diff) |
Use indexed getToken()
Change-Id: Ic3cd02928cf8ea938b7cb2963b9fc316dddcac80
Reviewed-on: https://gerrit.libreoffice.org/67314
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/fldui/fldvar.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 1bc8682b8276..d156a13204cf 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -179,9 +179,10 @@ void SwFieldVarPage::Reset(const SfxItemSet* ) if( !IsRefresh() ) { OUString sUserData = GetUserData(); - if(!IsRefresh() && sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1)) + sal_Int32 nIdx{ 0 }; + if(!IsRefresh() && sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1)) { - OUString sVal = sUserData.getToken(1, ';'); + OUString sVal = sUserData.getToken(0, ';', nIdx); sal_uInt16 nVal = static_cast<sal_uInt16>(sVal.toInt32()); if( USHRT_MAX != nVal ) { |