Kaydet (Commit) 984875f8 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1130377 Unchecked dynamic_cast

Change-Id: I6cb816ec3de711f4faec0e9d676fa9e1127ad175
üst a434a8bf
...@@ -161,7 +161,7 @@ void SwFmtFld::SetField(SwField * _pField) ...@@ -161,7 +161,7 @@ void SwFmtFld::SetField(SwField * _pField)
mpField = _pField; mpField = _pField;
if ( GetField()->GetTyp()->Which() == RES_INPUTFLD ) if ( GetField()->GetTyp()->Which() == RES_INPUTFLD )
{ {
dynamic_cast<SwInputField* >(GetField())->SetFmtFld( *this ); static_cast<SwInputField* >(GetField())->SetFmtFld( *this );
} }
Broadcast( SwFmtFldHint( this, SWFMTFLD_CHANGED ) ); Broadcast( SwFmtFldHint( this, SWFMTFLD_CHANGED ) );
} }
...@@ -238,8 +238,7 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) ...@@ -238,8 +238,7 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if( RES_GETREFFLD == GetField()->GetTyp()->Which() ) if( RES_GETREFFLD == GetField()->GetTyp()->Which() )
{ {
// #i81002# // #i81002#
// ((SwGetRefField*)GetFld())->UpdateField(); static_cast<SwGetRefField*>(GetField())->UpdateField( mpTxtFld );
dynamic_cast<SwGetRefField*>(GetField())->UpdateField( mpTxtFld );
} }
break; break;
case RES_DOCPOS_UPDATE: case RES_DOCPOS_UPDATE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment