diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-02 11:51:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-02 11:51:30 +0000 |
commit | d6ac6475a5f0304e0d9b770a5f8ec98f425e59b6 (patch) | |
tree | 79ed8b333344dc3faa14df4e322fb6bf31f2113c /lotuswordpro | |
parent | 7d2ec4c0136c054923947093e35f4ab074f2b550 (diff) |
fix leak
Change-Id: I01c7ebf10831a27eaab55c2082cbe0a0f28bda1f
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwptablelayout.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index f44544fc3eaa..67c299115803 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -381,25 +381,25 @@ void LwpSuperTableLayout::XFConvertFrame(XFContentContainer* pCont, sal_Int32 n { 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, static_cast<sal_uInt16>(nStart)); + m_pFrame->Parse(xXFFrame.get(), static_cast<sal_uInt16>(nStart)); //parse table, and add table to frame LwpTableLayout * pTableLayout = GetTableLayout(); if (pTableLayout) { - pTableLayout->XFConvert(pXFFrame); + pTableLayout->XFConvert(xXFFrame.get()); } //add frame to the container - pCont ->Add(pXFFrame); + pCont->Add(xXFFrame.get()); } } |