[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Mar 19 01:17:33 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 5b55db59f93d526e7c2e192194aa562c640cce16
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Mar 19 09:16:16 2015 +0100
DocxSdrExport::Impl: use std::unique_ptr for m_pFlyFillAttrList
Change-Id: I134f375f3785beb05f320be67990d3b2d572d46f
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index a642b17..0f0bc3a 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -140,7 +140,7 @@ struct DocxSdrExport::Impl
bool m_bParagraphSdtOpen;
bool m_bParagraphHasDrawing; ///Flag for checking drawing in a paragraph.
bool m_bFlyFrameGraphic;
- sax_fastparser::FastAttributeList* m_pFlyFillAttrList;
+ std::unique_ptr<sax_fastparser::FastAttributeList> m_pFlyFillAttrList;
sax_fastparser::FastAttributeList* m_pFlyWrapAttrList;
sax_fastparser::FastAttributeList* m_pBodyPrAttrList;
sax_fastparser::FastAttributeList* m_pDashLineStyleAttr;
@@ -166,7 +166,6 @@ struct DocxSdrExport::Impl
m_bParagraphSdtOpen(false),
m_bParagraphHasDrawing(false),
m_bFlyFrameGraphic(false),
- m_pFlyFillAttrList(0),
m_pFlyWrapAttrList(0),
m_pBodyPrAttrList(0),
m_pDashLineStyleAttr(0),
@@ -263,7 +262,7 @@ void DocxSdrExport::setParagraphHasDrawing(bool bParagraphHasDrawing)
m_pImpl->m_bParagraphHasDrawing = bParagraphHasDrawing;
}
-sax_fastparser::FastAttributeList*& DocxSdrExport::getFlyFillAttrList()
+std::unique_ptr<sax_fastparser::FastAttributeList>& DocxSdrExport::getFlyFillAttrList()
{
return m_pImpl->m_pFlyFillAttrList;
}
@@ -1618,8 +1617,7 @@ void DocxSdrExport::writeVMLTextFrame(sw::Frame* pParentFrame, bool bTextBoxOnly
m_pImpl->textFrameShadow(rFrmFmt);
if (m_pImpl->m_pFlyFillAttrList)
{
- sax_fastparser::XFastAttributeListRef xFlyFillAttrList(m_pImpl->m_pFlyFillAttrList);
- m_pImpl->m_pFlyFillAttrList = NULL;
+ sax_fastparser::XFastAttributeListRef xFlyFillAttrList(m_pImpl->m_pFlyFillAttrList.release());
pFS->singleElementNS(XML_v, XML_fill, xFlyFillAttrList);
}
if (m_pImpl->m_pDashLineStyleAttr)
diff --git a/sw/source/filter/ww8/docxsdrexport.hxx b/sw/source/filter/ww8/docxsdrexport.hxx
index da2d975..a086b2a 100644
--- a/sw/source/filter/ww8/docxsdrexport.hxx
+++ b/sw/source/filter/ww8/docxsdrexport.hxx
@@ -76,7 +76,7 @@ public:
bool IsDMLAndVMLDrawingOpen();
bool IsParagraphHasDrawing();
void setParagraphHasDrawing(bool bParagraphHasDrawing);
- sax_fastparser::FastAttributeList*& getFlyFillAttrList();
+ std::unique_ptr<sax_fastparser::FastAttributeList>& getFlyFillAttrList();
sax_fastparser::FastAttributeList* getFlyWrapAttrList();
void setFlyWrapAttrList(sax_fastparser::FastAttributeList* pAttrList);
/// Attributes of <wps:bodyPr>, used during DML export of text frames.
More information about the Libreoffice-commits
mailing list