From f5fae0f97b494cce5fef92b567f62f15e423fa01 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 24 Jul 2017 08:13:41 +0100 Subject: coverity#1411569 Unchecked dynamic_cast Change-Id: I87521de07e18ea56c49083576e5de56023e45aa4 --- sw/qa/extras/tiledrendering/tiledrendering.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sw/qa/extras/tiledrendering') diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index b33e8ea42206..e3541c4898c7 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -1796,8 +1796,9 @@ void SwTiledRenderingTest::testDisableUndoRepair() // first view, undo conflict pView1->GetState(aItemSet1); CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, aItemSet1.GetItemState(SID_UNDO)); - CPPUNIT_ASSERT(dynamic_cast< const SfxUInt32Item * >(aItemSet1.GetItem(SID_UNDO))); - CPPUNIT_ASSERT_EQUAL(static_cast(SID_REPAIRPACKAGE), dynamic_cast< const SfxUInt32Item * >(aItemSet1.GetItem(SID_UNDO))->GetValue()); + const SfxUInt32Item* pUInt32Item = dynamic_cast(aItemSet1.GetItem(SID_UNDO)); + CPPUNIT_ASSERT(pUInt32Item); + CPPUNIT_ASSERT_EQUAL(static_cast(SID_REPAIRPACKAGE), pUInt32Item->GetValue()); } // Insert a character in the first view. -- cgit