diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-28 10:19:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-28 10:19:37 +0000 |
commit | 328d26a17b9ea3243ed0ae96384acc08d7fea0c0 (patch) | |
tree | 478ac717e9f076c00340c391c211bc481666276b /lotuswordpro | |
parent | new loplugin unoany (diff) | |
download | core-328d26a17b9ea3243ed0ae96384acc08d7fea0c0.tar.gz core-328d26a17b9ea3243ed0ae96384acc08d7fea0c0.zip |
fix leak
Change-Id: I88e652fa2eab8738d0e1a235cf1a3f9066bfc230
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwppagelayout.cxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwppagelayout.cxx b/lotuswordpro/source/filter/lwppagelayout.cxx index 4fa01d2f936f..bdb99af8077a 100644 --- a/lotuswordpro/source/filter/lwppagelayout.cxx +++ b/lotuswordpro/source/filter/lwppagelayout.cxx @@ -754,23 +754,22 @@ void LwpHeaderLayout::Read() void LwpHeaderLayout::RegisterStyle(XFPageMaster* pm1) { - XFHeaderStyle* pHeaderStyle = new XFHeaderStyle(); + std::unique_ptr<XFHeaderStyle> xHeaderStyle(new XFHeaderStyle()); //Modify page top margin //page top marging: from top of header to the top edge double top = GetMarginsValue(MARGIN_TOP); pm1->SetMargins(-1, -1, top, -1); - ParseMargins(pHeaderStyle); - ParseBorder(pHeaderStyle); - ParseShadow(pHeaderStyle); -// ParseBackColor(pHeaderStyle); - ParseBackGround(pHeaderStyle); + ParseMargins(xHeaderStyle.get()); + ParseBorder(xHeaderStyle.get()); + ParseShadow(xHeaderStyle.get()); + ParseBackGround(xHeaderStyle.get()); - ParseWaterMark(pHeaderStyle); + ParseWaterMark(xHeaderStyle.get()); //End by - pm1->SetHeaderStyle(pHeaderStyle); + pm1->SetHeaderStyle(xHeaderStyle.release()); } void LwpHeaderLayout::ParseMargins(XFHeaderStyle* ph1) |