diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index 616a72decdde..6ede832f8e25 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -219,7 +219,6 @@ namespace abp } ODataSourceContext::~ODataSourceContext() { - delete(m_pImpl); } diff --git a/extensions/source/abpilot/datasourcehandling.hxx b/extensions/source/abpilot/datasourcehandling.hxx index 87d3588134ff..4b0bc51e252c 100644 --- a/extensions/source/abpilot/datasourcehandling.hxx +++ b/extensions/source/abpilot/datasourcehandling.hxx @@ -22,6 +22,7 @@ #include #include +#include #include "abptypes.hxx" @@ -45,7 +46,7 @@ namespace abp class ODataSourceContext { private: - ODataSourceContextImpl* m_pImpl; + std::unique_ptr m_pImpl; public: explicit ODataSourceContext( diff --git a/hwpfilter/source/attributes.cxx b/hwpfilter/source/attributes.cxx index 4c91b72fc91d..c3683138f14c 100644 --- a/hwpfilter/source/attributes.cxx +++ b/hwpfilter/source/attributes.cxx @@ -52,10 +52,10 @@ sal_Int16 SAL_CALL AttributeListImpl::getLength() throw (RuntimeException, std:: } -AttributeListImpl::AttributeListImpl( const AttributeListImpl &r ) : -cppu::WeakImplHelper( r ) +AttributeListImpl::AttributeListImpl( const AttributeListImpl &r ) + : cppu::WeakImplHelper( r ), + m_pImpl( new AttributeListImpl_impl ) { - m_pImpl = new AttributeListImpl_impl; *m_pImpl = *(r.m_pImpl); } @@ -125,14 +125,13 @@ OUString AttributeListImpl::getValueByName(const OUString& sName) throw (Runtime AttributeListImpl::AttributeListImpl() + : m_pImpl( new AttributeListImpl_impl ) { - m_pImpl = new AttributeListImpl_impl; } AttributeListImpl::~AttributeListImpl() { - delete m_pImpl; } diff --git a/hwpfilter/source/attributes.hxx b/hwpfilter/source/attributes.hxx index c4025044bbea..a23058e66256 100644 --- a/hwpfilter/source/attributes.hxx +++ b/hwpfilter/source/attributes.hxx @@ -23,12 +23,7 @@ #include #include - -/*---------------------------------------- -* -* Attributlist implementation -* -*----------------------------------------*/ +#include using namespace ::cppu; using namespace ::com::sun::star::xml::sax; @@ -57,7 +52,7 @@ public: void clear(); private: - struct AttributeListImpl_impl *m_pImpl; + std::unique_ptr m_pImpl; }; #endif // INCLUDED_HWPFILTER_SOURCE_ATTRIBUTES_HXX