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

New commits:
commit df95540dec164c7de2bf1aa6b85269435023c040
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Nov 27 20:27:17 2024 +0000
Commit:     Michael Stahl <[email protected]>
CommitDate: Fri Nov 29 11:24:41 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 <[email protected]>
    (cherry picked from commit 50fec9db063edd2fdf63ca22277ef16b3727ca4c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177474
    Reviewed-by: Michael Stahl <[email protected]>

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx 
b/sw/source/filter/ww8/rtfattributeoutput.cxx
index c8751574b04f..bcf1aedba7bb 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -4424,8 +4424,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