diff options
author | Noel Grandin <noel@peralex.com> | 2016-03-23 10:04:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-03-23 10:19:43 +0200 |
commit | aec2477b41ea09e914ff64965099d0cea1411ba7 (patch) | |
tree | e9c759a1bd17e4e04f2df6ad68b41e9c74dfe3ea /forms | |
parent | 73140c6f3485e3f221fe6f272c21104b8575e12c (diff) |
loplugin:constantparam in forms
Change-Id: Iebce160fd6c3de63ba179d747768fd4cf420baec
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/CheckBox.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 10 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.hxx | 2 | ||||
-rw-r--r-- | forms/source/component/RadioButton.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/refvaluecomponent.cxx | 18 | ||||
-rw-r--r-- | forms/source/component/refvaluecomponent.hxx | 5 | ||||
-rw-r--r-- | forms/source/helper/controlfeatureinterception.cxx | 6 | ||||
-rw-r--r-- | forms/source/inc/controlfeatureinterception.hxx | 2 |
8 files changed, 18 insertions, 29 deletions
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index cece340f6239..f28a76686367 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -60,7 +60,7 @@ css::uno::Sequence<OUString> SAL_CALL OCheckBoxControl::getSupportedServiceNames //= OCheckBoxModel OCheckBoxModel::OCheckBoxModel(const Reference<XComponentContext>& _rxFactory) - :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX, true ) + :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX ) // use the old control name for compytibility reasons { diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index bf1b7d1bf750..4245ff995aa9 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1448,7 +1448,7 @@ Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeEx } -void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount, bool bVetoable ) +void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount ) { // same as in getFastPropertyValue(sal_Int32) : if we're resetting currently don't fire any changes of the // IsModified property from sal_False to sal_True, as this is only temporary 'til the reset is done @@ -1474,15 +1474,15 @@ void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any --nCount; else { // split into two base class calls - OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues, nPos, bVetoable); + OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues, nPos, false/*bVetoable*/); ++nPos; - OPropertySetAggregationHelper::fire(pnHandles + nPos, pNewValues + nPos, pOldValues + nPos, nCount - nPos, bVetoable); + OPropertySetAggregationHelper::fire(pnHandles + nPos, pNewValues + nPos, pOldValues + nPos, nCount - nPos, false/*bVetoable*/); return; } } } - OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues, nCount, bVetoable); + OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues, nCount, false/*bVetoable*/); } @@ -2337,7 +2337,7 @@ void ODatabaseForm::_propertyChanged(const PropertyChangeEvent& evt) throw( Runt // the rowset changed its active connection itself (without interaction from our side), so // we need to fire this event, too sal_Int32 nHandle = PROPERTY_ID_ACTIVE_CONNECTION; - fire(&nHandle, &evt.NewValue, &evt.OldValue, 1, false); + fire(&nHandle, &evt.NewValue, &evt.OldValue, 1); } else // it was one of the statement relevant props { diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx index 48ca614e7c0b..f51f9993a75b 100644 --- a/forms/source/component/DatabaseForm.hxx +++ b/forms/source/component/DatabaseForm.hxx @@ -240,7 +240,7 @@ public: css::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - void fire( sal_Int32 * pnHandles, const css::uno::Any * pNewValues, const css::uno::Any * pOldValues, sal_Int32 nCount, bool bVetoable ); + void fire( sal_Int32 * pnHandles, const css::uno::Any * pNewValues, const css::uno::Any * pOldValues, sal_Int32 nCount ); // IPropertyBagHelperContext virtual ::osl::Mutex& getMutex() override; diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index 182dd898e024..567eb5c638e4 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -83,7 +83,7 @@ void SAL_CALL ORadioButtonControl::createPeer(const Reference<css::awt::XToolkit ORadioButtonModel::ORadioButtonModel(const Reference<XComponentContext>& _rxFactory) - :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON,true ) + :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON ) // use the old control name for compytibility reasons { diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx index c1d6ae81beec..66bc6dbabbe0 100644 --- a/forms/source/component/refvaluecomponent.cxx +++ b/forms/source/component/refvaluecomponent.cxx @@ -37,10 +37,9 @@ namespace frm //= - OReferenceValueComponent::OReferenceValueComponent( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, bool _bSupportNoCheckRefValue ) + OReferenceValueComponent::OReferenceValueComponent( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault ) :OBoundControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, false, true, true ) ,m_eDefaultChecked( TRISTATE_FALSE ) - ,m_bSupportSecondRefValue( _bSupportNoCheckRefValue ) { } @@ -51,7 +50,6 @@ namespace frm m_sReferenceValue = _pOriginal->m_sReferenceValue; m_sNoCheckReferenceValue = _pOriginal->m_sNoCheckReferenceValue; m_eDefaultChecked = _pOriginal->m_eDefaultChecked; - m_bSupportSecondRefValue = _pOriginal->m_bSupportSecondRefValue; calculateExternalValueType(); } @@ -77,7 +75,6 @@ namespace frm case PROPERTY_ID_DEFAULT_STATE: _rValue <<= (sal_Int16)m_eDefaultChecked; break; case PROPERTY_ID_UNCHECKED_REFVALUE: - OSL_ENSURE( m_bSupportSecondRefValue, "OReferenceValueComponent::getFastPropertyValue: not supported!" ); _rValue <<= m_sNoCheckReferenceValue; break; @@ -97,7 +94,6 @@ namespace frm break; case PROPERTY_ID_UNCHECKED_REFVALUE: - OSL_ENSURE( m_bSupportSecondRefValue, "OReferenceValueComponent::setFastPropertyValue_NoBroadcast: not supported!" ); OSL_VERIFY( _rValue >>= m_sNoCheckReferenceValue ); break; @@ -133,7 +129,6 @@ namespace frm break; case PROPERTY_ID_UNCHECKED_REFVALUE: - OSL_ENSURE( m_bSupportSecondRefValue, "OReferenceValueComponent::convertFastPropertyValue: not supported!" ); bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_sNoCheckReferenceValue ); break; @@ -157,13 +152,10 @@ namespace frm void OReferenceValueComponent::describeFixedProperties( Sequence< Property >& _rProps ) const { - BEGIN_DESCRIBE_PROPERTIES( m_bSupportSecondRefValue ? 3 : 2, OBoundControlModel ) + BEGIN_DESCRIBE_PROPERTIES( 3, OBoundControlModel ) DECL_PROP1( REFVALUE, OUString, BOUND ); DECL_PROP1( DEFAULT_STATE, sal_Int16, BOUND ); - if ( m_bSupportSecondRefValue ) - { - DECL_PROP1( UNCHECKED_REFVALUE, OUString, BOUND ); - } + DECL_PROP1( UNCHECKED_REFVALUE, OUString, BOUND ); END_DESCRIBE_PROPERTIES(); } @@ -197,7 +189,7 @@ namespace frm nState = TRISTATE_TRUE; else { - if ( !m_bSupportSecondRefValue || ( sExternalValue == m_sNoCheckReferenceValue ) ) + if ( sExternalValue == m_sNoCheckReferenceValue ) nState = TRISTATE_FALSE; else nState = TRISTATE_INDET; @@ -251,7 +243,7 @@ namespace frm } else if ( bStringExchange ) { - aExternalValue <<= (m_bSupportSecondRefValue ? m_sNoCheckReferenceValue : OUString()); + aExternalValue <<= m_sNoCheckReferenceValue; } break; } diff --git a/forms/source/component/refvaluecomponent.hxx b/forms/source/component/refvaluecomponent.hxx index e391702a659f..bedfc4f7c8c6 100644 --- a/forms/source/component/refvaluecomponent.hxx +++ b/forms/source/component/refvaluecomponent.hxx @@ -38,8 +38,6 @@ namespace frm ToggleState m_eDefaultChecked; // the default check state // </properties> - bool m_bSupportSecondRefValue; // do we support the SecondaryRefValue property? - protected: const OUString& getReferenceValue() const { return m_sReferenceValue; } void setReferenceValue( const OUString& _rRefValue ); @@ -53,8 +51,7 @@ namespace frm OReferenceValueComponent( const css::uno::Reference< css::uno::XComponentContext>& _rxFactory, const OUString& _rUnoControlModelTypeName, - const OUString& _rDefault, - bool _bSupportNoCheckRefValue = false + const OUString& _rDefault ); DECLARE_DEFAULT_CLONE_CTOR( OReferenceValueComponent ) virtual ~OReferenceValueComponent(); diff --git a/forms/source/helper/controlfeatureinterception.cxx b/forms/source/helper/controlfeatureinterception.cxx index bc3dd494afbe..4a3740f47f17 100644 --- a/forms/source/helper/controlfeatureinterception.cxx +++ b/forms/source/helper/controlfeatureinterception.cxx @@ -127,18 +127,18 @@ namespace frm } } - Reference< XDispatch > ControlFeatureInterception::queryDispatch( const URL& _rURL, const OUString& _rTargetFrameName, ::sal_Int32 _nSearchFlags ) + Reference< XDispatch > ControlFeatureInterception::queryDispatch( const URL& _rURL, const OUString& _rTargetFrameName ) { Reference< XDispatch > xDispatcher; if ( m_xFirstDispatchInterceptor.is() ) - xDispatcher = m_xFirstDispatchInterceptor->queryDispatch( _rURL, _rTargetFrameName, _nSearchFlags ); + xDispatcher = m_xFirstDispatchInterceptor->queryDispatch( _rURL, _rTargetFrameName, 0 ); return xDispatcher; } Reference< XDispatch > ControlFeatureInterception::queryDispatch( const URL& _rURL ) { - return queryDispatch( _rURL, OUString(), 0 ); + return queryDispatch( _rURL, OUString() ); } diff --git a/forms/source/inc/controlfeatureinterception.hxx b/forms/source/inc/controlfeatureinterception.hxx index 0ef9e90fc620..6c0097f9aa70 100644 --- a/forms/source/inc/controlfeatureinterception.hxx +++ b/forms/source/inc/controlfeatureinterception.hxx @@ -69,7 +69,7 @@ namespace frm /** queries the interceptor chain for the given dispatch */ css::uno::Reference< css::frame::XDispatch > - queryDispatch( const css::util::URL& _rURL, const OUString& _rTargetFrameName, ::sal_Int32 _nSearchFlags ); + queryDispatch( const css::util::URL& _rURL, const OUString& _rTargetFrameName ); /** queries the interceptor chain for the given dispatch, with a blank target frame and no frame search flags */ |