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

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


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

New commits:
commit 81c3d469413db27d22ea757ccef677b1aa0669c0
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Fri Feb 1 07:42:18 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Mon Feb 4 23:00:28 2019 +0100

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

diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index a2e1691a5aec..314146a7d049 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -432,8 +432,9 @@ void SwLabPage::InitDatabaseBox()
         const OUString* pDataNames = aDataNames.getConstArray();
         for (long i = 0; i < aDataNames.getLength(); i++)
             m_xDatabaseLB->append_text(pDataNames[i]);
-        OUString sDBName = sActDBName.getToken( 0, DB_DELIM );
-        OUString sTableName = sActDBName.getToken( 1, DB_DELIM );
+        sal_Int32 nIdx{ 0 };
+        OUString sDBName = sActDBName.getToken( 0, DB_DELIM, nIdx );
+        OUString sTableName = sActDBName.getToken( 0, DB_DELIM, nIdx );
         m_xDatabaseLB->set_active_text(sDBName);
         if( !sDBName.isEmpty() && GetDBManager()->GetTableNames(*m_xTableLB, sDBName))
         {


More information about the Libreoffice-commits mailing list