lotuswordpro/source/filter/lwpcelllayout.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
New commits: commit e7c960e233e4a7742a8359f6f4b3ae4a62e069ea Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 28 11:33:48 2017 +0000 fix leak Change-Id: Ic84035f68075733a6777a7447cb2be092f17a189 diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx index 6d87c39..1858788 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(); } } /**
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits