summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-02-09 18:06:09 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-02-14 07:37:22 +0100
commit04fbaff283c52ae42e05f64a5cc353b17a537183 (patch)
treeb0f56fe34ef5b98837558f7fe2e07004d161513a
parentb672d6697a85e46a5b552e727eaad1eb97991bbe (diff)
Use indexed getToken()
Change-Id: Iee411b9f8af7f123d0b13051ba6266d65ebb10ac Reviewed-on: https://gerrit.libreoffice.org/67622 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
-rw-r--r--svx/source/fmcomp/dbaexchange.cxx9
-rw-r--r--svx/source/form/fmview.cxx9
2 files changed, 10 insertions, 8 deletions
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;