[Libreoffice-commits] core.git: chart2/source connectivity/source cui/source dbaccess/source editeng/source embeddedobj/source embedserv/source extensions/source filter/source forms/source formula/source framework/source helpcompiler/source hwpfilter/source i18npool/source idlc/source l10ntools/source lotuswordpro/source package/source registry/source reportdesign/source rsc/source sax/source sc/source sdext/source sd/source sfx2/source shell/source sot/source starmath/source svgio/source svl/source svtools/source tools/source ucb/source unotools/source vcl/opengl vcl/source vcl/unx writerperfect/source xmloff/source
Noel Grandin
noelgrandin at gmail.com
Mon Jun 15 05:48:27 PDT 2015
chart2/source/controller/accessibility/AccessibleTextHelper.cxx | 3
chart2/source/controller/drawinglayer/ViewElementListProvider.cxx | 3
connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx | 3
cui/source/customize/acccfg.cxx | 9 --
cui/source/dialogs/hldocntp.cxx | 3
cui/source/tabpages/numfmt.cxx | 3
dbaccess/source/core/api/RowSetBase.cxx | 4 -
dbaccess/source/core/api/TableDeco.cxx | 3
dbaccess/source/core/dataaccess/intercept.cxx | 8 --
dbaccess/source/ui/misc/moduledbu.cxx | 4 -
editeng/source/items/bulitem.cxx | 3
editeng/source/rtf/svxrtf.cxx | 6 -
embeddedobj/source/general/intercept.cxx | 7 --
embedserv/source/embed/intercept.cxx | 7 --
embedserv/source/inprocserv/advisesink.cxx | 3
extensions/source/inc/componentmodule.cxx | 3
extensions/source/plugin/base/xplugin.cxx | 3
filter/source/msfilter/escherex.cxx | 3
filter/source/msfilter/msdffimp.cxx | 6 -
filter/source/svg/svgwriter.cxx | 6 -
filter/source/t602/t602filter.cxx | 3
forms/source/component/clickableimage.cxx | 3
formula/source/ui/resource/ModuleHelper.cxx | 3
framework/source/uielement/addonstoolbarmanager.cxx | 3
framework/source/uielement/fontsizemenucontroller.cxx | 3
framework/source/uielement/statusbarmanager.cxx | 3
helpcompiler/source/HelpLinker.cxx | 3
hwpfilter/source/hwpfile.cxx | 3
i18npool/source/collator/collator_unicode.cxx | 4 -
idlc/source/astexpression.cxx | 12 +--
idlc/source/idlc.cxx | 21 +-----
l10ntools/source/export.cxx | 10 +-
l10ntools/source/xmlparse.cxx | 6 -
lotuswordpro/source/filter/lwpbreaksoverride.cxx | 3
lotuswordpro/source/filter/lwpfoundry.cxx | 18 +----
lotuswordpro/source/filter/lwpfrib.cxx | 3
lotuswordpro/source/filter/lwpobj.cxx | 3
lotuswordpro/source/filter/lwpparaborderoverride.cxx | 12 +--
lotuswordpro/source/filter/xfilter/xfcell.cxx | 3
lotuswordpro/source/filter/xfilter/xfcellstyle.cxx | 9 --
lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx | 6 -
lotuswordpro/source/filter/xfilter/xfframestyle.cxx | 24 ++-----
lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx | 15 +---
lotuswordpro/source/filter/xfilter/xfindex.cxx | 5 -
lotuswordpro/source/filter/xfilter/xfmasterpage.cxx | 12 +--
lotuswordpro/source/filter/xfilter/xfpagemaster.cxx | 21 ++----
lotuswordpro/source/filter/xfilter/xfparastyle.cxx | 14 +---
lotuswordpro/source/filter/xfilter/xfrow.cxx | 13 ---
lotuswordpro/source/filter/xfilter/xfrowstyle.cxx | 3
lotuswordpro/source/filter/xfilter/xfsaxstream.cxx | 3
lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx | 9 --
lotuswordpro/source/filter/xfilter/xfstylemanager.cxx | 3
lotuswordpro/source/filter/xfilter/xftablestyle.cxx | 6 -
package/source/xstor/ocompinstream.cxx | 17 ++---
registry/source/reflwrit.cxx | 7 --
reportdesign/source/core/sdr/ModuleHelper.cxx | 3
rsc/source/parser/rsclex.cxx | 3
rsc/source/tools/rscdef.cxx | 3
sax/source/expatwrap/xml2utf.cxx | 6 -
sc/source/core/data/formulacell.cxx | 6 -
sc/source/core/data/table4.cxx | 3
sc/source/core/tool/interpr4.cxx | 5 -
sc/source/filter/excel/excrecds.cxx | 3
sc/source/filter/excel/exctools.cxx | 9 --
sc/source/filter/rtf/eeimpars.cxx | 3
sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx | 3
sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx | 6 -
sc/source/filter/xml/XMLExportSharedData.cxx | 15 +---
sc/source/filter/xml/XMLStylesExportHelper.cxx | 3
sc/source/filter/xml/XMLTrackedChangesContext.cxx | 3
sc/source/ui/dbgui/sfiltdlg.cxx | 3
sc/source/ui/miscdlgs/instbdlg.cxx | 3
sd/source/core/sdpage.cxx | 3
sd/source/filter/html/pubdlg.cxx | 3
sd/source/ui/animations/CustomAnimationDialog.cxx | 6 -
sd/source/ui/unoidl/unopback.cxx | 3
sd/source/ui/view/outlview.cxx | 11 ---
sdext/source/pdfimport/pdfparse/pdfentries.cxx | 3
sdext/source/pdfimport/tree/genericelements.cxx | 6 -
sfx2/source/appl/impldde.cxx | 3
sfx2/source/appl/xpackcreator.cxx | 9 --
sfx2/source/doc/guisaveas.cxx | 7 --
shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx | 22 ++----
sot/source/sdstor/ucbstorage.cxx | 6 -
starmath/source/document.cxx | 6 -
svgio/source/svgreader/svgcirclenode.cxx | 2
svgio/source/svgreader/svgclippathnode.cxx | 2
svgio/source/svgreader/svgellipsenode.cxx | 2
svgio/source/svgreader/svggnode.cxx | 2
svgio/source/svgreader/svggradientnode.cxx | 2
svgio/source/svgreader/svgimagenode.cxx | 2
svgio/source/svgreader/svglinenode.cxx | 2
svgio/source/svgreader/svgmarkernode.cxx | 2
svgio/source/svgreader/svgmasknode.cxx | 2
svgio/source/svgreader/svgpathnode.cxx | 4 -
svgio/source/svgreader/svgpatternnode.cxx | 8 +-
svgio/source/svgreader/svgpolynode.cxx | 4 -
svgio/source/svgreader/svgrectnode.cxx | 2
svgio/source/svgreader/svgsvgnode.cxx | 2
svgio/source/svgreader/svgsymbolnode.cxx | 2
svgio/source/svgreader/svgtextnode.cxx | 2
svgio/source/svgreader/svgusenode.cxx | 2
svl/source/fsstor/fsstorage.cxx | 9 --
svtools/source/contnr/fileview.cxx | 5 -
svtools/source/contnr/treelistbox.cxx | 5 -
svtools/source/control/calendar.cxx | 6 -
svtools/source/graphic/grfcache.cxx | 7 --
svtools/source/misc/transfer2.cxx | 3
tools/source/stream/stream.cxx | 3
tools/source/stream/strmunx.cxx | 3
tools/source/stream/strmwnt.cxx | 3
ucb/source/ucp/file/prov.cxx | 3
unotools/source/config/lingucfg.cxx | 3
unotools/source/ucbhelper/xtempfile.cxx | 3
vcl/opengl/x11/salvd.cxx | 3
vcl/source/fontsubset/gsub.cxx | 3
vcl/source/window/toolbox.cxx | 3
vcl/source/window/toolbox2.cxx | 3
vcl/unx/generic/gdi/salvd.cxx | 3
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 6 -
vcl/unx/gtk/window/gtksalframe.cxx | 3
vcl/unx/kde4/KDESalGraphics.cxx | 7 --
writerperfect/source/common/WPXSvInputStream.cxx | 3
xmloff/source/chart/SchXMLImport.cxx | 34 +++-------
xmloff/source/draw/sdxmlimp.cxx | 30 ++------
xmloff/source/draw/shapeimport.cxx | 24 +++----
xmloff/source/draw/ximpshap.cxx | 3
xmloff/source/style/MarkerStyle.cxx | 3
128 files changed, 261 insertions(+), 508 deletions(-)
New commits:
commit 4729774b244db7a175077ed0c70aa48be62bc60e
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Sat Jun 13 22:15:31 2015 +0200
remove unnecessary check for null when calling delete
Idea originally from caolan.
Found using the following command:
find . -name *.cxx | xargs /opt/local/bin/grep -zlP '(?m)if\s*\(\s*\w+\s*\)\s*delete\s+\w+\;'
Change-Id: I3338f4e22193a6dfd6219c8c75835224a3392763
diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index 878ecd1..f232166 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -53,8 +53,7 @@ AccessibleTextHelper::AccessibleTextHelper(
AccessibleTextHelper::~AccessibleTextHelper()
{
- if( m_pTextHelper )
- delete m_pTextHelper;
+ delete m_pTextHelper;
}
// ____ XInitialization ____
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 9f60c63..4dbe04c 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -54,8 +54,7 @@ ViewElementListProvider::ViewElementListProvider( DrawModelWrapper* pDrawModelWr
ViewElementListProvider::~ViewElementListProvider()
{
- if(m_pFontList)
- delete m_pFontList;
+ delete m_pFontList;
}
XColorListRef ViewElementListProvider::GetColorTable() const
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
index fe2f8f7..7975758 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx
@@ -91,8 +91,7 @@ MQuery::~MQuery()
NULL )
m_aQueryDirectory->directoryQuery->StopQuery(m_aQueryDirectory->contextId);
- if ( m_aQueryDirectory )
- delete m_aQueryDirectory;
+ delete m_aQueryDirectory;
NS_IF_RELEASE( m_aQueryHelper);
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index b91f003..6bf6282 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -819,8 +819,7 @@ void SfxAcceleratorConfigPage::dispose()
while (pEntry)
{
TAccInfo* pUserData = static_cast<TAccInfo*>(pEntry->GetUserData());
- if (pUserData)
- delete pUserData;
+ delete pUserData;
pEntry = m_pEntriesBox->Next(pEntry);
}
@@ -828,8 +827,7 @@ void SfxAcceleratorConfigPage::dispose()
while (pEntry)
{
TAccInfo* pUserData = static_cast<TAccInfo*>(pEntry->GetUserData());
- if (pUserData)
- delete pUserData;
+ delete pUserData;
pEntry = m_pKeyBox->Next(pEntry);
}
@@ -1427,8 +1425,7 @@ void SfxAcceleratorConfigPage::StartFileDialog( WinBits nBits, const OUString& r
bool bSave = ( ( nBits & WB_SAVEAS ) == WB_SAVEAS );
short nDialogType = bSave ? ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION
: ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
- if ( m_pFileDlg )
- delete m_pFileDlg;
+ delete m_pFileDlg;
m_pFileDlg = new sfx2::FileDialogHelper( nDialogType, 0 );
m_pFileDlg->SetTitle( rTitle );
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 798731a..234ea38 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -316,8 +316,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
bool bOk = pIStm && ( pIStm->GetError() == 0);
- if( pIStm )
- delete pIStm;
+ delete pIStm;
if( bOk )
{
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 54bcb27..ed933d7 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -511,8 +511,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
break;
}
- if ( pNumFmtShell )
- delete pNumFmtShell; // delete old shell if applicable (== reset)
+ delete pNumFmtShell; // delete old shell if applicable (== reset)
nInitFormat = ( pValFmtAttr ) // memorize init key
? pValFmtAttr->GetValue() // (for FillItemSet())
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 547c2c1..ebdd4a8 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -113,9 +113,7 @@ ORowSetBase::~ORowSetBase()
m_pColumns = NULL;
}
- if ( m_pEmptyCollection )
- delete m_pEmptyCollection;
-
+ delete m_pEmptyCollection;
}
// com::sun::star::lang::XTypeProvider
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index 0c21188..bdd7740 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -75,8 +75,7 @@ ODBTableDecorator::ODBTableDecorator( const Reference< XConnection >& _rxConnect
ODBTableDecorator::~ODBTableDecorator()
{
- if ( m_pColumns )
- delete m_pColumns;
+ delete m_pColumns;
}
Sequence< sal_Int8 > ODBTableDecorator::getImplementationId() throw (RuntimeException, std::exception)
diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx
index d6c0595..7059c22 100644
--- a/dbaccess/source/core/dataaccess/intercept.cxx
+++ b/dbaccess/source/core/dataaccess/intercept.cxx
@@ -96,12 +96,8 @@ OInterceptor::OInterceptor( ODocumentDefinition* _pContentHolder )
OInterceptor::~OInterceptor()
{
- if( m_pDisposeEventListeners )
- delete m_pDisposeEventListeners;
-
- if(m_pStatCL)
- delete m_pStatCL;
-
+ delete m_pDisposeEventListeners;
+ delete m_pStatCL;
}
struct DispatchHelper
diff --git a/dbaccess/source/ui/misc/moduledbu.cxx b/dbaccess/source/ui/misc/moduledbu.cxx
index 63502fb..702b14e 100644
--- a/dbaccess/source/ui/misc/moduledbu.cxx
+++ b/dbaccess/source/ui/misc/moduledbu.cxx
@@ -54,9 +54,7 @@ OModuleImpl::OModuleImpl()
OModuleImpl::~OModuleImpl()
{
- if (m_pResources)
- delete m_pResources;
-
+ delete m_pResources;
}
ResMgr* OModuleImpl::getResManager()
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index d35a20e..e99cb02 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -181,8 +181,7 @@ SvxBulletItem::SvxBulletItem( const SvxBulletItem& rItem) : SfxPoolItem( rItem )
SvxBulletItem::~SvxBulletItem()
{
- if( pGraphicObject )
- delete pGraphicObject;
+ delete pGraphicObject;
}
diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx
index b70fd01..1bc5cf1 100644
--- a/editeng/source/rtf/svxrtf.cxx
+++ b/editeng/source/rtf/svxrtf.cxx
@@ -101,8 +101,7 @@ SvxRTFParser::~SvxRTFParser()
void SvxRTFParser::SetInsPos( const SvxPosition& rNew )
{
- if( pInsPos )
- delete pInsPos;
+ delete pInsPos;
pInsPos = rNew.Clone();
}
@@ -1037,8 +1036,7 @@ void SvxRTFParser::AttrGroupEnd() // process the current, delete from Stack
} while( false );
- if( pOld )
- delete pOld;
+ delete pOld;
bNewGroup = false;
}
diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx
index 710caf9..079d912 100644
--- a/embeddedobj/source/general/intercept.cxx
+++ b/embeddedobj/source/general/intercept.cxx
@@ -62,11 +62,8 @@ Interceptor::Interceptor( DocumentHolder* pDocHolder )
Interceptor::~Interceptor()
{
- if( m_pDisposeEventListeners )
- delete m_pDisposeEventListeners;
-
- if(m_pStatCL)
- delete m_pStatCL;
+ delete m_pDisposeEventListeners;
+ delete m_pStatCL;
}
//XDispatch
diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx
index 2593c3e..20dcfd1 100644
--- a/embedserv/source/embed/intercept.cxx
+++ b/embedserv/source/embed/intercept.cxx
@@ -112,11 +112,8 @@ Interceptor::Interceptor(
Interceptor::~Interceptor()
{
- if( m_pDisposeEventListeners )
- delete m_pDisposeEventListeners;
-
- if(m_pStatCL)
- delete m_pStatCL;
+ delete m_pDisposeEventListeners;
+ delete m_pStatCL;
DocumentHolder* pTmpDocH = NULL;
uno::Reference< uno::XInterface > xLock;
diff --git a/embedserv/source/inprocserv/advisesink.cxx b/embedserv/source/inprocserv/advisesink.cxx
index 6d44b9f..eb6488c 100644
--- a/embedserv/source/inprocserv/advisesink.cxx
+++ b/embedserv/source/inprocserv/advisesink.cxx
@@ -92,8 +92,7 @@ OleWrapperAdviseSink::OleWrapperAdviseSink( const ComSmart< IAdviseSink >& pList
OleWrapperAdviseSink::~OleWrapperAdviseSink()
{
- if ( m_pFormatEtc )
- delete m_pFormatEtc;
+ delete m_pFormatEtc;
}
STDMETHODIMP OleWrapperAdviseSink::QueryInterface( REFIID riid , void** ppv )
diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx
index bc19b5a..44b5311 100644
--- a/extensions/source/inc/componentmodule.cxx
+++ b/extensions/source/inc/componentmodule.cxx
@@ -66,8 +66,7 @@ namespace COMPMOD_NAMESPACE
OModuleImpl::~OModuleImpl()
{
- if (m_pResources)
- delete m_pResources;
+ delete m_pResources;
}
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index e4d89d5..f5f54fe 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -1038,8 +1038,7 @@ PluginInputStream::~PluginInputStream()
}
else
osl::File::remove( aFile );
- if( m_pContent )
- delete m_pContent;
+ delete m_pContent;
}
PluginStreamType PluginInputStream::getStreamType()
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index b3dbfde..0079569 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4479,8 +4479,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
nBlibId = ImplInsertBlib( p_EscherBlibEntry ), p_EscherBlibEntry = NULL;
}
}
- if ( p_EscherBlibEntry )
- delete p_EscherBlibEntry;
+ delete p_EscherBlibEntry;
return nBlibId;
}
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 6053ae3..3cf0c9e 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4987,15 +4987,13 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
{
case 0x038F: pImpRec->nXAlign = nUDData; break;
case 0x0390:
- if (pImpRec->pXRelTo)
- delete pImpRec->pXRelTo;
+ delete pImpRec->pXRelTo;
pImpRec->pXRelTo = new sal_uInt32;
*(pImpRec->pXRelTo) = nUDData;
break;
case 0x0391: pImpRec->nYAlign = nUDData; break;
case 0x0392:
- if (pImpRec->pYRelTo)
- delete pImpRec->pYRelTo;
+ delete pImpRec->pYRelTo;
pImpRec->pYRelTo = new sal_uInt32;
*(pImpRec->pYRelTo) = nUDData;
break;
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 0226922..d637ccb 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -106,10 +106,8 @@ SVGAttributeWriter::SVGAttributeWriter( SVGExport& rExport, SVGFontExport& rFont
SVGAttributeWriter::~SVGAttributeWriter()
{
- if( mpElemPaint )
- delete mpElemPaint;
- if( mpElemFont )
- delete mpElemFont;
+ delete mpElemPaint;
+ delete mpElemFont;
}
double SVGAttributeWriter::ImplRound( double fValue, sal_Int32 nDecs )
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 0623c2e..a590b23 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -883,8 +883,7 @@ T602ImportFilterDialog::T602ImportFilterDialog(const ::com::sun::star::uno::Refe
T602ImportFilterDialog::~T602ImportFilterDialog()
{
- if (mpResMgr)
- delete mpResMgr;
+ delete mpResMgr;
}
// XLocalizable
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index a0ac4c0..9051857 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -722,8 +722,7 @@ namespace frm
if (!rURL.isEmpty() && !::svt::GraphicAccess::isSupportedURL( rURL ) )
{
- if (m_pMedium)
- delete m_pMedium;
+ delete m_pMedium;
m_pMedium = new SfxMedium(rURL, STREAM_STD_READ);
diff --git a/formula/source/ui/resource/ModuleHelper.cxx b/formula/source/ui/resource/ModuleHelper.cxx
index 4d4803e..8044b84 100644
--- a/formula/source/ui/resource/ModuleHelper.cxx
+++ b/formula/source/ui/resource/ModuleHelper.cxx
@@ -62,8 +62,7 @@ OModuleImpl::OModuleImpl()
OModuleImpl::~OModuleImpl()
{
- if (m_pResources)
- delete m_pResources;
+ delete m_pResources;
}
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 1e5fbf9..22393d2 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -148,8 +148,7 @@ void SAL_CALL AddonsToolBarManager::dispose() throw( RuntimeException, std::exce
if ( nId > 0 )
{
AddonsParams* pRuntimeItemData = static_cast<AddonsParams*>(m_pToolBar->GetItemData( nId ));
- if ( pRuntimeItemData )
- delete pRuntimeItemData;
+ delete pRuntimeItemData;
m_pToolBar->SetItemData( nId, NULL );
}
}
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index a0229d6..97b2d1b 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -155,8 +155,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
vcl::FontInfo aFntInfo = pFontList->Get( m_aFontDescriptor.Name, m_aFontDescriptor.StyleName );
// setup font size array
- if ( m_pHeightArray )
- delete m_pHeightArray;
+ delete m_pHeightArray;
const sal_IntPtr* pTempAry;
const sal_IntPtr* pAry = pFontList->GetSizeAry( aFntInfo );
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 80e81c0..a9a33a4 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -210,8 +210,7 @@ void SAL_CALL StatusBarManager::dispose() throw( uno::RuntimeException, std::exc
{
AddonStatusbarItemData *pUserData = static_cast< AddonStatusbarItemData *>(
m_pStatusBar->GetItemData( m_pStatusBar->GetItemId( n ) ) );
- if ( pUserData )
- delete pUserData;
+ delete pUserData;
}
m_pStatusBar.disposeAndClear();
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index e4798b1..624f8de 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -270,8 +270,7 @@ void HelpLinker::addBookmark( FILE* pFile_DBHelp, std::string thishid,
void HelpLinker::initIndexerPreProcessor()
{
- if( m_pIndexerPreProcessor )
- delete m_pIndexerPreProcessor;
+ delete m_pIndexerPreProcessor;
std::string mod = module;
std::transform (mod.begin(), mod.end(), mod.begin(), tocharlower);
m_pIndexerPreProcessor = new IndexerPreProcessor( mod, indexDirParentName,
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index db7ed11..d4457a5 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -307,8 +307,7 @@ void HWPFile::TagsRead()
}
break;
case FILETAG_OLE_OBJECT:
- if (oledata)
- delete oledata;
+ delete oledata;
oledata = new OlePicture(size);
oledata->Read(*this);
break;
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index 3eb93f3..95334e8 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -47,8 +47,8 @@ Collator_Unicode::Collator_Unicode()
Collator_Unicode::~Collator_Unicode()
{
- if (collator) delete collator;
- if (uca_base) delete uca_base;
+ delete collator;
+ delete uca_base;
#ifndef DISABLE_DYNLOADING
if (hModule) osl_unloadModule(hModule);
#endif
diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx
index fffeadf..ceda954 100644
--- a/idlc/source/astexpression.cxx
+++ b/idlc/source/astexpression.cxx
@@ -122,14 +122,10 @@ AstExpression::AstExpression(OString* scopedName)
AstExpression::~AstExpression()
{
- if ( m_exprValue )
- delete m_exprValue;
- if ( m_subExpr1 )
- delete m_subExpr1;
- if ( m_subExpr2 )
- delete m_subExpr2;
- if ( m_pSymbolicName )
- delete m_pSymbolicName;
+ delete m_exprValue;
+ delete m_subExpr1;
+ delete m_subExpr2;
+ delete m_pSymbolicName;
}
/*
diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx
index 27cb47d..94d1525 100644
--- a/idlc/source/idlc.cxx
+++ b/idlc/source/idlc.cxx
@@ -218,19 +218,14 @@ Idlc::Idlc(Options* pOptions)
Idlc::~Idlc()
{
- if (m_pRoot)
- delete m_pRoot;
- if (m_pScopes)
- delete m_pScopes;
- if (m_pErrorHandler)
- delete m_pErrorHandler;
+ delete m_pRoot;
+ delete m_pScopes;
+ delete m_pErrorHandler;
}
void Idlc::init()
{
- if ( m_pRoot )
- delete m_pRoot;
-
+ delete m_pRoot;
m_pRoot = new AstModule(NT_root, OString(), NULL);
// push the root node on the stack
@@ -256,8 +251,7 @@ void Idlc::reset()
m_documentation.clear();
m_pScopes->clear();
- if ( m_pRoot)
- delete m_pRoot;
+ delete m_pRoot;
m_pRoot = new AstModule(NT_root, OString(), NULL);
@@ -363,10 +357,7 @@ Idlc* SAL_CALL idlc()
Idlc* SAL_CALL setIdlc(Options* pOptions)
{
- if ( pStaticIdlc )
- {
- delete pStaticIdlc;
- }
+ delete pStaticIdlc;
pStaticIdlc = new Idlc(pOptions);
pStaticIdlc->init();
return pStaticIdlc;
diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 25b2cdb..ee4fc43 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -258,8 +258,7 @@ void Export::Init()
Export::~Export()
{
- if( pParseQueue )
- delete pParseQueue;
+ delete pParseQueue;
if ( bMergeMode )
{
aOutput.mSimple->close();
@@ -1315,9 +1314,10 @@ ParserQueue::ParserQueue( Export& aExportObj )
}
-ParserQueue::~ParserQueue(){
- if( aQueueNext ) delete aQueueNext;
- if( aQueueCur ) delete aQueueCur;
+ParserQueue::~ParserQueue()
+{
+ delete aQueueNext;
+ delete aQueueCur;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index d5abd21..f47880d 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -333,8 +333,7 @@ XMLFile::XMLFile( const OString &rFileName ) // the file name, empty if created
void XMLFile::Extract( XMLFile *pCur )
{
- if( m_pXMLStrings )
- delete m_pXMLStrings; // Elements ?
+ delete m_pXMLStrings; // Elements ?
m_pXMLStrings = new XMLHashMap();
if ( !pCur )
@@ -420,8 +419,7 @@ XMLFile& XMLFile::operator=(const XMLFile& rObj)
m_aNodes_localize = rObj.m_aNodes_localize;
m_vOrder = rObj.m_vOrder;
- if( m_pXMLStrings )
- delete m_pXMLStrings;
+ delete m_pXMLStrings;
if( rObj.m_pXMLStrings )
{
diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.cxx b/lotuswordpro/source/filter/lwpbreaksoverride.cxx
index 12a855a..23f7f83a 100644
--- a/lotuswordpro/source/filter/lwpbreaksoverride.cxx
+++ b/lotuswordpro/source/filter/lwpbreaksoverride.cxx
@@ -79,8 +79,7 @@ LwpBreaksOverride::LwpBreaksOverride(LwpBreaksOverride const& rOther)
LwpBreaksOverride::~LwpBreaksOverride()
{
- if( m_pNextStyle )
- delete m_pNextStyle;
+ delete m_pNextStyle;
}
LwpBreaksOverride* LwpBreaksOverride::clone() const
diff --git a/lotuswordpro/source/filter/lwpfoundry.cxx b/lotuswordpro/source/filter/lwpfoundry.cxx
index d343520..7e90c36 100644
--- a/lotuswordpro/source/filter/lwpfoundry.cxx
+++ b/lotuswordpro/source/filter/lwpfoundry.cxx
@@ -91,20 +91,10 @@ LwpFoundry::LwpFoundry(LwpObjectStream *pStrm, LwpDocument* pDoc)
LwpFoundry::~LwpFoundry()
{
- if(m_pPieceMgr)
- {
- delete m_pPieceMgr;
- }
- if(m_pStyleMgr)
- {
- delete m_pStyleMgr;
- }
- if (m_pDropcapMgr)
- delete m_pDropcapMgr;
- if (m_pBulletStyleMgr)
- {
- delete m_pBulletStyleMgr;
- }
+ delete m_pPieceMgr;
+ delete m_pStyleMgr;
+ delete m_pDropcapMgr;
+ delete m_pBulletStyleMgr;
}
void LwpFoundry::Read(LwpObjectStream *pStrm)
diff --git a/lotuswordpro/source/filter/lwpfrib.cxx b/lotuswordpro/source/filter/lwpfrib.cxx
index f930660..851a3db 100644
--- a/lotuswordpro/source/filter/lwpfrib.cxx
+++ b/lotuswordpro/source/filter/lwpfrib.cxx
@@ -102,8 +102,7 @@ LwpFrib::LwpFrib(LwpPara* pPara)
LwpFrib::~LwpFrib()
{
- if(m_pModifiers)
- delete m_pModifiers;
+ delete m_pModifiers;
}
LwpFrib* LwpFrib::CreateFrib(LwpPara* pPara, LwpObjectStream* pObjStrm, sal_uInt8 fribtag,sal_uInt8 editID)
diff --git a/lotuswordpro/source/filter/lwpobj.cxx b/lotuswordpro/source/filter/lwpobj.cxx
index 7e15b62..5a0a79b 100644
--- a/lotuswordpro/source/filter/lwpobj.cxx
+++ b/lotuswordpro/source/filter/lwpobj.cxx
@@ -74,8 +74,7 @@ LwpObject::LwpObject(LwpObjectHeader objHdr, LwpSvStream* pStrm)
*/
LwpObject::~LwpObject()
{
- if(m_pObjStrm)
- delete m_pObjStrm;
+ delete m_pObjStrm;
}
/**
diff --git a/lotuswordpro/source/filter/lwpparaborderoverride.cxx b/lotuswordpro/source/filter/lwpparaborderoverride.cxx
index 318ff8d..254dc09 100644
--- a/lotuswordpro/source/filter/lwpparaborderoverride.cxx
+++ b/lotuswordpro/source/filter/lwpparaborderoverride.cxx
@@ -113,14 +113,10 @@ LwpParaBorderOverride::LwpParaBorderOverride(LwpParaBorderOverride const& rOther
LwpParaBorderOverride::~LwpParaBorderOverride()
{
- if( m_pBorderStuff )
- delete m_pBorderStuff;
- if( m_pBetweenStuff )
- delete m_pBetweenStuff;
- if( m_pShadow )
- delete m_pShadow;
- if( m_pMargins )
- delete m_pMargins;
+ delete m_pBorderStuff;
+ delete m_pBetweenStuff;
+ delete m_pShadow;
+ delete m_pMargins;
}
LwpParaBorderOverride* LwpParaBorderOverride::clone() const
diff --git a/lotuswordpro/source/filter/xfilter/xfcell.cxx b/lotuswordpro/source/filter/xfilter/xfcell.cxx
index ac79dda..a263a63 100644
--- a/lotuswordpro/source/filter/xfilter/xfcell.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcell.cxx
@@ -75,8 +75,7 @@ XFCell::XFCell()
XFCell::~XFCell()
{
- if( m_pSubTable )
- delete m_pSubTable;
+ delete m_pSubTable;
}
void XFCell::Add(XFContent *pContent)
diff --git a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
index b0d4881..a6350e2 100644
--- a/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfcellstyle.cxx
@@ -74,8 +74,7 @@ XFCellStyle::XFCellStyle()
XFCellStyle::~XFCellStyle()
{
- if( m_pBorders )
- delete m_pBorders;
+ delete m_pBorders;
}
void XFCellStyle::SetPadding(double left, double right,double top, double bottom)
@@ -97,15 +96,13 @@ void XFCellStyle::SetBackColor(XFColor& color)
void XFCellStyle::SetBackImage(XFBGImage *pImage)
{
- if( m_pBackImage )
- delete m_pBackImage;
+ delete m_pBackImage;
m_pBackImage = pImage;
}
void XFCellStyle::SetBorders(XFBorders *pBorders)
{
- if( m_pBorders )
- delete m_pBorders;
+ delete m_pBorders;
m_pBorders = pBorders;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx b/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
index 6b218bc..dab6c9d 100644
--- a/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfconfigmanager.cxx
@@ -76,15 +76,13 @@ XFConfigManager::~XFConfigManager()
void XFConfigManager::SetLineNumberConfig(XFLineNumberConfig *pLNConfig)
{
- if( m_pLineNumberConfig )
- delete m_pLineNumberConfig;
+ delete m_pLineNumberConfig;
m_pLineNumberConfig = pLNConfig;
}
void XFConfigManager::SetFootnoteConfig(XFFootnoteConfig *pFNConfig)
{
- if( m_pFootnoteConfig )
- delete m_pFootnoteConfig;
+ delete m_pFootnoteConfig;
m_pFootnoteConfig = pFNConfig;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
index a0b485b..b11ce546 100644
--- a/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfframestyle.cxx
@@ -89,41 +89,33 @@ XFFrameStyle::XFFrameStyle()
XFFrameStyle::~XFFrameStyle()
{
- if( m_pBorders )
- delete m_pBorders;
- if( m_pColumns )
- delete m_pColumns;
- if( m_pShadow )
- delete m_pShadow;
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBorders;
+ delete m_pColumns;
+ delete m_pShadow;
+ delete m_pBGImage;
}
void XFFrameStyle::SetBorders(XFBorders *pBorders)
{
- if( m_pBorders )
- delete m_pBorders;
+ delete m_pBorders;
m_pBorders = pBorders;
}
void XFFrameStyle::SetColumns(XFColumns *pColumns)
{
- if( m_pColumns )
- delete m_pColumns;
+ delete m_pColumns;
m_pColumns = pColumns;
}
void XFFrameStyle::SetShadow(XFShadow *pShadow)
{
- if( m_pShadow )
- delete m_pShadow;
+ delete m_pShadow;
m_pShadow = pShadow;
}
void XFFrameStyle::SetBackImage(XFBGImage *image)
{
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBGImage;
m_pBGImage = image;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx b/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
index 10345c8..d2521ab 100644
--- a/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx
@@ -73,12 +73,9 @@ XFHeaderStyle::XFHeaderStyle(bool isFooter)
XFHeaderStyle::~XFHeaderStyle()
{
- if( m_pBorders )
- delete m_pBorders;
- if( m_pBGImage )
- delete m_pBGImage;
- if( m_pShadow )
- delete m_pShadow;
+ delete m_pBorders;
+ delete m_pBGImage;
+ delete m_pShadow;
}
void XFHeaderStyle::SetMargins(double left, double right, double bottom)
@@ -114,15 +111,13 @@ void XFHeaderStyle::SetShadow(XFShadow *pShadow)
void XFHeaderStyle::SetBorders(XFBorders *pBorders)
{
- if( m_pBorders )
- delete m_pBorders;
+ delete m_pBorders;
m_pBorders = pBorders;
}
void XFHeaderStyle::SetBackImage(XFBGImage *image)
{
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBGImage;
m_pBGImage = image;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfindex.cxx b/lotuswordpro/source/filter/xfilter/xfindex.cxx
index 40d64fee..a028aa9 100644
--- a/lotuswordpro/source/filter/xfilter/xfindex.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfindex.cxx
@@ -76,8 +76,7 @@ XFIndex::XFIndex()
XFIndex::~XFIndex()
{
- if( m_pTitle )
- delete m_pTitle;
+ delete m_pTitle;
for(sal_uInt16 i=1;i<MAX_TOC_LEVEL+1;i++)
{
@@ -88,7 +87,7 @@ XFIndex::~XFIndex()
{
XFIndexTemplate * pTemplate = m_aTemplates.back();
m_aTemplates.pop_back();
- delete pTemplate;pTemplate=NULL;
+ delete pTemplate;
}
}
diff --git a/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx b/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx
index 2efc78d..084f50e 100644
--- a/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfmasterpage.cxx
@@ -71,23 +71,19 @@ XFMasterPage::XFMasterPage()
XFMasterPage::~XFMasterPage()
{
- if( m_pHeader )
- delete m_pHeader;
- if( m_pFooter )
- delete m_pFooter;
+ delete m_pHeader;
+ delete m_pFooter;
}
void XFMasterPage::SetHeader(XFHeader *pHeader)
{
- if( m_pHeader )
- delete m_pHeader;
+ delete m_pHeader;
m_pHeader = pHeader;
}
void XFMasterPage::SetFooter(XFFooter *pFooter)
{
- if( m_pFooter )
- delete m_pFooter;
+ delete m_pFooter;
m_pFooter = pFooter;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx b/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
index dcf7894..15e2fa1 100644
--- a/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfpagemaster.cxx
@@ -78,18 +78,12 @@ m_fSepSpaceBelow(0), m_nSepLengthPercent(0)
XFPageMaster::~XFPageMaster()
{
- if( m_pBorders )
- delete m_pBorders;
- if( m_pShadow )
- delete m_pShadow;
- if( m_pColumns )
- delete m_pColumns;
- if( m_pHeaderStyle )
- delete m_pHeaderStyle;
- if( m_pFooterStyle )
- delete m_pFooterStyle;
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBorders;
+ delete m_pShadow;
+ delete m_pColumns;
+ delete m_pHeaderStyle;
+ delete m_pFooterStyle;
+ delete m_pBGImage;
}
enumXFStyle XFPageMaster::GetStyleFamily()
@@ -140,8 +134,7 @@ void XFPageMaster::SetBackColor(XFColor color)
void XFPageMaster::SetBackImage(XFBGImage *image)
{
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBGImage;
m_pBGImage = image;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
index 8364d1a..701d057 100644
--- a/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfparastyle.cxx
@@ -136,7 +136,7 @@ XFParaStyle& XFParaStyle::operator=(const XFParaStyle& other)
if (this != &other)
{
// first , clean member
- delete(m_pBGImage);
+ delete m_pBGImage;
m_aTabs.Reset();
m_strParentStyleName = other.m_strParentStyleName;
@@ -186,10 +186,8 @@ XFParaStyle& XFParaStyle::operator=(const XFParaStyle& other)
XFParaStyle::~XFParaStyle()
{
- if( m_pBorders )
- delete m_pBorders;
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBorders;
+ delete m_pBGImage;
}
enumXFStyle XFParaStyle::GetStyleFamily()
@@ -234,15 +232,13 @@ void XFParaStyle::SetBackColor(XFColor& color)
void XFParaStyle::SetBackImage(XFBGImage *image)
{
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBGImage;
m_pBGImage = image;
}
void XFParaStyle::SetBorders(XFBorders *pBorders)
{
- if( m_pBorders )
- delete m_pBorders;
+ delete m_pBorders;
m_pBorders = pBorders;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfrow.cxx b/lotuswordpro/source/filter/xfilter/xfrow.cxx
index 7f7a540..26c2581 100644
--- a/lotuswordpro/source/filter/xfilter/xfrow.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfrow.cxx
@@ -79,8 +79,7 @@ XFRow::~XFRow()
for( it=m_aCells.begin(); it!=m_aCells.end(); ++it )
{
XFCell *pCell = (*it).second;
- if( pCell )
- delete pCell;
+ delete pCell;
}
}
@@ -88,16 +87,6 @@ void XFRow::AddCell(XFCell *pCell)
{
if( !pCell )
return;
-/* sal_Int32 col = pCell->GetCol();
- if( col<1 )
- {
- pCell->SetCol(m_aCells.size()+1);
- }
-
- col = pCell->GetCol();
- if( m_aCells.find(col) != m_aCells.end() )
- delete m_aCells[col];
-*/
sal_Int32 col = m_aCells.size()+1;
pCell->SetCol(col);
pCell->SetOwnerRow(this);
diff --git a/lotuswordpro/source/filter/xfilter/xfrowstyle.cxx b/lotuswordpro/source/filter/xfilter/xfrowstyle.cxx
index ffeaa06..a8acfba 100644
--- a/lotuswordpro/source/filter/xfilter/xfrowstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfrowstyle.cxx
@@ -108,8 +108,7 @@ XFRowStyle& XFRowStyle::operator=(XFRowStyle const &other)
m_fMinHeight = other.m_fMinHeight;
m_aBackColor = other.m_aBackColor;
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBGImage;
if( other.m_pBGImage )
m_pBGImage = new XFBGImage(*other.m_pBGImage);
diff --git a/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx b/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
index 9419630..6a5bcd7 100644
--- a/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfsaxstream.cxx
@@ -87,8 +87,7 @@ XFSaxStream::XFSaxStream(Reference<XDocumentHandler>& xHandler)
XFSaxStream::~XFSaxStream()
{
- if( m_pAttrList )
- delete m_pAttrList;
+ delete m_pAttrList;
}
void XFSaxStream::StartDocument()
diff --git a/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx b/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx
index dd04e86..cb9d5cf 100644
--- a/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfsectionstyle.cxx
@@ -70,10 +70,8 @@ XFSectionStyle::XFSectionStyle()
XFSectionStyle::~XFSectionStyle()
{
- if( m_pColumns )
- delete m_pColumns;
- if( m_pBackImage )
- delete m_pBackImage;
+ delete m_pColumns;
+ delete m_pBackImage;
}
enumXFStyle XFSectionStyle::GetStyleFamily()
@@ -93,8 +91,7 @@ void XFSectionStyle::SetMarginRight(double right)
void XFSectionStyle::SetColumns(XFColumns *pColumns)
{
- if( m_pColumns )
- delete m_pColumns;
+ delete m_pColumns;
m_pColumns = pColumns;
}
diff --git a/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx b/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
index 6a31a9c..8704816 100644
--- a/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfstylemanager.cxx
@@ -203,8 +203,7 @@ IXFStyleRet XFStyleManager::AddStyle(IXFStyle *pStyle)
}
else if( pStyle->GetStyleFamily() == enumXFStyleOutline )
{
- if( s_pOutlineStyle )
- delete s_pOutlineStyle;
+ delete s_pOutlineStyle;
s_pOutlineStyle = pStyle;
}
else if( pStyle->GetStyleFamily() == enumXFStyleStrokeDash )
diff --git a/lotuswordpro/source/filter/xfilter/xftablestyle.cxx b/lotuswordpro/source/filter/xfilter/xftablestyle.cxx
index 0fc87b2..0e05551 100644
--- a/lotuswordpro/source/filter/xfilter/xftablestyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xftablestyle.cxx
@@ -69,14 +69,12 @@ XFTableStyle::XFTableStyle()
XFTableStyle::~XFTableStyle()
{
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBGImage;
}
void XFTableStyle::SetBackImage(XFBGImage *pImage)
{
- if( m_pBGImage )
- delete m_pBGImage;
+ delete m_pBGImage;
m_pBGImage = pImage;
}
diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx
index bcf5027..0056184 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -63,18 +63,15 @@ OInputCompStream::OInputCompStream( uno::Reference < io::XInputStream > xStream,
OInputCompStream::~OInputCompStream()
{
- {
- ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
-
- if ( !m_bDisposed )
- {
- m_refCount++;
- dispose();
- }
+ ::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
- if ( m_pInterfaceContainer )
- delete m_pInterfaceContainer;
+ if ( !m_bDisposed )
+ {
+ m_refCount++;
+ dispose();
}
+
+ delete m_pInterfaceContainer;
}
uno::Any SAL_CALL OInputCompStream::queryInterface( const uno::Type& rType )
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index 7c1f440..3096b83 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -548,11 +548,8 @@ MethodEntry::MethodEntry()
MethodEntry::~MethodEntry()
{
- if (m_params)
- delete[] m_params;
-
- if (m_excNames)
- delete[] m_excNames;
+ delete[] m_params;
+ delete[] m_excNames;
}
void MethodEntry::setData(const OString& name,
diff --git a/reportdesign/source/core/sdr/ModuleHelper.cxx b/reportdesign/source/core/sdr/ModuleHelper.cxx
index ecbd677..3632382 100644
--- a/reportdesign/source/core/sdr/ModuleHelper.cxx
+++ b/reportdesign/source/core/sdr/ModuleHelper.cxx
@@ -63,8 +63,7 @@ OModuleImpl::OModuleImpl()
OModuleImpl::~OModuleImpl()
{
- if (m_pResources)
- delete m_pResources;
+ delete m_pResources;
}
diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx
index 6f906e6..d8517e1 100644
--- a/rsc/source/parser/rsclex.cxx
+++ b/rsc/source/parser/rsclex.cxx
@@ -357,8 +357,7 @@ void EndParser()
delete pStringContainer;
pStringContainer = NULL;
- if( pExp )
- delete pExp;
+ delete pExp;
pTC = NULL;
pFI = NULL;
pExp = NULL;
diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx
index 7daa2f0..ac1fb17 100644
--- a/rsc/source/tools/rscdef.cxx
+++ b/rsc/source/tools/rscdef.cxx
@@ -155,8 +155,7 @@ void RscDefine::DecRef()
void RscDefine::DefineToNumber()
{
- if( pExp )
- delete pExp;
+ delete pExp;
pExp = NULL;
SetName(OString::number(lId));
}
diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx
index aca05ed..f58023c 100644
--- a/sax/source/expatwrap/xml2utf.cxx
+++ b/sax/source/expatwrap/xml2utf.cxx
@@ -118,10 +118,8 @@ sal_Int32 XMLFile2UTFConverter::readAndConvert( Sequence<sal_Int8> &seq , sal_In
XMLFile2UTFConverter::~XMLFile2UTFConverter()
{
- if( m_pText2Unicode )
- delete m_pText2Unicode;
- if( m_pUnicode2Text )
- delete m_pUnicode2Text;
+ delete m_pText2Unicode;
+ delete m_pUnicode2Text;
}
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 4af29d6..72b698b 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1105,8 +1105,7 @@ void ScFormulaCell::Compile( const OUString& rFormula, bool bNoListening,
ScCompiler aComp( pDocument, aPos);
aComp.SetGrammar(eGrammar);
pCode = aComp.CompileString( rFormula );
- if ( pCodeOld )
- delete pCodeOld;
+ delete pCodeOld;
if( !pCode->GetCodeError() )
{
if ( !pCode->GetLen() && !aResult.GetHybridFormula().isEmpty() && rFormula == aResult.GetHybridFormula() )
@@ -1140,8 +1139,7 @@ void ScFormulaCell::Compile(
ScTokenArray* pCodeOld = pCode;
ScCompiler aComp(rCxt, aPos);
pCode = aComp.CompileString( rFormula );
- if ( pCodeOld )
- delete pCodeOld;
+ delete pCodeOld;
if( !pCode->GetCodeError() )
{
if ( !pCode->GetLen() && !aResult.GetHybridFormula().isEmpty() && rFormula == aResult.GetHybridFormula() )
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index be1bc8f..a1bc8ee5 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -677,8 +677,7 @@ void ScTable::FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
if (rInner == nIEnd) break;
if (bPositive) ++rInner; else --rInner;
}
- if ( pNewPattern )
- delete pNewPattern;
+ delete pNewPattern;
// Analyse
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index c8bdc22..7158224 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3736,14 +3736,11 @@ ScInterpreter::ScInterpreter( ScFormulaCell* pCell, ScDocument* pDoc,
ScInterpreter::~ScInterpreter()
{
-// delete pStack;
-
if ( pStackObj == pGlobalStack )
bGlobalStackInUse = false;
else
delete pStackObj;
- if (pTokenMatrixMap)
- delete pTokenMatrixMap;
+ delete pTokenMatrixMap;
}
void ScInterpreter::SetGlobalConfig(const ScCalcConfig& rConfig)
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 9b316c4..5df0787 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -568,8 +568,7 @@ ExcFilterCondition::ExcFilterCondition() :
ExcFilterCondition::~ExcFilterCondition()
{
- if( pText )
- delete pText;
+ delete pText;
}
sal_Size ExcFilterCondition::GetTextBytes() const
diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx
index c23c70d..6f85f28 100644
--- a/sc/source/filter/excel/exctools.cxx
+++ b/sc/source/filter/excel/exctools.cxx
@@ -223,12 +223,9 @@ ExcScenario::ExcScenario( XclImpStream& rIn, const RootData& rR )
ExcScenario::~ExcScenario()
{
- if( pName )
- delete pName;
- if( pComment )
- delete pComment;
- if( pUserName )
- delete pUserName;
+ delete pName;
+ delete pComment;
+ delete pUserName;
}
void ExcScenario::Apply( const XclImpRoot& rRoot, const bool bLast )
diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 001286c..ef9a9ff 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -464,8 +464,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
}
}
}
- if ( pProgress )
- delete pProgress;
+ delete pProgress;
}
bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseEntry* pE )
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 91788a6..bf0eafd 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -56,8 +56,7 @@ ScChangeTrackingExportHelper::ScChangeTrackingExportHelper(ScXMLExport& rTempExp
ScChangeTrackingExportHelper::~ScChangeTrackingExportHelper()
{
- if (pDependings)
- delete pDependings;
+ delete pDependings;
}
OUString ScChangeTrackingExportHelper::GetChangeID(const sal_uInt32 nActionNumber)
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index 33c6016..cbc0442 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -136,8 +136,7 @@ ScMyDelAction::ScMyDelAction(const ScChangeActionType nActionTypeP)
ScMyDelAction::~ScMyDelAction()
{
- if (pInsCutOff)
- delete pInsCutOff;
+ delete pInsCutOff;
}
ScMyMoveAction::ScMyMoveAction()
@@ -149,8 +148,7 @@ ScMyMoveAction::ScMyMoveAction()
ScMyMoveAction::~ScMyMoveAction()
{
- if (pMoveRanges)
- delete pMoveRanges;
+ delete pMoveRanges;
}
ScMyContentAction::ScMyContentAction()
diff --git a/sc/source/filter/xml/XMLExportSharedData.cxx b/sc/source/filter/xml/XMLExportSharedData.cxx
index 5f2b06f..0e3fd2c 100644
--- a/sc/source/filter/xml/XMLExportSharedData.cxx
+++ b/sc/source/filter/xml/XMLExportSharedData.cxx
@@ -37,16 +37,11 @@ ScMySharedData::ScMySharedData(const sal_Int32 nTempTableCount) :
ScMySharedData::~ScMySharedData()
{
- if (pShapesContainer)
- delete pShapesContainer;
- if (pTableShapes)
- delete pTableShapes;
- if (pDrawPages)
- delete pDrawPages;
- if (pDetectiveObjContainer)
- delete pDetectiveObjContainer;
- if (pNoteShapes)
- delete pNoteShapes;
+ delete pShapesContainer;
+ delete pTableShapes;
+ delete pDrawPages;
+ delete pDetectiveObjContainer;
+ delete pNoteShapes;
}
void ScMySharedData::SetLastColumn(const sal_Int32 nTable, const sal_Int32 nCol)
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 10231fb..de8a6a0 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -339,8 +339,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport,
rExport.GetTextParagraphExport()->exportText(sTemp.makeStringAndClear(), bPrevCharWasSpace);
}
}
- if (pMessage)
- delete pMessage;
+ delete pMessage;
}
void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index 2232a1f..1499f34 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -977,8 +977,7 @@ ScXMLChangeTextPContext::ScXMLChangeTextPContext( ScXMLImport& rImport,
ScXMLChangeTextPContext::~ScXMLChangeTextPContext()
{
- if (pTextPContext)
- delete pTextPContext;
+ delete pTextPContext;
}
SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( sal_uInt16 nTempPrefix,
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 9ae4d34..ba3eae0 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -110,8 +110,7 @@ void ScSpecialFilterDlg::dispose()
delete pOptionsMgr;
- if ( pOutItem )
- delete pOutItem;
+ delete pOutItem;
// Hack: RefInput-Kontrolle
pIdle->Stop();
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 719f037..a237f18 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -281,8 +281,7 @@ IMPL_LINK_NOARG(ScInsertTableDlg, ChoiceHdl_Impl)
IMPL_LINK_NOARG(ScInsertTableDlg, BrowseHdl_Impl)
{
- if ( pDocInserter )
- delete pDocInserter;
+ delete pDocInserter;
pDocInserter = new ::sfx2::DocumentInserter(
OUString::createFromAscii( ScDocShell::Factory().GetShortName() ) );
pDocInserter->StartExecuteModal( LINK( this, ScInsertTableDlg, DialogClosedHdl ) );
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 5a8de34..80cd752 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -145,8 +145,7 @@ SdPage::~SdPage()
EndListenOutlineText();
- if( mpItems )
- delete mpItems;
+ delete mpItems;
Clear();
}
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 033eeb0..9bdf9cf 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -1549,8 +1549,7 @@ bool SdPublishingDlg::Load()
bool bOk = pIStm && ( pIStm->GetError() == 0);
- if( pIStm )
- delete pIStm;
+ delete pIStm;
if( !bOk )
return false;
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 633427e..f0bf4bf 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -2217,8 +2217,7 @@ void CustomAnimationDialog::dispose()
STLPropertySet* CustomAnimationDialog::getResultSet()
{
- if( mpResultSet )
- delete mpResultSet;
+ delete mpResultSet;
mpResultSet = createDefaultSet();
@@ -2292,8 +2291,7 @@ PropertyControl::~PropertyControl()
void PropertyControl::dispose()
{
- if( mpSubControl )
- delete mpSubControl;
+ delete mpSubControl;
ListBox::dispose();
}
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index 53be943..899388a 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -75,8 +75,7 @@ SdUnoPageBackground::~SdUnoPageBackground() throw()
if( mpDoc )
EndListening( *mpDoc );
- if( mpSet )
- delete mpSet;
+ delete mpSet;
}
void SdUnoPageBackground::Notify( SfxBroadcaster&, const SfxHint& rHint )
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 455640e..7d98503 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -175,8 +175,7 @@ OutlineView::~OutlineView()
mrOutlineViewShell.GetViewShellBase().GetEventMultiplexer()->RemoveEventListener( aLink );
DisconnectFromApplication();
- if( mpProgress )
- delete mpProgress;
+ delete mpProgress;
// unregister OutlinerViews and destroy them
for (sal_uInt16 nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
@@ -604,9 +603,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
if (mnPagesToProcess > PROCESS_WITH_PROGRESS_THRESHOLD)
{
- if( mpProgress )
- delete mpProgress;
-
+ delete mpProgress;
mpProgress = new SfxProgress( GetDocSh(), SD_RESSTR(STR_CREATE_PAGES), mnPagesToProcess );
}
else
@@ -1196,9 +1193,7 @@ IMPL_LINK_NOARG(OutlineView, RemovingPagesHdl)
if (mnPagesToProcess)
{
- if( mpProgress )
- delete mpProgress;
-
+ delete mpProgress;
mpProgress = new SfxProgress( GetDocSh(), SD_RESSTR(STR_DELETE_PAGES), mnPagesToProcess );
}
mrOutliner.UpdateFields();
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 9765086..1f8cf7e 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -1054,8 +1054,7 @@ struct PDFFileImplData
PDFFile::~PDFFile()
{
- if( m_pData )
- delete m_pData;
+ delete m_pData;
}
bool PDFFile::isEncrypted() const
diff --git a/sdext/source/pdfimport/tree/genericelements.cxx b/sdext/source/pdfimport/tree/genericelements.cxx
index 7332495..67d2767 100644
--- a/sdext/source/pdfimport/tree/genericelements.cxx
+++ b/sdext/source/pdfimport/tree/genericelements.cxx
@@ -266,10 +266,8 @@ TextElement* ParagraphElement::getFirstTextChild() const
PageElement::~PageElement()
{
- if( HeaderElement )
- delete HeaderElement;
- if( FooterElement )
- delete FooterElement;
+ delete HeaderElement;
+ delete FooterElement;
}
void PageElement::visitedBy( ElementTreeVisitor& rVisitor,
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 4eb4e65..12bd1cc 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -181,8 +181,7 @@ bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
{
// otherwise it will be executed asynchronously
{
- if( pRequest )
- delete pRequest;
+ delete pRequest;
pRequest = new DdeRequest( *pConnection, sItem );
pRequest->SetDataHdl( LINK( this, SvDDEObject, ImplGetDDEData ) );
diff --git a/sfx2/source/appl/xpackcreator.cxx b/sfx2/source/appl/xpackcreator.cxx
index f447273..380b3ba 100644
--- a/sfx2/source/appl/xpackcreator.cxx
+++ b/sfx2/source/appl/xpackcreator.cxx
@@ -117,8 +117,7 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const OUString& aFolde
}
catch (const uno::RuntimeException&)
{
- if ( pTempStream )
- delete pTempStream;
+ delete pTempStream;
if ( !aTempURL.isEmpty() )
::utl::UCBContentHelper::Kill( aTempURL );
@@ -127,8 +126,7 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const OUString& aFolde
}
catch (const io::IOException&)
{
- if ( pTempStream )
- delete pTempStream;
+ delete pTempStream;
if ( !aTempURL.isEmpty() )
::utl::UCBContentHelper::Kill( aTempURL );
@@ -139,8 +137,7 @@ void SAL_CALL OPackageStructureCreator::convertToPackage( const OUString& aFolde
{
}
- if ( pTempStream )
- delete pTempStream;
+ delete pTempStream;
if ( !aTempURL.isEmpty() )
::utl::UCBContentHelper::Kill( aTempURL );
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 3ca399f..ddb1ee1 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -365,11 +365,8 @@ ModelData_Impl::ModelData_Impl( SfxStoringHelper& aOwner,
ModelData_Impl::~ModelData_Impl()
{
FreeDocumentProps();
- if ( m_pDocumentPropsHM )
- delete m_pDocumentPropsHM;
-
- if ( m_pModulePropsHM )
- delete m_pModulePropsHM;
+ delete m_pDocumentPropsHM;
+ delete m_pModulePropsHM;
}
diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
index fbc3852..dbb4402 100644
--- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
+++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx
@@ -108,13 +108,9 @@ COooFilter::COooFilter() :
COooFilter::~COooFilter()
{
delete [] m_pAttributes;
-
- if (m_pContentReader)
- delete m_pContentReader;
- if (m_pMetaInfoReader)
- delete m_pMetaInfoReader;
- if (m_pStream)
- delete m_pStream;
+ delete m_pContentReader;
+ delete m_pMetaInfoReader;
+ delete m_pStream;
InterlockedDecrement( &g_lInstances );
}
@@ -576,12 +572,10 @@ SCODE STDMETHODCALLTYPE COooFilter::Load(LPCWSTR pszFileName, DWORD /*dwMode*/)
// Open the file previously specified in call to IPersistFile::Load and get content.
try
{
- if (m_pMetaInfoReader)
- delete m_pMetaInfoReader;
+ delete m_pMetaInfoReader;
m_pMetaInfoReader = new CMetaInfoReader(WStringToString(m_pwszFileName));
- if (m_pContentReader)
- delete m_pContentReader;
+ delete m_pContentReader;
m_pContentReader = new CContentReader(WStringToString(m_pwszFileName), m_pMetaInfoReader->getDefaultLocale());
}
catch (const std::exception&)
@@ -637,12 +631,10 @@ SCODE STDMETHODCALLTYPE COooFilter::Load(IStream *pStm)
m_pStream = new BufferStream(pStm);
try
{
- if (m_pMetaInfoReader)
- delete m_pMetaInfoReader;
+ delete m_pMetaInfoReader;
m_pMetaInfoReader = new CMetaInfoReader(m_pStream);
- if (m_pContentReader)
- delete m_pContentReader;
+ delete m_pContentReader;
m_pContentReader = new CContentReader(m_pStream, m_pMetaInfoReader->getDefaultLocale());
}
catch (const std::exception&)
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 19bb96c..a4e1110 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -702,14 +702,12 @@ UCBStorageStream_Impl::~UCBStorageStream_Impl()
if( m_rSource.is() )
m_rSource.clear();
- if( m_pStream )
- delete m_pStream;
+ delete m_pStream;
if ( !m_aTempURL.isEmpty() )
::utl::UCBContentHelper::Kill( m_aTempURL );
- if( m_pContent )
- delete m_pContent;
+ delete m_pContent;
}
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index a9b6d98..460706e 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -237,8 +237,7 @@ OUString SmDocShell::GetAccessibleText()
void SmDocShell::Parse()
{
- if (pTree)
- delete pTree;
+ delete pTree;
ReplaceBadChars();
pTree = aInterpreter.Parse(aText);
nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState
@@ -679,8 +678,7 @@ SmDocShell::~SmDocShell()
EndListening(*pp->GetConfig());
- if(pCursor)
- delete pCursor;
+ delete pCursor;
pCursor = NULL;
delete pEditEngine;
diff --git a/svgio/source/svgreader/svgcirclenode.cxx b/svgio/source/svgreader/svgcirclenode.cxx
index 17031af..0f0c63a 100644
--- a/svgio/source/svgreader/svgcirclenode.cxx
+++ b/svgio/source/svgreader/svgcirclenode.cxx
@@ -39,7 +39,7 @@ namespace svgio
SvgCircleNode::~SvgCircleNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgCircleNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgclippathnode.cxx b/svgio/source/svgreader/svgclippathnode.cxx
index 7d4ac89..7100535 100644
--- a/svgio/source/svgreader/svgclippathnode.cxx
+++ b/svgio/source/svgreader/svgclippathnode.cxx
@@ -42,7 +42,7 @@ namespace svgio
SvgClipPathNode::~SvgClipPathNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgClipPathNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgellipsenode.cxx b/svgio/source/svgreader/svgellipsenode.cxx
index e23dfaa..93caf79 100644
--- a/svgio/source/svgreader/svgellipsenode.cxx
+++ b/svgio/source/svgreader/svgellipsenode.cxx
@@ -40,7 +40,7 @@ namespace svgio
SvgEllipseNode::~SvgEllipseNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgEllipseNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svggnode.cxx b/svgio/source/svgreader/svggnode.cxx
index 306de2e..0b7f49b 100644
--- a/svgio/source/svgreader/svggnode.cxx
+++ b/svgio/source/svgreader/svggnode.cxx
@@ -38,7 +38,7 @@ namespace svgio
SvgGNode::~SvgGNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgGNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svggradientnode.cxx b/svgio/source/svgreader/svggradientnode.cxx
index 3bc72e5..c9ab440 100644
--- a/svgio/source/svgreader/svggradientnode.cxx
+++ b/svgio/source/svgreader/svggradientnode.cxx
@@ -59,7 +59,7 @@ namespace svgio
SvgGradientNode::~SvgGradientNode()
{
- if(mpaGradientTransform) delete mpaGradientTransform;
+ delete mpaGradientTransform;
// do NOT delete mpXLink, it's only referenced, not owned
}
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 5423e3b..55f62dc 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -57,7 +57,7 @@ namespace svgio
SvgImageNode::~SvgImageNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgImageNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svglinenode.cxx b/svgio/source/svgreader/svglinenode.cxx
index dd71ee1..d9371a3 100644
--- a/svgio/source/svgreader/svglinenode.cxx
+++ b/svgio/source/svgreader/svglinenode.cxx
@@ -40,7 +40,7 @@ namespace svgio
SvgLineNode::~SvgLineNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgLineNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgmarkernode.cxx b/svgio/source/svgreader/svgmarkernode.cxx
index e9a3085..cabe6d0 100644
--- a/svgio/source/svgreader/svgmarkernode.cxx
+++ b/svgio/source/svgreader/svgmarkernode.cxx
@@ -43,7 +43,7 @@ namespace svgio
SvgMarkerNode::~SvgMarkerNode()
{
- if(mpViewBox) delete mpViewBox;
+ delete mpViewBox;
}
const SvgStyleAttributes* SvgMarkerNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx
index 9e46709..6aed68a9 100644
--- a/svgio/source/svgreader/svgmasknode.cxx
+++ b/svgio/source/svgreader/svgmasknode.cxx
@@ -48,7 +48,7 @@ namespace svgio
SvgMaskNode::~SvgMaskNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgMaskNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgpathnode.cxx b/svgio/source/svgreader/svgpathnode.cxx
index 7b14b72..4e7b72e 100644
--- a/svgio/source/svgreader/svgpathnode.cxx
+++ b/svgio/source/svgreader/svgpathnode.cxx
@@ -37,8 +37,8 @@ namespace svgio
SvgPathNode::~SvgPathNode()
{
- if(mpPolyPolygon) delete mpPolyPolygon;
- if(mpaTransform) delete mpaTransform;
+ delete mpPolyPolygon;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgPathNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgpatternnode.cxx b/svgio/source/svgreader/svgpatternnode.cxx
index 48e0bf0..7df26f6 100644
--- a/svgio/source/svgreader/svgpatternnode.cxx
+++ b/svgio/source/svgreader/svgpatternnode.cxx
@@ -54,10 +54,10 @@ namespace svgio
SvgPatternNode::~SvgPatternNode()
{
- if(mpViewBox) delete mpViewBox;
- if(mpaPatternTransform) delete mpaPatternTransform;
- if(mpPatternUnits) delete mpPatternUnits;
- if(mpPatternContentUnits) delete mpPatternContentUnits;
+ delete mpViewBox;
+ delete mpaPatternTransform;
+ delete mpPatternUnits;
+ delete mpPatternContentUnits;
}
const SvgStyleAttributes* SvgPatternNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgpolynode.cxx b/svgio/source/svgreader/svgpolynode.cxx
index 5edd746..dfea1ea 100644
--- a/svgio/source/svgreader/svgpolynode.cxx
+++ b/svgio/source/svgreader/svgpolynode.cxx
@@ -40,8 +40,8 @@ namespace svgio
SvgPolyNode::~SvgPolyNode()
{
- if(mpaTransform) delete mpaTransform;
- if(mpPolygon) delete mpPolygon;
+ delete mpaTransform;
+ delete mpPolygon;
}
const SvgStyleAttributes* SvgPolyNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgrectnode.cxx b/svgio/source/svgreader/svgrectnode.cxx
index fa3f1ddf..2edf283 100644
--- a/svgio/source/svgreader/svgrectnode.cxx
+++ b/svgio/source/svgreader/svgrectnode.cxx
@@ -42,7 +42,7 @@ namespace svgio
SvgRectNode::~SvgRectNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgRectNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index dcc0bf9..f33961b 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -106,7 +106,7 @@ namespace svgio
SvgSvgNode::~SvgSvgNode()
{
- if(mpViewBox) delete mpViewBox;
+ delete mpViewBox;
}
const SvgStyleAttributes* SvgSvgNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgsymbolnode.cxx b/svgio/source/svgreader/svgsymbolnode.cxx
index 78cbb4c..86ef1df 100644
--- a/svgio/source/svgreader/svgsymbolnode.cxx
+++ b/svgio/source/svgreader/svgsymbolnode.cxx
@@ -37,7 +37,7 @@ namespace svgio
SvgSymbolNode::~SvgSymbolNode()
{
- if(mpViewBox) delete mpViewBox;
+ delete mpViewBox;
}
const SvgStyleAttributes* SvgSymbolNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgtextnode.cxx b/svgio/source/svgreader/svgtextnode.cxx
index e70f80a..0ad425c 100644
--- a/svgio/source/svgreader/svgtextnode.cxx
+++ b/svgio/source/svgreader/svgtextnode.cxx
@@ -42,7 +42,7 @@ namespace svgio
SvgTextNode::~SvgTextNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgTextNode::getSvgStyleAttributes() const
diff --git a/svgio/source/svgreader/svgusenode.cxx b/svgio/source/svgreader/svgusenode.cxx
index 42d5c31..04b0893 100644
--- a/svgio/source/svgreader/svgusenode.cxx
+++ b/svgio/source/svgreader/svgusenode.cxx
@@ -41,7 +41,7 @@ namespace svgio
SvgUseNode::~SvgUseNode()
{
- if(mpaTransform) delete mpaTransform;
+ delete mpaTransform;
}
const SvgStyleAttributes* SvgUseNode::getSvgStyleAttributes() const
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index d3c3c9a..4caaf7b 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -115,12 +115,9 @@ struct FSStorage_Impl
FSStorage_Impl::~FSStorage_Impl()
{
- if ( m_pListenersContainer )
- delete m_pListenersContainer;
- if ( m_pTypeCollection )
- delete m_pTypeCollection;
- if ( m_pContent )
- delete m_pContent;
+ delete m_pListenersContainer;
+ delete m_pTypeCollection;
+ delete m_pContent;
}
FSStorage::FSStorage( const ::ucbhelper::Content& aContent,
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 3fe79c8..10fa19fa 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1520,8 +1520,7 @@ NameTranslator_Impl::NameTranslator_Impl( const INetURLObject& rActualFolder )
NameTranslator_Impl::~NameTranslator_Impl()
{
- if( mpActFolder )
- delete mpActFolder;
+ delete mpActFolder;
}
void NameTranslator_Impl::SetActualFolder( const INetURLObject& rActualFolder )
@@ -1798,7 +1797,7 @@ void SvtFileView_Impl::FilterFolderContent_Impl( const OUString &rFilter )
if( bDelete )
{
// none of the filters did match
- delete (*aContentLoop);
+ delete *aContentLoop;
if ( maContent.begin() == aContentLoop )
{
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index a1f21fa..e4d8319 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1013,8 +1013,7 @@ void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect,
void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect,
const Selection& rSel, bool bMulti )
{
- if( pEdCtrl )
- delete pEdCtrl;
+ delete pEdCtrl;
nImpFlags |= SvTreeListBoxFlags::IN_EDT;
nImpFlags &= ~SvTreeListBoxFlags::EDTEND_CALLED;
HideFocus();
@@ -1040,8 +1039,6 @@ IMPL_LINK_NOARG(SvTreeListBox, TextEditEndedHdl_Impl)
// that we don't call the selection handler in the GetFocus of the listbox
// with the old entry text.
pEdCtrl->Hide();
- // delete pEdCtrl;
- // pEdCtrl = 0;
nImpFlags &= (~SvTreeListBoxFlags::IN_EDT);
GrabFocus();
return 0;
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index f68514b..af32fe4 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -1406,8 +1406,7 @@ void Calendar::MouseButtonDown( const MouseEvent& rMEvt )
DoubleClick();
else
{
- if ( mpOldSelectTable )
- delete mpOldSelectTable;
+ delete mpOldSelectTable;
maOldCurDate = maCurDate;
mpOldSelectTable = new IntDateSet( *mpSelectTable );
@@ -1994,8 +1993,7 @@ Rectangle Calendar::GetDateRect( const Date& rDate ) const
void Calendar::StartSelection()
{
- if ( mpOldSelectTable )
- delete mpOldSelectTable;
+ delete mpOldSelectTable;
maOldCurDate = maCurDate;
mpOldSelectTable = new IntDateSet( *mpSelectTable );
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 21aa7d7..fb1c9fa 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -778,11 +778,8 @@ sal_uLong GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Poi
GraphicDisplayCacheEntry::~GraphicDisplayCacheEntry()
{
- if( mpMtf )
- delete mpMtf;
-
- if( mpBmpEx )
- delete mpBmpEx;
+ delete mpMtf;
+ delete mpBmpEx;
}
void GraphicDisplayCacheEntry::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz ) const
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index d0bb2cd..c3e0990 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -201,8 +201,7 @@ void SAL_CALL DropTargetHelper::DropTargetListener::dragOver( const DropTargetDr
try
{
- if( mpLastDragOverEvent )
- delete mpLastDragOverEvent;
+ delete mpLastDragOverEvent;
mpLastDragOverEvent = new AcceptDropEvent( rDTDE.DropAction & ~DNDConstants::ACTION_DEFAULT, Point( rDTDE.LocationX, rDTDE.LocationY ), rDTDE );
mpLastDragOverEvent->mbDefault = ( ( rDTDE.DropAction & DNDConstants::ACTION_DEFAULT ) != 0 );
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx
index 79c3717..529f7e2 100644
--- a/tools/source/stream/stream.cxx
+++ b/tools/source/stream/stream.cxx
@@ -433,8 +433,7 @@ SvStream::~SvStream()
if ( xLockBytes.Is() )
Flush();
- if( pRWBuf )
- delete[] pRWBuf;
+ delete[] pRWBuf;
}
void SvStream::ClearError()
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index c8e5986..1a7ab56 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -302,8 +302,7 @@ SvFileStream::~SvFileStream()
unlockFile( 0, 0, this );
- if (pInstanceData)
- delete pInstanceData;
+ delete pInstanceData;
}
sal_Size SvFileStream::GetData( void* pData, sal_Size nSize )
diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx
index dd49f6d..6076205 100644
--- a/tools/source/stream/strmwnt.cxx
+++ b/tools/source/stream/strmwnt.cxx
@@ -129,8 +129,7 @@ SvFileStream::SvFileStream()
SvFileStream::~SvFileStream()
{
Close();
- if (pInstanceData)
- delete pInstanceData;
+ delete pInstanceData;
}
/// Does not check for EOF, makes isEof callable
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index 5da8d6e..6f14d05 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -93,8 +93,7 @@ FileProvider::FileProvider( const Reference< XComponentContext >& rxContext )
FileProvider::~FileProvider()
{
- if( m_pMyShell )
- delete m_pMyShell;
+ delete m_pMyShell;
}
// XInitialization
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 8052d41..2439cd4 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -815,8 +815,7 @@ SvtLinguConfig::~SvtLinguConfig()
if (--nCfgItemRefCount <= 0)
{
- if (pCfgItem)
- delete pCfgItem;
+ delete pCfgItem;
pCfgItem = 0;
}
}
diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx
index da8321a..a56347f 100644
--- a/unotools/source/ucbhelper/xtempfile.cxx
+++ b/unotools/source/ucbhelper/xtempfile.cxx
@@ -44,8 +44,7 @@ OTempFileService::OTempFileService(css::uno::Reference< css::uno::XComponentCont
OTempFileService::~OTempFileService ()
{
- if ( mpTempFile )
- delete mpTempFile;
+ delete mpTempFile;
}
// XInterface
diff --git a/vcl/opengl/x11/salvd.cxx b/vcl/opengl/x11/salvd.cxx
index 0b42c11..99abcdd 100644
--- a/vcl/opengl/x11/salvd.cxx
+++ b/vcl/opengl/x11/salvd.cxx
@@ -61,8 +61,7 @@ X11OpenGLSalVirtualDevice::X11OpenGLSalVirtualDevice( SalGraphics* pGraphics,
X11OpenGLSalVirtualDevice::~X11OpenGLSalVirtualDevice()
{
- if( mpGraphics )
- delete mpGraphics;
+ delete mpGraphics;
}
SalGraphics* X11OpenGLSalVirtualDevice::AcquireGraphics()
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index a716ad7..cd76e54 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -319,8 +319,7 @@ bool ReadGSUB( struct _TrueTypeFont* pTTFile,
void ReleaseGSUB(struct _TrueTypeFont* pTTFile)
{
GlyphSubstitution* pGlyphSubstitution = static_cast<GlyphSubstitution*>(pTTFile->pGSubstitution);
- if( pGlyphSubstitution )
- delete pGlyphSubstitution;
+ delete pGlyphSubstitution;
}
int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph )
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 34637a2..3d1231d 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1646,8 +1646,7 @@ void ToolBox::dispose()
mpFloatWin = NULL;
// delete private data
- if (mpData)
- delete mpData;
+ delete mpData;
mpData = NULL;
// remove the lists when there are no more toolbox references to
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 4aa4269..3e04d1b 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -77,8 +77,7 @@ ImplToolBoxPrivateData::ImplToolBoxPrivateData() :
ImplToolBoxPrivateData::~ImplToolBoxPrivateData()
{
- if( m_pLayoutData )
- delete m_pLayoutData;
+ delete m_pLayoutData;
delete mpMenu;
}
diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx
index b0caab7..f4bce82 100644
--- a/vcl/unx/generic/gdi/salvd.cxx
+++ b/vcl/unx/generic/gdi/salvd.cxx
@@ -162,8 +162,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long
X11SalVirtualDevice::~X11SalVirtualDevice()
{
- if( pGraphics_ )
- delete pGraphics_;
+ delete pGraphics_;
pGraphics_ = NULL;
if( GetDrawable() && !bExternPixmap_ )
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 463d9fe..203ca4c 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -390,10 +390,8 @@ public:
void NWPixmapCacheData::SetPixmap( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask )
{
- if( m_pixmap )
- delete m_pixmap;
- if( m_mask )
- delete m_mask;
+ delete m_pixmap;
+ delete m_mask;
m_pixmap = pPixmap;
m_mask = pMask;
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index e39e7682..c67daeb 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -881,8 +881,7 @@ GtkSalFrame::~GtkSalFrame()
}
#endif
- if( m_pIMHandler )
- delete m_pIMHandler;
+ delete m_pIMHandler;
if( m_pFixedContainer )
gtk_widget_destroy( GTK_WIDGET( m_pFixedContainer ) );
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index ed6b130..1fa06fd 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -80,8 +80,7 @@ KDESalGraphics::KDESalGraphics() :
KDESalGraphics::~KDESalGraphics()
{
- if (m_image)
- delete m_image;
+ delete m_image;
}
bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part )
@@ -249,9 +248,7 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
//if no image, or resized, make a new image
if (!m_image || m_image->size() != widgetRect.size())
{
- if (m_image)
- delete m_image;
-
+ delete m_image;
m_image = new QImage( widgetRect.width(),
widgetRect.height(),
QImage::Format_ARGB32 );
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index 59895c9..a5550fd 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -817,8 +817,7 @@ WPXSvInputStream::WPXSvInputStream(Reference< XInputStream > xStream) :
WPXSvInputStream::~WPXSvInputStream()
{
- if (mpImpl)
- delete mpImpl;
+ delete mpImpl;
}
#define BUFFER_MAX 65536
diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx
index 3cd2dc0..46083c4 100644
--- a/xmloff/source/chart/SchXMLImport.cxx
+++ b/xmloff/source/chart/SchXMLImport.cxx
@@ -104,28 +104,18 @@ SchXMLImportHelper::SchXMLImportHelper() :
SchXMLImportHelper::~SchXMLImportHelper()
{
- // delete token maps
- if( mpChartDocElemTokenMap )
- delete mpChartDocElemTokenMap;
- if( mpTableElemTokenMap )
- delete mpTableElemTokenMap;
- if( mpChartElemTokenMap )
- delete mpChartElemTokenMap;
- if( mpPlotAreaElemTokenMap )
- delete mpPlotAreaElemTokenMap;
- if( mpSeriesElemTokenMap )
- delete mpSeriesElemTokenMap;
-
- if( mpChartAttrTokenMap )
- delete mpChartAttrTokenMap;
- if( mpPlotAreaAttrTokenMap )
- delete mpPlotAreaAttrTokenMap;
- if( mpAutoStyleAttrTokenMap )
- delete mpAutoStyleAttrTokenMap;
- if( mpCellAttrTokenMap )
- delete mpCellAttrTokenMap;
- if( mpSeriesAttrTokenMap )
- delete mpSeriesAttrTokenMap;
+ // delete token maps
+ delete mpChartDocElemTokenMap;
+ delete mpTableElemTokenMap;
+ delete mpChartElemTokenMap;
+ delete mpPlotAreaElemTokenMap;
+ delete mpSeriesElemTokenMap;
+
+ delete mpChartAttrTokenMap;
+ delete mpPlotAreaAttrTokenMap;
+ delete mpAutoStyleAttrTokenMap;
+ delete mpCellAttrTokenMap;
+ delete mpSeriesAttrTokenMap;
delete mpPropMappingAttrTokenMap;
}
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index f7df18e..b38d117 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -421,26 +421,16 @@ SdXMLImport::~SdXMLImport() throw ()
mpMasterStylesContext->ReleaseRef();
// delete all token maps
- if(mpDocElemTokenMap)
- delete mpDocElemTokenMap;
- if(mpBodyElemTokenMap)
- delete mpBodyElemTokenMap;
- if(mpStylesElemTokenMap)
- delete mpStylesElemTokenMap;
- if(mpMasterPageElemTokenMap)
- delete mpMasterPageElemTokenMap;
- if(mpMasterPageAttrTokenMap)
- delete mpMasterPageAttrTokenMap;
- if(mpPageMasterAttrTokenMap)
- delete mpPageMasterAttrTokenMap;
- if(mpPageMasterStyleAttrTokenMap)
- delete mpPageMasterStyleAttrTokenMap;
- if(mpDrawPageAttrTokenMap)
- delete mpDrawPageAttrTokenMap;
- if(mpDrawPageElemTokenMap)
- delete mpDrawPageElemTokenMap;
- if(mpPresentationPlaceholderAttrTokenMap)
- delete mpPresentationPlaceholderAttrTokenMap;
+ delete mpDocElemTokenMap;
+ delete mpBodyElemTokenMap;
+ delete mpStylesElemTokenMap;
+ delete mpMasterPageElemTokenMap;
+ delete mpMasterPageAttrTokenMap;
+ delete mpPageMasterAttrTokenMap;
+ delete mpPageMasterStyleAttrTokenMap;
+ delete mpDrawPageAttrTokenMap;
+ delete mpDrawPageElemTokenMap;
+ delete mpPresentationPlaceholderAttrTokenMap;
}
const SvXMLTokenMap& SdXMLImport::GetDocElemTokenMap()
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index c8dc20c..d86ee50 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -200,18 +200,18 @@ XMLShapeImportHelper::~XMLShapeImportHelper()
mpPresPagePropsMapper = 0L;
}
- if(mpGroupShapeElemTokenMap) delete mpGroupShapeElemTokenMap;
- if(mpFrameShapeElemTokenMap) delete mpFrameShapeElemTokenMap;
-
- if(mpPolygonShapeAttrTokenMap) delete mpPolygonShapeAttrTokenMap;
- if(mpPathShapeAttrTokenMap) delete mpPathShapeAttrTokenMap;
- if(mp3DSceneShapeElemTokenMap) delete mp3DSceneShapeElemTokenMap;
- if(mp3DObjectAttrTokenMap) delete mp3DObjectAttrTokenMap;
- if(mp3DPolygonBasedAttrTokenMap) delete mp3DPolygonBasedAttrTokenMap;
- if(mp3DCubeObjectAttrTokenMap) delete mp3DCubeObjectAttrTokenMap;
- if(mp3DSphereObjectAttrTokenMap) delete mp3DSphereObjectAttrTokenMap;
- if(mp3DSceneShapeAttrTokenMap) delete mp3DSceneShapeAttrTokenMap;
- if(mp3DLightAttrTokenMap) delete mp3DLightAttrTokenMap;
+ delete mpGroupShapeElemTokenMap;
+ delete mpFrameShapeElemTokenMap;
+
+ delete mpPolygonShapeAttrTokenMap;
+ delete mpPathShapeAttrTokenMap;
+ delete mp3DSceneShapeElemTokenMap;
+ delete mp3DObjectAttrTokenMap;
+ delete mp3DPolygonBasedAttrTokenMap;
+ delete mp3DCubeObjectAttrTokenMap;
+ delete mp3DSphereObjectAttrTokenMap;
+ delete mp3DSceneShapeAttrTokenMap;
+ delete mp3DLightAttrTokenMap;
// Styles or AutoStyles context?
if(mpStylesContext)
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 316b379..fac5f3b 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -2574,8 +2574,7 @@ SdXMLChartShapeContext::SdXMLChartShapeContext(
SdXMLChartShapeContext::~SdXMLChartShapeContext()
{
- if( mpChartContext )
- delete mpChartContext;
+ delete mpChartContext;
}
void SdXMLChartShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>& xAttrList)
diff --git a/xmloff/source/style/MarkerStyle.cxx b/xmloff/source/style/MarkerStyle.cxx
index a2c1386..864eedf 100644
--- a/xmloff/source/style/MarkerStyle.cxx
+++ b/xmloff/source/style/MarkerStyle.cxx
@@ -136,8 +136,7 @@ bool XMLMarkerStyleImport::importXML(
}
}
- if( pViewBox )
- delete pViewBox;
+ delete pViewBox;
return bHasViewBox && bHasPathData;
}
More information about the Libreoffice-commits
mailing list