diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-14 12:39:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-14 13:33:20 +0200 |
commit | fcabb9a7263d4128ae934636b5a8eebc2a0217cc (patch) | |
tree | 28badfa7a81d578610f6abfc895d330f8a6437e4 /forms/source/runtime | |
parent | 600b35480da436b2683b720149b576e85c16aa84 (diff) |
loplugin:flatten in forms
Change-Id: I7e264cc1e60280b80a4e2e87b8944de4912c563d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92162
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms/source/runtime')
-rw-r--r-- | forms/source/runtime/formoperations.cxx | 54 |
1 files changed, 27 insertions, 27 deletions
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 ); } |