diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-27 13:08:02 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-28 09:49:56 +0200 |
commit | bd8b93fdff93ff7b2b7e493a7bcef6a59f299dae (patch) | |
tree | f05be9665737f0667faf95702d96fbf3f0a103c5 /sfx2/source/dialog | |
parent | 1b9c3a17e8496aedfb80528c5275e6658154789d (diff) |
make PostUserEvent Link<> typed
Change-Id: I13f10bda985d55d419a5bff481130a456ae2db8a
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlgimpl.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/taskpane.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 21 | ||||
-rw-r--r-- | sfx2/source/dialog/tplcitem.cxx | 4 |
6 files changed, 18 insertions, 30 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index ec76c0565041..a0d3c1c01ef5 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -698,7 +698,7 @@ struct ImplDelayedDispatch ~ImplDelayedDispatch() {} }; -static sal_IntPtr implDispatchDelayed( void*, void* pArg ) +static void implDispatchDelayed( void*, void* pArg ) { struct ImplDelayedDispatch* pDispatch = static_cast<ImplDelayedDispatch*>(pArg); try @@ -711,8 +711,6 @@ static sal_IntPtr implDispatchDelayed( void*, void* pArg ) // clean up delete pDispatch; - - return 0; } void BackingWindow::dispatchURL( const OUString& i_rURL, @@ -745,7 +743,7 @@ void BackingWindow::dispatchURL( const OUString& i_rURL, if ( xDispatch.is() ) { ImplDelayedDispatch* pDisp = new ImplDelayedDispatch( xDispatch, aDispatchURL, i_rArgs ); - if( Application::PostUserEvent( Link<>( NULL, implDispatchDelayed ), pDisp ) == 0 ) + if( Application::PostUserEvent( Link<void*,void>( NULL, implDispatchDelayed ), pDisp ) == 0 ) delete pDisp; // event could not be posted for unknown reason, at least don't leak } } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index fd1f6799a277..fdca859cd80c 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1158,14 +1158,12 @@ void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, con } } -IMPL_LINK_NOARG( FileDialogHelper_Impl, InitControls ) +IMPL_LINK_NOARG_TYPED( FileDialogHelper_Impl, InitControls, void*, void ) { mnPostUserEventId = 0; enablePasswordBox( true ); updateFilterOptionsBox( ); updateSelectionBox( ); - - return 0L; } void FileDialogHelper_Impl::preExecute() @@ -2301,13 +2299,11 @@ void FileDialogHelper::SetContext( Context _eNewContext ) mpImp->SetContext( _eNewContext ); } -IMPL_LINK_NOARG(FileDialogHelper, ExecuteSystemFilePicker) +IMPL_LINK_NOARG_TYPED(FileDialogHelper, ExecuteSystemFilePicker, void*, void) { m_nError = mpImp->execute(); if ( m_aDialogClosedLink.IsSet() ) m_aDialogClosedLink.Call( this ); - - return 0L; } // rDirPath has to be a directory diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 9103318581d0..e0122ff2f01f 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -147,8 +147,8 @@ namespace sfx2 std::vector<OUString>& rpURLList, const SfxFilter* pFilter ); - DECL_LINK_TYPED(TimeOutHdl_Impl, Idle *, void); - DECL_LINK( InitControls, void* ); + DECL_LINK_TYPED( TimeOutHdl_Impl, Idle *, void); + DECL_LINK_TYPED( InitControls, void*, void ); public: // XFilePickerListener methods diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index 814df2accdd5..ff90fc97dad1 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -549,7 +549,7 @@ namespace sfx2 static bool impl_isToolPanelResource( const OUString& i_rResourceURL ); - DECL_LINK( OnActivatePanel, void* ); + DECL_LINK_TYPED( OnActivatePanel, void*, void ); private: ModuleTaskPane& m_rAntiImpl; @@ -571,10 +571,9 @@ namespace sfx2 } - IMPL_LINK( ModuleTaskPane_Impl, OnActivatePanel, void*, i_pArg ) + IMPL_LINK_TYPED( ModuleTaskPane_Impl, OnActivatePanel, void*, i_pArg, void ) { m_aPanelDeck->ActivatePanel( reinterpret_cast< size_t >( i_pArg ) ); - return 1L; } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index ba176f00cce7..f9a313df50a5 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -284,10 +284,9 @@ sal_Int8 DropListBox_Impl::ExecuteDrop( const ExecuteDropEvent& rEvt ) return nRet; } -IMPL_LINK_NOARG(DropListBox_Impl, OnAsyncExecuteDrop) +IMPL_LINK_NOARG_TYPED(DropListBox_Impl, OnAsyncExecuteDrop, void*, void) { pDialog->ActionSelect( SID_STYLE_NEW_BY_EXAMPLE ); - return 0; } bool DropListBox_Impl::Notify( NotifyEvent& rNEvt ) @@ -2151,25 +2150,23 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pListBox return 0; } -IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu *, pMenu ) +IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu ) { - if( pMenu ) - { - nLastItemId = pMenu->GetCurItemId(); - Application::PostUserEvent( - LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectHdl ), 0 ); - return sal_IntPtr(true); - } + nLastItemId = pMenu->GetCurItemId(); + Application::PostUserEvent( + LINK( this, SfxCommonTemplateDialog_Impl, MenuSelectAsyncHdl ), 0 ); + return sal_IntPtr(true); +} +IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, MenuSelectAsyncHdl, void*, void ) +{ switch(nLastItemId) { case ID_NEW: NewHdl(0); break; case ID_EDIT: EditHdl(0); break; case ID_DELETE: DeleteHdl(0); break; case ID_HIDE: HideHdl(0); break; case ID_SHOW: ShowHdl(0); break; - default: return sal_IntPtr(false); } - return sal_IntPtr(true); } SfxStyleFamily SfxCommonTemplateDialog_Impl::GetActualFamily() const diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index 612166cfcf7b..6cc5b08be270 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -154,8 +154,7 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta } } -IMPL_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl, - SfxTemplateControllerItem*,) +IMPL_LINK_NOARG_TYPED(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl, void*, void) { nUserEventId = 0; SfxBoolItem* pState = 0; @@ -168,7 +167,6 @@ IMPL_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl, } rTemplateDlg.SetWaterCanState(pState); delete pState; - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |