diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-28 11:33:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-28 11:33:48 +0000 |
commit | e7c960e233e4a7742a8359f6f4b3ae4a62e069ea (patch) | |
tree | 0620a2498ed33428f98eee9b3d31c437b27e9121 /lotuswordpro | |
parent | 390b7ffbc9c0fd2a846bb0a60883b450d6124fd8 (diff) |
fix leak
Change-Id: Ic84035f68075733a6777a7447cb2be092f17a189
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 6d87c39ad9cf..18587889d9d6 100644 --- a/lotuswordpro/source/filter/lwpcelllayout.cxx +++ b/lotuswordpro/source/filter/lwpcelllayout.cxx @@ -510,13 +510,13 @@ void LwpCellLayout::RegisterDefaultCell() for (sal_uInt16 eLoop = enumWholeBorder; eLoop < enumCellBorderTopLimit; eLoop++) { // register cell style - XFCellStyle *pCellStyle = new XFCellStyle(); + std::unique_ptr<XFCellStyle> xCellStyle(new XFCellStyle()); - ApplyPadding(pCellStyle); - ApplyBackColor(pCellStyle); - ApplyWatermark(pCellStyle); - ApplyFmtStyle(pCellStyle); - pCellStyle->SetAlignType(enumXFAlignNone, GetVerticalAlignmentType()); + ApplyPadding(xCellStyle.get()); + ApplyBackColor(xCellStyle.get()); + ApplyWatermark(xCellStyle.get()); + ApplyFmtStyle(xCellStyle.get()); + xCellStyle->SetAlignType(enumXFAlignNone, GetVerticalAlignmentType()); XFBorders * pBorders = GetXFBorders(); if (pBorders) @@ -554,9 +554,9 @@ void LwpCellLayout::RegisterDefaultCell() default: assert(false); } - pCellStyle->SetBorders(pBorders); + xCellStyle->SetBorders(pBorders); } - m_CellStyleNames[eLoop] = (pXFStyleManager->AddStyle(pCellStyle)).m_pStyle->GetStyleName(); + m_CellStyleNames[eLoop] = (pXFStyleManager->AddStyle(xCellStyle.release())).m_pStyle->GetStyleName(); } } /** |