diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-09-06 12:05:08 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-09-07 06:56:57 +0000 |
commit | 9af27324f5f5ef9bd340c6df8640b146a3eba21c (patch) | |
tree | 1bab2dbd1185adf86714718f5fb1a757c1a101e9 /sfx2 | |
parent | 67a5fbeb8e2d6775ff6bd7bfd35ff5027d38457c (diff) |
convert Link<> to typed
Change-Id: I38f2c15b4f8bb1d7187b019d26a2644b087898c1
Reviewed-on: https://gerrit.libreoffice.org/18357
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/taskpane.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 16 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/inc/virtmenu.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/menu/mnumgr.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 4 |
8 files changed, 24 insertions, 24 deletions
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index 52e9e02eb518..ce878f3d07d0 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -840,7 +840,7 @@ namespace sfx2 private: DECL_LINK_TYPED( OnToolboxClicked, ToolBox*, void ); - DECL_LINK( OnMenuItemSelected, Menu* ); + DECL_LINK_TYPED( OnMenuItemSelected, Menu*, bool ); DECL_LINK_TYPED( DockingChanged, TitledDockingWindow*, void ); ::std::unique_ptr< PopupMenu > impl_createPopupMenu() const; @@ -979,7 +979,7 @@ namespace sfx2 } - IMPL_LINK( TaskPaneController_Impl, OnMenuItemSelected, Menu*, i_pMenu ) + IMPL_LINK_TYPED( TaskPaneController_Impl, OnMenuItemSelected, Menu*, i_pMenu, bool ) { ENSURE_OR_RETURN( i_pMenu, "TaskPaneController_Impl::OnMenuItemSelected: illegal menu!", 0L ); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index f9a313df50a5..e931b0fcc531 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2150,7 +2150,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, FmtSelectHdl, SvTreeListBox *, pListBox return 0; } -IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu ) +IMPL_LINK_TYPED( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu, bool ) { nLastItemId = pMenu->GetCurItemId(); Application::PostUserEvent( @@ -2528,11 +2528,11 @@ IMPL_LINK_TYPED( SfxTemplateDialog_Impl, ToolBoxRClick, ToolBox *, pBox, void ) } } -IMPL_LINK( SfxTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu) +IMPL_LINK_TYPED( SfxTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu, bool) { sal_uInt16 nMenuId = pMenu->GetCurItemId(); ActionSelect(nMenuId); - return 0; + return false; } void SfxCommonTemplateDialog_Impl::SetFamily( sal_uInt16 nId ) diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 94b6bd706db2..c37554d5b9a3 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -561,7 +561,7 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, TVItemStateHdl, const ThumbnailViewItem*, OnTemplateState(pItem); } -IMPL_LINK(SfxTemplateManagerDlg, MenuSelectHdl, Menu*, pMenu) +IMPL_LINK_TYPED(SfxTemplateManagerDlg, MenuSelectHdl, Menu*, pMenu, bool) { sal_uInt16 nMenuId = pMenu->GetCurItemId(); @@ -577,10 +577,10 @@ IMPL_LINK(SfxTemplateManagerDlg, MenuSelectHdl, Menu*, pMenu) break; } - return 0; + return false; } -IMPL_LINK(SfxTemplateManagerDlg, MoveMenuSelectHdl, Menu*, pMenu) +IMPL_LINK_TYPED(SfxTemplateManagerDlg, MoveMenuSelectHdl, Menu*, pMenu, bool) { sal_uInt16 nMenuId = pMenu->GetCurItemId(); @@ -599,10 +599,10 @@ IMPL_LINK(SfxTemplateManagerDlg, MoveMenuSelectHdl, Menu*, pMenu) remoteMoveTo(nMenuId); } - return 0; + return false; } -IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu) +IMPL_LINK_TYPED(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu, bool) { sal_uInt16 nMenuId = pMenu->GetCurItemId(); @@ -650,10 +650,10 @@ IMPL_LINK(SfxTemplateManagerDlg, RepositoryMenuSelectHdl, Menu*, pMenu) switchMainView(false); } - return 0; + return false; } -IMPL_LINK(SfxTemplateManagerDlg, DefaultTemplateMenuSelectHdl, Menu*, pMenu) +IMPL_LINK_TYPED(SfxTemplateManagerDlg, DefaultTemplateMenuSelectHdl, Menu*, pMenu, bool) { sal_uInt16 nId = pMenu->GetCurItemId(); @@ -662,7 +662,7 @@ IMPL_LINK(SfxTemplateManagerDlg, DefaultTemplateMenuSelectHdl, Menu*, pMenu) createDefaultTemplateMenu(); - return 0; + return false; } IMPL_LINK_NOARG_TYPED(SfxTemplateManagerDlg, OpenRegionHdl, void*, void) diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index 8a79c49f5e91..ddb4a6f61ebb 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -291,7 +291,7 @@ public: SfxCommonTemplateDialog_Impl( SfxBindings* pB, vcl::Window*, bool ); virtual ~SfxCommonTemplateDialog_Impl(); - DECL_LINK( MenuSelectHdl, Menu * ); + DECL_LINK_TYPED( MenuSelectHdl, Menu*, bool ); DECL_LINK_TYPED( MenuSelectAsyncHdl, void*, void ); virtual void EnableEdit( bool b = true ) @@ -359,7 +359,7 @@ private: DECL_LINK_TYPED( ToolBoxLSelect, ToolBox*, void ); DECL_LINK_TYPED( ToolBoxRSelect, ToolBox*, void ); DECL_LINK_TYPED( ToolBoxRClick, ToolBox*, void ); - DECL_LINK( MenuSelectHdl, Menu* ); + DECL_LINK_TYPED( MenuSelectHdl, Menu*, bool ); protected: virtual void EnableEdit( bool = true ) SAL_OVERRIDE; diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx index 079eaf1c65ae..370e24f1b956 100644 --- a/sfx2/source/inc/virtmenu.hxx +++ b/sfx2/source/inc/virtmenu.hxx @@ -94,7 +94,7 @@ public: void InitPopup(sal_uInt16 nPos, bool bOLE = true); void InitializeHelp(); - DECL_LINK( Select, Menu * ); + DECL_LINK_TYPED( Select, Menu*, bool ); }; diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 9fefbe5b2edd..a8460511ca13 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -206,7 +206,7 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) // executes the function for the selected item -IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu ) +IMPL_LINK_TYPED( SfxMenuManager, Select, Menu *, pSelMenu, bool ) { sal_uInt16 nId = (sal_uInt16) pSelMenu->GetCurItemId(); OUString aCommand = pSelMenu->GetItemCommand( nId ); @@ -235,7 +235,7 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu ) // special menu function pBindings->GetDispatcher_Impl()->Execute( nId ); - return sal_IntPtr(true); + return true; } SfxPopupMenuManager::~SfxPopupMenuManager() diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 6588f4961122..5bbda1cd4a3e 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -930,7 +930,7 @@ IMPL_LINK_TYPED( SfxVirtualMenu, Deactivate, Menu *, pMenu, bool ) // called on activation of the SV-Menu -IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu ) +IMPL_LINK_TYPED( SfxVirtualMenu, Select, Menu *, pMenu, bool ) { sal_uInt16 nSlotId = (sal_uInt16) pMenu->GetCurItemId(); SAL_INFO( @@ -960,12 +960,12 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu ) nTaskId++; } - return sal_IntPtr(true); + return true; } else if ( nSlotId >= START_ITEMID_PICKLIST && nSlotId <= END_ITEMID_PICKLIST ) { SfxPickList::ExecuteMenuEntry( nSlotId ); - return sal_IntPtr(true); + return true; } OUString sCommand = pMenu->GetItemCommand(nSlotId); @@ -974,7 +974,7 @@ IMPL_LINK( SfxVirtualMenu, Select, Menu *, pMenu ) else pBindings->Execute(nSlotId); - return sal_IntPtr(true); + return true; } diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 969f08ee7c59..ac9853f859bb 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -958,12 +958,12 @@ void SidebarController::ShowPopupMenu ( return pMenu; } -IMPL_LINK(SidebarController, OnMenuItemSelected, Menu*, pMenu) +IMPL_LINK_TYPED(SidebarController, OnMenuItemSelected, Menu*, pMenu, bool) { if (pMenu == NULL) { OSL_ENSURE(pMenu!=NULL, "sfx2::sidebar::SidebarController::OnMenuItemSelected: illegal menu!"); - return 0; + return false; } pMenu->Deactivate(); |