summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/control
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-06-09 08:50:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-06-09 13:49:39 +0200
commit13e5d52fc37f9283edd8a055d6b86108701182f1 (patch)
tree54a21d76afa9a2ecbf64527d343727b430c42934 /dbaccess/source/ui/control
parent317a90fd9d090aa2fe879549553d6491eb5028bf (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/source/ui/control')
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx36
1 files changed, 14 insertions, 22 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 )