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

New commits:
commit 50fec9db063edd2fdf63ca22277ef16b3727ca4c
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Nov 27 20:27:17 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Nov 28 09:57:05 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>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 4f881ab90d84..3edc159ce2ae 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -4429,8 +4429,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