[Libreoffice-commits] core.git: lotuswordpro/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 3 18:54:13 UTC 2018
lotuswordpro/source/filter/lwplayout.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit ce4ec0b80e9d181dcec64b749083254d61c85c69
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 3 15:29:01 2018 +0000
ofz#4919 Direct-leak
Change-Id: I476a8760578e2ee9b564903ef2f6a2ed5e702cff
Reviewed-on: https://gerrit.libreoffice.org/47326
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
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();
}
/**
More information about the Libreoffice-commits
mailing list