lotuswordpro/source/filter/lwpdoc.cxx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-)
New commits: commit bb626853cbe59010537d35e9390f24963e149fe4 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Mar 1 13:22:54 2017 +0000 fix leak Change-Id: I61e21619e949fe0dda7c4820e6ddbb8d4d597652 diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx index 3113776..d83da25 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 */
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits