summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-03-09 09:27:39 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-09 09:27:39 +0100
commita4068cb6c65bf16c84769138c6f96585b2e48e56 (patch)
tree95ed14853993345b0183a132a40d4867df48e3f6 /sw
parenttdf#39279: Prioritise Thunderbird address books in first-match search (diff)
downloadcore-a4068cb6c65bf16c84769138c6f96585b2e48e56.tar.gz
core-a4068cb6c65bf16c84769138c6f96585b2e48e56.zip
DocxAttributeOutput::m_pSectionSpacingAttrList: use std::unique_ptr
Change-Id: Ia360b2461d0bf31abc62ae443822259b7197d90d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx5
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx2
2 files changed, 2 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0c4bf840a5ca..b285a176e281 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -5405,8 +5405,7 @@ void DocxAttributeOutput::EndSection()
// Write the section properties
if ( m_pSectionSpacingAttrList )
{
- XFastAttributeListRef xAttrList( m_pSectionSpacingAttrList );
- m_pSectionSpacingAttrList = NULL;
+ XFastAttributeListRef xAttrList( m_pSectionSpacingAttrList.release() );
m_pSerializer->singleElementNS( XML_w, XML_pgMar, xAttrList );
}
@@ -8282,7 +8281,6 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
: m_rExport( rExport ),
m_pSerializer( pSerializer ),
m_rDrawingML( *pDrawingML ),
- m_pSectionSpacingAttrList( NULL ),
m_pParagraphSpacingAttrList( NULL ),
m_pHyperlinkAttrList( NULL ),
m_bEndCharSdt(false),
@@ -8354,7 +8352,6 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri
DocxAttributeOutput::~DocxAttributeOutput()
{
- delete m_pSectionSpacingAttrList, m_pSectionSpacingAttrList = NULL;
delete m_pParagraphSpacingAttrList, m_pParagraphSpacingAttrList = NULL;
delete m_pHyperlinkAttrList, m_pHyperlinkAttrList = NULL;
delete m_pColorAttrList, m_pColorAttrList = NULL;
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 2387b3af75da..1a3263275132 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -725,7 +725,7 @@ private:
std::unique_ptr<sax_fastparser::FastAttributeList> m_pFontsAttrList;
std::unique_ptr<sax_fastparser::FastAttributeList> m_pEastAsianLayoutAttrList;
std::unique_ptr<sax_fastparser::FastAttributeList> m_pCharLangAttrList;
- ::sax_fastparser::FastAttributeList *m_pSectionSpacingAttrList;
+ std::unique_ptr<sax_fastparser::FastAttributeList> m_pSectionSpacingAttrList;
::sax_fastparser::FastAttributeList *m_pParagraphSpacingAttrList;
::sax_fastparser::FastAttributeList *m_pHyperlinkAttrList;
/// If the current SDT around runs should be ended before the current run.