[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 12 06:47:24 UTC 2020


 sw/source/filter/ww8/wrtw8nds.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 23839d6ba4b221e7438a98a20dd2023ac0c786e5
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Tue Nov 10 17:16:59 2020 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Nov 12 07:46:51 2020 +0100

    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.
    
    Change-Id: Ia636a6ffe8386e58e31e37c0d8afc283e6f2fc4d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105558
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    (cherry picked from commit b0b5812bc6b74369c7909313fcb7fd86c535aea3)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105536
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 4f3b98089658..30f06c8d5cce 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2252,7 +2252,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
             if ( pBox->IsFormulaOrValueBox() == RES_BOXATR_FORMULA &&
                  GetExportFormat() == MSWordExportBase::ExportFormat::DOCX )
             {
-                SwTableBoxFormula* pFormula = pBox->GetFrameFormat()->GetTableBoxFormula().Clone();
+                std::unique_ptr<SwTableBoxFormula> pFormula(pBox->GetFrameFormat()->GetTableBoxFormula().Clone());
                 pFormula->PtrToBoxNm( &pTableNode->GetTable() );
                 OutputField( nullptr, ww::eEquals, " = " + pFormula->GetFormula(),
                     FieldFlags::Start | FieldFlags::CmdStart | FieldFlags::CmdEnd | FieldFlags::Close );


More information about the Libreoffice-commits mailing list