Kaydet (Commit) d47719a7 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz: fix a leak

Change-Id: Ifd730a0f162ab5032665926d66debe716b0579df
üst 1323a62d
...@@ -83,7 +83,7 @@ struct WW8SwFlyPara ...@@ -83,7 +83,7 @@ struct WW8SwFlyPara
const sal_Int32 nIniFlyDy ); const sal_Int32 nIniFlyDy );
void BoxUpWidth( long nWidth ); void BoxUpWidth( long nWidth );
SwWW8FltAnchorStack *pOldAnchorStck; std::unique_ptr<SwWW8FltAnchorStack> xOldAnchorStck;
}; };
class WW8RStyle: public WW8Style class WW8RStyle: public WW8Style
......
...@@ -2404,7 +2404,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const WW8_TablePos *p ...@@ -2404,7 +2404,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const WW8_TablePos *p
//remove fltanchors, otherwise they will be closed inside the //remove fltanchors, otherwise they will be closed inside the
//frame, which makes no sense, restore them after the frame is //frame, which makes no sense, restore them after the frame is
//closed //closed
m_xSFlyPara->pOldAnchorStck = m_pAnchorStck; m_xSFlyPara->xOldAnchorStck.reset(m_pAnchorStck);
m_pAnchorStck = new SwWW8FltAnchorStack(&m_rDoc, m_nFieldFlags); m_pAnchorStck = new SwWW8FltAnchorStack(&m_rDoc, m_nFieldFlags);
if (m_xSFlyPara->pFlyFormat) if (m_xSFlyPara->pFlyFormat)
...@@ -2554,7 +2554,7 @@ void SwWW8ImplReader::StopApo() ...@@ -2554,7 +2554,7 @@ void SwWW8ImplReader::StopApo()
m_xSFlyPara->pFlyFormat->SetFormatAttr(SvxBrushItem(aBg, RES_BACKGROUND)); m_xSFlyPara->pFlyFormat->SetFormatAttr(SvxBrushItem(aBg, RES_BACKGROUND));
DeleteAnchorStack(); DeleteAnchorStack();
m_pAnchorStck = m_xSFlyPara->pOldAnchorStck; m_pAnchorStck = m_xSFlyPara->xOldAnchorStck.release();
// When inserting a graphic into the fly frame using the auto // When inserting a graphic into the fly frame using the auto
// function, the extension of the SW-fly has to be set // function, the extension of the SW-fly has to be set
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment