diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-27 15:05:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-27 15:05:44 +0000 |
commit | 299a1ef9f2197f253ac887bac46d6e0dcd0d6378 (patch) | |
tree | 45b7283fe381395a929a27197b49e0b4479cd48a | |
parent | 1866335fe6b59ce7943b6e5f934a3592ac81ae8a (diff) |
ofz: fix leak
Change-Id: I7f490335efef71b13aae66e9467cd74429509d7d
-rw-r--r-- | lotuswordpro/source/filter/lwpsilverbullet.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lotuswordpro/source/filter/lwpsilverbullet.cxx b/lotuswordpro/source/filter/lwpsilverbullet.cxx index 4446aedb6852..b837023128db 100644 --- a/lotuswordpro/source/filter/lwpsilverbullet.cxx +++ b/lotuswordpro/source/filter/lwpsilverbullet.cxx @@ -107,7 +107,7 @@ void LwpSilverBullet::Read() */ void LwpSilverBullet::RegisterStyle() { - XFListStyle* pListStyle = new XFListStyle(); + std::unique_ptr<XFListStyle> xListStyle(new XFListStyle()); XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager(); GetBulletPara(); @@ -146,11 +146,11 @@ void LwpSilverBullet::RegisterStyle() } //set numbering format into the style-list. - pListStyle->SetListNumber(nPos, aFmt, pParaNumber->GetStart()+1); + xListStyle->SetListNumber(nPos, aFmt, pParaNumber->GetStart()+1); if (bCumulative && nPos > 1) { - pListStyle->SetDisplayLevel(nPos, nDisplayLevel); + xListStyle->SetDisplayLevel(nPos, nDisplayLevel); } } @@ -166,18 +166,18 @@ void LwpSilverBullet::RegisterStyle() aSuffix = aParaNumbering.pSuffix->GetText(); } - pListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber), + xListStyle->SetListBullet(nPos, GetNumCharByStyleID(pParaNumber), "Times New Roman", aPrefix, aSuffix); } - pListStyle->SetListPosition(nPos, 0.0, 0.635, 0.0); + xListStyle->SetListPosition(nPos, 0.0, 0.635, 0.0); aParaNumbering.clear(); } } } //add style-list to style manager. - m_strStyleName = pXFStyleManager->AddStyle(pListStyle).m_pStyle->GetStyleName(); + m_strStyleName = pXFStyleManager->AddStyle(xListStyle.release()).m_pStyle->GetStyleName(); } /** |