summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2009-11-06 11:03:40 +0000
committerCaolán McNamara <cmc@openoffice.org>2009-11-06 11:03:40 +0000
commit20dcb39a743cb083e55b9cdb72b2d93b95a3f744 (patch)
treeda363f61799c757cd96262c50b74fcea3d3070fa
parent7ac3cbc92e93eabfbbbf65b8ac429afc28f84b2e (diff)
cmcfixes66: #i106674# fix remaining new[]/delete mismatches
-rw-r--r--svx/source/msfilter/msdffimp.cxx22
-rw-r--r--svx/source/msfilter/msocximex.cxx2
-rw-r--r--svx/source/svdraw/svdhdl.cxx2
-rw-r--r--ucb/source/ucp/odma/odma_content.cxx2
-rw-r--r--ucb/source/ucp/odma/odma_datasupplier.cxx8
-rw-r--r--ucb/source/ucp/odma/odma_provider.cxx22
6 files changed, 29 insertions, 29 deletions
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index dbee37d04b..6efdf858d9 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -317,7 +317,7 @@ BOOL Impl_OlePres::Read( SvStream & rStm )
{
BYTE * p = new BYTE[ nSize ];
rStm.Read( p, nSize );
- delete p;
+ delete [] p;
return FALSE;
}
return TRUE;
@@ -5016,16 +5016,16 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
ApplyAttributes( rSt, aSet, aObjData );
pRet->SetMergedItemSet(aSet);
}
- else if ( aObjData.eShapeType == mso_sptLine )
- {
- basegfx::B2DPolygon aPoly;
- aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
- aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom()));
- pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
- pRet->SetModel( pSdrModel );
- ApplyAttributes( rSt, aSet, aObjData );
- pRet->SetMergedItemSet(aSet);
- }
+ else if ( aObjData.eShapeType == mso_sptLine )
+ {
+ basegfx::B2DPolygon aPoly;
+ aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Left(), aObjData.aBoundRect.Top()));
+ aPoly.append(basegfx::B2DPoint(aObjData.aBoundRect.Right(), aObjData.aBoundRect.Bottom()));
+ pRet = new SdrPathObj(OBJ_LINE, basegfx::B2DPolyPolygon(aPoly));
+ pRet->SetModel( pSdrModel );
+ ApplyAttributes( rSt, aSet, aObjData );
+ pRet->SetMergedItemSet(aSet);
+ }
else
{
if ( GetCustomShapeContent( aObjData.eShapeType ) || IsProperty( DFF_Prop_pVertices ) )
diff --git a/svx/source/msfilter/msocximex.cxx b/svx/source/msfilter/msocximex.cxx
index 493e097857..5abf32ce3d 100644
--- a/svx/source/msfilter/msocximex.cxx
+++ b/svx/source/msfilter/msocximex.cxx
@@ -5299,7 +5299,7 @@ sal_Bool OCX_Image::Read(SotStorageStream *pS)
bool result = storePictureInFileSystem( sImageUrl, pImage, nImageLen );
OUString pictName = sImageUrl.copy( sImageUrl.lastIndexOf('/') + 1 );
result = storePictureInDoc( pDocSh, pictName, pImage, nImageLen );
- delete pImage;
+ delete [] pImage;
}
return sal_True;
}
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 7c415cefb0..f5df1658b3 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -2004,7 +2004,7 @@ void SdrHdlList::TravelFocusHdl(sal_Bool bForward)
}
// #105678# free mem again
- delete pHdlAndIndex;
+ delete [] pHdlAndIndex;
}
}
diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx
index 80d5114e09..fc4be63462 100644
--- a/ucb/source/ucp/odma/odma_content.cxx
+++ b/ucb/source/ucp/odma/odma_content.cxx
@@ -565,7 +565,7 @@ uno::Any SAL_CALL Content::execute(
ODM_DELETE,
lpszNewDocId);
- delete lpszNewDocId;
+ delete [] lpszNewDocId;
}
if(bError)
ucbhelper::cancelCommandExecution(
diff --git a/ucb/source/ucp/odma/odma_datasupplier.cxx b/ucb/source/ucp/odma/odma_datasupplier.cxx
index ad1d6151e2..a047921752 100644
--- a/ucb/source/ucp/odma/odma_datasupplier.cxx
+++ b/ucb/source/ucp/odma/odma_datasupplier.cxx
@@ -329,10 +329,10 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
// now close the query
odm = NODMQueryClose(ContentProvider::getHandle(), pQueryId);
- delete lpszDMSList;
- delete pQueryId;
- delete lpszDocId;
- delete lpszDocName;
+ delete [] lpszDMSList;
+ delete [] pQueryId;
+ delete [] lpszDocId;
+ delete [] lpszDocName;
if ( !bFound )
m_pImpl->m_bCountFinal = sal_True;
diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx
index a124ff077b..988af49933 100644
--- a/ucb/source/ucp/odma/odma_provider.cxx
+++ b/ucb/source/ucp/odma/odma_provider.cxx
@@ -230,7 +230,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent(
aProp->m_sContentType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODMA_CONTENT_TYPE));
append(aProp);
}
- delete lpszDocName;
+ delete [] lpszDocName;
}
else // we got an already fetched name here so look for it
{
@@ -298,11 +298,11 @@ void ContentProvider::saveDocument(const ::rtl::OString& _sDocumentId)
OSL_ENSURE(odm == ODM_SUCCESS,"Could not save document!");
if(odm != ODM_SUCCESS)
{
- delete lpszDocId;
+ delete [] lpszDocId;
throw uno::Exception();
}
aIter->second->m_sDocumentId = rtl::OString(lpszDocId);
- delete lpszDocId;
+ delete [] lpszDocId;
}
}
// -----------------------------------------------------------------------------
@@ -414,7 +414,7 @@ void ContentProvider::fillDocumentProperties(const ::rtl::Reference<ContentPrope
lpszDocInfo,
ODM_DOCID_MAX);
*/
- delete lpszDocInfo;
+ delete [] lpszDocInfo;
}
// -----------------------------------------------------------------------------
void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp)
@@ -482,16 +482,16 @@ void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp)
}
while(nCount > nMaxCount);
- delete lpszDocInfo;
- delete lpszDocId;
- delete lpszDocName;
+ delete [] lpszDocInfo;
+ delete [] lpszDocId;
+ delete [] lpszDocName;
}
// now close the query
odm = NODMQueryClose(ContentProvider::getHandle(), pQueryId);
- delete pQueryId;
+ delete [] pQueryId;
}
- delete lpszDMSList;
+ delete [] lpszDMSList;
return aReturn;
@@ -547,11 +547,11 @@ void ContentProvider::append(const ::rtl::Reference<ContentProperties>& _rProp)
_rProp->m_bIsOpen = sal_True;
break;
default:
- delete pFileName;
+ delete [] pFileName;
throw uno::Exception(); // TODO give a more precise error message here
}
- delete pFileName;
+ delete [] pFileName;
}
return _rProp->m_sFileURL;
}