diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-13 15:39:37 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-13 15:49:24 +0100 |
commit | 5245021a806ccdd0d569d5cee7b95167892e9aab (patch) | |
tree | 5739b3098ea35361d0e50650d5ee493c9de9303c | |
parent | c9f2abed2e8a618bdf1237c162cb2073bb7022e0 (diff) |
Explicit disposeOnce instead of transient wrappers.
Change-Id: I578aa360c9923abd3fc516865896a004f377375b
audit: "vclwidget: check for calling delete on subclasses of vcl::Window"
-rw-r--r-- | basctl/source/basicide/basidesh.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/JoinTableView.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/QueryTableView.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 2 | ||||
-rw-r--r-- | svtools/source/dialogs/wizardmachine.cxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/popupwindowcontroller.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmoutputtypepage.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 2 |
10 files changed, 13 insertions, 17 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index 5f1cfed5cf78..7715de063057 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -816,7 +816,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange { if ( !( pWindow_->GetStatus() & BASWIN_INRESCHEDULE ) ) { - VclPtr<BaseWindow>(pWindow_).disposeAndClear(); + pWindow_->disposeOnce(); } else { diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index efa51d3a5a90..1683bdb79a3c 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -253,7 +253,7 @@ IMPL_LINK_NOARG(SearchProgress, CleanUpHdl) EndDialog( RET_OK ); - VclPtr<SearchProgress>(this).disposeAndClear(); + disposeOnce(); return 0L; } @@ -431,7 +431,7 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl) GetParent()->LeaveWait(); EndDialog( RET_OK ); - VclPtr<TakeProgress>(this).disposeAndClear(); + disposeOnce(); return 0L; } diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index da52057aee5d..32242f1bd41a 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -264,9 +264,7 @@ bool OJoinTableView::RemoveConnection( OTableConnection* _pConn,bool _bDelete ) makeAny(_pConn->GetAccessible()), Any()); if ( _bDelete ) - { - VclPtr<OTableConnection>(_pConn).disposeAndClear(); - } + _pConn->disposeOnce(); return true; } @@ -398,9 +396,9 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin ) m_pLastFocusTabWin = NULL; pTabWin->clearListBox(); - VclPtr<OTableWindow>(pTabWin).disposeAndClear(); - + pTabWin->disposeOnce(); } + if ( (sal_Int32)m_vTableConnection.size() < (nCount-1) ) // if some connections could be removed modified(); } diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index e60cebf6b7ac..374a2e48c602 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -926,7 +926,7 @@ bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc // Initialisation failed // (for example when the Connection to the database is not available at the moment) pTabWin->clearListBox(); - VclPtr<OQueryTableWindow>(pTabWin).disposeAndClear(); + pTabWin->disposeOnce(); } } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 09ed6b29ae88..4fedbfaa334d 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1384,7 +1384,7 @@ void SfxPopupWindow::Delete() { if ( m_aDeleteLink.IsSet() ) m_aDeleteLink.Call( this ); - VclPtr<SfxPopupWindow>(this).disposeAndClear(); + disposeOnce(); } diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 98094429a9bb..b3c17934906e 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -214,7 +214,7 @@ namespace svt m_pHelp.disposeAndClear(); for (WizardState i=0; i<m_pImpl->nFirstUnknownPage; ++i) - VclPtr<vcl::Window>(GetPage(i)).disposeAndClear(); + GetPage(i)->disposeOnce(); delete m_pImpl; WizardDialog::dispose(); diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx index 7bcd32bc8d21..82f61e3b9e49 100644 --- a/svtools/source/uno/popupwindowcontroller.cxx +++ b/svtools/source/uno/popupwindowcontroller.cxx @@ -126,7 +126,7 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclSimpleEvent*, pEve IMPL_STATIC_LINK( PopupWindowControllerImpl, AsyncDeleteWindowHdl, vcl::Window*, pWindow ) { (void)*pThis; - VclPtr<vcl::Window>(pWindow).disposeAndClear(); + pWindow->disposeOnce(); return 0; } diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index a99333ea85e4..33363a03ecf0 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -411,8 +411,7 @@ IMPL_STATIC_LINK( SwSendMailDialog, RemoveThis, Timer*, pTimer ) (!pThis->m_pImpl->xMailDispatcher.is() || !pThis->m_pImpl->xMailDispatcher->isRunning())) { - VclPtr<vcl::Window> a(pThis); - a.disposeAndClear(); + pThis->disposeOnce(); } else { diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index fb057fc7067c..f5f788f8e7b1 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -859,8 +859,7 @@ void SwNavigationPI::dispose() SfxImageManager* pImgMan = SfxImageManager::GetImageManager(*SW_MOD()); pImgMan->ReleaseToolBox(aContentToolBox.get()); pImgMan->ReleaseToolBox(aGlobalToolBox.get()); - VclPtr<vcl::Window> a(aContentToolBox->GetItemWindow(FN_PAGENUMBER)); - a.disposeAndClear(); + aContentToolBox->GetItemWindow(FN_PAGENUMBER)->disposeOnce(); aContentToolBox->Clear(); if(pxObjectShell) { diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 21532c35ce81..e4097edf331c 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -3297,7 +3297,7 @@ void VclBuilder::delete_by_name(const OString& sID) void VclBuilder::delete_by_window(vcl::Window *pWindow) { drop_ownership(pWindow); - VclPtr<vcl::Window>(pWindow).disposeAndClear(); + pWindow->disposeOnce(); } void VclBuilder::drop_ownership(const vcl::Window *pWindow) |