diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-27 15:32:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-27 15:32:28 +0000 |
commit | aee31a4e8fa6c6f49f70945c5675085d938651ef (patch) | |
tree | c85f26b9e760e6fdb27a98fc4545e4ec6bd0fb92 /lotuswordpro | |
parent | 299a1ef9f2197f253ac887bac46d6e0dcd0d6378 (diff) |
ofz: fix leak
Change-Id: I682b4e2750658efded5f4167d4f7026ed5fac8dc
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwppagelayout.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index 2d95ac70a288..078ea71bb373 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -919,23 +919,21 @@ void LwpFooterLayout::Read() void LwpFooterLayout::RegisterStyle(XFPageMaster* pm1) { - XFFooterStyle* pFooterStyle = new XFFooterStyle(); + std::unique_ptr<XFFooterStyle> xFooterStyle(new XFFooterStyle()); //Modify page bottom margin //page bottom margin: from bottom of footer to the bottom edge double bottom = GetMarginsValue(MARGIN_BOTTOM); pm1->SetMargins(-1, -1, -1, bottom); - ParseMargins(pFooterStyle); - ParseBorder(pFooterStyle); - ParseShadow(pFooterStyle); - ParseBackGround(pFooterStyle); -// ParseBackColor(pFooterStyle); + ParseMargins(xFooterStyle.get()); + ParseBorder(xFooterStyle.get()); + ParseShadow(xFooterStyle.get()); + ParseBackGround(xFooterStyle.get()); - ParseWaterMark(pFooterStyle); - //End by + ParseWaterMark(xFooterStyle.get()); - pm1->SetFooterStyle(pFooterStyle); + pm1->SetFooterStyle(xFooterStyle.release()); } void LwpFooterLayout::ParseMargins(XFFooterStyle* pFooterStyle) |