summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/relationdesign/RelationController.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-12-30 09:43:25 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-01-11 09:39:27 +0100
commit4cb3e1c05a16af3dad03db9d789dc7ea061b33cf (patch)
tree78f0f8a67e2ecbc60abc9901c0721f44a73ad4e7 /dbaccess/source/ui/relationdesign/RelationController.cxx
parent42bfd59b6ba9e7a53ba789f04694060cc43d9d88 (diff)
Use for-range loops in dbaccess (part2)
Change-Id: I7a247584a88fa516c7d28068b3d860499f090c92 Reviewed-on: https://gerrit.libreoffice.org/47189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess/source/ui/relationdesign/RelationController.cxx')
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 233141474c4c..dfafc9291c24 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -442,17 +442,15 @@ void ORelationController::mergeData(const TTableConnectionData& _aConnectionData
std::copy( _aConnectionData.begin(), _aConnectionData.end(), std::back_inserter( m_vTableConnectionData ));
// here we are finished, so we can collect the table from connection data
- TTableConnectionData::const_iterator aConnDataIter = m_vTableConnectionData.begin();
- TTableConnectionData::const_iterator aConnDataEnd = m_vTableConnectionData.end();
- for(;aConnDataIter != aConnDataEnd;++aConnDataIter)
+ for (auto const& elem : m_vTableConnectionData)
{
- if ( !existsTable((*aConnDataIter)->getReferencingTable()->GetComposedName()) )
+ if ( !existsTable(elem->getReferencingTable()->GetComposedName()) )
{
- m_vTableData.push_back((*aConnDataIter)->getReferencingTable());
+ m_vTableData.push_back(elem->getReferencingTable());
}
- if ( !existsTable((*aConnDataIter)->getReferencedTable()->GetComposedName()) )
+ if ( !existsTable(elem->getReferencedTable()->GetComposedName()) )
{
- m_vTableData.push_back((*aConnDataIter)->getReferencedTable());
+ m_vTableData.push_back(elem->getReferencedTable());
}
}
if ( m_nThreadEvent )
@@ -532,14 +530,12 @@ void ORelationController::loadData()
TTableWindowData::value_type ORelationController::existsTable(const OUString& _rComposedTableName) const
{
::comphelper::UStringMixEqual bCase(true);
- TTableWindowData::const_iterator aIter = m_vTableData.begin();
- TTableWindowData::const_iterator aEnd = m_vTableData.end();
- for(;aIter != aEnd;++aIter)
+ for (auto const& elem : m_vTableData)
{
- if(bCase((*aIter)->GetComposedName(),_rComposedTableName))
- break;
+ if(bCase(elem->GetComposedName(),_rComposedTableName))
+ return elem;
}
- return ( aIter != aEnd) ? *aIter : TTableWindowData::value_type();
+ return TTableWindowData::value_type();
}
void ORelationController::loadLayoutInformation()