summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-01 00:25:16 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-01 00:49:12 +0200
commit85456fae54029edd26df2277a9eec5e2fe3d9739 (patch)
treefd55ad48b34c66f0b839edcbc952a8a5a0752c72 /editeng
parenttdf#124362 hide Addressbook button in Online (diff)
downloadcore-85456fae54029edd26df2277a9eec5e2fe3d9739.tar.gz
core-85456fae54029edd26df2277a9eec5e2fe3d9739.zip
tdf#120703 PVS: Silence V522 warnings
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie617b41a8f8d334022cf5313b242a236baedba48 Reviewed-on: https://gerrit.libreoffice.org/70017 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/qa/unit/core-test.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 020a5a32d7aa..b5369c2e0603 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -617,6 +617,7 @@ void Test::testHyperlinkCopyPaste()
CPPUNIT_ASSERT_EQUAL( sal_Int32(13), aURLFieldInfo1.aPosition.nIndex );
CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aURLFieldInfo1.pFieldItem->Which() );
SvxURLField* pURLField1 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aURLFieldInfo1.pFieldItem->GetField()) );
+ CPPUNIT_ASSERT(pURLField1);
CPPUNIT_ASSERT_EQUAL( aURL1, pURLField1->GetURL() );
CPPUNIT_ASSERT_EQUAL( aRepres1, pURLField1->GetRepresentation() );
@@ -625,6 +626,7 @@ void Test::testHyperlinkCopyPaste()
CPPUNIT_ASSERT_EQUAL( sal_Int32(21), aURLFieldInfo2.aPosition.nIndex );
CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aURLFieldInfo2.pFieldItem->Which() );
SvxURLField* pURLField2 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aURLFieldInfo2.pFieldItem->GetField()) );
+ CPPUNIT_ASSERT(pURLField2);
CPPUNIT_ASSERT_EQUAL( aURL2, pURLField2->GetURL() );
CPPUNIT_ASSERT_EQUAL( aRepres2, pURLField2->GetRepresentation() );
@@ -652,6 +654,7 @@ void Test::testHyperlinkCopyPaste()
CPPUNIT_ASSERT_EQUAL( sal_Int32(13), aACPURLFieldInfo1.aPosition.nIndex );
CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aACPURLFieldInfo1.pFieldItem->Which() );
SvxURLField* pACPURLField1 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aACPURLFieldInfo1.pFieldItem->GetField()) );
+ CPPUNIT_ASSERT(pACPURLField1);
CPPUNIT_ASSERT_EQUAL( aURL1, pACPURLField1->GetURL() );
CPPUNIT_ASSERT_EQUAL( aRepres1, pACPURLField1->GetRepresentation() );
@@ -660,6 +663,7 @@ void Test::testHyperlinkCopyPaste()
CPPUNIT_ASSERT_EQUAL( sal_Int32(21), aACPURLFieldInfo2.aPosition.nIndex );
CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aACPURLFieldInfo2.pFieldItem->Which() );
SvxURLField* pACPURLField2 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aACPURLFieldInfo2.pFieldItem->GetField()) );
+ CPPUNIT_ASSERT(pACPURLField2);
CPPUNIT_ASSERT_EQUAL( aURL2, pACPURLField2->GetURL() );
CPPUNIT_ASSERT_EQUAL( aRepres2, pACPURLField2->GetRepresentation() ) ;
@@ -668,6 +672,7 @@ void Test::testHyperlinkCopyPaste()
CPPUNIT_ASSERT_EQUAL( sal_Int32(38), aACPURLFieldInfo3.aPosition.nIndex );
CPPUNIT_ASSERT_EQUAL( sal_uInt16(EE_FEATURE_FIELD), aACPURLFieldInfo3.pFieldItem->Which() );
SvxURLField* pACPURLField3 = dynamic_cast<SvxURLField*> ( const_cast<SvxFieldData*> (aACPURLFieldInfo3.pFieldItem->GetField()) );
+ CPPUNIT_ASSERT(pACPURLField3);
CPPUNIT_ASSERT_EQUAL( aURL1, pACPURLField3->GetURL() );
CPPUNIT_ASSERT_EQUAL( aRepres1, pACPURLField3->GetRepresentation() );
}