[Libreoffice-commits] core.git: sfx2/source

Noel Grandin noel.grandin at collabora.co.uk
Tue May 8 10:58:05 UTC 2018


 sfx2/source/appl/appquit.cxx    |   16 ++++++++--------
 sfx2/source/dialog/templdlg.cxx |    2 +-
 sfx2/source/doc/objxtor.cxx     |    4 ++--
 sfx2/source/inc/sfxtypes.hxx    |   10 ----------
 4 files changed, 11 insertions(+), 21 deletions(-)

New commits:
commit 638ec7728b9a1327b424eade7f6bc5828b575921
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Tue May 8 11:11:33 2018 +0200

    convert DELETEX to DELETEZ
    
    one of these is bad enough
    
    Change-Id: Ifc40f3e3c067bb715c6befab9193d22d0c56a6e7
    Reviewed-on: https://gerrit.libreoffice.org/53960
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index 35a7c152af34..76474457f84c 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -102,14 +102,14 @@ void SfxApplication::Deinitialize()
     // from here no SvObjects have to exists
     DELETEZ(pImpl->pMatcher);
 
-    DELETEX(SfxSlotPool, pImpl->pSlotPool);
-    DELETEX(SfxChildWinFactArr_Impl, pImpl->pFactArr);
-
-    DELETEX(SfxTbxCtrlFactArr_Impl, pImpl->pTbxCtrlFac);
-    DELETEX(SfxStbCtrlFactArr_Impl, pImpl->pStbCtrlFac);
-    DELETEX(SfxViewFrameArr_Impl, pImpl->pViewFrames);
-    DELETEX(SfxViewShellArr_Impl, pImpl->pViewShells);
-    DELETEX(SfxObjectShellArr_Impl, pImpl->pObjShells);
+    DELETEZ(pImpl->pSlotPool);
+    DELETEZ(pImpl->pFactArr);
+
+    DELETEZ(pImpl->pTbxCtrlFac);
+    DELETEZ(pImpl->pStbCtrlFac);
+    DELETEZ(pImpl->pViewFrames);
+    DELETEZ(pImpl->pViewShells);
+    DELETEZ(pImpl->pObjShells);
 
     //TODO/CLEANUP
     //ReleaseArgs could be used instead!
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 31ffd4cdbc5c..678285a27456 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -809,7 +809,7 @@ void SfxCommonTemplateDialog_Impl::impl_clear()
     pStyleFamilies = nullptr;
     sal_uInt16 i;
     for ( i = 0; i < MAX_FAMILIES; ++i )
-        DELETEX(SfxTemplateItem, pFamilyState[i]);
+        DELETEZ(pFamilyState[i]);
     for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
         delete pBoundItems[i];
     pCurObjShell = nullptr;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 6c398d3ff773..3eacd44ab701 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -309,7 +309,7 @@ SfxObjectShell::~SfxObjectShell()
     SfxObjectShell::CloseInternal();
     pImpl->pBaseModel.set( nullptr );
 
-    DELETEX(AutoReloadTimer_Impl, pImpl->pReloadTimer );
+    DELETEZ( pImpl->pReloadTimer );
 
     SfxApplication *pSfxApp = SfxGetpApp();
     if ( USHRT_MAX != pImpl->nVisualDocumentNumber )
@@ -344,7 +344,7 @@ SfxObjectShell::~SfxObjectShell()
         if ( IsDocShared() && pMedium )
             FreeSharedFile( pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
 #endif
-        DELETEX( SfxMedium, pMedium );
+        DELETEZ( pMedium );
     }
 
     // The removing of the temporary file must be done as the latest step in the document destruction
diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
index 99e5af0b6f87..d731086ba5fd 100644
--- a/sfx2/source/inc/sfxtypes.hxx
+++ b/sfx2/source/inc/sfxtypes.hxx
@@ -29,16 +29,6 @@
 #define DELETEZ(pPtr) ( delete pPtr, pPtr = 0 )
 #endif
 
-#ifndef DELETEX
-#ifdef DBG_UTIL
-#define DELETEX(T, pPtr) \
-    ( delete pPtr, pPtr = reinterpret_cast<T *>(sal_IntPtr(-1)) )
-#else
-#define DELETEX(T, pPtr) delete pPtr
-#endif
-#endif
-
-
 #if defined(DBG_UTIL)
 
 class SfxStack


More information about the Libreoffice-commits mailing list