diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-03 15:35:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-03 20:44:04 +0100 |
commit | 3071ba2af0d50b450975a01789fb1222c4f1ca7f (patch) | |
tree | ef480ccc57b157906a9fd231baa31c92427cc073 /lotuswordpro | |
parent | b21c8faf6f54451d1f8cd08bca0359d62440bc3d (diff) |
ofz#4917 Direct-leak
Change-Id: Ia8fdd63e1944055a264549b1ff2272b02f32ef42
Reviewed-on: https://gerrit.libreoffice.org/47327
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpframelayout.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx index 645a16602709..badad5b09675 100644 --- a/lotuswordpro/source/filter/lwpframelayout.cxx +++ b/lotuswordpro/source/filter/lwpframelayout.cxx @@ -816,29 +816,29 @@ void LwpFrameLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 nStart { if(m_pFrame) { - XFFrame* pXFFrame = nullptr; + rtl::Reference<XFFrame> xXFFrame; if(nEnd < nStart) { - pXFFrame = new XFFrame(); + xXFFrame.set(new XFFrame); } else { - pXFFrame = new XFFloatFrame(nStart, nEnd, bAll); + xXFFrame.set(new XFFloatFrame(nStart, nEnd, bAll)); } - m_pFrame->Parse(pXFFrame, nStart); + m_pFrame->Parse(xXFFrame.get(), nStart); //if it is a link frame, parse contents only once if(!HasPreviousLinkLayout()) { rtl::Reference<LwpObject> content = m_Content.obj(); if (content.is()) { - content->DoXFConvert(pXFFrame); + content->DoXFConvert(xXFFrame.get()); //set frame size according to ole size - ApplyGraphicSize(pXFFrame); + ApplyGraphicSize(xXFFrame.get()); } } - pCont ->Add(pXFFrame); + pCont->Add(xXFFrame.get()); } } /** |