diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-28 09:41:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-28 09:41:03 +0000 |
commit | 14faa41bebc8147d45f9f392fd33fca08e7d1ba0 (patch) | |
tree | b80ac70f42ff1955e5d78728787a1b945fbe2964 /lotuswordpro | |
parent | 5ae0cb5618e53401da8ba3cec24ab3bf8ad24b05 (diff) |
fix leak
Change-Id: I195094adfd0a68401d26ef97b6489b105424b99b
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwppagelayout.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index 8a10267282ba..4fa01d2f936f 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) |