summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-02-10 10:31:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-02-10 11:21:09 +0000
commit984875f8da5766bb0eaae5a1b9f11ccc4491d066 (patch)
tree1bb76aa842d48ee38bf6127c1bfa0b982114ec21
parenta434a8bfdd8b9323c8262edcd591641fe9ea8b19 (diff)
coverity#1130377 Unchecked dynamic_cast
Change-Id: I6cb816ec3de711f4faec0e9d676fa9e1127ad175
-rw-r--r--sw/source/core/txtnode/atrfld.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 7481b4a13584..32e400d1f237 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -161,7 +161,7 @@ void SwFmtFld::SetField(SwField * _pField)
mpField = _pField;
if ( GetField()->GetTyp()->Which() == RES_INPUTFLD )
{
- dynamic_cast<SwInputField* >(GetField())->SetFmtFld( *this );
+ static_cast<SwInputField* >(GetField())->SetFmtFld( *this );
}
Broadcast( SwFmtFldHint( this, SWFMTFLD_CHANGED ) );
}
@@ -238,8 +238,7 @@ void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
if( RES_GETREFFLD == GetField()->GetTyp()->Which() )
{
// #i81002#
-// ((SwGetRefField*)GetFld())->UpdateField();
- dynamic_cast<SwGetRefField*>(GetField())->UpdateField( mpTxtFld );
+ static_cast<SwGetRefField*>(GetField())->UpdateField( mpTxtFld );
}
break;
case RES_DOCPOS_UPDATE: