From fcabb9a7263d4128ae934636b5a8eebc2a0217cc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 14 Apr 2020 12:39:50 +0200 Subject: loplugin:flatten in forms Change-Id: I7e264cc1e60280b80a4e2e87b8944de4912c563d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92162 Tested-by: Jenkins Reviewed-by: Noel Grandin --- forms/source/runtime/formoperations.cxx | 54 ++++++++++++++++----------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'forms/source/runtime') diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index 90208a556463..696616031f23 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -1022,39 +1022,39 @@ namespace frm impl_invalidateAllSupportedFeatures_nothrow( aGuard ); } - if ( m_xParser.is() && ( m_xCursor == _rEvent.Source ) ) + if ( !(m_xParser.is() && ( m_xCursor == _rEvent.Source )) ) + return; + + try { - try + OUString sNewValue; + _rEvent.NewValue >>= sNewValue; + if ( _rEvent.PropertyName == PROPERTY_ACTIVECOMMAND ) { - OUString sNewValue; - _rEvent.NewValue >>= sNewValue; - if ( _rEvent.PropertyName == PROPERTY_ACTIVECOMMAND ) - { - m_xParser->setElementaryQuery( sNewValue ); - } - else if ( _rEvent.PropertyName == PROPERTY_FILTER ) - { - if ( m_xParser->getFilter() != sNewValue ) - m_xParser->setFilter( sNewValue ); - } - else if ( _rEvent.PropertyName == PROPERTY_HAVINGCLAUSE ) - { - if ( m_xParser->getHavingClause() != sNewValue ) - m_xParser->setHavingClause( sNewValue ); - } - else if ( _rEvent.PropertyName == PROPERTY_SORT ) - { - _rEvent.NewValue >>= sNewValue; - if ( m_xParser->getOrder() != sNewValue ) - m_xParser->setOrder( sNewValue ); - } + m_xParser->setElementaryQuery( sNewValue ); } - catch( const Exception& ) + else if ( _rEvent.PropertyName == PROPERTY_FILTER ) { - OSL_FAIL( "FormOperations::propertyChange: caught an exception while updating the parser!" ); + if ( m_xParser->getFilter() != sNewValue ) + m_xParser->setFilter( sNewValue ); } - impl_invalidateAllSupportedFeatures_nothrow( aGuard ); + else if ( _rEvent.PropertyName == PROPERTY_HAVINGCLAUSE ) + { + if ( m_xParser->getHavingClause() != sNewValue ) + m_xParser->setHavingClause( sNewValue ); + } + else if ( _rEvent.PropertyName == PROPERTY_SORT ) + { + _rEvent.NewValue >>= sNewValue; + if ( m_xParser->getOrder() != sNewValue ) + m_xParser->setOrder( sNewValue ); + } + } + catch( const Exception& ) + { + OSL_FAIL( "FormOperations::propertyChange: caught an exception while updating the parser!" ); } + impl_invalidateAllSupportedFeatures_nothrow( aGuard ); } -- cgit