Kaydet (Commit) 41506271 authored tarafından Mike Kaganski's avatar Mike Kaganski

Use ref for SvTreeList's parent SvListView

Follow-up of commit 74816dd6

Change-Id: I246df80586c8fc60efc68b5deeb865cbfcd0da13
Reviewed-on: https://gerrit.libreoffice.org/64762
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst cb52b112
......@@ -67,7 +67,7 @@ class VCL_DLLPUBLIC SvTreeList final
{
friend class SvListView;
SvListView* const mpOwnerListView;
SvListView& mrOwnerListView;
sal_uLong nEntryCount;
Link<SvTreeListEntry*, SvTreeListEntry*> aCloneLink;
......@@ -131,7 +131,7 @@ class VCL_DLLPUBLIC SvTreeList final
public:
SvTreeList() = delete;
SvTreeList(SvListView*);
SvTreeList(SvListView&);
~SvTreeList();
void Broadcast(
......
......@@ -58,8 +58,8 @@ struct SvListView::Impl
};
SvTreeList::SvTreeList(SvListView* listView) :
mpOwnerListView(listView),
SvTreeList::SvTreeList(SvListView& listView) :
mrOwnerListView(listView),
mbEnableInvalidate(true)
{
nEntryCount = 0;
......@@ -79,7 +79,7 @@ void SvTreeList::Broadcast(
sal_uLong nPos
)
{
mpOwnerListView->ModelNotification(nActionId, pEntry1, pEntry2, nPos);
mrOwnerListView.ModelNotification(nActionId, pEntry1, pEntry2, nPos);
}
// an entry is visible if all parents are expanded
......@@ -1075,7 +1075,7 @@ std::pair<SvTreeListEntries::iterator, SvTreeListEntries::iterator>
SvListView::SvListView()
: m_pImpl(new Impl(*this))
{
pModel.reset(new SvTreeList(this));
pModel.reset(new SvTreeList(*this));
m_pImpl->InitTable();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment