summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-12 12:05:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-08-13 08:18:20 +0200
commit8143a2023fc28e3694dd884ddd64d297eb1ce71c (patch)
treef1d1ea2d0a8218fc373653d5d8d92147ff28e7a0
parent8ce3647224c9aae6425dcb199d2b83de2359665c (diff)
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.grandin@collabora.co.uk>
-rw-r--r--sfx2/source/doc/objstor.cxx8
-rw-r--r--sfx2/source/doc/objxtor.cxx3
-rw-r--r--sfx2/source/explorer/nochaos.cxx6
-rw-r--r--sfx2/source/view/frame.cxx5
-rw-r--r--sfx2/source/view/ipclient.cxx3
5 files changed, 17 insertions, 8 deletions
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