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

New commits:
commit 8b2330dcf350f653e61fc95f245fc6e360d13a73
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 10:46:22 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/+/177443
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 57a4bdf23147..5d50496eda59 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -4375,8 +4375,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