summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/xmlcnitm.cxx11
1 files changed, 2 insertions, 9 deletions
diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx
index f672845ca486..470362c95207 100644
--- a/editeng/source/items/xmlcnitm.cxx
+++ b/editeng/source/items/xmlcnitm.cxx
@@ -119,7 +119,7 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal
}
else
{
- SvXMLAttrContainerData* pNewImpl = new SvXMLAttrContainerData;
+ std::auto_ptr<SvXMLAttrContainerData> pNewImpl(new SvXMLAttrContainerData);
try
{
@@ -168,19 +168,12 @@ bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, sal
}
if( nAttr == nCount )
- {
- delete pImpl;
- pImpl = pNewImpl;
- }
+ pImpl = pNewImpl.release();
else
- {
- delete pNewImpl;
return false;
- }
}
catch(...)
{
- delete pNewImpl;
return false;
}
}