From ddeed05299f842a8dffe2222509459602a57ef79 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 9 Sep 2014 10:58:35 +0200 Subject: [PATCH] Use boost::shared_ptr Change-Id: I488accb1fb7588d6b91a8406d78f5897c12b3548 --- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4 +--- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 9a90ce7a1f27..a7a3185f122d 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -207,7 +207,6 @@ DomainMapper_Impl::DomainMapper_Impl( m_xInsertTextRange(xInsertTextRange), m_bIsNewDoc(bIsNewDoc), m_bInTableStyleRunProps(false), - m_pSdtHelper(0), m_nTableDepth(0), m_bHasFtnSep(false), m_bIgnoreNextPara(false), @@ -233,7 +232,7 @@ DomainMapper_Impl::DomainMapper_Impl( getTableManager( ).startLevel(); m_bUsingEnhancedFields = officecfg::Office::Common::Filter::Microsoft::Import::ImportWWFieldsAsEnhancedFields::get(m_xComponentContext); - m_pSdtHelper = new SdtHelper(*this); + m_pSdtHelper.reset(new SdtHelper(*this)); m_aRedlines.push(std::vector()); } @@ -245,7 +244,6 @@ DomainMapper_Impl::~DomainMapper_Impl() RemoveLastParagraph( ); getTableManager( ).endLevel(); popTableManager( ); - delete m_pSdtHelper; } diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 4bee8aceeedc..2376f3c5b2dd 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -771,7 +771,7 @@ public: /// If we're inside , inside bool m_bInTableStyleRunProps; - SdtHelper* m_pSdtHelper; + boost::shared_ptr m_pSdtHelper; /// Document background color, applied to every page style. boost::optional m_oBackgroundColor;