summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2019-02-10 18:30:08 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2019-02-17 16:45:30 +0100
commit7d23072e8ea2ab409a04ff1b79ef943831f3c046 (patch)
tree8b06b46233adf9f2cb4e0e1fee5aa2952a71f218 /sw
parent55cf6c856dbb43ed5648e57d647ecfaf1498c3e5 (diff)
Use indexed getToken()
Change-Id: Id26dc4262ca7030f5165a56be019a009e043d893 Reviewed-on: https://gerrit.libreoffice.org/67660 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/fldui/fldpage.cxx18
1 files changed, 10 insertions, 8 deletions
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index c35385da27a1..1cc166356c24 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -144,14 +144,15 @@ void SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUS
bRecordDB ? FN_INSERT_DBFIELD : FN_INSERT_FIELD );
if(bRecordDB)
{
+ sal_Int32 nIdx{ 0 };
aReq.AppendItem(SfxStringItem
- (FN_INSERT_DBFIELD,rPar1.getToken(0, DB_DELIM)));
+ (FN_INSERT_DBFIELD,rPar1.getToken(0, DB_DELIM, nIdx)));
aReq.AppendItem(SfxStringItem
- (FN_PARAM_1,rPar1.getToken(1, DB_DELIM)));
+ (FN_PARAM_1,rPar1.getToken(0, DB_DELIM, nIdx)));
aReq.AppendItem(SfxInt32Item
- (FN_PARAM_3,rPar1.getToken(2, DB_DELIM).toInt32()));
+ (FN_PARAM_3,rPar1.getToken(0, DB_DELIM, nIdx).toInt32()));
aReq.AppendItem(SfxStringItem
- (FN_PARAM_2,rPar1.getToken(3, DB_DELIM)));
+ (FN_PARAM_2,rPar1.getToken(0, DB_DELIM, nIdx)));
}
else
{
@@ -201,10 +202,11 @@ void SwFieldPage::InsertField(sal_uInt16 nTypeId, sal_uInt16 nSubType, const OUS
case TYP_DBFLD:
{
SwDBData aData;
- aData.sDataSource = rPar1.getToken(0, DB_DELIM);
- aData.sCommand = rPar1.getToken(1, DB_DELIM);
- aData.nCommandType = rPar1.getToken(2, DB_DELIM).toInt32();
- OUString sColumn = rPar1.getToken(3, DB_DELIM);
+ sal_Int32 nIdx{ 0 };
+ aData.sDataSource = rPar1.getToken(0, DB_DELIM, nIdx);
+ aData.sCommand = rPar1.getToken(0, DB_DELIM, nIdx);
+ aData.nCommandType = rPar1.getToken(0, DB_DELIM, nIdx).toInt32();
+ OUString sColumn = rPar1.getToken(0, DB_DELIM, nIdx);
SwDBFieldType* pOldTyp = static_cast<SwDBFieldType*>(pTmpField->GetTyp());
SwDBFieldType* pTyp = static_cast<SwDBFieldType*>(pSh->InsertFieldType(