diff options
Diffstat (limited to 'sw/source/filter/ww8/docxexportfilter.cxx')
-rw-r--r-- | sw/source/filter/ww8/docxexportfilter.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx index fe6b8abdff29..c3859af0844a 100644 --- a/sw/source/filter/ww8/docxexportfilter.cxx +++ b/sw/source/filter/ww8/docxexportfilter.cxx @@ -62,21 +62,20 @@ bool DocxExportFilter::exportDocument() aPam.SetMark(); aPam.Move( fnMoveBackward, GoInDoc ); - SwPaM *pCurPam = new SwPaM( *aPam.End(), *aPam.Start() ); + std::unique_ptr<SwPaM> pCurPam( new SwPaM( *aPam.End(), *aPam.Start() ) ); // export the document // (in a separate block so that it's destructed before the commit) { - DocxExport aExport( this, pDoc, pCurPam, &aPam ); + DocxExport aExport( this, pDoc, pCurPam.get(), &aPam ); aExport.ExportDocument( true ); // FIXME support exporting selection only } commitStorage(); // delete the pCurPam - while ( pCurPam->GetNext() != pCurPam ) + while ( pCurPam->GetNext() != pCurPam.get() ) delete pCurPam->GetNext(); - delete pCurPam; return true; } |