sfx2/source/sidebar/SidebarController.cxx | 1 + vcl/source/window/menu.cxx | 2 +- vcl/source/window/menubarwindow.cxx | 6 ++++-- vcl/source/window/menubarwindow.hxx | 4 +++- vcl/source/window/toolbox2.cxx | 1 + 5 files changed, 10 insertions(+), 4 deletions(-)
New commits: commit 2c8a26e287779758c923e8619fa70ba04efc1363 Author: Michael Meeks <[email protected]> Date: Tue Mar 17 12:13:43 2015 +0000 get misc. ordering right and add missing disposes. Change-Id: I76489f833949a556b657010e5d5cba6f64c89ba7 diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 8d03044..02c0dbc 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 dcb68f3..bb3c8be 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 938a932..85b24a5 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -169,6 +169,7 @@ ImplToolItem::ImplToolItem( const ImplToolItem& rItem ) : ImplToolItem::~ImplToolItem() { + mpWindow.disposeAndClear(); } ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem ) commit f730efeab04b8158188b22e63dfb44b85c25983f Author: Michael Meeks <[email protected]> Date: Tue Mar 17 12:11:26 2015 +0000 explicit delete of another class' VclPtr is not a great plan. Change-Id: Ie719ed153f2de462ced194fe67b6dd78933b354e diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index a280685..e8cf524 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2511,7 +2511,7 @@ void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete ) if (pWindow && bDelete) { pMenu->getMenuBarWindow()->KillActivePopup(); - delete pWindow; + pWindow->disposeOnce(); } pMenu->pWindow = NULL; } commit f1c341b08bc0ab3905168bf191ae0c5acc40f248 Author: Michael Meeks <[email protected]> Date: Tue Mar 17 10:15:12 2015 +0000 ensure valid iterator even with empty content. Change-Id: Icd2e193b66ace8212d1af086192abf0c43c5953f diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 71c43ea..0f9c0ab 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -613,6 +613,7 @@ void SidebarController::SwitchToDeck ( } else { + iPanel = rCurrentPanels.end(); for (auto a = rCurrentPanels.begin(); a != rCurrentPanels.end(); ++a) { iPanel = a; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
