diff options
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r-- | xmloff/source/draw/animationexport.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/draw/animexp.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/ximpshow.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/draw/ximpshow.hxx | 3 |
5 files changed, 8 insertions, 14 deletions
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 547bd6929946..f911e6741307 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -1674,13 +1674,12 @@ void AnimationsExporterImpl::prepareValue( const Any& rValue ) } AnimationsExporter::AnimationsExporter( SvXMLExport& rExport, const Reference< XPropertySet >& xPageProps ) + : mpImpl( new AnimationsExporterImpl( rExport, xPageProps ) ) { - mpImpl = new AnimationsExporterImpl( rExport, xPageProps ); } AnimationsExporter::~AnimationsExporter() { - delete mpImpl; } void AnimationsExporter::prepare( Reference< XAnimationNode > xRootNode ) diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index 13d665a8574a..bf4d60fa6dab 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -257,15 +257,13 @@ public: }; XMLAnimationsExporter::XMLAnimationsExporter( XMLShapeExport* pShapeExp ) + : mpImpl( new AnimExpImpl ) { - mpImpl = new AnimExpImpl; mpImpl->mxShapeExp = pShapeExp; } XMLAnimationsExporter::~XMLAnimationsExporter() { - delete mpImpl; - mpImpl = nullptr; } void XMLAnimationsExporter::prepare( Reference< XShape > xShape, SvXMLExport& ) diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 688d8c62b51c..2000a4c925dd 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -111,7 +111,8 @@ XMLShapeImportHelper::XMLShapeImportHelper( SvXMLImport& rImporter, const uno::Reference< frame::XModel>& rModel, SvXMLImportPropertyMapper *pExtMapper ) -: mpPageContext(nullptr), +: mpImpl( new XMLShapeImportHelperImpl() ), + mpPageContext(nullptr), mxModel(rModel), mpPropertySetMapper(nullptr), @@ -136,7 +137,6 @@ XMLShapeImportHelper::XMLShapeImportHelper( mrImporter( rImporter ) { - mpImpl = new XMLShapeImportHelperImpl(); mpImpl->mpSortContext = nullptr; // #88546# init to sal_False @@ -224,8 +224,6 @@ XMLShapeImportHelper::~XMLShapeImportHelper() mpAutoStylesContext->Clear(); mpAutoStylesContext->ReleaseRef(); } - - delete mpImpl; } const SvXMLTokenMap& XMLShapeImportHelper::GetGroupShapeElemTokenMap() diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx index 4175ff79248b..baa9eb058231 100644 --- a/xmloff/source/draw/ximpshow.cxx +++ b/xmloff/source/draw/ximpshow.cxx @@ -63,9 +63,9 @@ public: SdXMLShowsContext::SdXMLShowsContext( SdXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) -: SvXMLImportContext(rImport, nPrfx, rLocalName) +: SvXMLImportContext(rImport, nPrfx, rLocalName), + mpImpl(new ShowsImpImpl( rImport ) ) { - mpImpl = new ShowsImpImpl( rImport ); Reference< XCustomPresentationSupplier > xShowsSupplier( rImport.GetModel(), UNO_QUERY ); if( xShowsSupplier.is() ) @@ -186,8 +186,6 @@ SdXMLShowsContext::~SdXMLShowsContext() aAny <<= mpImpl->maCustomShowName; mpImpl->mxPresProps->setPropertyValue("CustomShow", aAny ); } - - delete mpImpl; } SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) diff --git a/xmloff/source/draw/ximpshow.hxx b/xmloff/source/draw/ximpshow.hxx index 0eb6c9a52af8..c186206e1c7f 100644 --- a/xmloff/source/draw/ximpshow.hxx +++ b/xmloff/source/draw/ximpshow.hxx @@ -22,6 +22,7 @@ #include <xmloff/xmlictxt.hxx> #include "sdxmlimp_impl.hxx" +#include <memory> class ShowsImpImpl; @@ -29,7 +30,7 @@ class ShowsImpImpl; class SdXMLShowsContext : public SvXMLImportContext { - ShowsImpImpl* mpImpl; + std::unique_ptr<ShowsImpImpl> mpImpl; public: |