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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Jan 27 17:00:48 UTC 2019


 sw/source/uibase/uiview/view2.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 9bc10964f0673b64e282ad567d08bf7ebba4df65
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sat Jan 26 01:15:45 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Sun Jan 27 18:00:28 2019 +0100

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

diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 524d636241af..8d5b3bd42e52 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2381,9 +2381,10 @@ void SwView::GenerateFormLetter(bool bUseCurrentDocument)
         if(!aDBNameList.empty())
         {
             OUString sDBName(aDBNameList[0]);
-            aData.sDataSource = sDBName.getToken(0, DB_DELIM);
-            aData.sCommand = sDBName.getToken(1, DB_DELIM);
-            aData.nCommandType = sDBName.getToken(2, DB_DELIM ).toInt32();
+            sal_Int32 nIdx {0};
+            aData.sDataSource = sDBName.getToken(0, DB_DELIM, nIdx);
+            aData.sCommand = sDBName.getToken(0, DB_DELIM, nIdx);
+            aData.nCommandType = sDBName.getToken(0, DB_DELIM, nIdx).toInt32();
         }
         rSh.EnterStdMode(); // force change in text shell; necessary for mixing DB fields
         AttrChangedNotify( &rSh );


More information about the Libreoffice-commits mailing list