diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-24 09:58:49 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-24 10:31:18 +0200 |
commit | d772b9bdc442c767fe99da74df375e5ecf6c8454 (patch) | |
tree | 09c605059d340df4a9129fb432b6f4598e1f2e61 /forms | |
parent | c3dc46723234c3fd5101a26ff374e59140997582 (diff) |
loplugin:constantfunction: forms
Change-Id: Icb1b4bb3fd73b54378b77fbaa6c41c3a0f03706a
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 1 | ||||
-rw-r--r-- | forms/source/component/Filter.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/FormComponent.cxx | 12 | ||||
-rw-r--r-- | forms/source/inc/FormComponent.hxx | 8 | ||||
-rw-r--r-- | forms/source/richtext/richtextcontrol.cxx | 3 | ||||
-rw-r--r-- | forms/source/solar/component/navbarcontrol.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/datatypes.cxx | 31 | ||||
-rw-r--r-- | forms/source/xforms/datatypes.hxx | 18 |
8 files changed, 19 insertions, 58 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 6bb799181c28..ed8e1d28a8ea 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1309,7 +1309,6 @@ void ODatabaseForm::disposing() EventObject aEvt(static_cast<XWeak*>(this)); m_aLoadListeners.disposeAndClear(aEvt); m_aRowSetApproveListeners.disposeAndClear(aEvt); - m_aParameterManager.disposing( aEvt ); m_aResetListeners.disposing(); m_aSubmitListeners.disposeAndClear(aEvt); m_aErrorListeners.disposeAndClear(aEvt); diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index 87ed175e40f0..016ac7051c8d 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -236,8 +236,6 @@ namespace frm break; } - OControl::initFormControlPeer( getPeer() ); - // filter controls are _never_ readonly Reference< XPropertySet > xModel( getModel(), UNO_QUERY_THROW ); Reference< XPropertySetInfo > xModelPSI( xModel->getPropertySetInfo(), UNO_SET_THROW ); diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 662aec432ba4..ca893dae1def 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -194,11 +194,6 @@ Sequence<Type> OControl::_getTypes() return TypeBag( OComponentHelper::getTypes(), OControl_BASE::getTypes() ).getTypes(); } -void OControl::initFormControlPeer( const Reference< XWindowPeer >& /*_rxPeer*/ ) -{ - // nothing to do here -} - // OComponentHelper void OControl::disposing() { @@ -289,7 +284,6 @@ void SAL_CALL OControl::createPeer(const Reference<XToolkit>& _rxToolkit, const if ( m_xControl.is() ) { m_xControl->createPeer( _rxToolkit, _rxParent ); - initFormControlPeer( getPeer() ); impl_resetStateGuard_nothrow(); } } @@ -2221,10 +2215,6 @@ void OBoundControlModel::onConnectedExternalValue( ) calculateExternalValueType(); } -void OBoundControlModel::onDisconnectedExternalValue( ) -{ -} - void OBoundControlModel::onConnectedDbColumn( const Reference< XInterface >& /*_rxForm*/ ) { OSL_PRECOND( !hasExternalValueBinding(), "OBoundControlModel::onConnectedDbColumn: how this? There's an external value binding!" ); @@ -2505,8 +2495,6 @@ void OBoundControlModel::disconnectExternalValueBinding( ) // re-connect to database column of the new parent if ( m_xAmbientForm.is() && m_xAmbientForm->isLoaded() ) impl_connectDatabaseColumn_noNotify( false ); - // tell the derivee - onDisconnectedExternalValue(); } void SAL_CALL OBoundControlModel::setValueBinding( const Reference< XValueBinding >& _rxBinding ) throw (IncompatibleTypesException, RuntimeException, std::exception) diff --git a/forms/source/inc/FormComponent.hxx b/forms/source/inc/FormComponent.hxx index abf8956ae772..ecaffb92cb14 100644 --- a/forms/source/inc/FormComponent.hxx +++ b/forms/source/inc/FormComponent.hxx @@ -197,11 +197,6 @@ public: const bool _bSetDelegator = true ); - /** initializes the given peer with various settings necessary for form controls - */ - static void initFormControlPeer( - const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& _rxPeer ); - protected: virtual ~OControl(); @@ -914,9 +909,6 @@ protected: @see m_xExternalBinding */ virtual void onConnectedExternalValue( ); - /** called whenever a connection to an external supplier of values (XValueBinding) has been suspended - */ - void onDisconnectedExternalValue(); /** called whenever an external validator has been registered */ diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 87af6fc4df0b..76372c341660 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -179,7 +179,6 @@ namespace frm if ( !bReallyActAsRichText ) { UnoEditControl::createPeer( _rToolkit, _rParentPeer ); - OControl::initFormControlPeer( getPeer() ); return; } @@ -232,8 +231,6 @@ namespace frm } mbCreatingPeer = false; - - OControl::initFormControlPeer( getPeer() ); } } diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index e76cce47cf93..92db4965bcf0 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -160,8 +160,6 @@ namespace frm peerCreated(); mbCreatingPeer = false; - - OControl::initFormControlPeer( getPeer() ); } } diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx index 2bc451044768..f3a156c3bcea 100644 --- a/forms/source/xforms/datatypes.cxx +++ b/forms/source/xforms/datatypes.cxx @@ -605,14 +605,15 @@ namespace xforms { } - - IMPLEMENT_DEFAULT_CLONING( OBooleanType, OBooleanType_Base ) - - - void OBooleanType::initializeTypedClone( const OBooleanType& /*_rCloneSource*/ ) + OXSDDataType* OBooleanType::createClone( const OUString& _rName ) const { + return new OBooleanType( _rName ); } + void OBooleanType::initializeClone( const OXSDDataType& _rCloneSource ) + { + OBooleanType_Base::initializeClone( _rCloneSource ); + } sal_uInt16 OBooleanType::_validate( const OUString& sValue ) { @@ -737,12 +738,15 @@ namespace xforms :classname##_Base( _rName, DataTypeClass::typeclass ) \ { \ } \ - \ - IMPLEMENT_DEFAULT_CLONING( classname, classname##_Base ) \ - \ - void classname::initializeTypedClone( const classname& /*_rCloneSource*/ ) \ - { \ - } \ + OXSDDataType* classname::createClone( const OUString& _rName ) const \ + { \ + return new classname( _rName ); \ + } \ + void classname::initializeClone( const OXSDDataType& _rCloneSource ) \ + { \ + classname##_Base::initializeClone( _rCloneSource ); \ + initializeTypedClone( static_cast< const classname& >( _rCloneSource ) ); \ + } \ @@ -906,11 +910,6 @@ namespace xforms IMPLEMENT_DEFAULT_TYPED_CLONING( OShortIntegerType, OShortIntegerType_Base ) - void OShortIntegerType::initializeTypedClone( const OShortIntegerType& /*_rCloneSource*/ ) - { - } - - bool OShortIntegerType::_getValue( const OUString& value, double& fValue ) { fValue = (double)(sal_Int16)value.toInt32(); diff --git a/forms/source/xforms/datatypes.hxx b/forms/source/xforms/datatypes.hxx index 848ff75e5dac..a2422bea6ac8 100644 --- a/forms/source/xforms/datatypes.hxx +++ b/forms/source/xforms/datatypes.hxx @@ -139,19 +139,7 @@ namespace xforms #define DECLARE_DEFAULT_CLONING( classname ) \ virtual OXSDDataType* createClone( const OUString& _rName ) const SAL_OVERRIDE; \ - virtual void initializeClone( const OXSDDataType& _rCloneSource ) SAL_OVERRIDE; \ - void initializeTypedClone( const classname& _rCloneSource ); - -#define IMPLEMENT_DEFAULT_CLONING( classname, baseclass ) \ - OXSDDataType* classname::createClone( const OUString& _rName ) const \ - { \ - return new classname( _rName ); \ - } \ - void classname::initializeClone( const OXSDDataType& _rCloneSource ) \ - { \ - baseclass::initializeClone( _rCloneSource ); \ - initializeTypedClone( static_cast< const classname& >( _rCloneSource ) ); \ - } \ + virtual void initializeClone( const OXSDDataType& _rCloneSource ) SAL_OVERRIDE; #define IMPLEMENT_DEFAULT_TYPED_CLONING( classname, baseclass ) \ OXSDDataType* classname::createClone( const OUString& _rName ) const \ @@ -162,7 +150,7 @@ namespace xforms { \ baseclass::initializeClone( _rCloneSource ); \ initializeTypedClone( static_cast< const classname& >( _rCloneSource ) ); \ - } \ + } #define REGISTER_VOID_PROP( prop, memberAny, type ) \ registerMayBeVoidProperty( PROPERTY_##prop, PROPERTY_ID_##prop, ::com::sun::star::beans::PropertyAttribute::BOUND | ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, \ @@ -288,6 +276,7 @@ namespace xforms protected: DECLARE_DEFAULT_CLONING( OStringType ) + void initializeTypedClone( const OStringType& _rCloneSource ); // OXSDDataType overridables virtual sal_uInt16 _validate( const OUString& value ) SAL_OVERRIDE; @@ -309,6 +298,7 @@ namespace xforms protected: DECLARE_DEFAULT_CLONING( ODecimalType ) + void initializeTypedClone( const ODecimalType& _rCloneSource ); // OXSDDataType overridables virtual sal_uInt16 _validate( const OUString& value ) SAL_OVERRIDE; |