diff options
Diffstat (limited to 'sfx2/source/sidebar/Panel.cxx')
-rw-r--r-- | sfx2/source/sidebar/Panel.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx index d72f15e57c22..52c9abc831f7 100644 --- a/sfx2/source/sidebar/Panel.cxx +++ b/sfx2/source/sidebar/Panel.cxx @@ -51,7 +51,7 @@ Panel::Panel ( const ::boost::function<Context()>& rContextAccess) : Window(pParentWindow), msPanelId(rPanelDescriptor.msId), - mpTitleBar(new PanelTitleBar( + mpTitleBar(VclPtr<PanelTitleBar>::Create( rPanelDescriptor.msTitle, pParentWindow, this)), @@ -71,10 +71,10 @@ Panel::Panel ( Panel::~Panel() { - Dispose(); + disposeOnce(); } -void Panel::Dispose() +void Panel::dispose() { mxPanelComponent = NULL; @@ -91,7 +91,9 @@ void Panel::Dispose() xComponent->dispose(); } - mpTitleBar.reset(); + mpTitleBar.disposeAndClear(); + + vcl::Window::dispose(); } PanelTitleBar* Panel::GetTitleBar() const |