diff options
author | Arnold Dumas <arnold@dumas.at> | 2016-08-24 22:39:10 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-25 06:53:50 +0000 |
commit | 89d3482b7a80c6fd508cf3954b7c52608445eae0 (patch) | |
tree | 859aa4f2de74e0c03658b671da9c3993d501ddc6 /xmloff | |
parent | f360244e5ddb6b607e752a0df3c37ccefaec1d9f (diff) |
tdf#89329: use unique_ptr for pImpl in officeforms
Change-Id: Icdf742cbdbecab11be6a3fdd4387ade1c8fd7c15
Reviewed-on: https://gerrit.libreoffice.org/28368
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/forms/officeforms.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/forms/officeforms.hxx | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index bf272678c215..74a37ac0be89 100644 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -121,12 +121,11 @@ namespace xmloff { addModelAttributes(_rExp); - m_pImplElement = new SvXMLElementExport(_rExp, XML_NAMESPACE_OFFICE, XML_FORMS, true, true); + m_pImplElement.reset( new SvXMLElementExport(_rExp, XML_NAMESPACE_OFFICE, XML_FORMS, true, true) ); } OFormsRootExport::~OFormsRootExport( ) { - delete m_pImplElement; } void OFormsRootExport::implExportBool(SvXMLExport& _rExp, OfficeFormsAttributes _eAttribute, diff --git a/xmloff/source/forms/officeforms.hxx b/xmloff/source/forms/officeforms.hxx index 4c478ac73360..fbf5c701fc73 100644 --- a/xmloff/source/forms/officeforms.hxx +++ b/xmloff/source/forms/officeforms.hxx @@ -22,6 +22,7 @@ #include "formattributes.hxx" #include <xmloff/xmlictxt.hxx> +#include <memory> #include "logging.hxx" class SvXMLElementExport; @@ -61,7 +62,7 @@ namespace xmloff class OFormsRootExport { private: - SvXMLElementExport* m_pImplElement; + std::unique_ptr<SvXMLElementExport> m_pImplElement; public: explicit OFormsRootExport( SvXMLExport& _rExp ); |