[Libreoffice-commits] core.git: cui/source sd/source svx/source sw/source

László Németh laszlo.nemeth at collabora.com
Fri May 29 08:02:20 PDT 2015


 cui/source/dialogs/cuihyperdlg.cxx |    6 ++++++
 cui/source/inc/cuihyperdlg.hxx     |    1 +
 sd/source/ui/dlg/animobjs.cxx      |    2 +-
 sd/source/ui/dlg/navigatr.cxx      |    4 ++--
 sd/source/ui/view/sdruler.cxx      |    2 +-
 svx/source/dialog/_contdlg.cxx     |    1 +
 svx/source/dialog/fontwork.cxx     |    2 +-
 svx/source/dialog/imapdlg.cxx      |    3 ++-
 svx/source/dialog/srchdlg.cxx      |   10 +++++-----
 svx/source/engine3d/float3d.cxx    |    6 +++---
 svx/source/form/datanavi.cxx       |    1 +
 svx/source/form/filtnav.cxx        |    1 +
 svx/source/form/fmPropBrw.cxx      |    1 +
 svx/source/form/fmexpl.cxx         |    1 +
 svx/source/form/tabwin.cxx         |    1 +
 sw/source/uibase/utlui/navipi.cxx  |    2 ++
 16 files changed, 30 insertions(+), 14 deletions(-)

New commits:
commit bec67f339b9b000628e2b82e2b38cd1cae37f94a
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Fri May 29 16:50:50 2015 +0200

    dispose SfxControllerItem objects correctly
    
    Change-Id: Id5f80e06e5609b4e85f3d6db7bc37aabe6ef0dac

diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx
index 0587f87..1fbe4cd 100644
--- a/cui/source/dialogs/cuihyperdlg.cxx
+++ b/cui/source/dialogs/cuihyperdlg.cxx
@@ -42,6 +42,12 @@ SvxHlinkCtrl::SvxHlinkCtrl( sal_uInt16 _nId, SfxBindings & rBindings, SvxHpLinkD
     pParent = pDlg;
 }
 
+void SvxHlinkCtrl::dispose()
+{
+    aRdOnlyForwarder.dispose();
+    ::SfxControllerItem::dispose();
+}
+
 void SvxHlinkCtrl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
                                  const SfxPoolItem* pState )
 {
diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx
index b856337..08541f8 100644
--- a/cui/source/inc/cuihyperdlg.hxx
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -44,6 +44,7 @@ private :
 
 public :
     SvxHlinkCtrl( sal_uInt16 nId, SfxBindings & rBindings, SvxHpLinkDlg* pDlg);
+    virtual void dispose() SAL_OVERRIDE;
 
     virtual void    StateChanged( sal_uInt16 nSID, SfxItemState eState,
                                 const SfxPoolItem* pState ) SAL_OVERRIDE;
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 46b9e51..0b033f9 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -211,7 +211,7 @@ AnimationWindow::~AnimationWindow()
 
 void AnimationWindow::dispose()
 {
-    delete pControllerItem;
+    DELETEZ( pControllerItem );
 
     for (size_t i = 0; i < m_FrameList.size(); ++i)
     {
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index ae1f66e..388f54f 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -161,8 +161,8 @@ SdNavigatorWin::~SdNavigatorWin()
 
 void SdNavigatorWin::dispose()
 {
-    delete mpNavigatorCtrlItem;
-    delete mpPageNameCtrlItem;
+    DELETEZ( mpNavigatorCtrlItem );
+    DELETEZ( mpPageNameCtrlItem );
     maToolbox.disposeAndClear();
     maTlbObjects.disposeAndClear();
     maLbDocs.disposeAndClear();
diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx
index 8c3c9b7..3c2b12a 100644
--- a/sd/source/ui/view/sdruler.cxx
+++ b/sd/source/ui/view/sdruler.cxx
@@ -99,7 +99,7 @@ void Ruler::dispose()
 {
     SfxBindings& rBindings = pCtrlItem->GetBindings();
     rBindings.EnterRegistrations();
-    delete pCtrlItem;
+    DELETEZ( pCtrlItem );
     rBindings.LeaveRegistrations();
     pSdWin.clear();
     SvxRuler::dispose();
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index e7c1d3e..3426ea3 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -305,6 +305,7 @@ void SvxSuperContourDlg::dispose()
     m_pTbx1.clear();
     m_pMtfTolerance.clear();
     m_pStbStatus.clear();
+    aContourItem.dispose();
     SvxContourDlg::dispose();
 }
 
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index 1b6e0bf..8c64e41 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -294,7 +294,7 @@ SvxFontWorkDialog::~SvxFontWorkDialog()
 void SvxFontWorkDialog::dispose()
 {
     for (sal_uInt16 i = 0; i < CONTROLLER_COUNT; i++)
-        DELETEZ(pCtrlItems[i]);
+        pCtrlItems[i]->dispose();
     m_pTbxStyle.clear();
     m_pTbxAdjust.clear();
     m_pFbDistance.clear();
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index a98f1a6..772f970 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -222,7 +222,7 @@ void SvxIMapDlg::dispose()
 {
     // Delete URL-List
     pIMapWnd.disposeAndClear();
-    delete pOwnData;
+    DELETEZ( pOwnData );
     m_pTbxIMapDlg1.clear();
     m_pFtURL.clear();
     m_pURLBox.clear();
@@ -232,6 +232,7 @@ void SvxIMapDlg::dispose()
     m_pCbbTarget.clear();
     m_pStbStatus.clear();
     SfxModelessDialog::dispose();
+    aIMapItem.dispose();
 }
 
 bool SvxIMapDlg::Close()
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 7b2b7e6..009622d 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -353,11 +353,11 @@ void SvxSearchDialog::dispose()
     Hide();
 
     rBindings.EnterRegistrations();
-    delete pSearchController;
-    delete pOptionsController;
-    delete pFamilyController;
-    delete pSearchSetController;
-    delete pReplaceSetController;
+    DELETEZ( pSearchController );
+    DELETEZ( pOptionsController );
+    DELETEZ( pFamilyController );
+    DELETEZ( pSearchSetController );
+    DELETEZ( pReplaceSetController );
     rBindings.LeaveRegistrations();
 
     delete pSearchItem;
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 0e539ac..455ef5e 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -333,9 +333,9 @@ void Svx3DWin::dispose()
     pVDev.disposeAndClear();
     delete pModel;
 
-    delete pControllerItem;
-    delete pConvertTo3DItem;
-    delete pConvertTo3DLatheItem;
+    DELETEZ( pControllerItem );
+    DELETEZ( pConvertTo3DItem );
+    DELETEZ( pConvertTo3DLatheItem );
 
     delete mpRemember2DAttributes;
 
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 6ec5068..9762b58 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -2177,6 +2177,7 @@ namespace svxform
     void DataNavigator::dispose()
     {
         m_aDataWin.disposeAndClear();
+        ::SfxControllerItem::dispose();
         SfxDockingWindow::dispose();
     }
 
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 792efa8..3800cb6 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1873,6 +1873,7 @@ FmFilterNavigatorWin::~FmFilterNavigatorWin()
 void FmFilterNavigatorWin::dispose()
 {
     m_pNavigator.disposeAndClear();
+    ::SfxControllerItem::dispose();
     SfxDockingWindow::dispose();
 }
 
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index 427a16a..b7256df 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -279,6 +279,7 @@ void FmPropBrw::dispose()
     {
         DBG_UNHANDLED_EXCEPTION();
     }
+    ::SfxControllerItem::dispose();
     SfxFloatingWindow::dispose();
 }
 
diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx
index 11ee1c1..3548871 100644
--- a/svx/source/form/fmexpl.cxx
+++ b/svx/source/form/fmexpl.cxx
@@ -520,6 +520,7 @@ namespace svxform
     void NavigatorFrame::dispose()
     {
         m_pNavigatorTree.disposeAndClear();
+        ::SfxControllerItem::dispose();
         SfxDockingWindow::dispose();
     }
 
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 2055f43..2a21874 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -211,6 +211,7 @@ void FmFieldWin::dispose()
     }
     pListBox.disposeAndClear();
     delete pData;
+    ::SfxControllerItem::dispose();
     SfxFloatingWindow::dispose();
 }
 
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index c3abce9..5c68de1 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -877,6 +877,8 @@ void SwNavigationPI::dispose()
 
     aPageChgIdle.Stop();
 
+    ::SfxControllerItem::dispose();
+
     vcl::Window::dispose();
 }
 


More information about the Libreoffice-commits mailing list