sw/source/filter/ww8/rtfattributeoutput.cxx |    2 --
 1 file changed, 2 deletions(-)

New commits:
commit 37c6332432ce16192eaf292a4c6eb99806afae45
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Nov 27 20:27:17 2024 +0000
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Wed Dec 11 12:08:23 2024 +0100

    crashtesting: unbalanced rtf {} on inability to export a math object
    
    Seen in export of forum-mso-en-11772.docx to rtf and reimport
    
    so rtf cannot be imported, a problem probably since:
    
    commit c14355592ccc249500ca58b3607888db195b06c0
    CommitDate: Tue Dec 31 18:02:07 2013 +0100
    
        Related: fdo#66440 RTF export: handle NULL component in 
FlyFrameOLEMath()
    
    A problem with casting the uno proxy obj probably got fixed with:
    
    commit ef533553559fe09b4afab651fc692885d1acf4ed
    CommitDate: Wed Jan 4 13:49:58 2023 +0000
    
        Rudimentary support for dynamic_cast on UNO proxy objects
    
    At least now converting the original test case to rtf doesn't crash for
    me on export, and now uses "if (pBase)" to keep balanced and at least
    output a preview image if not the math text content.
    
    Change-Id: Ib428ab89fac6f36f1fa8e3bd7b3b01cd0a889d7e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177442
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit 50fec9db063edd2fdf63ca22277ef16b3727ca4c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177474
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>
    (cherry picked from commit df95540dec164c7de2bf1aa6b85269435023c040)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177538
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 3035e18cbd96..08b5d80a5d7d 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -4425,8 +4425,6 @@ bool RtfAttributeOutput::FlyFrameOLEMath(const 
SwFlyFrameFormat* pFlyFrameFormat
 
     m_aRunText->append("{" LO_STRING_SVTOOLS_RTF_MMATH " ");
     uno::Reference<util::XCloseable> xClosable = xObj->getComponent();
-    if (!xClosable.is())
-        return false;
     auto pBase = dynamic_cast<oox::FormulaImExportBase*>(xClosable.get());
     SAL_WARN_IF(!pBase, "sw.rtf", "Math OLE object cannot write out RTF");
     if (pBase)

Reply via email to