diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-09 08:50:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-09 13:49:39 +0200 |
commit | 13e5d52fc37f9283edd8a055d6b86108701182f1 (patch) | |
tree | 54a21d76afa9a2ecbf64527d343727b430c42934 /dbaccess | |
parent | 317a90fd9d090aa2fe879549553d6491eb5028bf (diff) |
loplugin:constantparam
Change-Id: I7bbc4e1546acf58f1ca24bfec5e465bad5ca90de
Reviewed-on: https://gerrit.libreoffice.org/73732
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 36 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/tabletree.hxx | 3 |
2 files changed, 15 insertions, 24 deletions
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 4cc0885d8112..a0e126254062 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -410,11 +410,7 @@ void TableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConne for (auto const& table : _rTables) { // add the entry - implAddEntry( - xMeta, - table.first, - false - ); + implAddEntry(xMeta, table.first); } if ( !m_bNoEmptyFolders && lcl_shouldDisplayEmptySchemasAndCatalogs( _rxConnection ) ) @@ -684,8 +680,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry( void TableTreeListBox::implAddEntry( const Reference< XDatabaseMetaData >& _rxMeta, - const OUString& _rTableName, - bool _bCheckName + const OUString& _rTableName ) { OSL_PRECOND( _rxMeta.is(), "OTableTreeListBox::implAddEntry: invalid meta data!" ); @@ -746,23 +741,20 @@ void TableTreeListBox::implAddEntry( xParentEntry = std::move(xFolder); } - if (!_bCheckName || !GetEntryPosByName(sName, xParentEntry.get())) - { - std::unique_ptr<weld::TreeIter> xEntry = m_xTreeView->make_iterator(); - m_xTreeView->insert(xParentEntry.get(), -1, nullptr, nullptr, nullptr, nullptr, nullptr, false, xEntry.get()); + std::unique_ptr<weld::TreeIter> xEntry = m_xTreeView->make_iterator(); + m_xTreeView->insert(xParentEntry.get(), -1, nullptr, nullptr, nullptr, nullptr, nullptr, false, xEntry.get()); - auto xGraphic = m_xImageProvider->getXGraphic(_rTableName, DatabaseObject::TABLE); - if (xGraphic.is()) - m_xTreeView->set_image(*xEntry, xGraphic, -1); - else - { - OUString sImageId(m_xImageProvider->getImageId(_rTableName, DatabaseObject::TABLE)); - m_xTreeView->set_image(*xEntry, sImageId, -1); - } - if (m_bShowToggles) - m_xTreeView->set_toggle(*xEntry, TRISTATE_FALSE, 0); - m_xTreeView->set_text(*xEntry, sName, m_nTextColumn); + auto xGraphic = m_xImageProvider->getXGraphic(_rTableName, DatabaseObject::TABLE); + if (xGraphic.is()) + m_xTreeView->set_image(*xEntry, xGraphic, -1); + else + { + OUString sImageId(m_xImageProvider->getImageId(_rTableName, DatabaseObject::TABLE)); + m_xTreeView->set_image(*xEntry, sImageId, -1); } + if (m_bShowToggles) + m_xTreeView->set_toggle(*xEntry, TRISTATE_FALSE, 0); + m_xTreeView->set_text(*xEntry, sName, m_nTextColumn); } NamedDatabaseObject OTableTreeListBox::describeObject( SvTreeListEntry* _pEntry ) diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx index 2cbb4b3c1951..46487fc78b8d 100644 --- a/dbaccess/source/ui/inc/tabletree.hxx +++ b/dbaccess/source/ui/inc/tabletree.hxx @@ -216,8 +216,7 @@ private: */ void implAddEntry( const css::uno::Reference< css::sdbc::XDatabaseMetaData >& _rxMeta, - const OUString& _rTableName, - bool _bCheckName = true + const OUString& _rTableName ); void implOnNewConnection( const css::uno::Reference< css::sdbc::XConnection >& _rxConnection ); |