summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-12-07 12:31:57 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2018-12-07 17:54:34 +0100
commit4150627176623ca9abcf2317bbd178bc23914c7c (patch)
treee28a9cddf0fc047052ae0d38cc92c2422f07dd00
parentFind actual data area inside the main-range... (diff)
downloadcore-4150627176623ca9abcf2317bbd178bc23914c7c.tar.gz
core-4150627176623ca9abcf2317bbd178bc23914c7c.zip
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.kaganski@collabora.com>
-rw-r--r--include/vcl/treelist.hxx4
-rw-r--r--vcl/source/treelist/treelist.cxx8
2 files changed, 6 insertions, 6 deletions
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();
}