diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-25 13:49:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-26 08:35:01 +0200 |
commit | c99d883447cc37b017d8c2fce95877177095d301 (patch) | |
tree | 9529dee869a4b9714caaafc4df4226c6f820e672 /sw/source | |
parent | fb90f975cb5f744f8dbe64b9a1514d4d7ace746d (diff) |
loplugin:useuniqueptr in DocxExport
Change-Id: I8d98585fa759070a82bf5738d20b018ec9fbabf0
Reviewed-on: https://gerrit.libreoffice.org/58016
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.hxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index c3bf421ef793..82125851f571 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -511,7 +511,7 @@ void DocxExport::ExportDocument_Impl() InitStyles(); // init sections - m_pSections = new MSWordSections( *this ); + m_pSections.reset(new MSWordSections( *this )); // Make sure images are counted from one, even when exporting multiple documents. oox::drawingml::DrawingML::ResetCounters(); @@ -541,8 +541,7 @@ void DocxExport::ExportDocument_Impl() m_aLinkedTextboxesHelper.clear(); //final cleanup delete m_pStyles; m_pStyles = nullptr; - delete m_pSections; - m_pSections = nullptr; + m_pSections.reset(); } void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx index 12813a33f507..8361f81e2691 100644 --- a/sw/source/filter/ww8/docxexport.hxx +++ b/sw/source/filter/ww8/docxexport.hxx @@ -82,7 +82,7 @@ class DocxExport : public MSWordExportBase std::unique_ptr<DocxAttributeOutput> m_pAttrOutput; /// Sections/headers/footers - MSWordSections *m_pSections; + std::unique_ptr<MSWordSections> m_pSections; /// Header counter. sal_Int32 m_nHeaders; |