[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Apr 4 13:30:43 PDT 2014


 sw/source/filter/ww8/rtfexport.cxx |    6 ++----
 sw/source/filter/ww8/rtfexport.hxx |    4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 8ed74dc19bb659f5ca58156aad6c28b50259b8fc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Apr 4 21:49:54 2014 +0200

    RtfExport: convert remaining two naked pointer members
    
    Change-Id: I2cafd91841801ef22272ba83de2ce6294ca61918

diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 306b086..844fb07 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -836,13 +836,13 @@ RtfExport::RtfExport( RtfExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurren
 {
     mbExportModeRTF = true;
     // the attribute output for the document
-    m_pAttrOutput = new RtfAttributeOutput( *this );
+    m_pAttrOutput.reset(new RtfAttributeOutput(*this));
     // that just causes problems for RTF
     bSubstituteBullets = false;
     // needed to have a complete font table
     maFontHelper.bLoadAllFonts = true;
     // the related SdrExport
-    m_pSdrExport = new RtfSdrExport( *this );
+    m_pSdrExport.reset(new RtfSdrExport(*this));
 
     if (!m_pWriter)
         m_pWriter = &m_pFilter->m_aWriter;
@@ -850,8 +850,6 @@ RtfExport::RtfExport( RtfExportFilter *pFilter, SwDoc *pDocument, SwPaM *pCurren
 
 RtfExport::~RtfExport()
 {
-    delete m_pAttrOutput, m_pAttrOutput = NULL;
-    delete m_pSdrExport, m_pSdrExport = NULL;
 }
 
 SvStream& RtfExport::Strm()
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 103429f..78e8d81 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -41,12 +41,12 @@ class RtfExport : public MSWordExportBase
     Writer* m_pWriter;
 
     /// Attribute output for document.
-    RtfAttributeOutput *m_pAttrOutput;
+    boost::shared_ptr<RtfAttributeOutput> m_pAttrOutput;
 
     /// Sections/headers/footers
     MSWordSections *m_pSections;
 
-    RtfSdrExport *m_pSdrExport;
+    boost::shared_ptr<RtfSdrExport> m_pSdrExport;
     bool m_bOutOutlineOnly;
 
 public:


More information about the Libreoffice-commits mailing list