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

coverity#1326210 Unchecked dynamic_cast

Change-Id: I729af592a74aff7c40a5ae5311d8c5aff2ddee04
üst 5c90069d
......@@ -260,18 +260,16 @@ void DbGridColumn::impl_toggleScriptManager_nothrow( bool _bAttach )
}
}
void DbGridColumn::UpdateFromField(const DbGridRow* pRow, const Reference< XNumberFormatter >& xFormatter)
{
if (m_pCell && dynamic_cast<const FmXFilterCell*>( m_pCell) != nullptr)
dynamic_cast<FmXFilterCell*>( m_pCell)->Update( );
if (FmXFilterCell* pCell = dynamic_cast<FmXFilterCell*>(m_pCell))
pCell->Update();
else if (pRow && pRow->IsValid() && m_nFieldPos >= 0 && m_pCell && pRow->HasField(m_nFieldPos))
{
dynamic_cast<FmXDataCell*>( m_pCell)->UpdateFromField( pRow->GetField( m_nFieldPos ).getColumn(), xFormatter );
dynamic_cast<FmXDataCell&>(*m_pCell).UpdateFromField( pRow->GetField( m_nFieldPos ).getColumn(), xFormatter );
}
}
bool DbGridColumn::Commit()
{
bool bResult = true;
......
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