sfx2/source/doc/objstor.cxx | 8 +++++--- sfx2/source/doc/objxtor.cxx | 3 ++- sfx2/source/explorer/nochaos.cxx | 6 ++++-- sfx2/source/view/frame.cxx | 5 ++++- sfx2/source/view/ipclient.cxx | 3 ++- 5 files changed, 17 insertions(+), 8 deletions(-)
New commits: commit 8143a2023fc28e3694dd884ddd64d297eb1ce71c Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Aug 12 12:05:58 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Aug 13 08:18:20 2020 +0200 expand out DELETEZ in sfx2 Change-Id: Iced9299be454f5260582b0b639aad8e5d362d730 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index b22029107d59..3f3ac5d25279 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2932,7 +2932,8 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& // TODO/LATER: disconnect the new file from the storage for the case when pure saving is done // if storing has corrupted the file, probably it must be restored either here or // by the storage - DELETEZ( pNewFile ); + delete pNewFile; + pNewFile = nullptr; } } else @@ -2942,11 +2943,12 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& // reconnect to the old storage DoSaveCompleted(); - DELETEZ( pNewFile ); + delete pNewFile; + pNewFile = nullptr; } if ( bCopyTo ) - DELETEZ( pNewFile ); + delete pNewFile; else if( !bOk ) SetModified(); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index fb5a1677d6d2..7dd8276eb20c 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -324,7 +324,8 @@ SfxObjectShell::~SfxObjectShell() if (IsDocShared()) FreeSharedFile( pMedium->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); #endif - DELETEZ( pMedium ); + delete pMedium; + pMedium = nullptr; } // The removing of the temporary file must be done as the latest step in the document destruction diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx index 10e4c30bd0b4..33f219e3247e 100644 --- a/sfx2/source/explorer/nochaos.cxx +++ b/sfx2/source/explorer/nochaos.cxx @@ -145,8 +145,10 @@ sal_uInt16 CntItemPool::Release() if ( !nRefs ) { - DELETEZ( _pThePool ); - DELETEZ( pPoolDefs_Impl ); + delete _pThePool; + _pThePool = nullptr; + delete pPoolDefs_Impl; + pPoolDefs_Impl = nullptr; return 0; } diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index d96120fc6791..c7aa11f97b08 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -143,7 +143,10 @@ void SfxFrame::DoClose_Impl() pImpl->pCurrentViewFrame->Close(); if ( pImpl->bOwnsBindings ) - DELETEZ( pBindings ); + { + delete pBindings; + pBindings = nullptr; + } delete this; } diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 5dc6267e5c94..ad718537b76c 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -203,7 +203,8 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const document::EventObject& a void SAL_CALL SfxInPlaceClient_Impl::disposing( const css::lang::EventObject& /*aEvent*/ ) { - DELETEZ( m_pClient ); + delete m_pClient; + m_pClient = nullptr; } // XEmbeddedClient _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits