diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-04 10:30:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-04 22:04:15 +0100 |
commit | 56b754418c534153cb34bcc1de03cf7fd7724fd5 (patch) | |
tree | 631fcd05bc108e1be696c3089282e19c52c98f7d /lotuswordpro | |
parent | e26f2f3367d6bd44fda9a4c5ca2faeb7359bcb97 (diff) |
ofz#4950 Direct-leak
Change-Id: I231da98d9e7f9fefc25a454cb9c8e1f95215c364
Reviewed-on: https://gerrit.libreoffice.org/47382
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 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx index badad5b09675..12e1a7afe86b 100644 --- a/lotuswordpro/source/filter/lwpframelayout.cxx +++ b/lotuswordpro/source/filter/lwpframelayout.cxx @@ -1086,28 +1086,28 @@ void LwpGroupLayout::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); //add child frame into group LwpVirtualLayout* pLayout = dynamic_cast<LwpVirtualLayout*>(GetChildHead().obj().get()); while (pLayout && pLayout != this) { - pLayout->DoXFConvert(pXFFrame); + pLayout->DoXFConvert(xXFFrame.get()); pLayout = dynamic_cast<LwpVirtualLayout*>(pLayout->GetNext().obj().get()); } - pCont ->Add(pXFFrame); + pCont->Add(xXFFrame.get()); } } |