include/vcl/treelist.hxx | 4 ++-- vcl/source/treelist/treelist.cxx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
New commits: commit 4150627176623ca9abcf2317bbd178bc23914c7c Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Dec 7 12:31:57 2018 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Dec 7 17:54:34 2018 +0100 Use ref for SvTreeList's parent SvListView Follow-up of commit 74816dd665fb2980823e01f81446147fe7fe6688 Change-Id: I246df80586c8fc60efc68b5deeb865cbfcd0da13 Reviewed-on: https://gerrit.libreoffice.org/64762 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/include/vcl/treelist.hxx b/include/vcl/treelist.hxx index e4e2f21c0b3e..0f2a1f45efa9 100644 --- a/include/vcl/treelist.hxx +++ b/include/vcl/treelist.hxx @@ -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( diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx index 5637b8ba2529..255b5225dc02 100644 --- a/vcl/source/treelist/treelist.cxx +++ b/vcl/source/treelist/treelist.cxx @@ -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(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits