diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-07-18 17:23:17 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-20 08:01:58 +0000 |
commit | 91b1f300cf7f357c3a39d0d5810326cc78d78f16 (patch) | |
tree | a89ef37ce86d8fe5babde77a43a098001ca3c164 /sfx2 | |
parent | bca4d6f896fb12ceff37476c43ea8892898dd385 (diff) |
convert to typed Link<> in sfx2
Change-Id: Ifa42bd14d7329ff1043fa736513c468dda30485e
Reviewed-on: https://gerrit.libreoffice.org/17195
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/fileobj.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/fileobj.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/shutdownicon.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/shutdownicon.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/control/templateabstractview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/docinsert.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/notify/hintpost.cxx | 15 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 4 |
14 files changed, 24 insertions, 41 deletions
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index 761666173002..d1e3032d577a 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -506,7 +506,7 @@ IMPL_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, deleteMedium ) return 0; } -IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) +IMPL_LINK_TYPED( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) { OUString sFile; Application::SetDefDialogParent( pOldParent ); @@ -529,7 +529,6 @@ IMPL_LINK( SvFileObject, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) if ( aEndEditLink.IsSet() ) aEndEditLink.Call( &sFile ); - return 0; } /* [Description] diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx index 3b96e32a8a6d..8e24f0ff1363 100644 --- a/sfx2/source/appl/fileobj.hxx +++ b/sfx2/source/appl/fileobj.hxx @@ -56,7 +56,7 @@ class SvFileObject : public sfx2::SvLinkSource DECL_LINK( DelMedium_Impl, SfxMediumRef* ); DECL_LINK( LoadGrfReady_Impl, void* ); - DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); + DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); protected: virtual ~SvFileObject(); diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 22f82844740d..81bed2151734 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -364,7 +364,7 @@ void ShutdownIcon::StartFileDialog() -IMPL_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, ) +IMPL_LINK_TYPED( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, /*unused*/, void ) { DBG_ASSERT( m_pFileDlg, "ShutdownIcon, DialogClosedHdl_Impl(): no file dialog" ); @@ -503,7 +503,6 @@ IMPL_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, ) #endif LeaveModalMode(); - return 0; } diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx index 94224fbc44df..2744e11eaa07 100644 --- a/sfx2/source/appl/shutdownicon.hxx +++ b/sfx2/source/appl/shutdownicon.hxx @@ -116,7 +116,7 @@ class SFX2_DLLPUBLIC ShutdownIcon : public ShutdownIconServiceBase void SetVeto( bool bVeto ) { m_bVeto = bVeto;} void StartFileDialog(); - DECL_LINK(DialogClosedHdl_Impl, sfx2::FileDialogHelper*); + DECL_LINK_TYPED(DialogClosedHdl_Impl, sfx2::FileDialogHelper*, void); static bool IsQuickstarterInstalled(); diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 9f3de39ff70a..8d14270c937c 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -329,7 +329,7 @@ void SfxDispatcher::Construct_Impl( SfxDispatcher* pParent ) for (sal_uInt16 n=0; n<SFX_OBJECTBAR_MAX; n++) xImp->aObjBars[n].nResId = 0; - Link<> aGenLink( LINK(this, SfxDispatcher, PostMsgHandler) ); + Link<SfxRequest*,void> aGenLink( LINK(this, SfxDispatcher, PostMsgHandler) ); xImp->xPoster = new SfxHintPoster(aGenLink); @@ -376,7 +376,7 @@ SfxDispatcher::~SfxDispatcher() // So that no timer by Reschedule in PlugComm strikes the LeaveRegistrations xImp->aIdle.Stop(); - xImp->xPoster->SetEventHdl( Link<>() ); + xImp->xPoster->SetEventHdl( Link<SfxRequest*,void>() ); // Notify the stack varialbles in Call_Impl if ( xImp->pInCallAliveFlag ) @@ -1071,7 +1071,7 @@ const SfxPoolItem* SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, /** Helper method to receive the asynchronously executed <SfxRequest>s. */ -IMPL_LINK(SfxDispatcher, PostMsgHandler, SfxRequest*, pReq) +IMPL_LINK_TYPED(SfxDispatcher, PostMsgHandler, SfxRequest*, pReq, void) { DBG_ASSERT( !xImp->bFlushing, "recursive call to dispatcher" ); SFX_STACK(SfxDispatcher::PostMsgHandler); @@ -1104,7 +1104,6 @@ IMPL_LINK(SfxDispatcher, PostMsgHandler, SfxRequest*, pReq) } delete pReq; - return 0; } void SfxDispatcher::SetMenu_Impl() diff --git a/sfx2/source/control/templateabstractview.cxx b/sfx2/source/control/templateabstractview.cxx index 11b985dd5e15..3be294cee78d 100644 --- a/sfx2/source/control/templateabstractview.cxx +++ b/sfx2/source/control/templateabstractview.cxx @@ -219,7 +219,7 @@ void TemplateAbstractView::insertItems(const std::vector<TemplateItemProperties> -void TemplateAbstractView::setOpenRegionHdl(const Link<> &rLink) +void TemplateAbstractView::setOpenRegionHdl(const Link<void*,void> &rLink) { maOpenRegionHdl = rLink; } diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 419be21c99d0..e26879060bd8 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -649,12 +649,10 @@ IMPL_LINK_TYPED( BackingWindow, MenuSelectHdl, MenuButton*, pButton, void ) } -IMPL_LINK_NOARG( BackingWindow, OpenRegionHdl) +IMPL_LINK_NOARG_TYPED( BackingWindow, OpenRegionHdl, void*, void) { maSelFolders.clear(); maSelTemplates.clear(); - - return 0; } IMPL_LINK(BackingWindow, OpenTemplateHdl, ThumbnailViewItem*, pItem) diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 7bf4ca725a4a..50b3fb427d98 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -108,7 +108,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer DECL_LINK(ClickHdl, Button*); DECL_LINK_TYPED(MenuSelectHdl, MenuButton*, void); DECL_LINK(ExtLinkClickHdl, Button*); - DECL_LINK(OpenRegionHdl, void*); + DECL_LINK_TYPED(OpenRegionHdl, void*, void); DECL_LINK(OpenTemplateHdl, ThumbnailViewItem*); void initControls(); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 28ea2d01930c..51e62f4c0bcb 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -2152,13 +2152,12 @@ IMPL_LINK( CustomPropertiesControl, ScrollHdl, ScrollBar*, pScrollBar ) return 0; } -IMPL_LINK_NOARG(CustomPropertiesControl, RemovedHdl) +IMPL_LINK_NOARG_TYPED(CustomPropertiesControl, RemovedHdl, void*, void) { long nLineCount = m_pPropertiesWin->GetVisibleLineCount(); m_pVertScroll->SetRangeMax(nLineCount + 1); if ( m_pPropertiesWin->GetOutputSizePixel().Height() < nLineCount * m_pPropertiesWin->GetLineHeight() ) m_pVertScroll->DoScrollAction ( SCROLL_LINEUP ); - return 0; } void CustomPropertiesControl::AddLine( const OUString& sName, Any& rAny, bool bInteractive ) diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index d4d9e14b2c94..2ed3a4b7910d 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2337,7 +2337,7 @@ ErrCode FileDialogHelper::Execute( SfxItemSet *& rpSet, return nRet; } -void FileDialogHelper::StartExecuteModal( const Link<>& rEndDialogHdl ) +void FileDialogHelper::StartExecuteModal( const Link<FileDialogHelper*,void>& rEndDialogHdl ) { m_aDialogClosedLink = rEndDialogHdl; m_nError = ERRCODE_NONE; diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index c488b60c4d5f..51cac45e0874 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -65,7 +65,7 @@ DocumentInserter::~DocumentInserter() delete m_pFileDlg; } -void DocumentInserter::StartExecuteModal( const Link<>& _rDialogClosedLink ) +void DocumentInserter::StartExecuteModal( const Link<sfx2::FileDialogHelper*,void>& _rDialogClosedLink ) { m_aDialogClosedLink = _rDialogClosedLink; m_nError = ERRCODE_NONE; @@ -160,7 +160,7 @@ void impl_FillURLList( sfx2::FileDialogHelper* _pFileDlg, std::vector<OUString>& } } -IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl) +IMPL_LINK_NOARG_TYPED(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void) { DBG_ASSERT( m_pFileDlg, "DocumentInserter::DialogClosedHdl(): no file dialog" ); @@ -201,7 +201,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl) else { DELETEZ( m_pItemSet ); - return 0; + return; } } } @@ -264,8 +264,6 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl) if ( m_aDialogClosedLink.IsSet() ) m_aDialogClosedLink.Call( m_pFileDlg ); - - return 0; } } // namespace sfx2 diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 745ad6975215..7e8b840b0644 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -312,11 +312,11 @@ void SfxTemplateManagerDlg::dispose() // Ignore view events since we are cleaning the object mpLocalView->setItemStateHdl(Link<>()); - mpLocalView->setOpenRegionHdl(Link<>()); + mpLocalView->setOpenRegionHdl(Link<void*,void>()); mpLocalView->setOpenTemplateHdl(Link<>()); mpRemoteView->setItemStateHdl(Link<>()); - mpRemoteView->setOpenRegionHdl(Link<>()); + mpRemoteView->setOpenRegionHdl(Link<void*,void>()); mpRemoteView->setOpenTemplateHdl(Link<>()); mpSearchView->setItemStateHdl(Link<>()); @@ -669,7 +669,7 @@ IMPL_LINK(SfxTemplateManagerDlg, DefaultTemplateMenuSelectHdl, Menu*, pMenu) return 0; } -IMPL_LINK_NOARG(SfxTemplateManagerDlg, OpenRegionHdl) +IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, OpenRegionHdl, void*, void) { maSelFolders.clear(); maSelTemplates.clear(); @@ -682,8 +682,6 @@ IMPL_LINK_NOARG(SfxTemplateManagerDlg, OpenRegionHdl) mpTemplateBar->Hide(); mpViewBar->Show(); mpActionBar->Show(); - - return 0; } IMPL_LINK(SfxTemplateManagerDlg, OpenTemplateHdl, ThumbnailViewItem*, pItem) diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx index 00e4290d87c6..f952b6b5971a 100644 --- a/sfx2/source/notify/hintpost.cxx +++ b/sfx2/source/notify/hintpost.cxx @@ -24,7 +24,7 @@ #include "sfxtypes.hxx" -SfxHintPoster::SfxHintPoster(const Link<>& rLink) +SfxHintPoster::SfxHintPoster(const Link<SfxRequest*,void>& rLink) : m_Link(rLink) { } @@ -33,25 +33,20 @@ SfxHintPoster::~SfxHintPoster() { } -void SfxHintPoster::Post( SfxHint* pHintToPost ) +void SfxHintPoster::Post( SfxRequest* pHintToPost ) { Application::PostUserEvent( ( LINK(this, SfxHintPoster, DoEvent_Impl) ), pHintToPost ); AddFirstRef(); } -IMPL_LINK( SfxHintPoster, DoEvent_Impl, SfxHint *, pPostedHint ) +IMPL_LINK( SfxHintPoster, DoEvent_Impl, SfxRequest *, pPostedHint ) { - Event( pPostedHint ); + m_Link.Call( pPostedHint ); ReleaseRef(); return 0; } -void SfxHintPoster::Event( SfxHint* pPostedHint ) -{ - m_Link.Call( pPostedHint ); -} - -void SfxHintPoster::SetEventHdl(const Link<>& rLink) +void SfxHintPoster::SetEventHdl(const Link<SfxRequest*,void>& rLink) { m_Link = rLink; } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 41caaa3c6b97..ed53d9693ce6 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -653,14 +653,12 @@ IMPL_LINK_NOARG(SfxToolBoxControl, PopupModeEndHdl) } -IMPL_LINK( SfxToolBoxControl, ClosePopupWindow, SfxPopupWindow *, pWindow ) +IMPL_LINK_TYPED( SfxToolBoxControl, ClosePopupWindow, SfxPopupWindow *, pWindow, void ) { if ( pWindow == pImpl->mpFloatingWindow ) pImpl->mpFloatingWindow = 0; else pImpl->mpPopupWindow = 0; - - return 1; } |