diff options
-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 ); |