diff options
author | László Németh <nemeth@numbertext.org> | 2020-11-10 17:16:59 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-11-11 14:28:37 +0100 |
commit | 024a39100f7d19505886c4dafd9fba4948b86b52 (patch) | |
tree | 4422d55b385522c48561f45e6cf8f76f27b3c44a /sw | |
parent | 5c01715ad63ff850e1094a1d2536cea71690dbc8 (diff) |
DOCX: fix memory leak of cell formula export
clean-up of commit cf596c43315bb96b5e7256a82256f1ccb8c9c4d0
(tdf#133163 DOCX: export formula cell).
The problem was reported by Miklós Vajna.
(cherry picked from commit b0b5812bc6b74369c7909313fcb7fd86c535aea3)
Conflicts:
sw/source/filter/ww8/wrtw8nds.cxx
Change-Id: Ia636a6ffe8386e58e31e37c0d8afc283e6f2fc4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105580
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 2f6ff3c14cef..2d31a2f52aed 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2255,7 +2255,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode ) if ( pBox->IsFormulaOrValueBox() == RES_BOXATR_FORMULA && GetExportFormat() == MSWordExportBase::ExportFormat::DOCX ) { - auto pFormula = static_cast<SwTableBoxFormula*>(pBox->GetFrameFormat()->GetTableBoxFormula().Clone()); + std::unique_ptr<SwTableBoxFormula> pFormula(static_cast<SwTableBoxFormula*>(pBox->GetFrameFormat()->GetTableBoxFormula().Clone())); pFormula->PtrToBoxNm( &pTableNode->GetTable() ); OutputField( nullptr, ww::eEquals, " = " + pFormula->GetFormula(), FieldFlags::Start | FieldFlags::CmdStart | FieldFlags::CmdEnd | FieldFlags::Close ); |