diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-01 13:22:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-03-01 13:24:45 +0000 |
commit | bb626853cbe59010537d35e9390f24963e149fe4 (patch) | |
tree | d69d0bb2e9fff714c7f059216cc6003d17fa1228 /lotuswordpro | |
parent | 01f28ca8c555cc8b6496d155ea466ed6b47ca32b (diff) |
fix leak
Change-Id: I61e21619e949fe0dda7c4820e6ddbb8d4d597652
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpdoc.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx index 3113776501ec..d83da250ddf6 100644 --- a/lotuswordpro/source/filter/lwpdoc.cxx +++ b/lotuswordpro/source/filter/lwpdoc.cxx @@ -719,23 +719,21 @@ sal_uInt16 LwpDocument::GetNumberOfPagesBefore() pDivision = pDivision->GetNextDivision(); } } - /** + + /** * @descr Parse the frame which anchor is to page before parse other contents, - * This method is called when the document is root document. + * This method is called when the document is root document. */ void LwpDocument::ParseFrameInPage(IXFStream * pOutputStream) { - if(IsChildDoc()) + if (IsChildDoc()) return; - XFContentContainer* pXFContainer = new XFContentContainer; - - XFConvertFrameInPage(pXFContainer); - - pXFContainer->ToXml(pOutputStream); - delete pXFContainer; - pXFContainer = nullptr; + rtl::Reference<XFContentContainer> xXFContainer(new XFContentContainer); + XFConvertFrameInPage(xXFContainer.get()); + xXFContainer->ToXml(pOutputStream); } + /** * @descr Parse the frame which anchor is to page in the entire document */ |