[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Mar 20 01:04:03 PDT 2015
sw/source/filter/ww8/docxsdrexport.cxx | 8 +++-----
sw/source/filter/ww8/docxsdrexport.hxx | 2 +-
2 files changed, 4 insertions(+), 6 deletions(-)
New commits:
commit 5f904b2646771b5270efc59dd38bcf4122741c12
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Mar 20 09:02:33 2015 +0100
DocxSdrExport::Impl: use std::unique_ptr for m_pDashLineStyleAttr
Change-Id: Ie99327cf20cf0106aa9f35f959639597fa3ccd30
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 0f0bc3a..dbf2031 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 a086b2a..7b69b5f 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);
More information about the Libreoffice-commits
mailing list