diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-03-17 12:13:43 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 11:35:22 +0100 |
commit | 2269fd1d751d9b198cf9189125bd177151559596 (patch) | |
tree | 9396e54d7901f242defccb5c007fc9e05fe53d7a | |
parent | f3ac0f58dbfb9b600df56f8516b31091f4afcf3e (diff) |
get misc. ordering right and add missing disposes.
Change-Id: I76489f833949a556b657010e5d5cba6f64c89ba7
-rw-r--r-- | vcl/source/window/menubarwindow.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/menubarwindow.hxx | 4 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 08b820cea241..7d92186488ab 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -81,6 +81,8 @@ void DecoToolBox::calcMinSize() } aTbx->SetOutStyle( TOOLBOX_STYLE_FLAT ); maMinSize = aTbx->CalcWindowSizePixel(); + + aTbx.disposeAndClear(); } void DecoToolBox::SetImages( long nMaxHeight, bool bForce ) @@ -173,9 +175,9 @@ void MenuBarWindow::dispose() aCloseBtn->RemoveEventListener(LINK(this, MenuBarWindow, ToolboxEventHdl)); RemoveEventListener(LINK(this, MenuBarWindow, ShowHideListener)); - aCloseBtn.disposeAndClear(); - aFloatBtn.disposeAndClear(); aHideBtn.disposeAndClear(); + aFloatBtn.disposeAndClear(); + aCloseBtn.disposeAndClear(); Window::dispose(); } diff --git a/vcl/source/window/menubarwindow.hxx b/vcl/source/window/menubarwindow.hxx index dcb68f31853f..bb3c8be22073 100644 --- a/vcl/source/window/menubarwindow.hxx +++ b/vcl/source/window/menubarwindow.hxx @@ -39,7 +39,9 @@ class DecoToolBox : public ToolBox using Window::ImplInit; public: - DecoToolBox( vcl::Window* pParent, WinBits nStyle = 0 ); + DecoToolBox( vcl::Window* pParent, WinBits nStyle = 0 ); + virtual ~DecoToolBox() {} + void ImplInit(); void DataChanged( const DataChangedEvent& rDCEvt ) SAL_OVERRIDE; diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 2c9a9d0eda9e..0378a20c35ac 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -165,6 +165,7 @@ ImplToolItem::ImplToolItem( const ImplToolItem& rItem ) : ImplToolItem::~ImplToolItem() { + mpWindow.disposeAndClear(); } ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem ) |