summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-03-20 09:02:33 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-20 09:03:39 +0100
commit5f904b2646771b5270efc59dd38bcf4122741c12 (patch)
treeab7730261c3d2d61ad5dc3a517a39bf825962d78 /sw
parent62820766ef00c93192e0e8a7ce7c8f77f84a710e (diff)
DocxSdrExport::Impl: use std::unique_ptr for m_pDashLineStyleAttr
Change-Id: Ie99327cf20cf0106aa9f35f959639597fa3ccd30
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx8
-rw-r--r--sw/source/filter/ww8/docxsdrexport.hxx2
2 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 0f0bc3a815bc..dbf20318d60e 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -143,7 +143,7 @@ struct DocxSdrExport::Impl
std::unique_ptr<sax_fastparser::FastAttributeList> m_pFlyFillAttrList;
sax_fastparser::FastAttributeList* m_pFlyWrapAttrList;
sax_fastparser::FastAttributeList* m_pBodyPrAttrList;
- sax_fastparser::FastAttributeList* m_pDashLineStyleAttr;
+ std::unique_ptr<sax_fastparser::FastAttributeList> m_pDashLineStyleAttr;
sal_Int32 m_nId ;
sal_Int32 m_nSeq ;
bool m_bDMLAndVMLDrawingOpen;
@@ -168,7 +168,6 @@ struct DocxSdrExport::Impl
m_bFlyFrameGraphic(false),
m_pFlyWrapAttrList(0),
m_pBodyPrAttrList(0),
- m_pDashLineStyleAttr(0),
m_nId(0),
m_nSeq(0),
m_bDMLAndVMLDrawingOpen(false),
@@ -277,7 +276,7 @@ sax_fastparser::FastAttributeList* DocxSdrExport::getBodyPrAttrList()
return m_pImpl->m_pBodyPrAttrList;
}
-sax_fastparser::FastAttributeList*& DocxSdrExport::getDashLineStyle()
+std::unique_ptr<sax_fastparser::FastAttributeList>& DocxSdrExport::getDashLineStyle()
{
return m_pImpl->m_pDashLineStyleAttr;
}
@@ -1622,8 +1621,7 @@ void DocxSdrExport::writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly
}
if (m_pImpl->m_pDashLineStyleAttr)
{
- sax_fastparser::XFastAttributeListRef xDashLineStyleAttr(m_pImpl->m_pDashLineStyleAttr);
- m_pImpl->m_pDashLineStyleAttr = NULL;
+ sax_fastparser::XFastAttributeListRef xDashLineStyleAttr(m_pImpl->m_pDashLineStyleAttr.release());
pFS->singleElementNS(XML_v, XML_stroke, xDashLineStyleAttr);
}
pFS->startElementNS(XML_v, XML_textbox, xTextboxAttrList);
diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx
index a086b2a0c086..7b69b5fa9d57 100644
--- a/sw/source/filter/ww8/docxsdrexport.hxx
+++ b/sw/source/filter/ww8/docxsdrexport.hxx
@@ -81,7 +81,7 @@ public:
void setFlyWrapAttrList(sax_fastparser::FastAttributeList* pAttrList);
/// Attributes of <wps:bodyPr>, used during DML export of text frames.
sax_fastparser::FastAttributeList* getBodyPrAttrList();
- sax_fastparser::FastAttributeList*& getDashLineStyle();
+ std::unique_ptr<sax_fastparser::FastAttributeList>& getDashLineStyle();
void startDMLAnchorInline(const SwFrmFmt* pFrmFmt, const Size& rSize);
void endDMLAnchorInline(const SwFrmFmt* pFrmFmt);