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

Caolán McNamara caolanm at redhat.com
Sun Aug 27 19:48:50 UTC 2017


 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 3c74c8be066945be4f0a6da61eaeb21b2b0681a5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Aug 27 13:41:52 2017 +0100

    coverity#1416667 Unchecked dynamic_cast
    
    Change-Id: I562f7b41da67b65609d3eb156f52e2fa0adc9fd4
    Reviewed-on: https://gerrit.libreoffice.org/41604
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 2efa7f189d0e..a8abe8489c57 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -604,6 +604,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf55427_footnote2endnote, "tdf55427_footnote2endno
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Endnote style is cyan3 color", sal_Int32(0x2BD0D2), getProperty< sal_Int32 >(xPageStyle, "CharColor") );
 
     SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+    CPPUNIT_ASSERT(pTextDoc);
     SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
     // The footnote numbering type of ARABIC will not transfer over when those footnotes are converted to endnotes.
     CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote numbering type", SVX_NUM_ARABIC, pDoc->GetFootnoteInfo().aFormat.GetNumberingType() );
commit 7e134b66ec74f53be52b3c2e371b5bb8ca0d3dfd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Aug 27 13:43:25 2017 +0100

    coverity#1416883 Useless call
    
    Change-Id: Icf2dae3e69a84368a69f954276286483e3714aa0
    Reviewed-on: https://gerrit.libreoffice.org/41605
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index ba35ee12fdc8..2efa7f189d0e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -951,12 +951,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf111964, "tdf111964.docx")
 DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark-shapetype.docx")
 {
     uno::Reference<drawing::XShape> xShape1(getShape(1), uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xShape1.is());
     uno::Reference<beans::XPropertySet> xPropertySet1(xShape1, uno::UNO_QUERY);
-    xShape1.is();
 
     uno::Reference<drawing::XShape> xShape2(getShape(2), uno::UNO_QUERY);
+    CPPUNIT_ASSERT(xShape2.is());
     uno::Reference<beans::XPropertySet> xPropertySet2(xShape2, uno::UNO_QUERY);
-    xShape2.is();
 
     CPPUNIT_ASSERT_EQUAL(xPropertySet1->getPropertyValue("TextAutoGrowHeight"), xPropertySet2->getPropertyValue("TextAutoGrowHeight"));
 }


More information about the Libreoffice-commits mailing list