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

Caolán McNamara caolanm at redhat.com
Wed Jun 20 07:56:53 UTC 2018


 sw/qa/extras/ww8export/ww8export2.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 34a11c40fbc1bf8f55df29c17227981206cf2426
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jun 19 16:34:29 2018 +0100

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

diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index c982009b44cc..66b9a02612ef 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -308,10 +308,11 @@ DECLARE_WW8EXPORT_TEST(testTdf111480, "tdf111480.doc")
 DECLARE_WW8EXPORT_TEST(testTdf70838, "tdf70838.odt")
 {
     SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+    CPPUNIT_ASSERT(pTextDoc);
     SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
     SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
     tools::Rectangle aRect = pPage->GetObj(0)->GetSnapRect();
-    CPPUNIT_ASSERT( aRect.GetHeight() > aRect.GetWidth() );
+    CPPUNIT_ASSERT(aRect.GetHeight() > aRect.GetWidth());
 }
 
 DECLARE_WW8EXPORT_TEST( testActiveXCheckbox, "checkbox_control.odt" )


More information about the Libreoffice-commits mailing list