[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Thu Mar 2 11:53:18 UTC 2017
lotuswordpro/source/filter/lwptablelayout.cxx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit d6ac6475a5f0304e0d9b770a5f8ec98f425e59b6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 2 11:51:30 2017 +0000
fix leak
Change-Id: I01c7ebf10831a27eaab55c2082cbe0a0f28bda1f
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx
index f44544f..67c2991 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());
}
}
More information about the Libreoffice-commits
mailing list