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

Caolán McNamara caolanm at redhat.com
Tue Feb 28 09:42:15 UTC 2017


 lotuswordpro/source/filter/lwppagelayout.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 14faa41bebc8147d45f9f392fd33fca08e7d1ba0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Feb 28 09:41:03 2017 +0000

    fix leak
    
    Change-Id: I195094adfd0a68401d26ef97b6489b105424b99b

diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx
index 8a10267..4fa01d2 100644
--- a/lotuswordpro/source/filter/lwppagelayout.cxx
+++ b/lotuswordpro/source/filter/lwppagelayout.cxx
@@ -1024,7 +1024,7 @@ void LwpFooterLayout::ParseBackColor(XFFooterStyle* pFooterStyle)
 
 void LwpFooterLayout::RegisterStyle(XFMasterPage* mp1)
 {
-    XFFooter* pFooter = new XFFooter();
+    std::unique_ptr<XFFooter> xFooter(new XFFooter());
     rtl::Reference<LwpObject> pStory = m_Content.obj(VO_STORY);
     //Call the RegisterStyle first to register the styles in footer paras, and then XFConvert()
     if(pStory.is())
@@ -1038,13 +1038,13 @@ void LwpFooterLayout::RegisterStyle(XFMasterPage* mp1)
         //register child layout style for framelayout,
         RegisterChildStyle();
 
-        pChangeMgr->SetHeadFootChange(pFooter);
+        pChangeMgr->SetHeadFootChange(xFooter.get());
 
-        pStory->DoXFConvert(pFooter);
+        pStory->DoXFConvert(xFooter.get());
 
         pChangeMgr->SetHeadFootFribMap(false);
     }
-    mp1->SetFooter(pFooter);
+    mp1->SetFooter(xFooter.release());
 }
 
 void LwpFooterLayout::ParseWaterMark(XFFooterStyle * pFooterStyle)


More information about the Libreoffice-commits mailing list