diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-03 15:29:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-03 19:53:44 +0100 |
commit | ce4ec0b80e9d181dcec64b749083254d61c85c69 (patch) | |
tree | aa85292119fe461aa2e984f988dddba180a5a5a2 | |
parent | 22effe2b8edf46539bde34497c6ac3201d70f5ed (diff) |
ofz#4919 Direct-leak
Change-Id: I476a8760578e2ee9b564903ef2f6a2ed5e702cff
Reviewed-on: https://gerrit.libreoffice.org/47326
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwplayout.cxx b/lotuswordpro/source/filter/lwplayout.cxx index 33301a77ab26..2d7c61a703df 100644 --- a/lotuswordpro/source/filter/lwplayout.cxx +++ b/lotuswordpro/source/filter/lwplayout.cxx @@ -1569,18 +1569,18 @@ XFColumns* LwpLayout::GetXFColumns() return nullptr; } - XFColumns* pColumns = new XFColumns(); + std::unique_ptr<XFColumns> xColumns(new XFColumns); //set XFColumnSep - std::unique_ptr<XFColumnSep> pColumnSep(GetColumnSep()); - if(pColumnSep) + std::unique_ptr<XFColumnSep> xColumnSep(GetColumnSep()); + if (xColumnSep) { - pColumns->SetSeparator(*pColumnSep); + xColumns->SetSeparator(*xColumnSep); } //set column count and column gap - pColumns->SetCount(nCols); + xColumns->SetCount(nCols); double fGap = GetColGap(0); - pColumns->SetGap(fGap); + xColumns->SetGap(fGap); //set xfcolumn for(sal_uInt16 nIndex = 0; nIndex<nCols; nIndex++) @@ -1600,10 +1600,10 @@ XFColumns* LwpLayout::GetXFColumns() { aColumn.SetMargins(nGap,0); } - pColumns->AddColumn(aColumn); + xColumns->AddColumn(aColumn); } - return pColumns; + return xColumns.release(); } /** |