diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 14:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 20:23:38 +0200 |
commit | 3c6cb83b80b502975dce89c02401a064872b5ea3 (patch) | |
tree | 77ca629355406668a34332470c475feffe40e2ec /sw/source/uibase/dbui | |
parent | 7b4f643f4feb28fdc92b3da7a95d0f1c7286d01a (diff) |
loplugin:sequenceloop in sw
Change-Id: Icda7c89b396e5607ca847c0a8393cb27a2d50c6c
Reviewed-on: https://gerrit.libreoffice.org/77530
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/dbui')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbtree.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 77a2439990d1..5be3ddce23e5 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -729,7 +729,7 @@ bool SwDBManager::GetTableNames(weld::ComboBox& rBox, const OUString& rDBName) if(xTSupplier.is()) { uno::Reference<container::XNameAccess> xTables = xTSupplier->getTables(); - uno::Sequence<OUString> aTables = xTables->getElementNames(); + const uno::Sequence<OUString> aTables = xTables->getElementNames(); for (const OUString& rTable : aTables) rBox.append("0", rTable); } @@ -737,7 +737,7 @@ bool SwDBManager::GetTableNames(weld::ComboBox& rBox, const OUString& rDBName) if(xQSupplier.is()) { uno::Reference<container::XNameAccess> xQueries = xQSupplier->getQueries(); - uno::Sequence<OUString> aQueries = xQueries->getElementNames(); + const uno::Sequence<OUString> aQueries = xQueries->getElementNames(); for (const OUString& rQuery : aQueries) rBox.append("1", rQuery); } diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index d7d9e96e626c..afbb49f38f61 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -160,7 +160,7 @@ void SwDBTreeList::InitTreeList() { return sort.compare(x, y) < 0; }); OUString aImg(RID_BMP_DB); - for (const OUString& rDBName : aDBNames) + for (const OUString& rDBName : std::as_const(aDBNames)) { Reference<XConnection> xConnection = pImpl->GetConnection(rDBName); if (xConnection.is()) @@ -241,7 +241,7 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b if(xColsSupplier.is()) { Reference <XNameAccess> xCols = xColsSupplier->getColumns(); - Sequence< OUString> aColNames = xCols->getElementNames(); + const Sequence< OUString> aColNames = xCols->getElementNames(); for (const OUString& rColName : aColNames) { m_xTreeView->append(&rParent, rColName); @@ -266,7 +266,7 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b if(xTSupplier.is()) { Reference<XNameAccess> xTables = xTSupplier->getTables(); - Sequence< OUString> aTableNames = xTables->getElementNames(); + const Sequence< OUString> aTableNames = xTables->getElementNames(); OUString aImg(RID_BMP_DBTABLE); for (const OUString& rTableName : aTableNames) { @@ -279,7 +279,7 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b if(xQSupplier.is()) { Reference<XNameAccess> xQueries = xQSupplier->getQueries(); - Sequence< OUString> aQueryNames = xQueries->getElementNames(); + const Sequence< OUString> aQueryNames = xQueries->getElementNames(); OUString aImg(RID_BMP_DBQUERY); for (const OUString& rQueryName : aQueryNames) { |