diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-05 10:40:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-05 17:39:50 +0200 |
commit | 6209fcbdc694ca0ef22f157d3f5c5b74ed8c76c8 (patch) | |
tree | 05743a37ba61af4281286c1c56cf8766c8caa860 /sw | |
parent | c3a4dacfa0aae3cf40aa7b123672c6bc197efe0f (diff) |
coverity#1414486 Unchecked dynamic_cast
and
coverity#1414482 Unchecked dynamic_cast
coverity#1414480 Unchecked dynamic_cast
coverity#1414479 Unchecked dynamic_cast
Change-Id: Ia33e4cfa5c13beeae5dfa46411f526433d87ea99
Reviewed-on: https://gerrit.libreoffice.org/39568
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/tiledrendering/tiledrendering.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 8bf0f359c288..1d5926c33a88 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -1740,8 +1740,9 @@ void checkUndoRepairStates(SwXTextDocument* pXTextDocument, SwView* pView1, SwVi // second view, undo conflict pView2->GetState(aItemSet2); CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, aItemSet2.GetItemState(SID_UNDO)); - CPPUNIT_ASSERT(dynamic_cast< const SfxUInt32Item * >(aItemSet2.GetItem(SID_UNDO))); - CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), dynamic_cast< const SfxUInt32Item * >(aItemSet2.GetItem(SID_UNDO))->GetValue()); + const SfxUInt32Item* pUInt32Item = dynamic_cast<const SfxUInt32Item*>(aItemSet2.GetItem(SID_UNDO)); + CPPUNIT_ASSERT(pUInt32Item); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), pUInt32Item->GetValue()); }; } |