[Libreoffice-commits] core.git: 2 commits - sw/source

Miklos Vajna vmiklos at collabora.co.uk
Sun Mar 30 07:44:36 PDT 2014


 sw/source/filter/ww8/docxattributeoutput.cxx |    3 ++-
 sw/source/filter/ww8/rtfattributeoutput.cxx  |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit c2ed5f000efafdababa5aa2caa47b159b33ef65c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sun Mar 30 16:27:52 2014 +0200

    coverity#735942 Unchecked dynamic_cast
    
    Change-Id: Id508e771b0f117437671f40060c68122a408e386

diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 2074a06..97749ff 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3679,7 +3679,8 @@ bool RtfAttributeOutput::FlyFrameOLEMath(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENod
     oox::FormulaExportBase* pBase = dynamic_cast<oox::FormulaExportBase*>(dynamic_cast<SfxBaseModel*>(xClosable.get()));
     assert( pBase != NULL );
     OStringBuffer aBuf;
-    pBase->writeFormulaRtf(aBuf, m_rExport.eCurrentEncoding);
+    if (pBase)
+        pBase->writeFormulaRtf(aBuf, m_rExport.eCurrentEncoding);
     m_aRunText->append(aBuf.makeStringAndClear());
     // Replacement graphic.
     m_aRunText->append("{" LO_STRING_SVTOOLS_RTF_MMATHPICT " ");
commit 1ad901464afa29c96682bde59a12f864fccd525a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Sun Mar 30 16:26:50 2014 +0200

    coverity#735940 Unchecked dynamic_cast
    
    Change-Id: Ic5acb9afd69dda3fc630a438324ef692950ff2de

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index a425ae0..15874e3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3729,7 +3729,8 @@ void DocxAttributeOutput::WritePostponedMath()
 // to RTLD_GLOBAL, so most probably a gcc bug.
     oox::FormulaExportBase* formulaexport = dynamic_cast<oox::FormulaExportBase*>(dynamic_cast<SfxBaseModel*>(xInterface.get()));
     assert( formulaexport != NULL );
-    formulaexport->writeFormulaOoxml( m_pSerializer, GetExport().GetFilter().getVersion());
+    if (formulaexport)
+        formulaexport->writeFormulaOoxml( m_pSerializer, GetExport().GetFilter().getVersion());
     m_postponedMath = NULL;
 }
 


More information about the Libreoffice-commits mailing list