[Libreoffice-commits] core.git: lotuswordpro/source

Caolán McNamara caolanm at redhat.com
Thu Jan 4 21:04:47 UTC 2018


 lotuswordpro/source/filter/lwpframelayout.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 56b754418c534153cb34bcc1de03cf7fd7724fd5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 4 10:30:17 2018 +0000

    ofz#4950 Direct-leak
    
    Change-Id: I231da98d9e7f9fefc25a454cb9c8e1f95215c364
    Reviewed-on: https://gerrit.libreoffice.org/47382
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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());
     }
 }
 


More information about the Libreoffice-commits mailing list