diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-12 09:18:00 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-12 09:18:41 +0100 |
commit | c2f99275eb391c7e2aa72b51e68db9f0e4d8e96c (patch) | |
tree | 60b4dd9c6b94d34e22bd09df1c7b08a287904b72 /sw | |
parent | c4cfb4f4da3cdd318d52d6fca9f7d99c005e2bfe (diff) |
DocxAttributeOutput::m_pColorAttrList: use shared_ptr
Change-Id: I48083b6f984ade7ad574e1f51922e249fd08a96c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 5 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.hxx | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index dae6e0b2329e..ac557f5d079d 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1883,8 +1883,7 @@ void DocxAttributeOutput::WriteCollectedRunProperties() if ( m_pColorAttrList ) { - XFastAttributeListRef xAttrList( m_pColorAttrList ); - m_pColorAttrList = NULL; + XFastAttributeListRef xAttrList( m_pColorAttrList.release() ); m_pSerializer->singleElementNS( XML_w, XML_color, xAttrList ); } @@ -8281,7 +8280,6 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri m_bEndCharSdt(false), m_bStartedCharSdt(false), m_bStartedParaSdt(false), - m_pColorAttrList( NULL ), m_pBackgroundAttrList( NULL ), m_endPageRef( false ), m_pFootnotesList( new ::docx::FootnotesList() ), @@ -8347,7 +8345,6 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, FSHelperPtr pSeri DocxAttributeOutput::~DocxAttributeOutput() { - delete m_pColorAttrList, m_pColorAttrList = NULL; delete m_pBackgroundAttrList, m_pBackgroundAttrList = NULL; delete m_pFootnotesList, m_pFootnotesList = NULL; diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx index a4fcf4d5ba06..2311b86b8b9f 100644 --- a/sw/source/filter/ww8/docxattributeoutput.hxx +++ b/sw/source/filter/ww8/docxattributeoutput.hxx @@ -735,7 +735,7 @@ private: /// If an SDT around paragraphs is currently open. bool m_bStartedParaSdt; /// Attributes of the run color - ::sax_fastparser::FastAttributeList *m_pColorAttrList; + std::unique_ptr<sax_fastparser::FastAttributeList> m_pColorAttrList; /// Attributes of the paragraph background ::sax_fastparser::FastAttributeList *m_pBackgroundAttrList; OUString m_sOriginalBackgroundColor; |