diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-28 20:53:34 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-02-28 20:53:34 +0000 |
commit | 26ea6d50b3f0f82d4035b367811f8edcc49ee23e (patch) | |
tree | 7c0c31a1db5ecfba3c6928caf631e067e7ff4a89 /lotuswordpro | |
parent | b018021d5a5e644f1d8aafd20432562621b33554 (diff) |
fix leak
Change-Id: Ia073517977648a21d7adb5ee4d7bda51b1b7db18
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpfootnote.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwpfootnote.cxx b/lotuswordpro/source/filter/lwpfootnote.cxx index b8ac3fd027f5..dbf35dbe5acb 100644 --- a/lotuswordpro/source/filter/lwpfootnote.cxx +++ b/lotuswordpro/source/filter/lwpfootnote.cxx @@ -103,28 +103,28 @@ void LwpFribFootnote::XFConvert(XFContentContainer* pCont) LwpFootnote* pFootnote = GetFootnote(); if(pFootnote) { - XFContentContainer* pContent = nullptr; + rtl::Reference<XFContentContainer> xContent; if(pFootnote->GetType() == FN_FOOTNOTE) { - pContent = new XFFootNote(); + xContent.set(new XFFootNote); } else { - pContent = new XFEndNote(); + xContent.set(new XFEndNote); } - pFootnote->XFConvert(pContent); - if(m_ModFlag) + pFootnote->XFConvert(xContent.get()); + if (m_ModFlag) { //set footnote number font style - XFTextSpan *pSpan = new XFTextSpan(); + XFTextSpan *pSpan = new XFTextSpan; pSpan->SetStyleName(GetStyleName()); //add the xffootnote into the content container - pSpan->Add(pContent); + pSpan->Add(xContent.get()); pCont->Add(pSpan); } else { - pCont->Add(pContent); + pCont->Add(xContent.get()); } } } |