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

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


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

New commits:
commit 395729260ddd6ff1c32a9ac7ef5c5b4651f0100d
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Fri Feb 1 07:27:03 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 22:10:30 2019 +0100

    Use indexed getToken()
    
    Change-Id: Ic81c216d24eb0b41549f2b82a3888c466d26c5ca
    Reviewed-on: https://gerrit.libreoffice.org/67321
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>

diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 05e0bfcd4f45..c412a4045e0a 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -146,9 +146,10 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
 
     sal_Int32 nSelEntryData = LISTBOX_ENTRY_NOTFOUND;
     const OUString sUserData = GetUserData();
-    if (sUserData.getToken(0, ';').equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
+    sal_Int32 nIdx{ 0 };
+    if (sUserData.getToken(0, ';', nIdx).equalsIgnoreAsciiCase(USER_DATA_VERSION_1))
     {
-        nSelEntryData = sUserData.getToken(1, ';').toInt32();
+        nSelEntryData = sUserData.getToken(0, ';', nIdx).toInt32();
     }
 
     std::vector<OUString> aLst;


More information about the Libreoffice-commits mailing list