sw/source/ui/fldui/fldvar.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit ddc4c93436dc4342bb47004376bb7e8352fbe8d6 Author: Matteo Casalin <[email protected]> AuthorDate: Sun Jan 27 23:19:26 2019 +0100 Commit: Matteo Casalin <[email protected]> CommitDate: Mon Feb 4 22:02:39 2019 +0100 Use indexed getToken() Change-Id: Ic3cd02928cf8ea938b7cb2963b9fc316dddcac80 Reviewed-on: https://gerrit.libreoffice.org/67314 Tested-by: Jenkins Reviewed-by: Matteo Casalin <[email protected]> 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 ) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
