sw/source/ui/fldui/fldpage.cxx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
New commits: commit 7d23072e8ea2ab409a04ff1b79ef943831f3c046 Author: Matteo Casalin <matteo.casa...@yahoo.com> AuthorDate: Sun Feb 10 18:30:08 2019 +0100 Commit: Matteo Casalin <matteo.casa...@yahoo.com> CommitDate: Sun Feb 17 16:45:30 2019 +0100 Use indexed getToken() Change-Id: Id26dc4262ca7030f5165a56be019a009e043d893 Reviewed-on: https://gerrit.libreoffice.org/67660 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casa...@yahoo.com> 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( _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits