[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Feb 4 21:03:03 UTC 2019


 sw/source/ui/fldui/fldvar.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ddc4c93436dc4342bb47004376bb7e8352fbe8d6
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Jan 27 23:19:26 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
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 <matteo.casalin at yahoo.com>

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 )
             {


More information about the Libreoffice-commits mailing list