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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Feb 4 22:09:54 UTC 2019


 sw/source/core/fields/authfld.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 973c906d2af03284a662478d292124bbb0502548
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sun Feb 3 18:57:59 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 23:09:31 2019 +0100

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

diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index bf7ceb6df3ee..bd1ff9ff703c 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -103,9 +103,10 @@ void SwAuthorityFieldType::RemoveField(const SwAuthEntry* nHandle)
 SwAuthEntry* SwAuthorityFieldType::AddField(const OUString& rFieldContents)
 {
     rtl::Reference<SwAuthEntry> pEntry(new SwAuthEntry);
+    sal_Int32 nIdx{ 0 };
     for( sal_Int32 i = 0; i < AUTH_FIELD_END; ++i )
         pEntry->SetAuthorField( static_cast<ToxAuthorityField>(i),
-                        rFieldContents.getToken( i, TOX_STYLE_DELIMITER ));
+                        rFieldContents.getToken( 0, TOX_STYLE_DELIMITER, nIdx ));
 
     for (auto &rpTemp : m_DataArr)
     {


More information about the Libreoffice-commits mailing list