summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-15 12:39:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-15 12:44:10 +0100
commitd47719a7a8558db9502b84e3e64c4a1bb7af3e7c (patch)
treef4a068da6bef86229669fc6260a931f1975c3f4a /sw
parent1323a62d2156a551eae46d249e37d9d84bc280b0 (diff)
ofz: fix a leak
Change-Id: Ifd730a0f162ab5032665926d66debe716b0579df
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx2
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index f2c98070d24e..d532a580634e 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -83,7 +83,7 @@ struct WW8SwFlyPara
const sal_Int32 nIniFlyDy );
void BoxUpWidth( long nWidth );
- SwWW8FltAnchorStack *pOldAnchorStck;
+ std::unique_ptr<SwWW8FltAnchorStack> xOldAnchorStck;
};
class WW8RStyle: public WW8Style
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 3c05190a8c17..67282c3a1150 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2404,7 +2404,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const WW8_TablePos *p
//remove fltanchors, otherwise they will be closed inside the
//frame, which makes no sense, restore them after the frame is
//closed
- m_xSFlyPara->pOldAnchorStck = m_pAnchorStck;
+ m_xSFlyPara->xOldAnchorStck.reset(m_pAnchorStck);
m_pAnchorStck = new SwWW8FltAnchorStack(&m_rDoc, m_nFieldFlags);
if (m_xSFlyPara->pFlyFormat)
@@ -2554,7 +2554,7 @@ void SwWW8ImplReader::StopApo()
m_xSFlyPara->pFlyFormat->SetFormatAttr(SvxBrushItem(aBg, RES_BACKGROUND));
DeleteAnchorStack();
- m_pAnchorStck = m_xSFlyPara->pOldAnchorStck;
+ m_pAnchorStck = m_xSFlyPara->xOldAnchorStck.release();
// When inserting a graphic into the fly frame using the auto
// function, the extension of the SW-fly has to be set