[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Feb 14 06:37:02 UTC 2019
sw/source/core/doc/docfld.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit b672d6697a85e46a5b552e727eaad1eb97991bbe
Author: Matteo Casalin <matteo.casalin at yahoo.com>
AuthorDate: Sat Feb 9 11:05:53 2019 +0100
Commit: Matteo Casalin <matteo.casalin at yahoo.com>
CommitDate: Thu Feb 14 07:36:35 2019 +0100
Use indexed getToken()
Change-Id: Ibf8a644c1d61516caa67e0ce22b33a41380d9911
Reviewed-on: https://gerrit.libreoffice.org/67621
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin at yahoo.com>
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 30f5a8cb81d3..36e16bff2f5b 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -567,8 +567,9 @@ void SwDoc::AddUsedDBToList( std::vector<OUString>& rDBNameList, const OUString&
#endif
SwDBData aData;
- aData.sDataSource = rDBName.getToken(0, DB_DELIM);
- aData.sCommand = rDBName.getToken(1, DB_DELIM);
+ sal_Int32 nIdx{ 0 };
+ aData.sDataSource = rDBName.getToken(0, DB_DELIM, nIdx);
+ aData.sCommand = rDBName.getToken(0, DB_DELIM, nIdx);
aData.nCommandType = -1;
GetDBManager()->CreateDSData(aData);
rDBNameList.push_back(rDBName);
@@ -583,9 +584,10 @@ void SwDoc::ChangeDBFields( const std::vector<OUString>& rOldNames,
(void) rNewName;
#else
SwDBData aNewDBData;
- aNewDBData.sDataSource = rNewName.getToken(0, DB_DELIM);
- aNewDBData.sCommand = rNewName.getToken(1, DB_DELIM);
- aNewDBData.nCommandType = static_cast<short>(rNewName.getToken(2, DB_DELIM).toInt32());
+ sal_Int32 nIdx{ 0 };
+ aNewDBData.sDataSource = rNewName.getToken(0, DB_DELIM, nIdx);
+ aNewDBData.sCommand = rNewName.getToken(0, DB_DELIM, nIdx);
+ aNewDBData.nCommandType = static_cast<short>(rNewName.getToken(0, DB_DELIM, nIdx).toInt32());
SwSectionFormats& rArr = GetSections();
for (auto n = rArr.size(); n; )
More information about the Libreoffice-commits
mailing list