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 | |
parent | 8c4a1663f5d93380268365d35a5581d8065df897 (diff) |
Use typed Idle::SetIdleHdl Link
Change-Id: I189937950325dc4ef663f7f49cb45f38f8537de9
168 files changed, 273 insertions, 411 deletions
diff --git a/avmedia/inc/mediacontrol.hxx b/avmedia/inc/mediacontrol.hxx index b24e1a590ee7..b7cd9185d328 100644 --- a/avmedia/inc/mediacontrol.hxx +++ b/avmedia/inc/mediacontrol.hxx @@ -85,7 +85,7 @@ private: DECL_LINK(implVolumeEndHdl, void *); DECL_LINK( implSelectHdl, ToolBox* ); DECL_LINK( implZoomSelectHdl, ListBox* ); - DECL_LINK(implTimeoutHdl, void *); + DECL_LINK_TYPED(implTimeoutHdl, Idle *, void); ImageList maImageList; Idle maIdle; diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index 5168c12e34e3..99523fe7a8ef 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -604,12 +604,10 @@ IMPL_LINK( MediaControl, implZoomSelectHdl, ListBox*, p ) -IMPL_LINK_NOARG(MediaControl, implTimeoutHdl) +IMPL_LINK_NOARG_TYPED(MediaControl, implTimeoutHdl, Idle *, void) { update(); maIdle.Start(); - - return 0; } } diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx index 24e478f28bf8..3ed91fddcab6 100644 --- a/avmedia/source/framework/soundhandler.cxx +++ b/avmedia/source/framework/soundhandler.cxx @@ -299,7 +299,7 @@ OUString SAL_CALL SoundHandler::detect( css::uno::Sequence< css::beans::Property @return 0 every time... it doesn't matter for us. @threadsafe yes *//*-*************************************************************************************************************/ -IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify) +IMPL_LINK_NOARG_TYPED(SoundHandler, implts_PlayerNotify, Idle *, void) { // SAFE { ::osl::ClearableMutexGuard aLock( m_aLock ); @@ -307,7 +307,7 @@ IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify) if (m_xPlayer.is() && m_xPlayer->isPlaying() && m_xPlayer->getMediaTime() < m_xPlayer->getDuration()) { m_aUpdateIdle.Start(); - return 0L; + return; } m_xPlayer.clear(); @@ -333,7 +333,6 @@ IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify) // } SAFE //release aLock before end of method at which point xOperationHold goes out of scope and pThis dies aLock.clear(); - return 0; } } // namespace framework diff --git a/avmedia/source/framework/soundhandler.hxx b/avmedia/source/framework/soundhandler.hxx index 30b9b2623f08..c16592fc4590 100644 --- a/avmedia/source/framework/soundhandler.hxx +++ b/avmedia/source/framework/soundhandler.hxx @@ -110,7 +110,7 @@ class SoundHandler : // interfaces // private methods private: - DECL_LINK( implts_PlayerNotify, void* ); + DECL_LINK_TYPED( implts_PlayerNotify, Idle*, void ); // variables // (should be private everyway!) diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 749bf2315f74..d71ae5a07653 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -87,7 +87,7 @@ private: Idle aSyntaxIdle; typedef std::set<sal_uInt16> SyntaxLineSet; SyntaxLineSet aSyntaxLineTable; - DECL_LINK(SyntaxTimerHdl, void *); + DECL_LINK_TYPED(SyntaxTimerHdl, Idle *, void); // progress bar class ProgressInfo; diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 5182ebdb6931..f35739649684 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1289,7 +1289,7 @@ void EditorWindow::DoDelayedSyntaxHighlight( sal_uLong nPara ) } } -IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl) +IMPL_LINK_NOARG_TYPED(EditorWindow, SyntaxTimerHdl, Idle *, void) { DBG_ASSERT( pEditView, "Noch keine View, aber Syntax-Highlight ?!" ); @@ -1312,8 +1312,6 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl) aSyntaxLineTable.clear(); bHighlightning = false; - - return 0; } void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted ) diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 5ce766ffc823..1c7946dbb7dc 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -574,10 +574,9 @@ void DlgEditor::Paint( const Rectangle& rRect ) } -IMPL_LINK_NOARG(DlgEditor, MarkTimeout) +IMPL_LINK_NOARG_TYPED(DlgEditor, MarkTimeout, Idle *, void) { rLayout.UpdatePropertyBrowser(); - return 1; } diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx index af9ad3c8e41d..3b1c25b7faae 100644 --- a/basctl/source/inc/dlged.hxx +++ b/basctl/source/inc/dlged.hxx @@ -102,7 +102,7 @@ public: }; private: - DECL_LINK(MarkTimeout, void *); + DECL_LINK_TYPED(MarkTimeout, Idle *, void); static void Print( Printer* pPrinter, const OUString& rTitle ); diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 637720218112..5c5feb498046 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -1478,11 +1478,10 @@ void GL3DBarChart::processAutoFly(sal_uInt32 nId, sal_uInt32 nColor) } } -IMPL_LINK_NOARG(GL3DBarChart, UpdateTimerHdl) +IMPL_LINK_NOARG_TYPED(GL3DBarChart, UpdateTimerHdl, Idle *, void) { updateScreenText(); maIdle.Start(); - return 0; } void GL3DBarChart::setOpenGLWindow(OpenGLWindow* pWindow) diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx index c714a5b50489..4370aa8778f8 100644 --- a/chart2/source/view/inc/GL3DBarChart.hxx +++ b/chart2/source/view/inc/GL3DBarChart.hxx @@ -102,7 +102,7 @@ private: void updateScreenText(); void updateRenderFPS(); void updateDataUpdateFPS(); - DECL_LINK(UpdateTimerHdl, void*); + DECL_LINK_TYPED(UpdateTimerHdl, Idle*, void); static int calcTimeInterval(TimeValue &startTime, TimeValue &endTime); float addScreenTextShape(OUString &nStr, const glm::vec2& rLeftOrRightTop, float nTextHeight, bool bLeftTopFlag = true, const glm::vec4& rColor = glm::vec4(0.0f, 1.0f, 1.0f, 0.0f), diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 3a2ebf328db1..7f4abcbddefc 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -507,7 +507,7 @@ IMPL_LINK_NOARG(ActualizeProgress, ClickCancelBtn) -IMPL_LINK( ActualizeProgress, TimeoutHdl, Timer*, _pTimer ) +IMPL_LINK_TYPED( ActualizeProgress, TimeoutHdl, Idle*, _pTimer, void) { if ( _pTimer ) { @@ -517,8 +517,6 @@ IMPL_LINK( ActualizeProgress, TimeoutHdl, Timer*, _pTimer ) pTheme->Actualize( LINK( this, ActualizeProgress, ActualizeHdl ), &aStatusProgress ); ClickCancelBtn( NULL ); - - return 0; } diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index c947538640f1..b3a9c76c96b7 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -520,10 +520,8 @@ IMPL_LINK( SvBaseLinksDlg, BreakLinkClickHdl, PushButton *, pPushButton ) return 0; } -IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) +IMPL_LINK_NOARG_TYPED( SvBaseLinksDlg, UpdateWaitingHdl, Idle*, void ) { - (void)pTimer; - m_pTbLinks->SetUpdateMode(false); for( sal_uLong nPos = m_pTbLinks->GetEntryCount(); nPos; ) { @@ -538,7 +536,6 @@ IMPL_LINK( SvBaseLinksDlg, UpdateWaitingHdl, Timer*, pTimer ) } } m_pTbLinks->SetUpdateMode(true); - return 0; } IMPL_LINK( SvBaseLinksDlg, EndEditHdl, sfx2::SvBaseLink*, _pLink ) diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index a12e68c7fe21..a71456e33b75 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -92,11 +92,10 @@ void LookUpComboBox::Modify() m_aModifyIdle.Start(); } -IMPL_LINK( LookUpComboBox, ModifyTimer_Hdl, Timer *, EMPTYARG /*pTimer*/ ) +IMPL_LINK_NOARG_TYPED( LookUpComboBox, ModifyTimer_Hdl, Idle *, void ) { m_pDialog->LookUp( GetText() ); m_aModifyIdle.Stop(); - return 0; } // class ReplaceEdit -------------------------------------------------- diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index 70d01e9b87ff..89af13d6f0a9 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -140,7 +140,7 @@ private: bool FillItemSetWithWallpaperItem( SfxItemSet& rCoreSet, sal_uInt16 nSlot); void ResetFromWallpaperItem( const SfxItemSet& rSet ); - DECL_LINK( LoadIdleHdl_Impl, Idle* ); + DECL_LINK_TYPED( LoadIdleHdl_Impl, Idle*, void ); DECL_LINK(SelectHdl_Impl, void *); DECL_LINK(BrowseHdl_Impl, void *); DECL_LINK( RadioClickHdl_Impl, RadioButton* ); diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index fad03f168fe4..4431ef6a3ce6 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -141,7 +141,7 @@ private: void Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp ); bool FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp ); - DECL_LINK(UpdateHdl_Impl, void *); + DECL_LINK_TYPED(UpdateHdl_Impl, Idle *, void); DECL_LINK( FontModifyHdl_Impl, void* ); public: diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 644cf4a6d767..a2384403a36e 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -159,7 +159,7 @@ private: GalleryProgress aStatusProgress; DECL_LINK( ClickCancelBtn, void* ); - DECL_LINK( TimeoutHdl, Timer* ); + DECL_LINK_TYPED( TimeoutHdl, Idle*, void ); DECL_LINK( ActualizeHdl, INetURLObject* pURL ); public: diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index 7e953fcd747e..fb5baa9668b0 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -74,7 +74,7 @@ class SvBaseLinksDlg : public ModalDialog DECL_LINK( OpenSourceClickHdl, PushButton * ); DECL_LINK( ChangeSourceClickHdl, PushButton * ); DECL_LINK( BreakLinkClickHdl, PushButton * ); - DECL_LINK( UpdateWaitingHdl, Timer * ); + DECL_LINK_TYPED( UpdateWaitingHdl, Idle *, void ); DECL_LINK( EndEditHdl, sfx2::SvBaseLink* ); sfx2::SvBaseLink* GetSelEntry( sal_uLong* pPos ); OUString ImplGetStateStr( const sfx2::SvBaseLink& ); diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx index 696c8bf55711..76193c19a7d2 100644 --- a/cui/source/inc/macroass.hxx +++ b/cui/source/inc/macroass.hxx @@ -42,7 +42,7 @@ class _SfxMacroTabPage : public SfxTabPage DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, DoubleClickHdl_Impl, Control* ); DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton * ); - DECL_DLLPRIVATE_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer* ); + DECL_DLLPRIVATE_STATIC_LINK_TYPED( _SfxMacroTabPage, TimeOut_Impl, Idle*, void ); protected: _SfxMacroTabPage_Impl* mpImpl; diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx index 61084cf902d7..4f1ebe01e4eb 100644 --- a/cui/source/inc/thesdlg.hxx +++ b/cui/source/inc/thesdlg.hxx @@ -45,7 +45,7 @@ public: virtual ~LookUpComboBox(); virtual void dispose() SAL_OVERRIDE; - DECL_LINK( ModifyTimer_Hdl, Timer * ); + DECL_LINK_TYPED( ModifyTimer_Hdl, Idle *, void ); void init(SvxThesaurusDialog *pDialog); diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 95471d1121c5..80c6819f7f5b 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -394,10 +394,9 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl) -IMPL_LINK_NOARG(SvxJavaOptionsPage, ResetHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxJavaOptionsPage, ResetHdl_Impl, Idle *, void) { LoadJREs(); - return 0; } diff --git a/cui/source/options/optjava.hxx b/cui/source/options/optjava.hxx index ffe299b7c628..b73e2c308bb9 100644 --- a/cui/source/options/optjava.hxx +++ b/cui/source/options/optjava.hxx @@ -90,7 +90,7 @@ private: DECL_LINK(AddHdl_Impl, void *); DECL_LINK(ParameterHdl_Impl, void *); DECL_LINK(ClassPathHdl_Impl, void *); - DECL_LINK(ResetHdl_Impl, void *); + DECL_LINK_TYPED(ResetHdl_Impl, Idle *, void); DECL_LINK( StartFolderPickerHdl, void * ); DECL_LINK( DialogClosedHdl, ::com::sun::star::ui::dialogs::DialogClosedEvent* ); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 4e49e59e95e1..85dbdbc69456 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1482,7 +1482,7 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl) -IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Idle* , pIdle ) +IMPL_LINK_TYPED( SvxBackgroundTabPage, LoadIdleHdl_Impl, Idle* , pIdle, void ) /* [Description] @@ -1538,7 +1538,6 @@ IMPL_LINK( SvxBackgroundTabPage, LoadIdleHdl_Impl, Idle* , pIdle ) DELETEZ( pImportDlg ); } } - return 0; } diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index c2a24866e812..412c6d5efb28 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1179,10 +1179,9 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp -IMPL_LINK_NOARG(SvxCharNamePage, UpdateHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxCharNamePage, UpdateHdl_Impl, Idle *, void) { UpdatePreview_Impl(); - return 0; } diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 0cb8a54cd527..ecde19457844 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -346,7 +346,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) return 0; } -IMPL_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer*, EMPTYARG ) +IMPL_STATIC_LINK_TYPED( _SfxMacroTabPage, TimeOut_Impl, Idle*, EMPTYARG, void ) { // FillMacroList() can take a long time -> show wait cursor and disable input SfxTabDialog* pTabDlg = pThis->GetTabDialog(); @@ -362,7 +362,6 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, TimeOut_Impl, Timer*, EMPTYARG ) pTabDlg->EnableInput( true ); pTabDlg->LeaveWait(); } - return 0; } void _SfxMacroTabPage::InitAndSetHandler() diff --git a/dbaccess/source/ui/inc/JoinTableView.hxx b/dbaccess/source/ui/inc/JoinTableView.hxx index d33e84d2b3ee..f9686d3324a3 100644 --- a/dbaccess/source/ui/inc/JoinTableView.hxx +++ b/dbaccess/source/ui/inc/JoinTableView.hxx @@ -104,7 +104,7 @@ namespace dbaui bool m_bTrackingInitiallyMoved; - DECL_LINK(OnDragScrollTimer, void*); + DECL_LINK_TYPED(OnDragScrollTimer, Idle*, void); protected: VclPtr<OTableWindow> m_pLastFocusTabWin; diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 4addf1970279..470238267dad 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1074,10 +1074,9 @@ bool OJoinTableView::ScrollWhileDragging() return bScrolling; } -IMPL_LINK_NOARG(OJoinTableView, OnDragScrollTimer) +IMPL_LINK_NOARG_TYPED(OJoinTableView, OnDragScrollTimer, Idle *, void) { ScrollWhileDragging(); - return 0L; } void OJoinTableView::invalidateAndModify(SfxUndoAction *_pAction) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 976481251c19..7978b440688a 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -1089,7 +1089,7 @@ IMPL_LINK( ExtMgrDialog, HandleHyperlink, FixedHyperlink*, pHyperlink ) } -IMPL_LINK_NOARG(ExtMgrDialog, TimeOutHdl) +IMPL_LINK_NOARG_TYPED(ExtMgrDialog, TimeOutHdl, Idle *, void) { if ( m_bStopProgress ) { @@ -1122,8 +1122,6 @@ IMPL_LINK_NOARG(ExtMgrDialog, TimeOutHdl) m_aIdle.Start(); } - - return 1; } @@ -1433,7 +1431,7 @@ IMPL_LINK( UpdateRequiredDialog, HandleHyperlink, FixedHyperlink*, pHyperlink ) } -IMPL_LINK_NOARG(UpdateRequiredDialog, TimeOutHdl) +IMPL_LINK_NOARG_TYPED(UpdateRequiredDialog, TimeOutHdl, Idle *, void) { if ( m_bStopProgress ) { @@ -1466,8 +1464,6 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, TimeOutHdl) m_aIdle.Start(); } - - return 1; } // VCL::Dialog diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 8a130ff8ee8d..75e52f0c1f9c 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -135,7 +135,7 @@ class ExtMgrDialog : public ModelessDialog, DECL_DLLPRIVATE_LINK( HandleCloseBtn, void * ); DECL_DLLPRIVATE_LINK( HandleExtTypeCbx, void * ); DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * ); - DECL_DLLPRIVATE_LINK(TimeOutHdl, void *); + DECL_DLLPRIVATE_LINK_TYPED(TimeOutHdl, Idle *, void); DECL_DLLPRIVATE_LINK( startProgress, void * ); public: @@ -201,7 +201,7 @@ class UpdateRequiredDialog : public ModalDialog, DECL_DLLPRIVATE_LINK( HandleUpdateBtn, void * ); DECL_DLLPRIVATE_LINK( HandleCloseBtn, void * ); DECL_DLLPRIVATE_LINK( HandleCancelBtn, void * ); - DECL_DLLPRIVATE_LINK(TimeOutHdl, void *); + DECL_DLLPRIVATE_LINK_TYPED(TimeOutHdl, Idle *, void); DECL_DLLPRIVATE_LINK( startProgress, void * ); DECL_DLLPRIVATE_LINK( HandleHyperlink, FixedHyperlink * ); diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index ca187731b2e0..6213ea2e0e73 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -667,7 +667,7 @@ private: inline void EraseVirtualDevice() { pVirtDev.disposeAndClear(); } DECL_LINK_TYPED(StatusTimerHdl, Timer *, void); - DECL_LINK(IdleFormatHdl, void *); + DECL_LINK_TYPED(IdleFormatHdl, Idle *, void); DECL_LINK_TYPED(OnlineSpellHdl, Timer *, void); DECL_LINK( DocModified, void* ); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 1928ba02f1a5..19a12c3cd8a5 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -316,7 +316,7 @@ IMPL_LINK_NOARG_TYPED(ImpEditEngine, OnlineSpellHdl, Timer *, void) aOnlineSpellTimer.Start(); } -IMPL_LINK_NOARG(ImpEditEngine, IdleFormatHdl) +IMPL_LINK_NOARG_TYPED(ImpEditEngine, IdleFormatHdl, Idle *, void) { aIdleFormatter.ResetRestarts(); @@ -332,7 +332,6 @@ IMPL_LINK_NOARG(ImpEditEngine, IdleFormatHdl) break; } } - return 0; } void ImpEditEngine::CheckIdleFormatter() diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx index eedcc4e81064..726c4065e6d1 100644 --- a/editeng/source/editeng/impedit5.cxx +++ b/editeng/source/editeng/impedit5.cxx @@ -802,7 +802,7 @@ void IdleFormattter::ForceTimeout() if ( IsActive() ) { Stop(); - ((Link<>&)GetIdleHdl()).Call( this ); + ((Link<Idle *, void>&)GetIdleHdl()).Call( this ); } } diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx index 5eba4bac1bbc..5c75e528b515 100644 --- a/extensions/source/bibliography/bibcont.cxx +++ b/extensions/source/bibliography/bibcont.cxx @@ -164,14 +164,13 @@ void BibBookContainer::Split() { aIdle.Start(); } -IMPL_LINK( BibBookContainer, SplitHdl, Timer*,/*pT*/) +IMPL_LINK_NOARG_TYPED( BibBookContainer, SplitHdl, Idle*, void) { long nSize= GetItemSize( TOP_WINDOW); BibConfig* pConfig = BibModul::GetConfig(); pConfig->setBeamerSize(nSize); nSize = GetItemSize( BOTTOM_WINDOW); pConfig->setViewSize(nSize); - return 0; } void BibBookContainer::createTopFrame( BibShortCutHandler* pWin ) diff --git a/extensions/source/bibliography/bibcont.hxx b/extensions/source/bibliography/bibcont.hxx index 3488c2ee27ee..cb1d07e6a1ed 100644 --- a/extensions/source/bibliography/bibcont.hxx +++ b/extensions/source/bibliography/bibcont.hxx @@ -75,7 +75,7 @@ class BibBookContainer: public BibSplitWindow HdlBibModul pBibMod; Idle aIdle; - DECL_LINK( SplitHdl, Timer*); + DECL_LINK_TYPED( SplitHdl, Idle*, void ); protected: diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index 717591d65f3f..08ddcced7d15 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -468,7 +468,7 @@ IMPL_LINK( BibToolBar, SelHdl, ListBox*, /*pLb*/ ) return 0; } -IMPL_LINK( BibToolBar, SendSelHdl, Timer*,/*pT*/) +IMPL_LINK_NOARG_TYPED( BibToolBar, SendSelHdl, Idle*, void ) { Sequence<PropertyValue> aPropVal(1); PropertyValue* pPropertyVal = const_cast<PropertyValue*>(aPropVal.getConstArray()); @@ -477,8 +477,6 @@ IMPL_LINK( BibToolBar, SendSelHdl, Timer*,/*pT*/) OUString aSelection = aEntry; pPropertyVal[0].Value <<= aSelection; SendDispatch(TBC_LB_SOURCE,aPropVal); - - return 0; } IMPL_LINK( BibToolBar, MenuHdl, ToolBox*, /*pToolbox*/) diff --git a/extensions/source/bibliography/toolbar.hxx b/extensions/source/bibliography/toolbar.hxx index 8e36b56026b9..ddd9a0259323 100644 --- a/extensions/source/bibliography/toolbar.hxx +++ b/extensions/source/bibliography/toolbar.hxx @@ -129,7 +129,7 @@ class BibToolBar: public ToolBox BibDataManager* pDatMan; DECL_LINK( SelHdl, ListBox* ); - DECL_LINK( SendSelHdl, Timer* ); + DECL_LINK_TYPED( SendSelHdl, Idle*, void ); DECL_LINK( MenuHdl, ToolBox* ); DECL_LINK( OptionsChanged_Impl, void* ); DECL_LINK( SettingsChanged_Impl, void* ); diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 6c666f59a922..4a9fbe9bb640 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -145,7 +145,7 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper3 private: DECL_LINK(ClickHdl, void *); DECL_LINK( HighlightHdl, MenuBar::MenuBarButtonCallbackArg* ); - DECL_LINK(WaitTimeOutHdl, void *); + DECL_LINK_TYPED(WaitTimeOutHdl, Idle *, void); DECL_LINK_TYPED(TimeOutHdl, Timer *, void); DECL_LINK(UserEventHdl, void *); DECL_LINK( WindowEventHdl, VclWindowEvent* ); @@ -612,7 +612,7 @@ IMPL_LINK( UpdateCheckUI, HighlightHdl, MenuBar::MenuBarButtonCallbackArg*, pDat } -IMPL_LINK_NOARG(UpdateCheckUI, WaitTimeOutHdl) +IMPL_LINK_NOARG_TYPED(UpdateCheckUI, WaitTimeOutHdl, Idle *, void) { SolarMutexGuard aGuard; @@ -622,8 +622,6 @@ IMPL_LINK_NOARG(UpdateCheckUI, WaitTimeOutHdl) { mpBubbleWin->Show(); } - - return 0; } diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index 5c8fd838e002..c6243902ccc5 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -1972,10 +1972,9 @@ namespace frm } - IMPL_LINK(OListBoxControl, OnTimeout, void*, /*EMPTYTAG*/) + IMPL_LINK_NOARG_TYPED(OListBoxControl, OnTimeout, Idle*, void) { m_aChangeListeners.notifyEach( &XChangeListener::changed, EventObject( *this ) ); - return 0L; } diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx index 381d36ed8638..4a77df0a9192 100644 --- a/forms/source/component/ListBox.hxx +++ b/forms/source/component/ListBox.hxx @@ -335,7 +335,7 @@ protected: virtual void processEvent( const ::comphelper::AnyEvent& _rEvent ) SAL_OVERRIDE; private: - DECL_LINK( OnTimeout, void* ); + DECL_LINK_TYPED( OnTimeout, Idle*, void ); }; diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 1d731535bf1e..a857c60388f2 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -356,7 +356,7 @@ FormulaDlg_Impl::~FormulaDlg_Impl() { if(aIdle.IsActive()) { - aIdle.SetIdleHdl(Link<>()); + aIdle.SetIdleHdl(Link<Idle *, void>()); aIdle.Stop(); }// if(aIdle.IsActive()) bIsShutDown=true;// Set it in order to PreNotify not to save GetFocus. @@ -1863,7 +1863,7 @@ void FormulaDlg::SetEdSelection() { m_pImpl->SetEdSelection(); } -IMPL_LINK_NOARG(FormulaDlg, UpdateFocusHdl) +IMPL_LINK_NOARG_TYPED(FormulaDlg, UpdateFocusHdl, Idle *, void) { FormEditData* pData = m_pImpl->m_pHelper->getFormEditData(); @@ -1873,7 +1873,6 @@ IMPL_LINK_NOARG(FormulaDlg, UpdateFocusHdl) OString nUniqueId(pData->GetUniqueId()); SetFocusWin(this,nUniqueId); } - return 0; } diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 4fe03a17f037..a9d6f6a05862 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -503,7 +503,7 @@ RefEdit::~RefEdit() void RefEdit::dispose() { - aIdle.SetIdleHdl( Link<>() ); + aIdle.SetIdleHdl( Link<Idle *, void>() ); aIdle.Stop(); pLabelWidget.clear(); Edit::dispose(); @@ -551,7 +551,7 @@ void RefEdit::SetReferences( IControlReferenceHandler* pDlg, vcl::Window* pLabel } else { - aIdle.SetIdleHdl( Link<>() ); + aIdle.SetIdleHdl( Link<Idle *, void>() ); aIdle.Stop(); } } @@ -585,11 +585,10 @@ void RefEdit::LoseFocus() pAnyRefDlg->HideReference(); } -IMPL_LINK_NOARG(RefEdit, UpdateHdl) +IMPL_LINK_NOARG_TYPED(RefEdit, UpdateHdl, Idle *, void) { if( pAnyRefDlg ) pAnyRefDlg->ShowReference( GetText() ); - return 0; } //class RefButton diff --git a/include/formula/formula.hxx b/include/formula/formula.hxx index cfa13a21d086..1426404c038b 100644 --- a/include/formula/formula.hxx +++ b/include/formula/formula.hxx @@ -99,7 +99,7 @@ public: private: ::std::unique_ptr<FormulaDlg_Impl> m_pImpl; - DECL_LINK( UpdateFocusHdl, void*); + DECL_LINK_TYPED( UpdateFocusHdl, Idle*, void ); protected: void disableOk(); diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index 400a49b79876..77b9386e43aa 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -36,7 +36,7 @@ private: IControlReferenceHandler* pAnyRefDlg; // parent dialog VclPtr<vcl::Window> pLabelWidget; - DECL_LINK( UpdateHdl, void* ); + DECL_LINK_TYPED( UpdateHdl, Idle*, void ); protected: virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE; diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 9d5e507c8d60..fe0d3af7a9ee 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -116,7 +116,7 @@ public: SfxBindings& GetBindings() { return *pBindings; } - DECL_LINK(TimerHdl, void *); + DECL_LINK_TYPED(TimerHdl, Idle *, void); }; @@ -156,7 +156,7 @@ public: virtual void FillInfo(SfxChildWinInfo&) const; void Initialize (SfxChildWinInfo* pInfo); - DECL_LINK(TimerHdl, void *); + DECL_LINK_TYPED(TimerHdl, Idle *, void); }; diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index ff40465676f0..86e0036a3f8a 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -446,8 +446,8 @@ private: DECL_LINK( BoxLoseFocusHdl, CustomPropertiesTypeBox* ); //add lose focus handlers of Date/TimeField? - DECL_LINK(EditTimeoutHdl, void *); - DECL_LINK(BoxTimeoutHdl, void *); + DECL_LINK_TYPED(EditTimeoutHdl, Idle *, void); + DECL_LINK_TYPED(BoxTimeoutHdl, Idle *, void); bool IsLineValid( CustomPropertyLine* pLine ) const; void ValidateLine( CustomPropertyLine* pLine, bool bIsFromTypeBox ); diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx index c6c2425c302c..df4ca5ae5f07 100644 --- a/include/sfx2/dispatch.hxx +++ b/include/sfx2/dispatch.hxx @@ -87,7 +87,7 @@ private: friend class SfxApplication; friend class SfxViewFrame; - DECL_DLLPRIVATE_LINK( EventHdl_Impl, void * ); + DECL_DLLPRIVATE_LINK_TYPED( EventHdl_Impl, Idle *, void ); DECL_DLLPRIVATE_LINK( PostMsgHandler, SfxRequest * ); SAL_DLLPRIVATE void Call_Impl( SfxShell& rShell, const SfxSlot &rSlot, SfxRequest &rReq, bool bRecord ); diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx index 547e5ae93e84..e929824a9c49 100644 --- a/include/sfx2/dockwin.hxx +++ b/include/sfx2/dockwin.hxx @@ -104,7 +104,7 @@ public: void SetMinOutputSizePixel( const Size& rSize ); Size GetMinOutputSizePixel() const; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; - DECL_LINK(TimerHdl, void *); + DECL_LINK_TYPED(TimerHdl, Idle *, void); SAL_DLLPRIVATE void Initialize_Impl(); SAL_DLLPRIVATE sal_uInt16 GetWinBits_Impl() const; diff --git a/include/svtools/asynclink.hxx b/include/svtools/asynclink.hxx index 070d980964c2..643e002dd703 100644 --- a/include/svtools/asynclink.hxx +++ b/include/svtools/asynclink.hxx @@ -40,7 +40,8 @@ class SVT_DLLPUBLIC AsynchronLink void* _pArg; ::osl::Mutex* _pMutex; - DECL_DLLPRIVATE_STATIC_LINK( AsynchronLink, HandleCall, void* ); + DECL_DLLPRIVATE_STATIC_LINK_TYPED( AsynchronLink, HandleCall_Idle, Idle*, void ); + DECL_DLLPRIVATE_STATIC_LINK( AsynchronLink, HandleCall_PostUserEvent, void* ); SVT_DLLPRIVATE void Call_Impl( void* pArg ); public: diff --git a/include/svtools/filechangedchecker.hxx b/include/svtools/filechangedchecker.hxx index 08a98e4c3d9e..fe53a57209f9 100644 --- a/include/svtools/filechangedchecker.hxx +++ b/include/svtools/filechangedchecker.hxx @@ -30,7 +30,7 @@ private : ::boost::function0<void> mpCallback; bool SVT_DLLPRIVATE getCurrentModTime(TimeValue& o_rValue) const; - DECL_LINK(TimerHandler, void *); + DECL_LINK_TYPED(TimerHandler, Idle *, void); public : void resetTimer(); diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 45dce8ea8d51..d6a71ff5d15c 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -839,7 +839,7 @@ class SvInplaceEdit2 bool bAlreadyInCallBack; void CallCallBackHdl_Impl(); - DECL_LINK( Timeout_Impl, void * ); + DECL_LINK_TYPED( Timeout_Impl, Idle *, void ); DECL_LINK( ReturnHdl_Impl, void * ); DECL_LINK( EscapeHdl_Impl, void * ); diff --git a/include/svtools/wizdlg.hxx b/include/svtools/wizdlg.hxx index 2aeca758cf68..5fb9f5c57346 100644 --- a/include/svtools/wizdlg.hxx +++ b/include/svtools/wizdlg.hxx @@ -213,7 +213,7 @@ private: sal_Int16 mnLeftAlignCount; bool mbEmptyViewMargin; - DECL_DLLPRIVATE_LINK( ImplHandleWizardLayoutTimerHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplHandleWizardLayoutTimerHdl, Idle*, void ); bool hasWizardPendingLayout() const; protected: diff --git a/include/svx/fontwork.hxx b/include/svx/fontwork.hxx index 8905b76b9511..124cc0486fdb 100644 --- a/include/svx/fontwork.hxx +++ b/include/svx/fontwork.hxx @@ -148,7 +148,7 @@ class SVX_DLLPUBLIC SAL_WARN_UNUSED SvxFontWorkDialog : public SfxDockingWindow DECL_LINK( SelectShadowHdl_Impl, void * ); DECL_LINK( ModifyInputHdl_Impl, void * ); - DECL_LINK( InputTimoutHdl_Impl, void * ); + DECL_LINK_TYPED( InputTimoutHdl_Impl, Idle *, void ); DECL_LINK( ColorSelectHdl_Impl, void * ); diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx index 77fb49484a0e..36925677fe00 100644 --- a/include/svx/graphctl.hxx +++ b/include/svx/graphctl.hxx @@ -54,7 +54,7 @@ class SVX_DLLPUBLIC GraphCtrl : public Control bool bSdrMode; bool bAnim; - DECL_LINK( UpdateHdl, Timer* ); + DECL_LINK_TYPED( UpdateHdl, Idle*, void ); SvxGraphCtrlAccessibleContext* mpAccContext; diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx index fc0b758d3c37..cac8af041289 100644 --- a/include/svx/imapdlg.hxx +++ b/include/svx/imapdlg.hxx @@ -123,7 +123,7 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow DECL_LINK( GraphSizeHdl, IMapWindow* ); DECL_LINK( URLModifyHdl, void* ); DECL_LINK( URLLoseFocusHdl, void* ); - DECL_LINK(UpdateHdl, void *); + DECL_LINK_TYPED(UpdateHdl, Idle *, void); DECL_LINK( TbxUpdateHdl, Timer* ); DECL_LINK( StateHdl, IMapWindow* ); DECL_LINK( MiscHdl, void* ); diff --git a/include/svx/modctrl.hxx b/include/svx/modctrl.hxx index bb0bdc39513c..203a06cc7a4b 100644 --- a/include/svx/modctrl.hxx +++ b/include/svx/modctrl.hxx @@ -43,7 +43,7 @@ public: SvxModifyControl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar& rStb ); private: // Links - DECL_LINK( OnTimer, Timer * ); + DECL_LINK_TYPED( OnTimer, Idle *, void ); private: // Functions void _repaint(); diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx index d4a13cb1d3b8..aa4f87768d17 100644 --- a/include/svx/numvset.hxx +++ b/include/svx/numvset.hxx @@ -96,7 +96,7 @@ class SVX_DLLPUBLIC SvxBmpNumValueSet : public SvxNumValueSet void init(); protected: - DECL_LINK(FormatHdl_Impl, void *); + DECL_LINK_TYPED(FormatHdl_Impl, Idle *, void); void SetGrfNotFound(bool bSet) {bGrfNotFound = bSet;} bool IsGrfNotFound()const {return bGrfNotFound;} diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx index 82790a402e62..d479668067cd 100644 --- a/include/svx/sidebar/PanelLayout.hxx +++ b/include/svx/sidebar/PanelLayout.hxx @@ -29,7 +29,7 @@ private: bool m_bInClose; bool hasPanelPendingLayout() const; - DECL_DLLPRIVATE_LINK( ImplHandlePanelLayoutTimerHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplHandlePanelLayoutTimerHdl, Idle*, void ); public: PanelLayout(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx index cdb2ea62c7ba..1b3603257c22 100644 --- a/include/svx/svdpntv.hxx +++ b/include/svx/svdpntv.hxx @@ -246,7 +246,7 @@ public: private: SVX_DLLPRIVATE void ImpClearVars(); - DECL_LINK(ImpComeBackHdl,void*); + DECL_LINK_TYPED(ImpComeBackHdl, Idle*, void); protected: sal_uInt16 ImpGetMinMovLogic(short nMinMov, const OutputDevice* pOut) const; diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 71c81818fa22..0456c8599b5a 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -265,7 +265,7 @@ private: SAL_DLLPRIVATE void ImplInitDockingWindowData(); SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, Window &rBox); - DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplHandleLayoutTimerHdl, Idle*, void ); DockingWindow (const DockingWindow &) SAL_DELETED_FUNCTION; DockingWindow & operator= (const DockingWindow &) SAL_DELETED_FUNCTION; diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx index 64cd9674f383..b66a8893d023 100644 --- a/include/vcl/idle.hxx +++ b/include/vcl/idle.hxx @@ -26,7 +26,7 @@ class VCL_DLLPUBLIC Idle : public Scheduler { protected: - Link<> maIdleHdl; // Callback Link + Link<Idle *, void> maIdleHdl; // Callback Link public: Idle(); @@ -34,8 +34,8 @@ public: /// Make it possible to associate a callback with this idle handler /// of course, you can also sub-class and override 'Invoke' - void SetIdleHdl( const Link<>& rLink ) { maIdleHdl = rLink; } - const Link<>& GetIdleHdl() const { return maIdleHdl; } + void SetIdleHdl( const Link<Idle *, void>& rLink ) { maIdleHdl = rLink; } + const Link<Idle *, void>& GetIdleHdl() const { return maIdleHdl; } virtual void Invoke() SAL_OVERRIDE; Idle& operator=( const Idle& rIdle ); }; diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 29ed4b4225ed..db30b5a2bac0 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -159,7 +159,7 @@ private: SAL_DLLPRIVATE void Init(); SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, vcl::Window* i_pConfigureWin ); virtual void setPosSizeOnContainee(Size aSize, Window &rBox); - DECL_DLLPRIVATE_LINK( ImplHandleLayoutTimerHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplHandleLayoutTimerHdl, Idle*, void ); protected: // Single argument ctors shall be explicit. diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx index f5273d9d9b33..626094035db0 100644 --- a/include/vcl/texteng.hxx +++ b/include/vcl/texteng.hxx @@ -32,6 +32,7 @@ class TextCharAttrib; class TextUndo; class TextUndoManager; class EditSelFunctionSet; +class Idle; class IdleFormatter; class TextNode; class OutputDevice; @@ -173,7 +174,7 @@ protected: void ImpTextHeightChanged(); void ImpTextFormatted(); - DECL_LINK( IdleFormatHdl, void * ); + DECL_LINK_TYPED( IdleFormatHdl, Idle *, void ); void CheckIdleFormatter(); void IdleFormatAndUpdate( TextView* pCurView = 0, sal_uInt16 nMaxTimerRestarts = 5 ); diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index 076f4342f9c3..f4f8e184f5c3 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -236,7 +236,7 @@ private: SAL_DLLPRIVATE void ImplDrawFloatwinBorder( ImplToolItem* pItem ); DECL_DLLPRIVATE_LINK( ImplCallExecuteCustomMenu, void* ); - DECL_DLLPRIVATE_LINK( ImplUpdateHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplUpdateHdl, Idle*, void ); DECL_DLLPRIVATE_LINK( ImplResetAutoSizeTriesHdl, void* ); DECL_DLLPRIVATE_LINK( ImplCustomMenuListener, VclMenuEvent* ); DECL_DLLPRIVATE_LINK_TYPED( ImplDropdownLongClickHdl, Timer*, void ); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index a3012e79455f..d942003ff244 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -49,6 +49,7 @@ struct ImplCalcToTopData; struct SystemEnvData; struct SystemParentData; class ImplBorderWindow; +class Idle; class Timer; class DockingManager; class ScrollBar; @@ -424,11 +425,11 @@ private: public: - DECL_DLLPRIVATE_LINK( ImplHandlePaintHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplHandlePaintHdl, Idle*, void ); DECL_DLLPRIVATE_LINK( ImplGenerateMouseMoveHdl, void* ); DECL_DLLPRIVATE_LINK_TYPED( ImplTrackTimerHdl, Timer*, void ); DECL_DLLPRIVATE_LINK( ImplAsyncFocusHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplHandleResizeTimerHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED( ImplHandleResizeTimerHdl, Idle*, void ); DECL_DLLPRIVATE_LINK( ImplHideOwnerDrawWindowsHdl, void* ); diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 81c2f5c67535..467791da0b20 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -517,7 +517,7 @@ void LngSvcMgr::modified(const lang::EventObject&) //needs to be run in the main thread because //utl::ConfigChangeListener_Impl::changesOccurred grabs the SolarMutex and we //get notified that an extension was added from an extension manager thread -IMPL_LINK_NOARG(LngSvcMgr, updateAndBroadcast) +IMPL_LINK_NOARG_TYPED(LngSvcMgr, updateAndBroadcast, Idle *, void) { osl::MutexGuard aGuard( GetLinguMutex() ); @@ -531,8 +531,6 @@ IMPL_LINK_NOARG(LngSvcMgr, updateAndBroadcast) linguistic2::LinguServiceEventFlags::PROOFREAD_AGAIN | linguistic2::LinguServiceEventFlags::HYPHENATE_AGAIN ); } - - return 0; } void LngSvcMgr::stopListening() diff --git a/linguistic/source/lngsvcmgr.hxx b/linguistic/source/lngsvcmgr.hxx index 73822faf8473..c135ad6279fd 100644 --- a/linguistic/source/lngsvcmgr.hxx +++ b/linguistic/source/lngsvcmgr.hxx @@ -138,7 +138,7 @@ class LngSvcMgr : void UpdateAll(); void stopListening(); - DECL_LINK( updateAndBroadcast, void* ); + DECL_LINK_TYPED( updateAndBroadcast, Idle*, void ); public: LngSvcMgr(); diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index 90faf2d78595..fd9342e69025 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -82,7 +82,7 @@ namespace rptui bool m_bDeleted; - DECL_LINK(MarkTimeout, void *); + DECL_LINK_TYPED(MarkTimeout, Idle *, void); DECL_LINK( SplitHdl, void* ); void ImplInitSettings(); diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 698b065796f6..4ddada521fd6 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -269,7 +269,7 @@ void ODesignView::resizeDocumentView(Rectangle& _rPlayground) } -IMPL_LINK_NOARG(ODesignView, MarkTimeout) +IMPL_LINK_NOARG_TYPED(ODesignView, MarkTimeout, Idle *, void) { if ( m_pPropWin && m_pPropWin->IsVisible() ) { @@ -282,8 +282,6 @@ IMPL_LINK_NOARG(ODesignView, MarkTimeout) } Resize(); } - - return 0; } diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index e8b5905e5e52..667e5ea978fd 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -152,7 +152,7 @@ private: Idle aIdle; ScDocument* pDoc; - DECL_LINK(TimerHdl, void *); + DECL_LINK_TYPED(TimerHdl, Idle *, void); ScChartListenerCollection& operator=( const ScChartListenerCollection& ) SAL_DELETED_FUNCTION; diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 910f4d2ee884..0a30c7b4f949 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1890,7 +1890,7 @@ private: SCCOLROW nEndCol, SCCOLROW* pTranslate, ScProgress* pProgress, sal_uLong nProAdd ); - DECL_LINK(TrackTimeHdl, void *); + DECL_LINK_TYPED(TrackTimeHdl, Idle *, void); static ScRecursionHelper* CreateRecursionHelperInstance(); diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index 82ea4e3edacd..d51d100a4e8b 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -132,7 +132,7 @@ public: // moved by the application DECL_LINK_TYPED( IdleHandler, Timer*, void ); // Timer instead of idle - DECL_LINK( SpellTimerHdl, void* ); + DECL_LINK_TYPED( SpellTimerHdl, Idle*, void ); DECL_LINK( CalcFieldValueHdl, EditFieldInfo* ); void Execute( SfxRequest& rReq ); diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 05274b57691c..01721b6b0616 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -329,7 +329,7 @@ void ScDocument::SetChangeTrack( ScChangeTrack* pTrack ) pChangeTrack = pTrack; } -IMPL_LINK_NOARG(ScDocument, TrackTimeHdl) +IMPL_LINK_NOARG_TYPED(ScDocument, TrackTimeHdl, Idle *, void) { if ( ScDdeLink::IsInUpdate() ) // do not nest { @@ -353,8 +353,6 @@ IMPL_LINK_NOARG(ScDocument, TrackTimeHdl) } } } - - return 0; } void ScDocument::SetExpandRefs( bool bVal ) diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx index 9d80f65edd37..df74b9c3dafe 100644 --- a/sc/source/core/tool/chartlis.cxx +++ b/sc/source/core/tool/chartlis.cxx @@ -593,15 +593,14 @@ void ScChartListenerCollection::StartTimer() aIdle.Start(); } -IMPL_LINK_NOARG(ScChartListenerCollection, TimerHdl) +IMPL_LINK_NOARG_TYPED(ScChartListenerCollection, TimerHdl, Idle *, void) { if ( Application::AnyInput( VclInputFlags::KEYBOARD ) ) { aIdle.Start(); - return 0; + return; } UpdateDirtyCharts(); - return 0; } void ScChartListenerCollection::UpdateDirtyCharts() diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 4a5cf93dc110..48a3ad1c3574 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1942,12 +1942,12 @@ IMPL_LINK_NOARG_TYPED(ScModule, IdleHandler, Timer *, void) aIdleTimer.Start(); } -IMPL_LINK_NOARG(ScModule, SpellTimerHdl) +IMPL_LINK_NOARG_TYPED(ScModule, SpellTimerHdl, Idle *, void) { if ( Application::AnyInput( VclInputFlags::KEYBOARD ) ) { aSpellIdle.Start(); - return 0; // Later again ... + return; // Later again ... } ScTabViewShell* pViewSh = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current()); @@ -1956,7 +1956,6 @@ IMPL_LINK_NOARG(ScModule, SpellTimerHdl) if (pViewSh->ContinueOnlineSpelling()) aSpellIdle.Start(); } - return 0; } /** diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 120669101b1b..4cf0a86013d1 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -402,7 +402,7 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) return 0; } -IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle ) +IMPL_LINK_TYPED( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle, void ) { // alle 50ms nachschauen, ob RefInputMode noch stimmt @@ -426,8 +426,6 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle ) } pIdle->Start(); - - return 0; } IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb ) diff --git a/sc/source/ui/docshell/autostyl.cxx b/sc/source/ui/docshell/autostyl.cxx index 37f139347c41..ed81680c54f2 100644 --- a/sc/source/ui/docshell/autostyl.cxx +++ b/sc/source/ui/docshell/autostyl.cxx @@ -100,7 +100,7 @@ void ScAutoStyleList::AddInitial( const ScRange& rRange, const OUString& rStyle1 aInitIdle.Start(); } -IMPL_LINK_NOARG(ScAutoStyleList, InitHdl) +IMPL_LINK_NOARG_TYPED(ScAutoStyleList, InitHdl, Idle *, void) { boost::ptr_vector<ScAutoStyleInitData>::iterator iter; for (iter = aInitials.begin(); iter != aInitials.end(); ++iter) @@ -114,8 +114,6 @@ IMPL_LINK_NOARG(ScAutoStyleList, InitHdl) } aInitials.clear(); - - return 0; } void ScAutoStyleList::AddEntry( sal_uLong nTimeout, const ScRange& rRange, const OUString& rStyle ) diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 96ae3c0ac2c3..783891459687 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -1014,11 +1014,10 @@ void ScFunctionDockWin::ToggleFloatingMode() aIdle.Start(); } -IMPL_LINK_NOARG(ScFunctionDockWin, TimerHdl) +IMPL_LINK_NOARG_TYPED(ScFunctionDockWin, TimerHdl, Idle *, void) { CheckAlignment(eSfxOldAlignment,eSfxNewAlignment); SetSize(); - return 0; } void ScFunctionDockWin::Initialize(SfxChildWinInfo *pInfo) diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx index c8252fd9db0b..96d43e3efd36 100644 --- a/sc/source/ui/inc/acredlin.hxx +++ b/sc/source/ui/inc/acredlin.hxx @@ -148,10 +148,10 @@ private: DECL_LINK( SelectHandle, void*); DECL_LINK( RefInfoHandle, OUString*); - DECL_LINK( UpdateSelectionHdl, void*); + DECL_LINK_TYPED( UpdateSelectionHdl, Idle*, void ); DECL_LINK( ChgTrackModHdl, ScChangeTrack*); DECL_LINK( CommandHdl, void*); - DECL_LINK( ReOpenTimerHdl, void*); + DECL_LINK_TYPED( ReOpenTimerHdl, Idle*, void ); DECL_LINK( ColCompareHdl, SvSortData*); protected: diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 0c2363a0b5a1..eef11c9b442c 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -124,7 +124,7 @@ private: Idle aIdle; OUString aDocName; // document on which the dialog was opened - DECL_LINK( UpdateFocusHdl, void* ); + DECL_LINK_TYPED( UpdateFocusHdl, Idle*, void ); protected: bool DoClose( sal_uInt16 nId ); diff --git a/sc/source/ui/inc/autostyl.hxx b/sc/source/ui/inc/autostyl.hxx index b1659f5b4438..dcc3da713d2f 100644 --- a/sc/source/ui/inc/autostyl.hxx +++ b/sc/source/ui/inc/autostyl.hxx @@ -45,7 +45,7 @@ private: void AdjustEntries(sal_uLong nDiff); void StartTimer(sal_uLong nNow); DECL_LINK_TYPED( TimerHdl, Timer*, void ); - DECL_LINK( InitHdl, void* ); + DECL_LINK_TYPED( InitHdl, Idle*, void ); public: ScAutoStyleList(ScDocShell* pShell); diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx index 229c12055b42..03e6e831b271 100644 --- a/sc/source/ui/inc/conflictsdlg.hxx +++ b/sc/source/ui/inc/conflictsdlg.hxx @@ -151,7 +151,7 @@ private: DECL_LINK( SelectHandle, void* ); DECL_LINK( DeselectHandle, void* ); - DECL_LINK( UpdateSelectionHdl, void* ); + DECL_LINK_TYPED( UpdateSelectionHdl, Idle*, void ); DECL_LINK( KeepMineHandle, void* ); DECL_LINK( KeepOtherHandle, void* ); DECL_LINK( KeepAllMineHandle, void* ); diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index bef700938a8f..a3450cfc4133 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -84,7 +84,7 @@ private: DECL_LINK( SetSelectionHdl, void* ); DECL_LINK( SelHdl, ListBox* ); DECL_LINK(SetSplitHdl,ScPrivatSplit*); - DECL_LINK( TimerHdl, void*); + DECL_LINK_TYPED( TimerHdl, Idle*, void ); protected: diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index e7cdc96ee775..693d12848731 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -222,7 +222,7 @@ private: DECL_LINK( ScrollHdl, ScrollBar* ); // Hack: RefInput control - DECL_LINK( TimeOutHdl, Idle* ); + DECL_LINK_TYPED( TimeOutHdl, Idle*, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx index cb23e7ab61b9..e7296250b1b9 100644 --- a/sc/source/ui/inc/navipi.hxx +++ b/sc/source/ui/inc/navipi.hxx @@ -258,7 +258,7 @@ private: ScNavigatorControllerItem** ppBoundItems; - DECL_LINK( TimeHdl, Idle* ); + DECL_LINK_TYPED( TimeHdl, Idle*, void ); void DoResize(); diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx index cd4d3bfb74e2..19cc96c96b87 100644 --- a/sc/source/ui/inc/tphfedit.hxx +++ b/sc/source/ui/inc/tphfedit.hxx @@ -107,7 +107,7 @@ private: sal_uInt16 nSelected; OString aSelectedIdent; - SAL_DLLPRIVATE DECL_LINK( TimerHdl, void*); + DECL_DLLPRIVATE_LINK_TYPED( TimerHdl, Idle*, void ); protected: diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index f8011b957a44..71d7d2e7f72d 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -1637,16 +1637,14 @@ IMPL_LINK( ScAcceptChgDlg, ChgTrackModHdl, ScChangeTrack*, pChgTrack) return 0; } -IMPL_LINK_NOARG(ScAcceptChgDlg, ReOpenTimerHdl) +IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, ReOpenTimerHdl, Idle *, void) { ScSimpleRefDlgWrapper::SetAutoReOpen(true); m_pAcceptChgCtr->ShowFilterPage(); RefHandle(NULL); - - return 0; } -IMPL_LINK_NOARG(ScAcceptChgDlg, UpdateSelectionHdl) +IMPL_LINK_NOARG_TYPED(ScAcceptChgDlg, UpdateSelectionHdl, Idle *, void) { ScTabView* pTabView = pViewData->GetView(); @@ -1692,8 +1690,6 @@ IMPL_LINK_NOARG(ScAcceptChgDlg, UpdateSelectionHdl) bool bEnable = pDoc->IsDocEditable() && pChanges && !pChanges->IsProtected(); pTPView->EnableAccept( bAcceptFlag && bEnable ); pTPView->EnableReject( bRejectFlag && bEnable ); - - return 0; } IMPL_LINK_NOARG(ScAcceptChgDlg, CommandHdl) diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 6ea1343fc242..a1a6407b3602 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -964,13 +964,12 @@ void ScRefHandler::stateChanged(const StateChangedType nStateChange, const bool } } -IMPL_LINK_NOARG(ScRefHandler, UpdateFocusHdl) +IMPL_LINK_NOARG_TYPED(ScRefHandler, UpdateFocusHdl, Idle *, void) { if (pActiveWin) { pActiveWin->GrabFocus(); } - return 0; } bool ScRefHandler::ParseWithNames( ScRangeList& rRanges, const OUString& rStr, ScDocument* pDoc ) diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 9c0b55637cb6..a7c46448e2b4 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -566,11 +566,11 @@ IMPL_LINK_NOARG(ScConflictsDlg, DeselectHandle) return 0; } -IMPL_LINK_NOARG(ScConflictsDlg, UpdateSelectionHdl) +IMPL_LINK_NOARG_TYPED(ScConflictsDlg, UpdateSelectionHdl, Idle *, void) { if ( !mpViewData || !mpOwnDoc ) { - return 0; + return; } ScTabView* pTabView = mpViewData->GetView(); @@ -600,8 +600,6 @@ IMPL_LINK_NOARG(ScConflictsDlg, UpdateSelectionHdl) } pEntry = m_pLbConflicts->NextSelected( pEntry ); } - - return 0; } void ScConflictsDlg::SetConflictAction( SvTreeListEntry* pRootEntry, ScConflictAction eConflictAction ) diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index 02fc9c1a8ac7..ab073e168d2f 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -893,13 +893,12 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint ) } } -IMPL_LINK( ScNavigatorDlg, TimeHdl, Idle*, pIdle ) +IMPL_LINK_TYPED( ScNavigatorDlg, TimeHdl, Idle*, pIdle, void ) { if ( pIdle != &aContentIdle ) - return 0; + return; aLbEntries->Refresh( SC_CONTENT_NOTE ); - return 0; } void ScNavigatorDlg::SetDropMode(sal_uInt16 nNew) diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index c087920e98cd..175d3c717780 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -368,14 +368,14 @@ void ScExtIButton::MouseButtonDown( const MouseEvent& rMEvt ) void ScExtIButton::MouseButtonUp( const MouseEvent& rMEvt) { aIdle.Stop(); - aIdle.SetIdleHdl(Link<>()); + aIdle.SetIdleHdl(Link<Idle *, void>()); ImageButton::MouseButtonUp(rMEvt ); } void ScExtIButton::Click() { aIdle.Stop(); - aIdle.SetIdleHdl(Link<>()); + aIdle.SetIdleHdl(Link<Idle *, void>()); ImageButton::Click(); } @@ -414,10 +414,9 @@ bool ScExtIButton::PreNotify( NotifyEvent& rNEvt ) return ImageButton::PreNotify(rNEvt ); } -IMPL_LINK_NOARG(ScExtIButton, TimerHdl) +IMPL_LINK_NOARG_TYPED(ScExtIButton, TimerHdl, Idle *, void) { StartPopup(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 21d0bb5414fd..1a3e359b3f4c 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -191,7 +191,7 @@ private: SAL_DLLPRIVATE void SpellObject(SdrTextObj* pObj); DECL_DLLPRIVATE_LINK_TYPED(WorkStartupHdl, Timer *, void); - DECL_DLLPRIVATE_LINK(OnlineSpellingHdl, void *); + DECL_DLLPRIVATE_LINK_TYPED(OnlineSpellingHdl, Idle *, void); DECL_DLLPRIVATE_LINK(OnlineSpellEventHdl, EditStatus*); std::vector< OUString > maAnnotationAuthors; diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 1abbd8e136ad..fcc4d88211ab 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -823,7 +823,7 @@ void SdDrawDocument::FillOnlineSpellingList(SdPage* pPage) } // OnlineSpelling in the background -IMPL_LINK_NOARG(SdDrawDocument, OnlineSpellingHdl) +IMPL_LINK_NOARG_TYPED(SdDrawDocument, OnlineSpellingHdl, Idle *, void) { if (mpOnlineSpellingList!=NULL && ( !mbOnlineSpell || mpOnlineSpellingList->hasMore())) @@ -872,8 +872,6 @@ IMPL_LINK_NOARG(SdDrawDocument, OnlineSpellingHdl) delete mpOnlineSearchItem; mpOnlineSearchItem = NULL; } - - return 0; } // Spell object (for OnlineSpelling) diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx index eff19c5f365f..d02f13128b80 100644 --- a/sd/source/ui/dlg/brkdlg.cxx +++ b/sd/source/ui/dlg/brkdlg.cxx @@ -166,11 +166,10 @@ short BreakDlg::Execute() /** * link-method which starts the working function */ -IMPL_LINK_NOARG(BreakDlg, InitialUpdate) +IMPL_LINK_NOARG_TYPED(BreakDlg, InitialUpdate, Idle *, void) { pDrView->DoImportMarkedMtf(pProgrInfo); EndDialog(RET_OK); - return 0L; } } // end of namespace sd diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index 4ff7fa99d96d..0450ef24d044 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -227,14 +227,15 @@ public: DECL_LINK( SelectFileHdl, void * ); DECL_LINK( SelectRegionHdl, ListBox * ); - DECL_LINK( UpdatePreviewHdl, void * ); - DECL_LINK( UpdatePageListHdl, void * ); + DECL_LINK_TYPED( UpdatePreviewHdl, Idle *, void ); + DECL_LINK_TYPED( UpdatePageListHdl, Idle *, void ); DECL_LINK( StartTypeHdl, RadioButton * ); DECL_LINK( SelectTemplateHdl, void * ); DECL_LINK( NextPageHdl, void * ); DECL_LINK( LastPageHdl, void * ); DECL_LINK( PreviewFlagHdl, void * ); - DECL_LINK( EffectPreviewHdl, void * ); + DECL_LINK_TYPED( EffectPreviewIdleHdl, Idle *, void ); + DECL_LINK( EffectPreviewClickHdl, void * ); DECL_LINK( SelectLayoutHdl, void * ); DECL_LINK( PageSelectHdl, void * ); DECL_LINK( PresTypeHdl, void * ); @@ -579,7 +580,7 @@ AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link<>& rFinishL mpPreviewFlag->Check( mbPreview ); mpPreviewFlag->SetClickHdl(LINK(this, AssistentDlgImpl, PreviewFlagHdl )); - mpPreview->SetClickHdl(LINK(this,AssistentDlgImpl, EffectPreviewHdl )); + mpPreview->SetClickHdl(LINK(this,AssistentDlgImpl, EffectPreviewClickHdl )); // sets the exit page maAssistentFunc.GotoPage(1); @@ -589,7 +590,7 @@ AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link<>& rFinishL maPrevIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, UpdatePreviewHdl)); maEffectPrevIdle.SetPriority( SchedulerPriority::MEDIUM ); - maEffectPrevIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, EffectPreviewHdl )); + maEffectPrevIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, EffectPreviewIdleHdl )); maUpdatePageListIdle.SetPriority( SchedulerPriority::MEDIUM ); maUpdatePageListIdle.SetIdleHdl( LINK( this, AssistentDlgImpl, UpdatePageListHdl)); @@ -1107,7 +1108,7 @@ IMPL_LINK( AssistentDlgImpl, OpenButtonHdl, Button*, pButton ) return mpPage1OpenLB->GetDoubleClickHdl().Call(pButton); } -IMPL_LINK_NOARG(AssistentDlgImpl, EffectPreviewHdl) +IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, EffectPreviewIdleHdl, Idle *, void) { if(mbPreview && xDocShell.Is() ) { @@ -1125,6 +1126,11 @@ IMPL_LINK_NOARG(AssistentDlgImpl, EffectPreviewHdl) } mpPreview->startPreview(); } +} + +IMPL_LINK_NOARG(AssistentDlgImpl, EffectPreviewClickHdl) +{ + EffectPreviewIdleHdl(nullptr); return 0; } @@ -1173,16 +1179,14 @@ IMPL_LINK_NOARG(AssistentDlgImpl, PageSelectHdl) return 0; } -IMPL_LINK_NOARG(AssistentDlgImpl, UpdatePageListHdl) +IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, UpdatePageListHdl, Idle *, void) { UpdatePageList(); - return 0; } -IMPL_LINK_NOARG(AssistentDlgImpl, UpdatePreviewHdl) +IMPL_LINK_NOARG_TYPED(AssistentDlgImpl, UpdatePreviewHdl, Idle *, void) { UpdatePreview( true ); - return 0; } IMPL_LINK( AssistentDlgImpl, StartTypeHdl, RadioButton *, pButton ) diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx index ae7c5da3b28d..27d69ec7d524 100644 --- a/sd/source/ui/dlg/filedlg.cxx +++ b/sd/source/ui/dlg/filedlg.cxx @@ -62,7 +62,7 @@ private: Idle maUpdateIdle; - DECL_LINK( IsMusicStoppedHdl, void * ); + DECL_LINK_TYPED( IsMusicStoppedHdl, Idle *, void ); public: SdFileDialog_Imp( const short nDialogType, bool bUsableSelection ); @@ -163,7 +163,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, PlayMusicHdl) return 0; } -IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl) +IMPL_LINK_NOARG_TYPED(SdFileDialog_Imp, IsMusicStoppedHdl, Idle *, void) { SolarMutexGuard aGuard; @@ -173,7 +173,7 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl) ) { maUpdateIdle.Start(); - return 0L; + return; } if( mxControlAccess.is() ) @@ -191,8 +191,6 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl) #endif } } - - return 0L; } // check whether to disable the "selection" checkbox diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx b/sd/source/ui/framework/module/ShellStackGuard.cxx index 3e9ef23a51b1..bfcbdf5e7f24 100644 --- a/sd/source/ui/framework/module/ShellStackGuard.cxx +++ b/sd/source/ui/framework/module/ShellStackGuard.cxx @@ -118,7 +118,7 @@ void SAL_CALL ShellStackGuard::disposing ( } } -IMPL_LINK(ShellStackGuard, TimeoutHandler, Idle*, pIdle) +IMPL_LINK_TYPED(ShellStackGuard, TimeoutHandler, Idle*, pIdle, void) { #ifdef DEBUG OSL_ASSERT(pIdle==&maPrinterPollingIdle); @@ -138,8 +138,6 @@ IMPL_LINK(ShellStackGuard, TimeoutHandler, Idle*, pIdle) maPrinterPollingIdle.Start(); } } - - return 0; } bool ShellStackGuard::IsPrinting() const diff --git a/sd/source/ui/framework/module/ShellStackGuard.hxx b/sd/source/ui/framework/module/ShellStackGuard.hxx index 851687490d1b..c9033eadb568 100644 --- a/sd/source/ui/framework/module/ShellStackGuard.hxx +++ b/sd/source/ui/framework/module/ShellStackGuard.hxx @@ -87,7 +87,7 @@ private: ::boost::scoped_ptr<ConfigurationController::Lock> mpUpdateLock; Idle maPrinterPollingIdle; - DECL_LINK(TimeoutHandler, Idle*); + DECL_LINK_TYPED(TimeoutHandler, Idle*, void); /** Return <TRUE/> when the printer is printing. Return <FALSE/> when the printer is not printing, or there is no printer, or something diff --git a/sd/source/ui/inc/BreakDlg.hxx b/sd/source/ui/inc/BreakDlg.hxx index 6be181af2cad..2a807a7870d3 100644 --- a/sd/source/ui/inc/BreakDlg.hxx +++ b/sd/source/ui/inc/BreakDlg.hxx @@ -74,7 +74,7 @@ private: DECL_LINK( CancelButtonHdl, void* ); DECL_LINK( UpDate, void* ); - DECL_LINK( InitialUpdate, void* ); + DECL_LINK_TYPED( InitialUpdate, Idle*, void ); }; } // end of namespace sd diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx index 79207b406159..610648d78014 100644 --- a/sd/source/ui/inc/View.hxx +++ b/sd/source/ui/inc/View.hxx @@ -284,8 +284,8 @@ protected: boost::ptr_vector<SdViewRedrawRec> maLockedRedraws; bool mbIsDropAllowed; - DECL_LINK( DropErrorHdl, void* ); - DECL_LINK( DropInsertFileHdl, void* ); + DECL_LINK_TYPED( DropErrorHdl, Idle*, void ); + DECL_LINK_TYPED( DropInsertFileHdl, Idle*, void ); DECL_LINK( ExecuteNavigatorDrop, SdNavigatorDropEvent* pSdNavigatorDropEvent ); void ImplClearDrawDropMarker(); diff --git a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx index e2f909075953..0d43120c134f 100644 --- a/sd/source/ui/slidesorter/controller/SlsAnimator.cxx +++ b/sd/source/ui/slidesorter/controller/SlsAnimator.cxx @@ -219,10 +219,10 @@ void Animator::RequestNextFrame (const double nFrameStart) } } -IMPL_LINK_NOARG(Animator, TimeoutHandler) +IMPL_LINK_NOARG_TYPED(Animator, TimeoutHandler, Idle *, void) { if (mbIsDisposed) - return 0; + return; if (ProcessAnimations(maElapsedTime.getElapsedTime())) CleanUpAnimationList(); @@ -232,8 +232,6 @@ IMPL_LINK_NOARG(Animator, TimeoutHandler) if (!maAnimations.empty()) RequestNextFrame(); - - return 0; } //===== Animator::Animation =================================================== diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx index faf620cd9a0e..d58511fec397 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimator.hxx @@ -105,7 +105,7 @@ private: AnimationId mnNextAnimationId; - DECL_LINK(TimeoutHandler, void *); + DECL_LINK_TYPED(TimeoutHandler, Idle *, void); /** Execute one step of every active animation. @param nTime diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 929beb64ea6e..0395499284c1 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -398,11 +398,11 @@ SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rM /** * Timer handler for InsertFile at Drop() */ -IMPL_LINK_NOARG(View, DropInsertFileHdl) +IMPL_LINK_NOARG_TYPED(View, DropInsertFileHdl, Idle *, void) { DBG_ASSERT( mpViewSh, "sd::View::DropInsertFileHdl(), I need a view shell to work!" ); if( !mpViewSh ) - return 0; + return; SfxErrorContext aEc( ERRCTX_ERROR, mpViewSh->GetActiveWindow(), RID_SO_ERRCTX ); ErrCode nError = 0; @@ -584,17 +584,14 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl) if( nError ) ErrorHandler::HandleError( nError ); - - return nError; } /** * Timer handler for Errorhandling at Drop() */ -IMPL_LINK_NOARG(View, DropErrorHdl) +IMPL_LINK_NOARG_TYPED(View, DropErrorHdl, Idle *, void) { InfoBox( mpViewSh ? mpViewSh->GetActiveWindow() : 0, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute(); - return 0; } /** 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) {} diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx index 7efd852b6c41..b3864744e333 100644 --- a/starmath/inc/edit.hxx +++ b/starmath/inc/edit.hxx @@ -65,8 +65,8 @@ class SmEditWindow : public vcl::Window, public DropTargetHelper virtual void KeyInput(const KeyEvent& rKEvt) SAL_OVERRIDE; virtual void Command(const CommandEvent& rCEvt) SAL_OVERRIDE; DECL_LINK(MenuSelectHdl, Menu *); - DECL_LINK(ModifyTimerHdl, Idle *); - DECL_LINK(CursorMoveTimerHdl, Idle *); + DECL_LINK_TYPED(ModifyTimerHdl, Idle *, void); + DECL_LINK_TYPED(CursorMoveTimerHdl, Idle *, void); virtual void DataChanged( const DataChangedEvent& ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index 6b7975f57e22..2f0ad530ad37 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -256,20 +256,19 @@ void SmEditWindow::DataChanged( const DataChangedEvent& ) Resize(); } -IMPL_LINK( SmEditWindow, ModifyTimerHdl, Idle *, EMPTYARG /*pTimer*/ ) +IMPL_LINK_NOARG_TYPED( SmEditWindow, ModifyTimerHdl, Idle *, void ) { UpdateStatus(); aModifyIdle.Stop(); - return 0; } -IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Idle *, EMPTYARG /*pTimer*/) +IMPL_LINK_NOARG_TYPED(SmEditWindow, CursorMoveTimerHdl, Idle *, void) // every once in a while check cursor position (selection) of edit // window and if it has changed (try to) set the formula-cursor // according to that. { if (IsInlineEditEnabled()) - return 0; + return; ESelection aNewSelection(GetSelection()); @@ -289,8 +288,6 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Idle *, EMPTYARG /*pTimer*/) } } aCursorMoveIdle.Stop(); - - return 0; } void SmEditWindow::Resize() diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index c5d3b4b2db53..5b8151fd1ff1 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -226,13 +226,13 @@ class SvxIconChoiceCtrl_Impl DECL_LINK( ScrollUpDownHdl, ScrollBar * ); DECL_LINK( ScrollLeftRightHdl, ScrollBar * ); - DECL_LINK(EditTimeoutHdl, void *); + DECL_LINK_TYPED(EditTimeoutHdl, Idle *, void); DECL_LINK( UserEventHdl, void* ); DECL_LINK( EndScrollHdl, void* ); - DECL_LINK( AutoArrangeHdl, void* ); - DECL_LINK( DocRectChangedHdl, void* ); - DECL_LINK( VisRectChangedHdl, void* ); - DECL_LINK( CallSelectHdlHdl, void* ); + DECL_LINK_TYPED( AutoArrangeHdl, Idle*, void ); + DECL_LINK_TYPED( DocRectChangedHdl, Idle*, void ); + DECL_LINK_TYPED( VisRectChangedHdl, Idle*, void ); + DECL_LINK_TYPED( CallSelectHdlHdl, Idle*, void ); void AdjustScrollBars( bool bVirtSizeGrowedOnly = false); void PositionScrollBars( long nRealWidth, long nRealHeight ); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index e9d2412f1cb3..8f2b6f660681 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -64,7 +64,7 @@ class IcnViewEdit_Impl : public MultiLineEdit bool bGrabFocus; void CallCallBackHdl_Impl(); - DECL_LINK(Timeout_Impl, void *); + DECL_LINK_TYPED(Timeout_Impl, Idle *, void); DECL_LINK( ReturnHdl_Impl, Accelerator * ); DECL_LINK( EscapeHdl_Impl, Accelerator * ); @@ -2854,25 +2854,22 @@ void SvxIconChoiceCtrl_Impl::ClearSelectedRectList() aSelectedRectList.clear(); } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, AutoArrangeHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, AutoArrangeHdl, Idle *, void) { aAutoArrangeIdle.Stop(); Arrange( IsAutoArrange() ); - return 0; } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, VisRectChangedHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, VisRectChangedHdl, Idle *, void) { aVisRectChangedIdle.Stop(); pView->VisibleRectChanged(); - return 0; } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, DocRectChangedHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, DocRectChangedHdl, Idle *, void) { aDocRectChangedIdle.Stop(); pView->DocumentRectChanged(); - return 0; } bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Point& rDocPos ) @@ -2883,7 +2880,7 @@ bool SvxIconChoiceCtrl_Impl::IsTextHit( SvxIconChoiceCtrlEntry* pEntry, const Po return false; } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, EditTimeoutHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, EditTimeoutHdl, Idle *, void) { SvxIconChoiceCtrlEntry* pEntry = GetCurEntry(); if( bEntryEditingEnabled && pEntry && @@ -2891,7 +2888,6 @@ IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, EditTimeoutHdl) { EditEntry( pEntry ); } - return 0; } @@ -3306,10 +3302,9 @@ void IcnViewEdit_Impl::CallCallBackHdl_Impl() } } -IMPL_LINK_NOARG(IcnViewEdit_Impl, Timeout_Impl) +IMPL_LINK_NOARG_TYPED(IcnViewEdit_Impl, Timeout_Impl, Idle *, void) { CallCallBackHdl_Impl(); - return 0; } IMPL_LINK( IcnViewEdit_Impl, ReturnHdl_Impl, Accelerator*, EMPTYARG ) @@ -3738,12 +3733,11 @@ void SvxIconChoiceCtrl_Impl::CallSelectHandler( SvxIconChoiceCtrlEntry* ) aCallSelectHdlIdle.Start(); } -IMPL_LINK_NOARG(SvxIconChoiceCtrl_Impl, CallSelectHdlHdl) +IMPL_LINK_NOARG_TYPED(SvxIconChoiceCtrl_Impl, CallSelectHdlHdl, Idle *, void) { pHdlEntry = 0; pView->ClickIcon(); //pView->Select(); - return 0; } void SvxIconChoiceCtrl_Impl::SetOrigin( const Point& rPos ) diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 784efbc231ae..c53906f4f2d1 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2931,10 +2931,9 @@ void SvImpLBox::BeginDrag() } } -IMPL_LINK_NOARG(SvImpLBox, BeginDragHdl) +IMPL_LINK_NOARG_TYPED(SvImpLBox, BeginDragHdl, Idle *, void) { pView->StartDrag( 0, aAsyncBeginDragPos ); - return 0; } void SvImpLBox::PaintDDCursor( SvTreeListEntry* pInsertionPos ) @@ -3145,7 +3144,7 @@ void SvImpLBox::SetCurEntry( SvTreeListEntry* pEntry ) pView->Select( pEntry, true ); } -IMPL_LINK_NOARG(SvImpLBox, EditTimerCall) +IMPL_LINK_NOARG_TYPED(SvImpLBox, EditTimerCall, Idle *, void) { if( pView->IsInplaceEditingEnabled() ) { @@ -3157,7 +3156,7 @@ IMPL_LINK_NOARG(SvImpLBox, EditTimerCall) || ( std::abs( aCurrentMousePos.Y() - aEditClickPos.Y() ) > 5 ) ) { - return 0L; + return; } } @@ -3169,7 +3168,6 @@ IMPL_LINK_NOARG(SvImpLBox, EditTimerCall) ShowCursor( true ); } } - return 0; } bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt ) diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 6d98310924b6..47559982645c 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -242,10 +242,9 @@ void SvInplaceEdit2::LoseFocus() } } -IMPL_LINK_NOARG(SvInplaceEdit2, Timeout_Impl) +IMPL_LINK_NOARG_TYPED(SvInplaceEdit2, Timeout_Impl, Idle *, void) { CallCallBackHdl_Impl(); - return 0; } void SvInplaceEdit2::CallCallBackHdl_Impl() diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx index 87e30ec3c7f1..2a86642c9eea 100644 --- a/svtools/source/control/asynclink.cxx +++ b/svtools/source/control/asynclink.cxx @@ -57,14 +57,14 @@ bAllowDoubles _pIdle = new Idle; _pIdle->SetPriority( SchedulerPriority::HIGHEST ); _pIdle->SetIdleHdl( LINK( - this, AsynchronLink, HandleCall) ); + this, AsynchronLink, HandleCall_Idle) ); } _pIdle->Start(); } else { if( _pMutex ) _pMutex->acquire(); - _nEventId = Application::PostUserEvent( LINK( this, AsynchronLink, HandleCall), 0 ); + _nEventId = Application::PostUserEvent( LINK( this, AsynchronLink, HandleCall_PostUserEvent), 0 ); if( _pMutex ) _pMutex->release(); } } @@ -81,12 +81,17 @@ AsynchronLink::~AsynchronLink() delete _pMutex; } -IMPL_STATIC_LINK( AsynchronLink, HandleCall, void*, EMPTYARG ) +IMPL_STATIC_LINK_TYPED( AsynchronLink, HandleCall_Idle, Idle*, EMPTYARG, void ) { if( pThis->_pMutex ) pThis->_pMutex->acquire(); pThis->_nEventId = 0; if( pThis->_pMutex ) pThis->_pMutex->release(); pThis->Call_Impl( pThis->_pArg ); +} + +IMPL_STATIC_LINK( AsynchronLink, HandleCall_PostUserEvent, void*, EMPTYARG ) +{ + HandleCall_Idle(pThis, nullptr); return 0; } diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index a918c0fbbe8e..f8fd9a35d604 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -236,7 +236,7 @@ private: bool mbPostEvt; DECL_LINK( ImplEndEditHdl, void* ); - DECL_LINK( ImplEndTimerHdl, void* ); + DECL_LINK_TYPED( ImplEndTimerHdl, Idle*, void ); public: TabBarEdit( TabBar* pParent, WinBits nWinStyle = 0 ); @@ -317,10 +317,10 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel ) return 0; } -IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl) +IMPL_LINK_NOARG_TYPED(TabBarEdit, ImplEndTimerHdl, Idle *, void) { if ( HasFocus() ) - return 0; + return; // We need this query, because the edit gets a losefocus event, // when it shows the context menu or the insert symbol dialog @@ -328,8 +328,6 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl) maLoseFocusIdle.Start(); else GetParent()->EndEditMode( true ); - - return 0; } struct TabBar_Impl diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 74c04e77f15e..3e68e1719805 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -125,11 +125,10 @@ void WizardDialog::queue_resize(StateChangedType /*eReason*/) maWizardLayoutIdle.Start(); } -IMPL_LINK( WizardDialog, ImplHandleWizardLayoutTimerHdl, void*, EMPTYARG ) +IMPL_LINK_NOARG_TYPED( WizardDialog, ImplHandleWizardLayoutTimerHdl, Idle*, void ) { ImplPosCtrls(); ImplPosTabPage(); - return 0; } void WizardDialog::ImplPosCtrls() diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 4f0c79f5e3db..3abde0e2b5a0 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -161,9 +161,9 @@ private: // #97680# -------------------- std::vector< short > aContextBmpWidthVector; - DECL_LINK(EditTimerCall, void *); + DECL_LINK_TYPED(EditTimerCall, Idle *, void); - DECL_LINK( BeginDragHdl, void* ); + DECL_LINK_TYPED( BeginDragHdl, Idle*, void ); DECL_LINK( MyUserEvent,void*); void StopUserEvent(); diff --git a/svtools/source/misc/filechangedchecker.cxx b/svtools/source/misc/filechangedchecker.cxx index 5fb6fee99c3e..ea35296baa9c 100644 --- a/svtools/source/misc/filechangedchecker.cxx +++ b/svtools/source/misc/filechangedchecker.cxx @@ -75,7 +75,7 @@ bool FileChangedChecker::hasFileChanged() return false; } -IMPL_LINK_NOARG(FileChangedChecker, TimerHandler) +IMPL_LINK_NOARG_TYPED(FileChangedChecker, TimerHandler, Idle *, void) { // If the file has changed, then update the graphic in the doc OSL_TRACE("Timeout Called"); @@ -87,7 +87,6 @@ IMPL_LINK_NOARG(FileChangedChecker, TimerHandler) // Reset the Idle in any case resetTimer(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx index 05db3120343f..48feb1dd7e0b 100644 --- a/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx +++ b/svx/inc/sdr/overlay/overlaymanagerbuffered.hxx @@ -54,7 +54,7 @@ namespace sdr bool mbRefreshWithPreRendering : 1; // link for timer - DECL_LINK(ImpBufferTimerHandler, AutoTimer*); + DECL_LINK_TYPED(ImpBufferTimerHandler, Idle*, void); // Internal methods for buffering void ImpPrepareBufferDevice(); diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx index b735152ef15d..0a436533b97e 100644 --- a/svx/inc/svdibrow.hxx +++ b/svx/inc/svdibrow.hxx @@ -120,7 +120,7 @@ class SdrItemBrowser: public _SdrItemBrowserWindow { bool bDirty; private: static vcl::Window* ImpGetViewWin(SdrView& rView); - DECL_LINK(IdleHdl, void *); + DECL_LINK_TYPED(IdleHdl, Idle *, void); DECL_LINK(ChangedHdl,_SdrItemBrowserControl*); DECL_LINK(SetDirtyHdl, void *); public: diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 1d4799c7cc07..760a010fdd39 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -570,7 +570,7 @@ IMPL_LINK( SvxSuperContourDlg, GraphSizeHdl, ContourWindow*, pWnd ) return 0L; } -IMPL_LINK_NOARG(SvxSuperContourDlg, UpdateHdl) +IMPL_LINK_NOARG_TYPED(SvxSuperContourDlg, UpdateHdl, Idle *, void) { aUpdateIdle.Stop(); @@ -592,11 +592,9 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, UpdateHdl) } GetBindings().Invalidate( SID_CONTOUR_EXEC ); - - return 0L; } -IMPL_LINK_NOARG(SvxSuperContourDlg, CreateHdl) +IMPL_LINK_NOARG_TYPED(SvxSuperContourDlg, CreateHdl, Idle *, void) { aCreateIdle.Stop(); @@ -607,8 +605,6 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, CreateHdl) EnterWait(); SetPolyPolygon( CreateAutoContour( rGraphic, bValid ? &aWorkRect : NULL ) ); LeaveWait(); - - return 0L; } IMPL_LINK( SvxSuperContourDlg, StateHdl, ContourWindow*, pWnd ) diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index 68c78423c9e6..a0e76fb8cc19 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -86,8 +86,8 @@ class SvxSuperContourDlg : public SvxContourDlg DECL_LINK( Tbx1ClickHdl, ToolBox* ); DECL_LINK( MousePosHdl, ContourWindow* ); DECL_LINK( GraphSizeHdl, ContourWindow* ); - DECL_LINK(UpdateHdl, void *); - DECL_LINK(CreateHdl, void *); + DECL_LINK_TYPED(UpdateHdl, Idle *, void); + DECL_LINK_TYPED(CreateHdl, Idle *, void); DECL_LINK( StateHdl, ContourWindow* ); DECL_LINK( PipetteHdl, ContourWindow* ); DECL_LINK( PipetteClickHdl, ContourWindow* ); diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 3986a6a1a594..9285f3b32335 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -746,7 +746,7 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, ModifyInputHdl_Impl) return 0; } -IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxFontWorkDialog, InputTimoutHdl_Impl, Idle *, void) { // Possibly set the Metric system again. This should be done with a // listen, this is however not possible at the moment due to compabillity @@ -797,7 +797,6 @@ IMPL_LINK_NOARG(SvxFontWorkDialog, InputTimoutHdl_Impl) // Slot-ID does not matter, the Exec method evaluates the entire item set GetBindings().GetDispatcher()->Execute( SID_FORMTEXT_DISTANCE, SfxCallMode::RECORD, &aDistItem, &aStartItem, &aShadowXItem, &aShadowYItem, 0L ); - return 0; } IMPL_LINK_NOARG(SvxFontWorkDialog, ColorSelectHdl_Impl) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index 98561d20faf0..85b96ece35a9 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -739,14 +739,12 @@ void GraphCtrl::SetObjKind( const SdrObjKind _eObjKind ) eObjKind = OBJ_NONE; } -IMPL_LINK( GraphCtrl, UpdateHdl, Timer*, pTimer ) +IMPL_LINK_TYPED( GraphCtrl, UpdateHdl, Idle*, pTimer, void ) { if ( aUpdateLink.IsSet() ) aUpdateLink.Call( this ); pTimer->Start(); - - return 0L; } diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 1d606ce45a72..b260afa8db16 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -696,7 +696,7 @@ IMPL_LINK_NOARG(SvxIMapDlg, URLLoseFocusHdl) return 0; } -IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl) +IMPL_LINK_NOARG_TYPED(SvxIMapDlg, UpdateHdl, Idle *, void) { pOwnData->aIdle.Stop(); @@ -723,8 +723,6 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl) pOwnData->aUpdateTargetList.clear(); GetBindings().Invalidate( SID_IMAP_EXEC ); - - return 0L; } IMPL_LINK( SvxIMapDlg, StateHdl, IMapWindow*, pWnd ) diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 65d12c962e88..4615a0cc57f4 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -533,7 +533,7 @@ void SvxBmpNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) } } -IMPL_LINK_NOARG(SvxBmpNumValueSet, FormatHdl_Impl) +IMPL_LINK_NOARG_TYPED(SvxBmpNumValueSet, FormatHdl_Impl, Idle *, void) { // only when a graphics was not there, it needs to be formatted if(bGrfNotFound) @@ -542,7 +542,6 @@ IMPL_LINK_NOARG(SvxBmpNumValueSet, FormatHdl_Impl) Format(); } Invalidate(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 3a95687d1563..33fdcba23745 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2882,7 +2882,7 @@ namespace svxform } - IMPL_LINK_NOARG(AddConditionDialog, ResultHdl) + IMPL_LINK_NOARG_TYPED(AddConditionDialog, ResultHdl, Idle *, void) { OUString sCondition = comphelper::string::strip(m_pConditionED->GetText(), ' '); OUString sResult; @@ -2898,7 +2898,6 @@ namespace svxform } } m_pResultWin->SetText( sResult ); - return 0; } NamespaceItemDialog::NamespaceItemDialog( diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index aadfc17d10e6..1ded55099cd5 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -496,10 +496,9 @@ void FmXAutoControl::ImplSetPeerProperty( const OUString& rPropName, const Any& } -IMPL_LINK( FormController, OnActivateTabOrder, void*, /*EMPTYTAG*/ ) +IMPL_LINK_NOARG_TYPED( FormController, OnActivateTabOrder, Idle*, void ) { activateTabOrder(); - return 1; } diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index 378137464780..d336a391399b 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -495,7 +495,7 @@ namespace svxform XPropertySet_ref m_xBinding; DECL_LINK(ModifyHdl, void *); - DECL_LINK(ResultHdl, void *); + DECL_LINK_TYPED(ResultHdl, Idle *, void); DECL_LINK(EditHdl, void *); DECL_LINK(OKHdl, void *); diff --git a/svx/source/inc/formcontroller.hxx b/svx/source/inc/formcontroller.hxx index 4ed59e08533b..45d74e6b46e3 100644 --- a/svx/source/inc/formcontroller.hxx +++ b/svx/source/inc/formcontroller.hxx @@ -562,7 +562,7 @@ namespace svxform bool isListeningForChanges() const {return m_bDBConnection && !m_bFiltering && !isLocked();} ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl> isInList(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer>& xPeer) const; - DECL_LINK( OnActivateTabOrder, void* ); + DECL_LINK_TYPED( OnActivateTabOrder, Idle*, void ); DECL_LINK_TYPED( OnInvalidateFeatures, Timer*, void ); DECL_LINK( OnLoad, void* ); DECL_LINK( OnToggleAutoFields, void* ); diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 58814b1efe48..f5373057d0b1 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -206,7 +206,7 @@ namespace sdr mpBufferDevice->EnableMapMode(bMapModeWasEnabledSource); } - IMPL_LINK(OverlayManagerBuffered, ImpBufferTimerHandler, AutoTimer*, /*pTimer*/) + IMPL_LINK_NOARG_TYPED(OverlayManagerBuffered, ImpBufferTimerHandler, Idle*, void) { //Resolves: fdo#46728 ensure this exists until end of scope rtl::Reference<OverlayManager> xRef(this); @@ -372,8 +372,6 @@ namespace sdr // forget remembered Region maBufferRememberedRangePixel.reset(); } - - return 0; } OverlayManagerBuffered::OverlayManagerBuffered( diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx index 9a1f11fffa54..2535f9b3f00a 100644 --- a/svx/source/sidebar/PanelLayout.cxx +++ b/svx/source/sidebar/PanelLayout.cxx @@ -62,12 +62,11 @@ void PanelLayout::queue_resize(StateChangedType /*eReason*/) m_aPanelLayoutIdle.Start(); } -IMPL_LINK( PanelLayout, ImplHandlePanelLayoutTimerHdl, void*, EMPTYARG ) +IMPL_LINK_NOARG_TYPED( PanelLayout, ImplHandlePanelLayoutTimerHdl, Idle*, void ) { vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); assert(pChild); VclContainer::setLayoutAllocation(*pChild, Point(0, 0), GetSizePixel()); - return 0; } void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags) diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index 701562908270..41d66e0c07f0 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -108,17 +108,15 @@ void SvxModifyControl::StateChanged( sal_uInt16, SfxItemState eState, -IMPL_LINK( SvxModifyControl, OnTimer, Timer *, pTimer ) +IMPL_LINK_TYPED( SvxModifyControl, OnTimer, Idle *, pTimer, void ) { if (pTimer == 0) - return 0; + return; pTimer->Stop(); mxImpl->mnModState = ImplData::MODIFICATION_STATE_NO; _repaint(); - - return 0; } diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index cddf3dfa9954..5e0fa262570d 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -1140,10 +1140,9 @@ void SdrItemBrowser::Undirty() } } -IMPL_LINK_NOARG(SdrItemBrowser, IdleHdl) +IMPL_LINK_NOARG_TYPED(SdrItemBrowser, IdleHdl, Idle *, void) { Undirty(); - return 0; } IMPL_LINK(SdrItemBrowser,ChangedHdl,_SdrItemBrowserControl*,pBrowse) diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index dfc7d210e6a5..775da2f42a79 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -293,13 +293,12 @@ void SdrPaintView::ConfigurationChanged( ::utl::ConfigurationBroadcaster* , sal_ -IMPL_LINK_NOARG(SdrPaintView, ImpComeBackHdl) +IMPL_LINK_NOARG_TYPED(SdrPaintView, ImpComeBackHdl, Idle *, void) { if (bSomeObjChgdFlag) { bSomeObjChgdFlag=false; ModelHasChanged(); } - return 0; } void SdrPaintView::FlushComeBackTimer() const diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 5cc2a78736a2..3e5e255c6d1f 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -91,7 +91,7 @@ private: OUString maCommand; Reference< XFrame > mxFrame; - DECL_LINK(ImplModifyHdl, void *); + DECL_LINK_TYPED(ImplModifyHdl, Idle *, void); protected: @@ -146,7 +146,7 @@ void ImplGrafMetricField::Modify() maIdle.Start(); } -IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl) +IMPL_LINK_NOARG_TYPED(ImplGrafMetricField, ImplModifyHdl, Idle *, void) { const sal_Int64 nVal = GetValue(); @@ -175,7 +175,6 @@ IMPL_LINK_NOARG(ImplGrafMetricField, ImplModifyHdl) maCommand, aArgs ); } - return 0L; } void ImplGrafMetricField::Update( const SfxPoolItem* pItem ) diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 0bb1c879789d..7969c6976c38 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -445,7 +445,7 @@ private: // CharTimer calls this method. void DoUpdateAllCharts(); - DECL_LINK( DoUpdateModifiedOLE, Timer * ); + DECL_LINK_TYPED( DoUpdateModifiedOLE, Idle *, void ); public: SwFmt *_MakeCharFmt(const OUString &, SwFmt *, bool, bool ); diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx index b7982a765ac7..210eb3689424 100644 --- a/sw/source/core/doc/DocumentTimerManager.cxx +++ b/sw/source/core/doc/DocumentTimerManager.cxx @@ -78,7 +78,7 @@ void DocumentTimerManager::StartBackgroundJobs() maIdle.Start(); } -IMPL_LINK( DocumentTimerManager, DoIdleJobs, Idle*, pIdle ) +IMPL_LINK_TYPED( DocumentTimerManager, DoIdleJobs, Idle*, pIdle, void ) { #ifdef TIMELOG static ::rtl::Logfile* pModLogFile = 0; @@ -96,7 +96,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Idle*, pIdle ) if( rSh.ActionPend() ) { pIdle->Start(); - return 0; + return; } } @@ -120,7 +120,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Idle*, pIdle ) // Defer the remaining work. pIdle->Start(); - return 0; + return; } } @@ -136,7 +136,7 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Idle*, pIdle ) m_rDoc.getIDocumentFieldsAccess().IsExpFldsLocked() ) { pIdle->Start(); - return 0; + return; } // Action brackets! @@ -165,7 +165,6 @@ IMPL_LINK( DocumentTimerManager, DoIdleJobs, Idle*, pIdle ) if( pModLogFile && 1 != (long)pModLogFile ) delete pModLogFile, static_cast<long&>(pModLogFile) = 1; #endif - return 0; } DocumentTimerManager::~DocumentTimerManager() {} diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index a92b2d242e11..43924035665f 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -772,7 +772,7 @@ void SwDoc::PrtOLENotify( bool bAll ) } } -IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, ) +IMPL_LINK_NOARG_TYPED( SwDoc, DoUpdateModifiedOLE, Idle *, void ) { SwFEShell* pSh = static_cast<SwFEShell*>(GetEditShell()); if( pSh ) @@ -806,7 +806,6 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, ) delete pNodes; } } - return 0; } struct CompareSwPageDescName { diff --git a/sw/source/core/docnode/threadmanager.cxx b/sw/source/core/docnode/threadmanager.cxx index 8003e9b30845..daa12c3cbeb8 100644 --- a/sw/source/core/docnode/threadmanager.cxx +++ b/sw/source/core/docnode/threadmanager.cxx @@ -202,7 +202,7 @@ bool ThreadManager::StartThread( const tThreadData& rThreadData ) return bThreadStarted; } -IMPL_LINK_NOARG(ThreadManager, TryToStartNewThread) +IMPL_LINK_NOARG_TYPED(ThreadManager, TryToStartNewThread, Idle *, void) { osl::MutexGuard aGuard(maMutex); @@ -220,8 +220,6 @@ IMPL_LINK_NOARG(ThreadManager, TryToStartNewThread) } } } - - return sal_True; } void ThreadManager::ResumeStartingOfThreads() diff --git a/sw/source/core/inc/DocumentTimerManager.hxx b/sw/source/core/inc/DocumentTimerManager.hxx index 7bff0403276c..29d93b1b3d66 100644 --- a/sw/source/core/inc/DocumentTimerManager.hxx +++ b/sw/source/core/inc/DocumentTimerManager.hxx @@ -50,7 +50,7 @@ public: void StartBackgroundJobs() SAL_OVERRIDE; // Our own 'IdleTimer' calls the following method - DECL_LINK( DoIdleJobs, Idle * ); + DECL_LINK_TYPED( DoIdleJobs, Idle *, void ); virtual ~DocumentTimerManager(); diff --git a/sw/source/core/inc/threadmanager.hxx b/sw/source/core/inc/threadmanager.hxx index 0c6e827674ab..781821d2ac5e 100644 --- a/sw/source/core/inc/threadmanager.hxx +++ b/sw/source/core/inc/threadmanager.hxx @@ -71,7 +71,7 @@ class ThreadManager : public IThreadListenerOwner void RemoveThread( const oslInterlockedCount nThreadID, const bool bThreadFinished = false ); - DECL_LINK( TryToStartNewThread, void* ); + DECL_LINK_TYPED( TryToStartNewThread, Idle*, void ); /** suspend the starting of threads diff --git a/sw/source/ui/dbui/mmoutputpage.hxx b/sw/source/ui/dbui/mmoutputpage.hxx index 470a72e04689..6ca57d1f1c93 100644 --- a/sw/source/ui/dbui/mmoutputpage.hxx +++ b/sw/source/ui/dbui/mmoutputpage.hxx @@ -182,7 +182,7 @@ class SwSendMailDialog : public ModelessDialog //SfxModalDialog SAL_DLLPRIVATE DECL_LINK( CloseHdl_Impl, void* ); SAL_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, StartSendMails, SwSendMailDialog* ); SAL_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, StopSendMails, SwSendMailDialog* ); - SAL_DLLPRIVATE DECL_STATIC_LINK( SwSendMailDialog, RemoveThis, Timer* ); + SAL_DLLPRIVATE DECL_STATIC_LINK_TYPED( SwSendMailDialog, RemoveThis, Idle*, void ); SAL_DLLPRIVATE void IterateMails(); SAL_DLLPRIVATE void SendMails(); diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index 4b7bbfe27794..72c84ccd66df 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -397,7 +397,7 @@ IMPL_STATIC_LINK_NOINSTANCE( SwSendMailDialog, StartSendMails, SwSendMailDialog* return 0; } -IMPL_STATIC_LINK( SwSendMailDialog, RemoveThis, Timer*, pTimer ) +IMPL_STATIC_LINK_TYPED( SwSendMailDialog, RemoveThis, Idle*, pTimer, void ) { if( pThis->m_pImpl->xMailDispatcher.is() ) { @@ -417,7 +417,6 @@ IMPL_STATIC_LINK( SwSendMailDialog, RemoveThis, Timer*, pTimer ) { pTimer->Start(); } - return 0; } IMPL_STATIC_LINK_NOINSTANCE( SwSendMailDialog, StopSendMails, SwSendMailDialog*, pDialog ) diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index cba7b7082166..be2171bdde8e 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -385,14 +385,12 @@ IMPL_LINK_NOARG(SwLabFmtPage, ModifyHdl) } // Invalidate preview -IMPL_LINK_NOARG(SwLabFmtPage, PreviewHdl) +IMPL_LINK_NOARG_TYPED(SwLabFmtPage, PreviewHdl, Idle *, void) { aPreviewIdle.Stop(); ChangeMinMax(); FillItem( aItem ); m_pPreview->UpdateItem( aItem ); - - return 0; } // LoseFocus-Handler: Update on change diff --git a/sw/source/ui/envelp/labfmt.hxx b/sw/source/ui/envelp/labfmt.hxx index c81acc1b2180..9b409be04aab 100644 --- a/sw/source/ui/envelp/labfmt.hxx +++ b/sw/source/ui/envelp/labfmt.hxx @@ -90,7 +90,7 @@ class SwLabFmtPage : public SfxTabPage SwLabItem aItem; DECL_LINK(ModifyHdl, void *); - DECL_LINK(PreviewHdl, void *); + DECL_LINK_TYPED(PreviewHdl, Idle *, void); DECL_LINK( LoseFocusHdl, Control * ); DECL_LINK(SaveHdl, void *); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 700f9489b58b..df4cf18118c7 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5761,10 +5761,9 @@ void SwEditWin::StopQuickHelp() m_pQuickHlpData->Stop( m_rView.GetWrtShell() ); } -IMPL_LINK_NOARG(SwEditWin, TemplateTimerHdl) +IMPL_LINK_NOARG_TYPED(SwEditWin, TemplateTimerHdl, Idle *, void) { SetApplyTemplate(SwApplyTemplate()); - return 0; } void SwEditWin::SetChainMode( bool bOn ) diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 02e1e66b1093..b6776f23456e 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -578,7 +578,7 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll) return 0; } -IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Idle *, pIdle ) +IMPL_LINK_TYPED( SwSrcEditWindow, SyntaxTimerHdl, Idle *, pIdle, void ) { tools::Time aSyntaxCheckStart( tools::Time::SYSTEM ); SAL_WARN_IF(pTextView == 0, "sw", "No View yet, but syntax highlighting?!"); @@ -631,8 +631,6 @@ IMPL_LINK( SwSrcEditWindow, SyntaxTimerHdl, Idle *, pIdle ) if ( nCurTextWidth != nPrevTextWidth ) SetScrollBarRanges(); bHighlighting = false; - - return 0; } void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara ) diff --git a/sw/source/uibase/inc/edtwin.hxx b/sw/source/uibase/inc/edtwin.hxx index 1fb8f2de9378..a24dd4fa486d 100644 --- a/sw/source/uibase/inc/edtwin.hxx +++ b/sw/source/uibase/inc/edtwin.hxx @@ -177,7 +177,7 @@ friend void PageNumNotify( SwViewShell* pVwSh, DECL_LINK_TYPED( KeyInputTimerHandler, Timer *, void ); // timer for ApplyTemplates via mouse (in disguise Drag&Drop) - DECL_LINK( TemplateTimerHdl, void * ); + DECL_LINK_TYPED( TemplateTimerHdl, Idle *, void ); using OutputDevice::GetTextColor; diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 1cb6b9fe021d..c24e446a77fc 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -108,7 +108,7 @@ class SwNavigationPI : public vcl::Window, DECL_LINK( EditGetFocus, NumEditAction * ); DECL_LINK( DoneLink, SfxPoolItem * ); DECL_LINK( MenuSelectHdl, Menu * ); - DECL_LINK( ChangePageHdl, void* ); + DECL_LINK_TYPED( ChangePageHdl, Idle*, void ); DECL_LINK( PageEditModifyHdl, void* ); DECL_LINK( PopupModeEndHdl, void * ); DECL_LINK( ClosePopupWindow, SfxPopupWindow * ); diff --git a/sw/source/uibase/inc/srcedtw.hxx b/sw/source/uibase/inc/srcedtw.hxx index 55e53f4fb9da..88971bf01274 100644 --- a/sw/source/uibase/inc/srcedtw.hxx +++ b/sw/source/uibase/inc/srcedtw.hxx @@ -95,7 +95,7 @@ private: using OutputDevice::SetFont; void SetFont(); - DECL_LINK( SyntaxTimerHdl, Idle * ); + DECL_LINK_TYPED( SyntaxTimerHdl, Idle *, void ); DECL_LINK( TimeoutHdl, Timer * ); using Window::Notify; diff --git a/sw/source/uibase/inc/unotools.hxx b/sw/source/uibase/inc/unotools.hxx index 36ffb80ba680..64dc616b5546 100644 --- a/sw/source/uibase/inc/unotools.hxx +++ b/sw/source/uibase/inc/unotools.hxx @@ -89,7 +89,7 @@ class SW_DLLPUBLIC SwOneExampleFrame static bool bShowServiceNotAvailableMessage; - SAL_DLLPRIVATE DECL_LINK( TimeoutHdl, Timer* ); + SAL_DLLPRIVATE DECL_LINK_TYPED( TimeoutHdl, Idle*, void ); SAL_DLLPRIVATE DECL_LINK( PopupHdl, Menu* ); SAL_DLLPRIVATE void CreateControl(); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 663ebe73b67d..1c99755c8408 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -1250,14 +1250,13 @@ bool SwNavigationPI::IsGlobalDoc() const return bRet; } -IMPL_LINK_NOARG(SwNavigationPI, ChangePageHdl) +IMPL_LINK_NOARG_TYPED(SwNavigationPI, ChangePageHdl, Idle *, void) { if (!IsDisposed()) { EditAction(&GetPageEdit()); GetPageEdit().GrabFocus(); } - return 0; } IMPL_LINK_NOARG(SwNavigationPI, PageEditModifyHdl) diff --git a/sw/source/uibase/utlui/unotools.cxx b/sw/source/uibase/utlui/unotools.cxx index 8898a1aa8964..d71b4c50fb35 100644 --- a/sw/source/uibase/utlui/unotools.cxx +++ b/sw/source/uibase/utlui/unotools.cxx @@ -192,10 +192,10 @@ static void disableScrollBars(uno::Reference< beans::XPropertySet > xViewProps, } } -IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) +IMPL_LINK_TYPED( SwOneExampleFrame, TimeoutHdl, Idle*, pTimer, void ) { if(!_xControl.is()) - return 0; + return; // now get the model uno::Reference< beans::XPropertySet > xPrSet(_xControl, uno::UNO_QUERY); @@ -397,7 +397,6 @@ IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer ) } else pTimer->Start(); - return 0; } void SwOneExampleFrame::ClearDocument( bool bStartUpdateTimer ) diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index c0d5751495ef..8bccc3d83ae5 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -1287,7 +1287,7 @@ class PrinterUpdate static int nActiveJobs; static void doUpdate(); - DECL_STATIC_LINK( PrinterUpdate, UpdateTimerHdl, void* ); + DECL_STATIC_LINK_TYPED( PrinterUpdate, UpdateTimerHdl, Idle*, void ); public: static void update(SalGenericInstance &rInstance); static void jobStarted() { nActiveJobs++; } @@ -1305,7 +1305,7 @@ void PrinterUpdate::doUpdate() pInst->PostPrintersChanged(); } -IMPL_STATIC_LINK_NOINSTANCE( PrinterUpdate, UpdateTimerHdl, void*, EMPTYARG ) +IMPL_STATIC_LINK_NOINSTANCE_NOARG_TYPED( PrinterUpdate, UpdateTimerHdl, Idle*, void ) { if( nActiveJobs < 1 ) { @@ -1315,8 +1315,6 @@ IMPL_STATIC_LINK_NOINSTANCE( PrinterUpdate, UpdateTimerHdl, void*, EMPTYARG ) } else pPrinterUpdateIdle->Start(); - - return 0; } void PrinterUpdate::update(SalGenericInstance &rInstance) diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx index d1f36aaf1989..30eb44e05f28 100644 --- a/vcl/source/edit/textdata.cxx +++ b/vcl/source/edit/textdata.cxx @@ -241,7 +241,7 @@ void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts ) if ( mnRestarts > nMaxRestarts ) { mnRestarts = 0; - ((Link<>&)GetIdleHdl()).Call( this ); + ((Link<Idle *, void>&)GetIdleHdl()).Call( this ); } else { @@ -255,7 +255,7 @@ void IdleFormatter::ForceTimeout() { Stop(); mnRestarts = 0; - ((Link<>&)GetIdleHdl()).Call( this ); + ((Link<Idle *, void>&)GetIdleHdl()).Call( this ); } } diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 235dd138be99..e5a3c84d2e2b 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -1514,10 +1514,9 @@ void TextEngine::UpdateViews( TextView* pCurView ) maInvalidRect = Rectangle(); } -IMPL_LINK_NOARG(TextEngine, IdleFormatHdl) +IMPL_LINK_NOARG_TYPED(TextEngine, IdleFormatHdl, Idle *, void) { FormatAndUpdate( mpIdleFormatter->GetView() ); - return 0; } void TextEngine::CheckIdleFormatter() diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 7d0f826c4406..89be3dbc1887 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -51,8 +51,8 @@ private: ImplSVEvent * mnLastUserEvent; DECL_LINK(DockingHdl, void *); - DECL_LINK(DockTimerHdl, void *); - DECL_LINK(EndDockTimerHdl, void *); + DECL_LINK_TYPED(DockTimerHdl, Idle *, void); + DECL_LINK_TYPED(EndDockTimerHdl, Idle *, void); public: ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits, ImplDockingWindowWrapper* pDockingWin ); @@ -108,7 +108,7 @@ void ImplDockFloatWin2::dispose() FloatingWindow::dispose(); } -IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl) +IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, DockTimerHdl, Idle *, void) { DBG_ASSERT( mpDockWin->IsFloatingMode(), "docktimer called but not floating" ); @@ -132,11 +132,9 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl) mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW ); maDockIdle.Start(); } - - return 0; } -IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl) +IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, EndDockTimerHdl, Idle *, void) { DBG_ASSERT( mpDockWin->IsFloatingMode(), "enddocktimer called but not floating" ); @@ -151,8 +149,6 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl) { maEndDockIdle.Start(); } - - return 0; } IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) @@ -215,13 +211,13 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) maDockRect.TopLeft() ) ); mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW ); maEndDockIdle.Stop(); - DockTimerHdl( this ); + DockTimerHdl( nullptr ); } else { mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking(); maDockIdle.Stop(); - EndDockTimerHdl( this ); + EndDockTimerHdl( nullptr ); } } mbInMove = false; diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 408cb328a132..3ea561f2598a 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -68,7 +68,7 @@ private: ImplSVEvent * mnLastUserEvent; DECL_LINK(DockingHdl, void *); - DECL_LINK(DockTimerHdl, void *); + DECL_LINK_TYPED(DockTimerHdl, Idle *, void); public: ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits, DockingWindow* pDockingWin ); @@ -126,7 +126,7 @@ void ImplDockFloatWin::dispose() FloatingWindow::dispose(); } -IMPL_LINK_NOARG(ImplDockFloatWin, DockTimerHdl) +IMPL_LINK_NOARG_TYPED(ImplDockFloatWin, DockTimerHdl, Idle *, void) { DBG_ASSERT( mpDockWin->IsFloatingMode(), "docktimer called but not floating" ); @@ -151,8 +151,6 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockTimerHdl) mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_BIG | SHOWTRACK_WINDOW ); maDockIdle.Start(); } - - return 0; } IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl) @@ -179,7 +177,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl) if( ! bFloatMode ) { mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW ); - DockTimerHdl( this ); + DockTimerHdl( nullptr ); } else { @@ -1139,18 +1137,17 @@ void DockingWindow::queue_resize(StateChangedType /*eReason*/) maLayoutIdle.Start(); } -IMPL_LINK(DockingWindow, ImplHandleLayoutTimerHdl, void*, EMPTYARG) +IMPL_LINK_NOARG_TYPED(DockingWindow, ImplHandleLayoutTimerHdl, Idle*, void) { if (!isLayoutEnabled()) { SAL_WARN("vcl.layout", "DockingWindow has become non-layout because extra children have been added directly to it."); - return 0; + return; } Window *pBox = GetWindow(WINDOW_FIRSTCHILD); assert(pBox); setPosSizeOnContainee(GetSizePixel(), *pBox); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index e0220189c9f2..11c8a5d3cdc8 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -292,13 +292,13 @@ void Window::ImplPostPaint() mpWindowImpl->mpFrameData->maPaintIdle.Start(); } -IMPL_LINK_NOARG(Window, ImplHandlePaintHdl) +IMPL_LINK_NOARG_TYPED(Window, ImplHandlePaintHdl, Idle *, void) { // save paint events until layout is done if (!ImplDoTiledRendering() && IsSystemWindow() && static_cast<const SystemWindow*>(this)->hasPendingLayout()) { mpWindowImpl->mpFrameData->maPaintIdle.Start(); - return 0; + return; } // save paint events until resizing is done @@ -307,10 +307,9 @@ IMPL_LINK_NOARG(Window, ImplHandlePaintHdl) mpWindowImpl->mpFrameData->maPaintIdle.Start(); else if ( mpWindowImpl->mbReallyVisible ) ImplCallOverlapPaint(); - return 0; } -IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl) +IMPL_LINK_NOARG_TYPED(Window, ImplHandleResizeTimerHdl, Idle *, void) { if( mpWindowImpl->mbReallyVisible ) { @@ -325,8 +324,6 @@ IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl) mpWindowImpl->mpFrameData->maPaintIdle.GetIdleHdl().Call( NULL ); } } - - return 0; } void Window::ImplInvalidateFrameRegion( const vcl::Region* pRegion, sal_uInt16 nFlags ) diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 13028b927695..1edd3b2940aa 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1051,18 +1051,17 @@ void SystemWindow::setPosSizeOnContainee(Size aSize, Window &rBox) VclContainer::setLayoutAllocation(rBox, aPos, aSize); } -IMPL_LINK( SystemWindow, ImplHandleLayoutTimerHdl, void*, EMPTYARG ) +IMPL_LINK_NOARG_TYPED( SystemWindow, ImplHandleLayoutTimerHdl, Idle*, void ) { if (!isLayoutEnabled()) { SAL_WARN("vcl.layout", "SystemWindow has become non-layout because extra children have been added directly to it."); - return 0; + return; } Window *pBox = GetWindow(WINDOW_FIRSTCHILD); assert(pBox); setPosSizeOnContainee(GetSizePixel(), *pBox); - return 0; } void SystemWindow::SetText(const OUString& rStr) diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 28806d8bb6ff..26590b7ab5c0 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2659,13 +2659,11 @@ IMPL_LINK_NOARG_TYPED(ToolBox, ImplDropdownLongClickHdl, Timer *, void) } } -IMPL_LINK_NOARG(ToolBox, ImplUpdateHdl) +IMPL_LINK_NOARG_TYPED(ToolBox, ImplUpdateHdl, Idle *, void) { if( mbFormat && mpData ) ImplFormat(); - - return 0; } static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, bool bSetColor, bool bRotate ) |