diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 10:44:13 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-10 10:46:01 +0100 |
commit | c0a802b59e1edddeb0b621e15137f5058299efd7 (patch) | |
tree | 48203cffcd51d1d2747bb2384608907d73b69670 /sfx2 | |
parent | 1c4025babd7037a3292aa530c7d45ab8d6ef6dcb (diff) |
Audit and correct misc. clears -> disposeAndClears.
Anything that used to be 'delete'd should be disposeAndCleared()
in the new world.
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/versdlg.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarPanelBase.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/view/printer.cxx | 2 |
10 files changed, 24 insertions, 14 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 333e07bc9ad0..54330246c40b 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1977,11 +1977,11 @@ void SfxHelpTextWindow_Impl::dispose() bIsInClose = true; SvtMiscOptions().RemoveListenerLink( LINK( this, SfxHelpTextWindow_Impl, NotifyHdl ) ); - pSrchDlg.clear(); + pSrchDlg.disposeAndClear(); aToolBox.disposeAndClear(); aOnStartupCB.disposeAndClear(); pHelpWin.clear(); - pTextWin.clear(); + pTextWin.disposeAndClear(); vcl::Window::dispose(); } diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 8dd755cba732..555e55f56835 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -78,7 +78,7 @@ void ThumbnailView::dispose() if (xComponent.is()) xComponent->dispose (); - mpScrBar.clear(); + mpScrBar.disposeAndClear(); delete mpItemAttrs; delete mpProcessor; diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 3e2f0b0f2e44..8794ce044bcb 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -730,7 +730,7 @@ void SfxSingleTabDialog::SetTabPage(SfxTabPage* pTabPage, { SetUniqId(nSettingsId); - pImpl->m_pSfxPage.clear(); + pImpl->m_pSfxPage.disposeAndClear(); pImpl->m_pSfxPage = pTabPage; fnGetRanges = pRangesFunc; diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 3daafd2a5cff..5c7160d02c3a 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -258,7 +258,7 @@ SfxTitleDockingWindow::~SfxTitleDockingWindow() void SfxTitleDockingWindow::dispose() { - m_pWrappedWindow.clear(); + m_pWrappedWindow.disposeAndClear(); SfxDockingWindow::dispose(); } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index b8f63d54c85e..bd4a59c6b334 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -409,6 +409,16 @@ void SfxTabDialog::dispose() delete pExampleSet; delete [] pRanges; + if (m_bOwnsBaseFmtBtn) + m_pBaseFmtBtn.disposeAndClear() + if (m_bOwnsResetBtn) + m_pResetBtn.disposeAndClear() + if (m_bOwnsHelpBtn) + m_pHelpBtn.disposeAndClear() + if (m_bOwnsCancelBtn) + m_pCancelBtn.disposeAndClear() + if (m_bOwnsOKBtn) + m_pOKBtn.disposeAndClear() m_pBox.clear(); m_pTabCtrl.clear(); m_pOKBtn.clear(); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 72fde222b23c..9b728a078267 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1531,7 +1531,7 @@ void SfxCommonTemplateDialog_Impl::EnableHierarchical(bool const bEnable) } else { - pTreeBox.clear(); + pTreeBox.disposeAndClear(); aFmtLb->Show(); // If bHierarchical, then the family can have changed // minus one since hierarchical is inserted at the start diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index f74654602fdc..0b43ce07f6f8 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -335,7 +335,7 @@ SfxVersionDialog::~SfxVersionDialog() void SfxVersionDialog::dispose() { delete m_pTable; - m_pVersionBox.clear(); + m_pVersionBox.disposeAndClear(); m_pSaveButton.clear(); m_pSaveCheckBox.clear(); m_pOpenButton.clear(); @@ -592,7 +592,7 @@ SfxCmisVersionsDialog::~SfxCmisVersionsDialog() void SfxCmisVersionsDialog::dispose() { delete m_pTable; - m_pVersionBox.clear(); + m_pVersionBox.disposeAndClear(); m_pOpenButton.clear(); m_pViewButton.clear(); m_pDeleteButton.clear(); diff --git a/sfx2/source/sidebar/SidebarPanelBase.cxx b/sfx2/source/sidebar/SidebarPanelBase.cxx index fdaaeb4aae67..bbbd07e28db7 100644 --- a/sfx2/source/sidebar/SidebarPanelBase.cxx +++ b/sfx2/source/sidebar/SidebarPanelBase.cxx @@ -81,7 +81,7 @@ SidebarPanelBase::~SidebarPanelBase (void) void SAL_CALL SidebarPanelBase::disposing (void) throw (css::uno::RuntimeException) { - mpControl.clear(); + mpControl.disposeAndClear(); if (mxFrame.is()) { diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 6afaec6536eb..c1df7877299e 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -209,7 +209,7 @@ IMPL_LINK( SfxToolBoxControl_Impl, WindowEventListener, VclSimpleEvent*, pEvent if (( pWindow == mpFloatingWindow ) && ( mpPopupWindow != nullptr )) { - mpPopupWindow.clear(); + mpPopupWindow.disposeAndClear(); } } @@ -291,8 +291,8 @@ void SAL_CALL SfxToolBoxControl::dispose() throw (::com::sun::star::uno::Runtime pImpl->mxUIElement = 0; // Delete my popup windows - pImpl->mpFloatingWindow.clear(); - pImpl->mpPopupWindow.clear(); + pImpl->mpFloatingWindow.disposeAndClear(); + pImpl->mpPopupWindow.disposeAndClear(); } @@ -862,7 +862,7 @@ IMPL_LINK_NOARG(SfxToolBoxControl, PopupModeEndHdl) { // Replace floating window with popup window and destroy // floating window instance. - pImpl->mpFloatingWindow.clear(); + pImpl->mpFloatingWindow.disposeAndClear(); pImpl->mpFloatingWindow = pImpl->mpPopupWindow; pImpl->mpPopupWindow.clear(); // We also need to know when the user tries to use the diff --git a/sfx2/source/view/printer.cxx b/sfx2/source/view/printer.cxx index 635ccf0bf89f..c9594f2ccf0c 100644 --- a/sfx2/source/view/printer.cxx +++ b/sfx2/source/view/printer.cxx @@ -235,7 +235,7 @@ SfxPrintOptionsDialog::~SfxPrintOptionsDialog() void SfxPrintOptionsDialog::dispose() { delete pDlgImpl; - pPage.clear(); + pPage.disposeAndClear(); delete pOptions; ModalDialog::dispose(); } |