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

Caolán McNamara caolanm at redhat.com
Wed Jan 3 19:44:32 UTC 2018


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

New commits:
commit 3071ba2af0d50b450975a01789fb1222c4f1ca7f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Jan 3 15:35:46 2018 +0000

    ofz#4917 Direct-leak
    
    Change-Id: Ia8fdd63e1944055a264549b1ff2272b02f32ef42
    Reviewed-on: https://gerrit.libreoffice.org/47327
    Tested-by: Jenkins <ci at libreoffice.org>
    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 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());
     }
 }
 /**


More information about the Libreoffice-commits mailing list