summaryrefslogtreecommitdiff
path: root/svx/source/form
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/form')
-rw-r--r--svx/source/form/filtnav.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 37b37c8a1039..3a021f1070f4 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -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