expand out DELETEZ

Change-Id: Ia69fb105c6cc661ac94a360d47655b3faa9d6bb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100618
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2020-08-12 11:15:51 +02:00
parent 2cb40c77cd
commit d4df251320
6 changed files with 21 additions and 10 deletions

View File

@@ -726,8 +726,10 @@ SvxNumRule::~SvxNumRule()
{
if(!--nRefCount)
{
DELETEZ(pStdNumFmt);
DELETEZ(pStdOutlineNumFmt);
delete pStdNumFmt;
pStdNumFmt = nullptr;
delete pStdOutlineNumFmt;
pStdOutlineNumFmt = nullptr;
}
}

View File

@@ -85,8 +85,10 @@ void OStartMarker::dispose()
{
if ( osl_atomic_decrement(&s_nImageRefCount) == 0 )
{
DELETEZ(s_pDefCollapsed);
DELETEZ(s_pDefExpanded);
delete s_pDefCollapsed;
s_pDefCollapsed = nullptr;
delete s_pDefExpanded;
s_pDefExpanded = nullptr;
}
m_aVRuler.disposeAndClear();
m_aText.disposeAndClear();

View File

@@ -306,7 +306,10 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode )
// check the stream
m_pStorStm = ::utl::UcbStreamHelper::CreateStream( m_aName, nMode ).release();
if ( m_pStorStm && m_pStorStm->GetError() )
DELETEZ( m_pStorStm );
{
delete m_pStorStm;
m_pStorStm = nullptr;
}
if ( m_pStorStm )
{
@@ -319,7 +322,8 @@ void SotStorage::CreateStorage( bool bForceUCBStorage, StreamMode nMode )
if ( bIsUCBStorage )
{
// UCBStorage always works directly on the UCB content, so discard the stream first
DELETEZ( m_pStorStm );
delete m_pStorStm;
m_pStorStm = nullptr;
m_pOwnStg = new UCBStorage( m_aName, nMode, true, true/*bIsRoot*/ );
}
else

View File

@@ -542,7 +542,8 @@ void SfxItemPool::SetPoolDefaultItem(const SfxPoolItem &rItem)
if (rOldDefault)
{
rOldDefault->SetRefCount(0);
DELETEZ(rOldDefault);
delete rOldDefault;
rOldDefault = nullptr;
}
rOldDefault = pNewDefault;
}
@@ -567,7 +568,8 @@ void SfxItemPool::ResetPoolDefaultItem( sal_uInt16 nWhichId )
if (rOldDefault)
{
rOldDefault->SetRefCount(0);
DELETEZ(rOldDefault);
delete rOldDefault;
rOldDefault = nullptr;
}
}
else if ( pImpl->mpSecondary )

View File

@@ -525,7 +525,7 @@ namespace svt
EditCellController::~EditCellController( )
{
if ( m_bOwnImplementation )
DELETEZ( m_pEditImplementation );
delete m_pEditImplementation;
}
void EditCellController::SaveValue()

View File

@@ -379,7 +379,8 @@ SvtAccessibilityOptions::~SvtAccessibilityOptions()
{
//if( sm_pSingleImplConfig->IsModified() )
// sm_pSingleImplConfig->Commit();
DELETEZ( sm_pSingleImplConfig );
delete sm_pSingleImplConfig;
sm_pSingleImplConfig = nullptr;
}
}