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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Feb 14 06:37:58 UTC 2019


 svx/source/fmcomp/dbaexchange.cxx |    9 +++++----
 svx/source/form/fmview.cxx        |    9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit 04fbaff283c52ae42e05f64a5cc353b17a537183
Author:     Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sat Feb 9 18:06:09 2019 +0100
Commit:     Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Thu Feb 14 07:37:22 2019 +0100

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

diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index 00014f83244c..a01525cfc00d 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -331,10 +331,11 @@ namespace svx
         (void)const_cast<TransferableDataHelper&>(_rData).GetString(nRecognizedFormat, sFieldDescription);
 
         const sal_Unicode cSeparator = u'\x000B';
-        _rDatasource    = sFieldDescription.getToken(0, cSeparator);
-        _rCommand       = sFieldDescription.getToken(1, cSeparator);
-        _nCommandType   = sFieldDescription.getToken(2, cSeparator).toInt32();
-        _rFieldName     = sFieldDescription.getToken(3, cSeparator);
+        sal_Int32 nIdx{ 0 };
+        _rDatasource    = sFieldDescription.getToken(0, cSeparator, nIdx);
+        _rCommand       = sFieldDescription.getToken(0, cSeparator, nIdx);
+        _nCommandType   = sFieldDescription.getToken(0, cSeparator, nIdx).toInt32();
+        _rFieldName     = sFieldDescription.getToken(0, cSeparator, nIdx);
 
         return true;
     }
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 0931b0003de7..fd632773be70 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -400,10 +400,11 @@ SdrObjectUniquePtr FmFormView::CreateXFormsControl( const OXFormsDescriptor &_rD
 
 SdrObjectUniquePtr FmFormView::CreateFieldControl(const OUString& rFieldDesc) const
 {
-    OUString sDataSource     = rFieldDesc.getToken(0,u'\x000B');
-    OUString sObjectName     = rFieldDesc.getToken(1,u'\x000B');
-    sal_uInt16 nObjectType   = static_cast<sal_uInt16>(rFieldDesc.getToken(2,u'\x000B').toInt32());
-    OUString sFieldName      = rFieldDesc.getToken(3,u'\x000B');
+    sal_Int32 nIdx{ 0 };
+    OUString sDataSource     = rFieldDesc.getToken(0, u'\x000B', nIdx);
+    OUString sObjectName     = rFieldDesc.getToken(0, u'\x000B', nIdx);
+    sal_uInt16 nObjectType   = static_cast<sal_uInt16>(rFieldDesc.getToken(0, u'\x000B', nIdx).toInt32());
+    OUString sFieldName      = rFieldDesc.getToken(0, u'\x000B', nIdx);
 
     if (sFieldName.isEmpty() || sObjectName.isEmpty() || sDataSource.isEmpty())
         return nullptr;


More information about the Libreoffice-commits mailing list