diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 20:54:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 22:38:34 +0100 |
commit | 5c90069d93ac45e359718a9186ff2366043f43ed (patch) | |
tree | 627c0dfc695b838e8b1b0173e118fa19a46d48a5 /sd | |
parent | 95ddc77f197124d1792ead85e81546b6fc68285f (diff) |
coverity#1326211 Unchecked dynamic_cast
Change-Id: I09892b8e17aacf32db51764d8fd766603a8542e1
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/navigatr.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index b390066e02a3..5af021c7227d 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -871,9 +871,8 @@ void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId, { if( eState >= SfxItemState::DEFAULT && nSId == SID_NAVIGATOR_STATE ) { - const SfxUInt32Item* pStateItem = dynamic_cast< const SfxUInt32Item* >( pItem ); - DBG_ASSERT( pStateItem, "SfxUInt16Item expected"); - sal_uInt32 nState = pStateItem->GetValue(); + const SfxUInt32Item& rStateItem = dynamic_cast<const SfxUInt32Item&>(*pItem); + sal_uInt32 nState = rStateItem.GetValue(); // pen if( nState & NAVBTN_PEN_DISABLED && @@ -955,9 +954,8 @@ void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId, NavDocInfo* pInfo = pNavigatorWin->GetDocInfo(); if( pInfo && pInfo->IsActive() ) { - const SfxStringItem* pStateItem = dynamic_cast<const SfxStringItem*>( pItem ); - DBG_ASSERT( pStateItem, "SfxStringItem expected"); - OUString aPageName = pStateItem->GetValue(); + const SfxStringItem& rStateItem = dynamic_cast<const SfxStringItem&>(*pItem); + OUString aPageName = rStateItem.GetValue(); if( !pNavigatorWin->maTlbObjects->HasSelectedChildren( aPageName ) ) { |