diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-04 10:26:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-04 15:13:25 +0100 |
commit | 0bd9ba0110b815abc375caf4ae0d5c91b90ae0c5 (patch) | |
tree | 25790c5fbdbeeec3cb48a927edd0295ab1eef601 /lotuswordpro | |
parent | a05ebbc59a40d95760fee8749e1daf3e4b1ed68c (diff) |
ofz#4949 Direct-leak
Change-Id: I7fbae09caff3b7bae2f921cbd89dee0f5b892c78
Reviewed-on: https://gerrit.libreoffice.org/47381
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpcelllayout.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx index 858f8ea22c0b..c6da43589aee 100644 --- a/lotuswordpro/source/filter/lwpcelllayout.cxx +++ b/lotuswordpro/source/filter/lwpcelllayout.cxx @@ -576,18 +576,18 @@ void LwpCellLayout::RegisterStyle() } // register cell style - XFCellStyle *pCellStyle = new XFCellStyle(); + std::unique_ptr<XFCellStyle> xCellStyle(new XFCellStyle); - ApplyPadding(pCellStyle); - ApplyBackGround(pCellStyle); - ApplyWatermark(pCellStyle); - ApplyFmtStyle(pCellStyle); - ApplyBorders(pCellStyle); + ApplyPadding(xCellStyle.get()); + ApplyBackGround(xCellStyle.get()); + ApplyWatermark(xCellStyle.get()); + ApplyFmtStyle(xCellStyle.get()); + ApplyBorders(xCellStyle.get()); - pCellStyle->SetAlignType(enumXFAlignNone, GetVerticalAlignmentType()); + xCellStyle->SetAlignType(enumXFAlignNone, GetVerticalAlignmentType()); XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); - m_StyleName = pXFStyleManager->AddStyle(pCellStyle).m_pStyle->GetStyleName(); + m_StyleName = pXFStyleManager->AddStyle(xCellStyle.release()).m_pStyle->GetStyleName(); // content object register styles rtl::Reference<LwpObject> pObj = m_Content.obj(); |