diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-05-05 09:59:27 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-05-05 12:05:38 +0200 |
commit | c9b4c5681194a1cd3297a36d4a1f4e4cc3aac55a (patch) | |
tree | 2cb864a67b556f807ba175507296f7dfc5254944 /sfx2 | |
parent | 8c4a1663f5d93380268365d35a5581d8065df897 (diff) |
Use typed Idle::SetIdleHdl Link
Change-Id: I189937950325dc4ef663f7f49cb45f38f8537de9
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 15 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.hxx | 8 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/basedlgs.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlgimpl.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/new.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 2 |
12 files changed, 28 insertions, 49 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 5a522ae8db3a..f7b541433c4b 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -91,7 +91,7 @@ public: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE; SfxEventAsyncer_Impl( const SfxEventHint& rHint ); virtual ~SfxEventAsyncer_Impl(); - DECL_LINK( IdleHdl, Idle*); + DECL_LINK_TYPED( IdleHdl, Idle*, void ); }; @@ -128,7 +128,7 @@ SfxEventAsyncer_Impl::~SfxEventAsyncer_Impl() -IMPL_LINK(SfxEventAsyncer_Impl, IdleHdl, Idle*, pAsyncIdle) +IMPL_LINK_TYPED(SfxEventAsyncer_Impl, IdleHdl, Idle*, pAsyncIdle, void) { SfxObjectShellRef xRef( aHint.GetObjShell() ); pAsyncIdle->Stop(); @@ -144,7 +144,6 @@ IMPL_LINK(SfxEventAsyncer_Impl, IdleHdl, Idle*, pAsyncIdle) if ( xRef.Is() ) xRef->Broadcast( aHint ); delete this; - return 0L; } diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 488d0cc26e44..b070a567f9f9 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -743,11 +743,10 @@ IMPL_LINK_NOARG(IndexTabPage_Impl, OpenHdl) return 0; } -IMPL_LINK( IndexTabPage_Impl, IdleHdl, Idle*, pIdle ) +IMPL_LINK_TYPED( IndexTabPage_Impl, IdleHdl, Idle*, pIdle, void ) { if ( &aFactoryIdle == pIdle ) InitializeIndex(); - return 0; } IMPL_LINK_TYPED( IndexTabPage_Impl, TimeoutHdl, Timer*, pTimer, void) @@ -1602,7 +1601,7 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectHdl) return 0; } -IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, InitHdl) +IMPL_LINK_NOARG_TYPED(SfxHelpIndexWindow_Impl, InitHdl, Idle *, void) { bIsInitDone = true; Initialize(); @@ -1610,11 +1609,9 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, InitHdl) // now use the timer for selection aIdle.SetIdleHdl( LINK( this, SfxHelpIndexWindow_Impl, SelectFactoryHdl ) ); aIdle.SetPriority( SchedulerPriority::LOWEST ); - - return 0; } -IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectFactoryHdl) +IMPL_LINK_NOARG_TYPED(SfxHelpIndexWindow_Impl, SelectFactoryHdl, Idle *, void) { OUString* pFactory = static_cast<OUString*>(m_pActiveLB->GetSelectEntryData()); if ( pFactory ) @@ -1622,8 +1619,6 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectFactoryHdl) SetFactory( OUString( *pFactory ).toAsciiLowerCase(), false ); aSelectFactoryLink.Call( this ); } - - return 0; } IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, KeywordHdl) @@ -2215,7 +2210,7 @@ bool SfxHelpTextWindow_Impl::isHandledKey( const vcl::KeyCode& _rKeyCode ) -IMPL_LINK_NOARG(SfxHelpTextWindow_Impl, SelectHdl) +IMPL_LINK_NOARG_TYPED(SfxHelpTextWindow_Impl, SelectHdl, Idle *, void) { try { @@ -2252,8 +2247,6 @@ IMPL_LINK_NOARG(SfxHelpTextWindow_Impl, SelectHdl) { OSL_FAIL( "SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" ); } - - return 1; } diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx index f72cdd1048a6..8ae94ed52bcb 100644 --- a/sfx2/source/appl/newhelp.hxx +++ b/sfx2/source/appl/newhelp.hxx @@ -139,7 +139,7 @@ private: void ClearIndex(); DECL_LINK(OpenHdl, void *); - DECL_LINK(IdleHdl, Idle* ); + DECL_LINK_TYPED(IdleHdl, Idle*, void); DECL_LINK_TYPED(TimeoutHdl, Timer*, void); public: @@ -314,8 +314,8 @@ private: DECL_LINK( ActivatePageHdl, TabControl* ); DECL_LINK(SelectHdl, void *); - DECL_LINK(InitHdl, void *); - DECL_LINK(SelectFactoryHdl, void *); + DECL_LINK_TYPED(InitHdl, Idle *, void); + DECL_LINK_TYPED(SelectFactoryHdl, Idle *, void); DECL_LINK(KeywordHdl, void *); public: @@ -451,7 +451,7 @@ private: getCursor() const; bool isHandledKey( const vcl::KeyCode& _rKeyCode ); - DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectHdl, Idle *, void); DECL_LINK( NotifyHdl, SvtMiscOptions* ); DECL_LINK( FindHdl, sfx2::SearchDialog* ); DECL_LINK( CloseHdl, sfx2::SearchDialog* ); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 2e54af5e9838..eea0d8ddcbf9 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -495,16 +495,13 @@ void SfxDispatcher::Pop(SfxShell& rShell, SfxDispatcherPopFlags nMode) It flushes the Stack, if it is dirty, thus it actually executes the pending Push and Pop commands. */ -IMPL_LINK( SfxDispatcher, EventHdl_Impl, void *, pvoid ) +IMPL_LINK_NOARG_TYPED( SfxDispatcher, EventHdl_Impl, Idle *, void ) { - (void)pvoid; // unused - Flush(); Update_Impl(); SfxBindings* pBindings = GetBindings(); if ( pBindings ) pBindings->StartUpdate_Impl(false); - return 0; } /** With this method it can be tested whether the <SfxShell> rShell is on the diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 285e618b398f..2fd86a789a01 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -292,7 +292,7 @@ void SfxModelessDialog::Move() Implements a timer event that is triggered by a move or resize of the window This will save config information to Views.xcu with a small delay */ -IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl) +IMPL_LINK_NOARG_TYPED(SfxModelessDialog, TimerHdl, Idle *, void) { pImp->aMoveIdle.Stop(); if ( pImp->bConstructed && pImp->pMgr ) @@ -305,7 +305,6 @@ IMPL_LINK_NOARG(SfxModelessDialog, TimerHdl) pImp->aWinState = GetWindowState( nMask ); GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() ); } - return 0; } SfxModelessDialog::SfxModelessDialog(SfxBindings* pBindinx, @@ -556,7 +555,7 @@ void SfxFloatingWindow::Move() Implements a timer event that is triggered by a move or resize of the window This will save config information to Views.xcu with a small delay */ -IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl) +IMPL_LINK_NOARG_TYPED(SfxFloatingWindow, TimerHdl, Idle *, void) { pImp->aMoveIdle.Stop(); if ( pImp->bConstructed && pImp->pMgr ) @@ -569,7 +568,6 @@ IMPL_LINK_NOARG(SfxFloatingWindow, TimerHdl) pImp->aWinState = GetWindowState( nMask ); GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( SfxChildIdentifier::DOCKINGWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, pImp->pMgr->GetType() ); } - return 0; } diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 569596180b88..37f1e4129bc5 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1601,16 +1601,14 @@ IMPL_LINK( CustomPropertiesWindow, BoxLoseFocusHdl, CustomPropertiesTypeBox*, pB return 0; } -IMPL_LINK_NOARG(CustomPropertiesWindow, EditTimeoutHdl) +IMPL_LINK_NOARG_TYPED(CustomPropertiesWindow, EditTimeoutHdl, Idle *, void) { ValidateLine( m_pCurrentLine, false ); - return 0; } -IMPL_LINK_NOARG(CustomPropertiesWindow, BoxTimeoutHdl) +IMPL_LINK_NOARG_TYPED(CustomPropertiesWindow, BoxTimeoutHdl, Idle *, void) { ValidateLine( m_pCurrentLine, true ); - return 0; } bool CustomPropertiesWindow::IsLineValid( CustomPropertyLine* pLine ) const diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 6eb392c552d7..4fec7bdaede8 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1927,7 +1927,7 @@ void SfxDockingWindow::Move() pImp->aMoveIdle.Start(); } -IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl) +IMPL_LINK_NOARG_TYPED(SfxDockingWindow, TimerHdl, Idle *, void) { pImp->aMoveIdle.Stop(); if ( IsReallyVisible() && IsFloatingMode() ) @@ -1941,7 +1941,6 @@ IMPL_LINK_NOARG(SfxDockingWindow, TimerHdl) SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); pWorkWin->ConfigChild_Impl( eIdent, SfxDockingConfig::ALIGNDOCKINGWINDOW, pMgr->GetType() ); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 95fa7c31c972..b790240f2cf9 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -663,10 +663,10 @@ void FileDialogHelper_Impl::updateVersions() } } -IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl) +IMPL_LINK_NOARG_TYPED(FileDialogHelper_Impl, TimeOutHdl_Impl, Idle *, void) { if ( !mbHasPreview ) - return 0; + return; maGraphic.Clear(); @@ -674,7 +674,7 @@ IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl) uno::Reference < XFilePreview > xFilePicker( mxFileDlg, UNO_QUERY ); if ( ! xFilePicker.is() ) - return 0; + return; Sequence < OUString > aPathSeq = mxFileDlg->getFiles(); @@ -735,8 +735,6 @@ IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl) catch( const IllegalArgumentException& ) { } - - return 0; } ErrCode FileDialogHelper_Impl::getGraphic( const OUString& rURL, @@ -1123,7 +1121,7 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl() if ( mbDeleteMatcher ) delete mpMatcher; - maPreviewIdle.SetIdleHdl( Link<>() ); + maPreviewIdle.SetIdleHdl( Link<Idle *, void>() ); ::comphelper::disposeComponent( mxFileDlg ); } diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index f07113288a37..97b748d950e3 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -149,7 +149,7 @@ namespace sfx2 std::vector<OUString>& rpURLList, const SfxFilter* pFilter ); - DECL_LINK(TimeOutHdl_Impl, void *); + DECL_LINK_TYPED(TimeOutHdl_Impl, Idle *, void); DECL_LINK( HandleEvent, FileDialogHelper* ); DECL_LINK( InitControls, void* ); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 53dca486fe3a..e3ef5e4afa7f 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1418,9 +1418,8 @@ void SfxCommonTemplateDialog_Impl::Update_Impl() EnableNew( bCanNew ); } -IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim ) +IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, TimeOut, Idle *, void ) { - (void)pTim; // unused if(!bDontUpdate) { bDontUpdate=true; @@ -1442,7 +1441,6 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, TimeOut, Timer *, pTim ) } else pIdle->Start(); - return 0; } void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 78884e561804..618602e2de9b 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -145,7 +145,7 @@ class SfxNewFileDialog_Impl SfxObjectShellLock xDocShell; VclPtr<SfxNewFileDialog> pAntiImpl; - DECL_LINK( Update, void * ); + DECL_LINK_TYPED( Update, Idle *, void ); DECL_LINK( RegionSelect, ListBox * ); DECL_LINK(TemplateSelect, void *); @@ -169,12 +169,12 @@ public: void SetTemplateFlags(SfxTemplateFlags nSet); }; -IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update) +IMPL_LINK_NOARG_TYPED(SfxNewFileDialog_Impl, Update, Idle *, void) { if ( xDocShell.Is() ) { if ( xDocShell->GetProgress() ) - return sal_False; + return; xDocShell.Clear(); } @@ -183,7 +183,7 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update) { m_pPreviewWin->Invalidate(); m_pPreviewWin->SetObjectShell( 0); - return 0; + return; } if ( m_pMoreBt->get_expanded() && (nFlags & SFXWB_PREVIEW) == SFXWB_PREVIEW) @@ -232,13 +232,12 @@ IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update) if ( !xDocShell.Is() ) { m_pPreviewWin->SetObjectShell( 0 ); - return sal_False; + return; } } m_pPreviewWin->SetObjectShell( xDocShell ); } - return sal_True; } diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 7e272ac90d65..8c49b71761dd 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -219,7 +219,7 @@ protected: DECL_LINK( FmtSelectHdl, SvTreeListBox* ); DECL_LINK( ApplyHdl, Control* ); DECL_LINK( DropHdl, StyleTreeListBox_Impl* ); - DECL_LINK( TimeOut, Timer* ); + DECL_LINK_TYPED( TimeOut, Idle*, void ); virtual void EnableItem(sal_uInt16 /*nMesId*/, bool /*bCheck*/ = true) {} |