From c72fac269626cd4c2c3f62a6eed69e47b59256a4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 16 Mar 2015 12:17:44 +0200 Subject: vclwidget: convert lots more sites to use VclPtr seems there was a lot of shared_ptr usage floating around... Change-Id: Icd05243170eb8493709275fc36bf986fc194b781 --- sd/source/ui/sidebar/PanelBase.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sd/source/ui/sidebar/PanelBase.cxx') diff --git a/sd/source/ui/sidebar/PanelBase.cxx b/sd/source/ui/sidebar/PanelBase.cxx index 7ee2a89f63d0..611c1977b451 100644 --- a/sd/source/ui/sidebar/PanelBase.cxx +++ b/sd/source/ui/sidebar/PanelBase.cxx @@ -43,16 +43,14 @@ PanelBase::~PanelBase (void) void PanelBase::dispose() { - OSL_TRACE("deleting wrapped control at %p", mpWrappedControl.get()); - mpWrappedControl.reset(); - OSL_TRACE("deleting PanelBase at %p from parent %p", this, GetParent()); + mpWrappedControl.disposeAndClear(); Control::dispose(); } void PanelBase::Dispose (void) { OSL_TRACE("PanelBase::DisposeL: deleting wrapped control at %p", mpWrappedControl.get()); - mpWrappedControl.reset(); + mpWrappedControl.disposeAndClear(); } css::ui::LayoutSize PanelBase::GetHeightForWidth (const sal_Int32 /*nWidth*/) @@ -75,7 +73,7 @@ void PanelBase::Resize (void) void PanelBase::SetSidebar (const css::uno::Reference& rxSidebar) { mxSidebar = rxSidebar; - if (mxSidebar.is() && mpWrappedControl!=0) + if (mxSidebar.is() && mpWrappedControl!=nullptr) mxSidebar->requestLayout(); } -- cgit