diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-16 13:55:04 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-17 08:19:33 +0200 |
commit | da1d52150d3475d44ee8be352154bbef5335421c (patch) | |
tree | 6a6fb8467071d330929ee9790ab6fa3b24faefe9 | |
parent | b9d0dc6a3813cac8a21ae1ce4d9332fc8d26ef50 (diff) |
convert Link<> to typed
Change-Id: I16452cc87c48d95466a46e54619e4247742328ff
-rw-r--r-- | svx/source/form/delayedevent.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 15 | ||||
-rw-r--r-- | svx/source/inc/delayedevent.hxx | 6 | ||||
-rw-r--r-- | svx/source/inc/formcontroller.hxx | 8 |
4 files changed, 13 insertions, 20 deletions
diff --git a/svx/source/form/delayedevent.cxx b/svx/source/form/delayedevent.cxx index 0d12fdbd2dbf..1105e1a1de5c 100644 --- a/svx/source/form/delayedevent.cxx +++ b/svx/source/form/delayedevent.cxx @@ -22,12 +22,12 @@ namespace svxform { - void DelayedEvent::Call( void* _pArg ) + void DelayedEvent::Call() { CancelPendingCall(); SAL_WARN_IF( m_nEventId != 0, "svx.form", "DelayedEvent::Call: CancelPendingCall did not work!" ); - m_nEventId = Application::PostUserEvent( LINK( this, DelayedEvent, OnCall ), _pArg ); + m_nEventId = Application::PostUserEvent( LINK( this, DelayedEvent, OnCall ), nullptr ); } void DelayedEvent::CancelPendingCall() diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 93042cf4b26a..4c19b35f7282 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -1435,12 +1435,11 @@ void FormController::toggleAutoFields(bool bAutoFields) } -IMPL_LINK_NOARG(FormController, OnToggleAutoFields) +IMPL_LINK_NOARG_TYPED(FormController, OnToggleAutoFields, void*, void) { OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" ); toggleAutoFields(m_bCurrentRecordNew); - return 1L; } // XTextListener @@ -1757,23 +1756,19 @@ void FormController::focusGained(const FocusEvent& e) throw( RuntimeException, s } -IMPL_LINK_NOARG( FormController, OnActivated ) +IMPL_LINK_NOARG_TYPED( FormController, OnActivated, void*, void ) { EventObject aEvent; aEvent.Source = *this; m_aActivateListeners.notifyEach( &XFormControllerListener::formActivated, aEvent ); - - return 0L; } -IMPL_LINK_NOARG( FormController, OnDeactivated ) +IMPL_LINK_NOARG_TYPED( FormController, OnDeactivated, void*, void ) { EventObject aEvent; aEvent.Source = *this; m_aActivateListeners.notifyEach( &XFormControllerListener::formDeactivated, aEvent ); - - return 0L; } @@ -2613,7 +2608,7 @@ void FormController::updateAllDispatchers() const } -IMPL_LINK_NOARG(FormController, OnLoad) +IMPL_LINK_NOARG_TYPED(FormController, OnLoad, void*, void) { OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" ); m_bLocked = determineLockState(); @@ -2626,8 +2621,6 @@ IMPL_LINK_NOARG(FormController, OnLoad) // just one exception toggle the auto values if (m_bCurrentRecordNew) toggleAutoFields(true); - - return 1L; } diff --git a/svx/source/inc/delayedevent.hxx b/svx/source/inc/delayedevent.hxx index 8286cca9d831..113948a8e404 100644 --- a/svx/source/inc/delayedevent.hxx +++ b/svx/source/inc/delayedevent.hxx @@ -38,7 +38,7 @@ namespace svxform class DelayedEvent { public: - DelayedEvent( const Link<>& _rHandler ) + DelayedEvent( const Link<void*,void>& _rHandler ) :m_aHandler( _rHandler ) ,m_nEventId( 0 ) { @@ -53,7 +53,7 @@ namespace svxform If there's already a call pending, this previous call is cancelled. */ - void Call( void* _pArg = NULL ); + void Call(); /** cancels a call which is currently pending @@ -62,7 +62,7 @@ namespace svxform void CancelPendingCall(); private: - Link<> m_aHandler; + Link<void*,void> m_aHandler; ImplSVEvent * m_nEventId; private: diff --git a/svx/source/inc/formcontroller.hxx b/svx/source/inc/formcontroller.hxx index 5ae418cff4f1..756322e09aef 100644 --- a/svx/source/inc/formcontroller.hxx +++ b/svx/source/inc/formcontroller.hxx @@ -564,10 +564,10 @@ namespace svxform DECL_LINK_TYPED( OnActivateTabOrder, Idle*, void ); DECL_LINK_TYPED( OnInvalidateFeatures, Timer*, void ); - DECL_LINK( OnLoad, void* ); - DECL_LINK( OnToggleAutoFields, void* ); - DECL_LINK( OnActivated, void* ); - DECL_LINK( OnDeactivated, void* ); + DECL_LINK_TYPED( OnLoad, void*, void ); + DECL_LINK_TYPED( OnToggleAutoFields, void*, void ); + DECL_LINK_TYPED( OnActivated, void*, void ); + DECL_LINK_TYPED( OnDeactivated, void*, void ); }; } |