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

coverity#735864 Unchecked dynamic_cast

Change-Id: I669ffab93976a61321f471586256fb52c9bd3451
üst 72dff798
......@@ -424,8 +424,9 @@ void FmFilterAdapter::predicateExpressionChanged( const FilterEvent& _Event ) th
const sal_Int32 nActiveTerm( xFilterController->getActiveTerm() );
FmFilterItems* pFilter = dynamic_cast<FmFilterItems*>( pFormItem->GetChildren()[ nActiveTerm ] );
FmFilterItem* pFilterItem = pFilter->Find( _Event.FilterComponent );
FmFilterData* pData = pFormItem->GetChildren()[nActiveTerm];
FmFilterItems& rFilter = dynamic_cast<FmFilterItems&>(*pData);
FmFilterItem* pFilterItem = rFilter.Find( _Event.FilterComponent );
if ( pFilterItem )
{
if ( !_Event.PredicateExpression.isEmpty())
......@@ -446,8 +447,8 @@ void FmFilterAdapter::predicateExpressionChanged( const FilterEvent& _Event ) th
// searching the component by field name
OUString aFieldName( lcl_getLabelName_nothrow( xFilterController->getFilterComponent( _Event.FilterComponent ) ) );
pFilterItem = new FmFilterItem( pFilter, aFieldName, _Event.PredicateExpression, _Event.FilterComponent );
m_pModel->Insert(pFilter->GetChildren().end(), pFilterItem);
pFilterItem = new FmFilterItem(&rFilter, aFieldName, _Event.PredicateExpression, _Event.FilterComponent);
m_pModel->Insert(rFilter.GetChildren().end(), pFilterItem);
}
// ensure there's one empty term in the filter, just in case the active term was previously empty
......
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