summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-12-11 10:23:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-12-11 10:58:41 +0100
commitb29b405549a527d4f953c5f0a581ea1e5a22afb8 (patch)
treec6c3257cb2e82fda13c194ae70889f8e0243298d /vcl
parenta8c1db54830fda16c5f5a9399bf11616570342da (diff)
SvListView::CreateViewData unnecessary
the method and the only override all do the same thing Change-Id: Id8cb131845f3303fbd51736879aa15661d672400 Reviewed-on: https://gerrit.libreoffice.org/64923 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/treelist/treelist.cxx13
-rw-r--r--vcl/source/treelist/treelistbox.cxx5
2 files changed, 3 insertions, 15 deletions
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx
index 255b5225dc02..f9078ea36a16 100644
--- a/vcl/source/treelist/treelist.cxx
+++ b/vcl/source/treelist/treelist.cxx
@@ -1122,19 +1122,13 @@ void SvListView::Impl::InitTable()
pEntry = m_rThis.pModel->First();
while( pEntry )
{
- pViewData = m_rThis.CreateViewData( pEntry );
- DBG_ASSERT(pViewData,"InitTable:No ViewData");
+ pViewData = o3tl::make_unique<SvViewDataEntry>();
m_rThis.InitViewData( pViewData.get(), pEntry );
m_DataTable.insert(std::make_pair(pEntry, std::move(pViewData)));
pEntry = m_rThis.pModel->Next( pEntry );
}
}
-std::unique_ptr<SvViewDataEntry> SvListView::CreateViewData( SvTreeListEntry* )
-{
- return o3tl::make_unique<SvViewDataEntry>();
-}
-
void SvListView::Clear()
{
m_pImpl->m_DataTable.clear();
@@ -1211,7 +1205,7 @@ void SvListView::Impl::ActionMoved()
void SvListView::Impl::ActionInserted( SvTreeListEntry* pEntry )
{
DBG_ASSERT(pEntry,"Insert:No Entry");
- std::unique_ptr<SvViewDataEntry> pData(m_rThis.CreateViewData( pEntry ));
+ std::unique_ptr<SvViewDataEntry> pData(new SvViewDataEntry());
m_rThis.InitViewData( pData.get(), pEntry );
std::pair<SvDataTable::iterator, bool> aSuccess =
m_DataTable.insert(std::make_pair(pEntry, std::move(pData)));
@@ -1236,8 +1230,7 @@ void SvListView::Impl::ActionInsertedTree( SvTreeListEntry* pEntry )
while( pCurEntry )
{
DBG_ASSERT(m_DataTable.find(pCurEntry) != m_DataTable.end(),"Entry already in Table");
- std::unique_ptr<SvViewDataEntry> pViewData(m_rThis.CreateViewData(pCurEntry));
- DBG_ASSERT(pViewData,"No ViewData");
+ std::unique_ptr<SvViewDataEntry> pViewData(new SvViewDataEntry());
m_rThis.InitViewData( pViewData.get(), pEntry );
m_DataTable.insert(std::make_pair(pCurEntry, std::move(pViewData)));
pCurEntry = m_rThis.pModel->Next( pCurEntry );
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 98b7f6a7cfae..514a43aea13b 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -808,11 +808,6 @@ const SvViewDataItem* SvTreeListBox::GetViewDataItem(const SvTreeListEntry* pEnt
return &pEntryData->GetItem(nItemPos);
}
-std::unique_ptr<SvViewDataEntry> SvTreeListBox::CreateViewData( SvTreeListEntry* )
-{
- return o3tl::make_unique<SvViewDataEntry>();
-}
-
void SvTreeListBox::InitViewData( SvViewDataEntry* pData, SvTreeListEntry* pEntry )
{
SvTreeListEntry* pInhEntry = pEntry;