From 8ad74d8866c77ca52f8c2562b728fc876c23f1c0 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 12 Mar 2014 14:21:27 +0000 Subject: [PATCH] Related: #i124392# fill in SidebarDockingWindow::DoDispose (cherry picked from commit 952f581cb77f52e9aaa974496dc8d86b335cb424) Conflicts: sfx2/inc/sfx2/sidebar/SidebarChildWindow.hxx sfx2/source/dialog/templdlg.cxx sfx2/source/inc/templdgi.hxx Change-Id: Idf06437dfc45e02d9e2303df84d52ba0837de108 --- include/sfx2/templdlg.hxx | 2 +- sfx2/source/inc/templdgi.hxx | 2 +- sfx2/source/sidebar/SidebarDockingWindow.cxx | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx index 25b152aee92c..96a03dfdc2f0 100644 --- a/include/sfx2/templdlg.hxx +++ b/include/sfx2/templdlg.hxx @@ -85,7 +85,7 @@ class SFX2_DLLPUBLIC SfxTemplatePanelControl : public DockingWindow { public: SfxTemplatePanelControl (SfxBindings* pBindings, Window* pParentWindow); - ~SfxTemplatePanelControl (void); + virtual ~SfxTemplatePanelControl(); virtual void Update(); virtual void DataChanged( const DataChangedEvent& _rDCEvt ); diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 8a4dfdc09a0d..f064bba49301 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -276,7 +276,7 @@ public: TYPEINFO(); SfxCommonTemplateDialog_Impl( SfxBindings* pB, Window*, bool ); - ~SfxCommonTemplateDialog_Impl(); + virtual ~SfxCommonTemplateDialog_Impl(); DECL_LINK( MenuSelectHdl, Menu * ); diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 259123dcca31..1fb9f0a1a029 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -66,6 +66,12 @@ SidebarDockingWindow::~SidebarDockingWindow (void) void SidebarDockingWindow::DoDispose (void) { + Reference xComponent (static_cast(mpSidebarController.get()), UNO_QUERY); + mpSidebarController.clear(); + if (xComponent.is()) + { + xComponent->dispose(); + } }