Kaydet (Commit) 68cf4bfa authored tarafından Armin Le Grand's avatar Armin Le Grand

binfilter, editeng: fix some warnings

Patch by: Michael Stahl
üst 0132f35e
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove // MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_editeng.hxx" #include "precompiled_editeng.hxx"
#include <memory>
#include <com/sun/star/xml/AttributeData.hpp> #include <com/sun/star/xml/AttributeData.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp>
#include <xmloff/xmlcnimp.hxx> #include <xmloff/xmlcnimp.hxx>
...@@ -114,7 +117,8 @@ sal_Bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, ...@@ -114,7 +117,8 @@ sal_Bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal,
} }
else else
{ {
SvXMLAttrContainerData* pNewImpl = new SvXMLAttrContainerData; ::std::auto_ptr<SvXMLAttrContainerData> pNewImpl(
new SvXMLAttrContainerData);
try try
{ {
...@@ -165,17 +169,15 @@ sal_Bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal, ...@@ -165,17 +169,15 @@ sal_Bool SvXMLAttrContainerItem::PutValue( const com::sun::star::uno::Any& rVal,
if( nAttr == nCount ) if( nAttr == nCount )
{ {
delete pImpl; delete pImpl;
pImpl = pNewImpl; pImpl = pNewImpl.release();
} }
else else
{ {
delete pNewImpl;
return sal_False; return sal_False;
} }
} }
catch(...) catch(...)
{ {
delete pNewImpl;
return sal_False; return sal_False;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment