cui/source/dialogs/iconcdlg.cxx | 1 + cui/source/factory/dlgfact.hxx | 2 +- cui/source/options/treeopt.cxx | 2 +- dbaccess/source/ui/querydesign/JoinTableView.cxx | 4 ++++ dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx | 1 + dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx | 2 ++ desktop/source/deployment/gui/dp_gui_theextmgr.cxx | 2 ++ extensions/source/propctrlr/propertyeditor.hxx | 2 +- forms/source/solar/inc/navtoolbar.hxx | 2 +- fpicker/source/office/commonpicker.cxx | 6 +++++- framework/inc/classes/fwktabwindow.hxx | 2 +- include/sfx2/fcontnr.hxx | 2 +- sc/source/ui/attrdlg/scdlgfact.hxx | 6 +++--- sc/source/ui/drawfunc/fupoor.cxx | 1 + sd/source/ui/dlg/sddlgfact.hxx | 2 +- sd/source/ui/func/fupoor.cxx | 3 ++- sfx2/source/control/thumbnailviewitem.cxx | 1 + sfx2/source/dialog/basedlgs.cxx | 2 ++ sfx2/source/dialog/infobar.cxx | 5 +++++ sfx2/source/dialog/tabdlg.cxx | 2 ++ sfx2/source/dialog/templdlg.cxx | 1 + svtools/source/control/tabbar.cxx | 3 +-- svtools/source/dialogs/roadmapwizard.cxx | 2 +- svx/source/fmcomp/gridcell.cxx | 4 +++- svx/source/form/datanavi.cxx | 3 +++ sw/source/ui/dbui/createaddresslistdialog.cxx | 8 ++++++++ sw/source/ui/dbui/mmaddressblockpage.cxx | 7 +++++++ sw/source/ui/dialog/swdlgfact.cxx | 1 + sw/source/ui/dialog/swdlgfact.hxx | 2 +- sw/source/ui/index/cnttab.cxx | 2 ++ sw/source/uibase/docvw/PostItMgr.cxx | 3 +++ sw/source/uibase/uiview/pview.cxx | 6 ++++++ sw/source/uibase/utlui/navipi.cxx | 1 + vcl/source/control/tabctrl.cxx | 2 ++ vcl/source/edit/vclmedit.cxx | 9 ++++++--- vcl/source/gdi/print3.cxx | 1 + vcl/source/window/btndlg.cxx | 6 ++++++ vcl/source/window/builder.cxx | 1 + vcl/unx/generic/app/i18n_status.cxx | 1 + 39 files changed, 93 insertions(+), 20 deletions(-)
New commits: commit f4c0efacc78698615f33fd05fd12856213f41356 Author: Michael Meeks <michael.me...@collabora.com> Date: Fri Mar 20 15:00:03 2015 +0000 re-insert erroneously converted delete calls. audited commit: "vclwidget: change all vcl::window fields to be wrapped in VclPtr" Change-Id: Iebdf2af3866d884289f6913646106fe3f2d4dde5 diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 6a13564..cd6a7f4 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -262,6 +262,7 @@ void IconChoiceDialog::dispose() if ( pData->bOnDemand ) delete (SfxItemSet*)&pData->pPage->GetItemSet(); + pData->pPage.disposeAndClear(); } delete pData; } diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 221a4b7..93b42a7 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -81,7 +81,7 @@ short Class::Execute() \ class VclAbstractDialog2_Impl : public VclAbstractDialog2 { - VclPtr<Dialog> m_pDlg; + ScopedVclPtr<Dialog> m_pDlg; Link m_aEndDlgHdl; public: VclAbstractDialog2_Impl( Dialog* p ) : m_pDlg( p ) {} diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index f7ae83a..46765eb 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -463,7 +463,7 @@ static bool lcl_isOptionHidden( sal_uInt16 _nPageId, const SvtOptionsDialogOptio struct OptionsPageInfo { - VclPtr<SfxTabPage> m_pPage; + ScopedVclPtr<SfxTabPage> m_pPage; sal_uInt16 m_nPageId; OUString m_sPageURL; OUString m_sEventHdl; diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 46b4f75..1feaf50 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1542,6 +1542,10 @@ void OJoinTableView::clearLayoutInformation() m_aTableMap.clear(); + for(auto i = m_vTableConnection.begin(); + i != m_vTableConnection.end(); ++i) + i->disposeAndClear(); + m_vTableConnection.clear(); } diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx index 85f3ff2..02c59c3 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx @@ -33,6 +33,7 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction() if (m_bOwnerOfConn) { // I have the connection -> delete m_pOwner->DeselectConn(m_pConnection); + m_pConnection.disposeAndClear(); } } diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx index 1745890..d898780 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx @@ -56,6 +56,7 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct() if ( m_pTabWin ) m_pTabWin->clearListBox(); + m_pTabWin.disposeAndClear(); // and of course the corresponding connections auto aIter = m_vTableConnection.begin(); @@ -63,6 +64,7 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct() for(;aIter != aEnd;++aIter) { m_pOwner->DeselectConn(*aIter); + aIter->disposeAndClear(); } m_vTableConnection.clear(); } diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx index 0c30d20..42743b1 100644 --- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx +++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx @@ -98,6 +98,8 @@ TheExtensionManager::TheExtensionManager( vcl::Window *pParent, TheExtensionManager::~TheExtensionManager() { + m_pUpdReqDialog.disposeAndClear(); + m_pExtMgrDialog.disposeAndClear(); delete m_pExecuteCmdQueue; } diff --git a/extensions/source/propctrlr/propertyeditor.hxx b/extensions/source/propctrlr/propertyeditor.hxx index a43ee8d..2e2d6fd 100644 --- a/extensions/source/propctrlr/propertyeditor.hxx +++ b/extensions/source/propctrlr/propertyeditor.hxx @@ -49,7 +49,7 @@ namespace pcr struct HiddenPage { sal_uInt16 nPos; - VclPtr<TabPage> pPage; + ScopedVclPtr<TabPage> pPage; HiddenPage() : nPos( 0 ), pPage( NULL ) { } HiddenPage( sal_uInt16 _nPos, TabPage* _pPage ) : nPos( _nPos ), pPage( _pPage ) { } }; diff --git a/forms/source/solar/inc/navtoolbar.hxx b/forms/source/solar/inc/navtoolbar.hxx index e5c2627..ec66f92 100644 --- a/forms/source/solar/inc/navtoolbar.hxx +++ b/forms/source/solar/inc/navtoolbar.hxx @@ -61,7 +61,7 @@ namespace frm m_pDescriptionProvider; ImageSize m_eImageSize; VclPtr<ImplNavToolBar> m_pToolbar; - ::std::vector< VclPtr<vcl::Window> > m_aChildWins; + ::std::vector< ScopedVclPtr<vcl::Window> > m_aChildWins; public: NavigationToolBar( diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx index 77e96c6..fc0f9a9 100644 --- a/fpicker/source/office/commonpicker.cxx +++ b/fpicker/source/office/commonpicker.cxx @@ -148,7 +148,11 @@ namespace svt { stopWindowListening(); - m_pDlg.disposeAndClear(); + if ( !bDialogDying ) // it's the parent which is dying -> delete the dialog + m_pDlg.disposeAndClear(); + else + m_pDlg.clear(); + m_xWindow = NULL; m_xDialogParent = NULL; } diff --git a/framework/inc/classes/fwktabwindow.hxx b/framework/inc/classes/fwktabwindow.hxx index 35d1779..5ecaa17 100644 --- a/framework/inc/classes/fwktabwindow.hxx +++ b/framework/inc/classes/fwktabwindow.hxx @@ -78,7 +78,7 @@ public: struct TabEntry { sal_Int32 m_nIndex; - VclPtr<FwkTabPage> m_pPage; + ScopedVclPtr<FwkTabPage> m_pPage; OUString m_sPageURL; css::uno::Reference< css::awt::XContainerWindowEventHandler > m_xEventHdl; diff --git a/include/sfx2/fcontnr.hxx b/include/sfx2/fcontnr.hxx index 381896d..08e3747 100644 --- a/include/sfx2/fcontnr.hxx +++ b/include/sfx2/fcontnr.hxx @@ -60,7 +60,7 @@ public: class SfxFrameWindow { - VclPtr<vcl::Window> pWindow; + ScopedVclPtr<vcl::Window> pWindow; public: SfxFrameWindow( vcl::Window *pWin ) : pWindow( pWin ) diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 958e194..45595b7 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -58,7 +58,7 @@ class ScTextImportOptionsDlg; class ScCondFormatManagerDlg; #define DECL_ABSTDLG_BASE(Class,DialogClass) \ - VclPtr<DialogClass> pDlg; \ + ScopedVclPtr<DialogClass> pDlg; \ public: \ Class( DialogClass* p) \ : pDlg(p) \ @@ -66,8 +66,8 @@ public: \ virtual ~Class(); \ virtual short Execute() SAL_OVERRIDE ; -#define DECL_ABSTDLG2_BASE(Class,DialogClass) \ - VclPtr<DialogClass> pDlg; \ +#define DECL_ABSTDLG2_BASE(Class,DialogClass) \ + ScopedVclPtr<DialogClass> pDlg; \ public: \ Class( DialogClass* p) \ : pDlg(p) \ diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx index 2e2d70f..eaea687 100644 --- a/sc/source/ui/drawfunc/fupoor.cxx +++ b/sc/source/ui/drawfunc/fupoor.cxx @@ -53,6 +53,7 @@ FuPoor::~FuPoor() { aDragTimer.Stop(); aScrollTimer.Stop(); + pDialog.disposeAndClear(); } void FuPoor::Activate() diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 308743d..5a1ddf8 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -23,7 +23,7 @@ #include <sfx2/basedlgs.hxx> #define DECL_ABSTDLG_BASE(Class,DialogClass) \ - VclPtr<DialogClass> pDlg; \ + ScopedVclPtr<DialogClass> pDlg; \ public: \ Class( DialogClass* p) \ : pDlg(p) \ diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 240f110..2e388a6 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -100,7 +100,8 @@ FuPoor::~FuPoor() { aDragTimer.Stop(); aScrollTimer.Stop(); - aDelayToScrollTimer.Stop (); + aDelayToScrollTimer.Stop(); + pDialog.disposeAndClear(); } void FuPoor::Activate() diff --git a/sfx2/source/control/thumbnailviewitem.cxx b/sfx2/source/control/thumbnailviewitem.cxx index 4d265d7..ccaebb1 100644 --- a/sfx2/source/control/thumbnailviewitem.cxx +++ b/sfx2/source/control/thumbnailviewitem.cxx @@ -117,6 +117,7 @@ ThumbnailViewItem::ThumbnailViewItem(ThumbnailView &rView, sal_uInt16 nId) ThumbnailViewItem::~ThumbnailViewItem() { + mpTitleED.disposeAndClear(); if( mpxAcc ) { static_cast< ThumbnailViewItemAcc* >( mpxAcc->get() )->ParentDestroyed(); diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index b2d3f13..0d1a000 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -711,6 +711,8 @@ SfxSingleTabDialog::~SfxSingleTabDialog() void SfxSingleTabDialog::dispose() { + pImpl->m_pSfxPage.disposeAndClear(); + pImpl->m_pLine.disposeAndClear(); delete pImpl; pOKBtn.disposeAndClear(); pCancelBtn.disposeAndClear(); diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 671a20c..e450760 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -137,6 +137,9 @@ SfxInfoBarWindow::~SfxInfoBarWindow() void SfxInfoBarWindow::dispose() { + for ( auto it = m_aActionBtns.begin( ); it != m_aActionBtns.end( ); ++it ) + it->disposeAndClear(); + m_pMessage.disposeAndClear(); m_pCloseBtn.disposeAndClear(); m_aActionBtns.clear( ); @@ -238,6 +241,8 @@ SfxInfoBarContainerWindow::~SfxInfoBarContainerWindow() void SfxInfoBarContainerWindow::dispose() { + for ( auto it = m_pInfoBars.begin( ); it != m_pInfoBars.end( ); ++it ) + it->disposeAndClear(); m_pInfoBars.clear( ); Window::dispose(); } diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 3b57970..6cab451 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -398,6 +398,7 @@ void SfxTabDialog::dispose() if ( pDataObject->bOnDemand ) delete (SfxItemSet*)&pDataObject->pTabPage->GetItemSet(); + pDataObject->pTabPage.disposeAndClear(); } delete pDataObject; } @@ -696,6 +697,7 @@ void SfxTabDialog::RemoveTabPage( sal_uInt16 nId ) if ( pDataObject->bOnDemand ) delete (SfxItemSet*)&pDataObject->pTabPage->GetItemSet(); + pDataObject->pTabPage.disposeAndClear(); } delete pDataObject; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 4eb9389..4ad4402 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -874,6 +874,7 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl() if ( pStyleSheetPool ) EndListening(*pStyleSheetPool); pStyleSheetPool = NULL; + pTreeBox.disposeAndClear(); delete pIdle; if ( m_pDeletionWatcher ) m_pDeletionWatcher->signal(); diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index a57ef05..d8bf0b6 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -360,7 +360,7 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl) struct TabBar_Impl { - VclPtr<ImplTabSizer> mpSizer; + ScopedVclPtr<ImplTabSizer> mpSizer; ::svt::AccessibleFactoryAccess maAccessibleFactory; TabBar_Impl() @@ -368,7 +368,6 @@ struct TabBar_Impl } ~TabBar_Impl() { - mpSizer.disposeAndClear(); } }; diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 1e08659..ce4b5bd 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -55,7 +55,7 @@ namespace svt struct RoadmapWizardImpl : public RoadmapWizardTypes { - VclPtr<ORoadmap> pRoadmap; + ScopedVclPtr<ORoadmap> pRoadmap; Paths aPaths; PathId nActivePath; StateDescriptions aStateDescriptors; diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 09ec264..3ee9d82 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -643,8 +643,10 @@ DbCellControl::~DbCellControl() { lcl_clearBroadCaster(m_pModelChangeBroadcaster); lcl_clearBroadCaster(m_pFieldChangeBroadcaster); -} + m_pWindow.disposeAndClear(); + m_pPainter.disposeAndClear(); +} void DbCellControl::implValuePropertyChanged( ) { diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 9e08ba2..43bd847 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -1439,6 +1439,9 @@ namespace svxform m_pSubmissionPage.disposeAndClear(); m_pBindingPage.disposeAndClear(); + sal_Int32 i, nCount = m_aPageList.size(); + for ( i = 0; i < nCount; ++i ) + m_aPageList[i].disposeAndClear(); m_aPageList.clear(); Reference< XFrameActionListener > xListener( diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index 78e8c88..f1a8d57 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -119,7 +119,11 @@ SwAddressControl_Impl::~SwAddressControl_Impl() void SwAddressControl_Impl::dispose() { + for(auto aTextIter = m_aFixedTexts.begin(); aTextIter != m_aFixedTexts.end(); ++aTextIter) + aTextIter->disposeAndClear(); m_aFixedTexts.clear(); + for(auto aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter) + aEditIter->disposeAndClear(); m_aEdits.clear(); m_pScrollBar.disposeAndClear(); m_pWindow.disposeAndClear(); @@ -132,7 +136,11 @@ void SwAddressControl_Impl::SetData(SwCSVData& rDBData) //when the address data is updated then remove the controls an build again if(m_aFixedTexts.size()) { + for(auto aTextIter = m_aFixedTexts.begin(); aTextIter != m_aFixedTexts.end(); ++aTextIter) + aTextIter->disposeAndClear(); m_aFixedTexts.clear(); + for(auto aEditIter = m_aEdits.begin(); aEditIter != m_aEdits.end(); ++aEditIter) + aEditIter->disposeAndClear(); m_aEdits.clear(); m_bNoDataSet = true; } diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 36684c9..cf330a4 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -989,6 +989,13 @@ SwAssignFieldsControl::~SwAssignFieldsControl() void SwAssignFieldsControl::dispose() { + for(auto aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter) + aFIIter->disposeAndClear(); + for(auto aLBIter = m_aMatches.begin(); aLBIter != m_aMatches.end(); ++aLBIter) + aLBIter->disposeAndClear(); + for(auto aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter) + aFIIter->disposeAndClear(); + m_aFieldNames.clear(); m_aMatches.clear(); m_aPreviews.clear(); diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index a32cf90..deb052e 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -595,6 +595,7 @@ void AbstractSwWordCountFloatDlg_Impl::SetCounts(const SwDocStat &rCurrCnt, cons AbstractMailMergeWizard_Impl::~AbstractMailMergeWizard_Impl() { + pDlg.disposeAndClear(); } void AbstractMailMergeWizard_Impl::StartExecuteModal( const Link& rEndDialogHdl ) diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx index ea38f71..4ec9fa6 100644 --- a/sw/source/ui/dialog/swdlgfact.hxx +++ b/sw/source/ui/dialog/swdlgfact.hxx @@ -48,7 +48,7 @@ class DropDownFieldDialog; #define DECL_ABSTDLG_BASE(Class,DialogClass) \ protected: \ - VclPtr<DialogClass> pDlg; \ + ScopedVclPtr<DialogClass> pDlg; \ public: \ Class( DialogClass* p) \ : pDlg(p) \ diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 8906783..2cdf9d2 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2791,6 +2791,8 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL) if(pForm) { + for (ctrl_iterator iter = aControlList.begin(); iter != aControlList.end(); ++iter) + iter->disposeAndClear(); //apply current level settings to the form aControlList.clear(); } diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 8ec99df..5d5aeba 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -193,6 +193,7 @@ void SwPostItMgr::CheckForRemovedPostIts() mvPostItFlds.remove(*it); if (GetActiveSidebarWin() == p->pPostIt) SetActiveSidebarWin(0); + p->pPostIt.disposeAndClear(); delete p; bRemoved = true; } @@ -241,6 +242,7 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast ) SwSidebarItem* p = (*i); if (GetActiveSidebarWin() == p->pPostIt) SetActiveSidebarWin(0); + p->pPostIt.disposeAndClear(); mvPostItFlds.erase(i); delete p; break; @@ -1175,6 +1177,7 @@ void SwPostItMgr::RemoveSidebarWin() for(std::list<SwSidebarItem*>::iterator i = mvPostItFlds.begin(); i != mvPostItFlds.end() ; ++i) { EndListening( *(const_cast<SfxBroadcaster*>((*i)->GetBroadCaster())) ); + (*i)->pPostIt.disposeAndClear(); delete (*i); } mvPostItFlds.clear(); diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx index 20b7c0b..5809bfd 100644 --- a/sw/source/uibase/uiview/pview.cxx +++ b/sw/source/uibase/uiview/pview.cxx @@ -1237,6 +1237,12 @@ SwPagePreview::~SwPagePreview() SwViewShell* pVShell = pViewWin->GetViewShell(); pVShell->SetWin(0); delete pVShell; + + pViewWin.disposeAndClear(); + + pScrollFill.disposeAndClear(); + pHScrollbar.disposeAndClear(); + pVScrollbar.disposeAndClear(); } SwDocShell* SwPagePreview::GetDocShell() diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 454ed8d..a97bf66 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -904,6 +904,7 @@ IMPL_LINK_NOARG(SwNavigationPI, PopupModeEndHdl) { // Replace floating window with popup window and destroy // floating window instance. + pFloatingWindow.disposeAndClear(); pFloatingWindow = pPopupWindow; pPopupWindow = 0; } diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 002ccf5..40522c2 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -204,6 +204,8 @@ void TabControl::dispose() ImplFreeLayoutData(); // delete TabCtrl data + if (mpTabCtrlData) + mpTabCtrlData->mpListBox.disposeAndClear(); delete mpTabCtrlData; mpTabCtrlData = NULL; Control::dispose(); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 63ed22a..ee8e530 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -185,6 +185,7 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle ) bool bScrollbarsChanged = false; if ( bHaveVScroll != bNeedVScroll ) { + mpVScrollBar.disposeAndClear(); mpVScrollBar = bNeedVScroll ? new ScrollBar( pVclMultiLineEdit, WB_VSCROLL|WB_DRAG ) : NULL; if ( bNeedVScroll ) @@ -198,6 +199,7 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle ) if ( bHaveHScroll != bNeedHScroll ) { + mpHScrollBar.disposeAndClear(); mpHScrollBar = bNeedHScroll ? new ScrollBar( pVclMultiLineEdit, WB_HSCROLL|WB_DRAG ) : NULL; if ( bNeedHScroll ) @@ -211,6 +213,7 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle ) if ( bHaveScrollBox != bNeedScrollBox ) { + mpScrollBox.disposeAndClear(); mpScrollBox = bNeedScrollBox ? new ScrollBarBox( pVclMultiLineEdit, WB_SIZEABLE ) : NULL; if ( bNeedScrollBox ) @@ -256,10 +259,10 @@ void ImpVclMEdit::InitFromStyle( WinBits nWinStyle ) ImpVclMEdit::~ImpVclMEdit() { EndListening( *mpTextWindow->GetTextEngine() ); - mpScrollBox.disposeAndClear(); - mpVScrollBar.disposeAndClear(); - mpHScrollBar.disposeAndClear(); mpTextWindow.disposeAndClear(); + mpHScrollBar.disposeAndClear(); + mpVScrollBar.disposeAndClear(); + mpScrollBox.disposeAndClear(); pVclMultiLineEdit.disposeAndClear(); } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index f8558b0..69a20d0 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -191,6 +191,7 @@ public: mnDefaultPaperBin( -1 ), mnFixedPaperBin( -1 ) {} + ~ImplPrinterControllerData() { mpProgress.disposeAndClear(); } Size getRealPaperSize( const Size& i_rPageSize, bool bNoNUP ) const { diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx index 86802f8..97fc203 100644 --- a/vcl/source/window/btndlg.cxx +++ b/vcl/source/window/btndlg.cxx @@ -64,6 +64,11 @@ ButtonDialog::~ButtonDialog() void ButtonDialog::dispose() { + for ( btn_iterator it = maItemList.begin(); it != maItemList.end(); ++it) + { + if ( it->mbOwnButton ) + it->mpPushButton.disposeAndClear(); + } maItemList.clear(); Dialog::dispose(); } @@ -345,6 +350,7 @@ void ButtonDialog::Clear() for (btn_iterator it = maItemList.begin(); it != maItemList.end(); ++it) { it->mpPushButton->Hide(); + it->mpPushButton.disposeAndClear(); } maItemList.clear(); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 1f9be33..c54a551 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -3221,6 +3221,7 @@ void VclBuilder::delete_by_name(const OString& sID) { if (aI->m_sID.equals(sID)) { + aI->m_pWindow.disposeAndClear(); m_aChildren.erase(aI); break; } diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index bd5157a..b0ad996 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -523,6 +523,7 @@ I18NStatus::I18NStatus() : I18NStatus::~I18NStatus() { + m_pStatusWindow.disposeAndClear(); if( pInstance == this ) pInstance = NULL; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits