diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 11:26:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 14:18:49 +0200 |
commit | 5a526f9196a8aeb527a2fc6d7c081812770c28be (patch) | |
tree | 076a324476d79bf397fb97d5884db571106425e8 /dbaccess/source/ui/tabledesign | |
parent | cf3fb54debffeab546085e648c73c576343be9f4 (diff) |
loplugin:sequenceloop dbaccess..extensions
Change-Id: I0eb33a8e293eb8afd0cf5a933384c44e023a2e6b
Reviewed-on: https://gerrit.libreoffice.org/77498
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ui/tabledesign')
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableController.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 3aff255781d2..b7b8a11b4579 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -777,7 +777,8 @@ void OTableController::loadData() // sal_Bool bReadOldRow = xMetaData->supportsAlterTableWithAddColumn() && xMetaData->supportsAlterTableWithDropColumn(); bool bIsAlterAllowed = isAlterAllowed(); - for(const OUString& rColumn : xColumns->getElementNames()) + const Sequence<OUString> aColNames = xColumns->getElementNames(); + for(const OUString& rColumn : aColNames) { Reference<XPropertySet> xColumn; xColumns->getByName(rColumn) >>= xColumn; @@ -847,7 +848,8 @@ void OTableController::loadData() Reference<XNameAccess> xKeyColumns = getKeyColumns(); if(xKeyColumns.is()) { - for(const OUString& rKeyColumn : xKeyColumns->getElementNames()) + const Sequence<OUString> aKeyColumnNames = xKeyColumns->getElementNames(); + for(const OUString& rKeyColumn : aKeyColumnNames) { for(std::shared_ptr<OTableRow> const& pRow : m_vRowList) { @@ -1158,7 +1160,8 @@ void OTableController::alterColumns() // now we have to look for the columns who could be deleted if ( xDrop.is() ) { - for(const OUString& rColumnName : xColumns->getElementNames()) + const Sequence<OUString> aColNames = xColumns->getElementNames(); + for(const OUString& rColumnName : aColNames) { if(aColumns.find(rColumnName) == aColumns.end()) // found a column to delete { |