From a8248293c301e6804dfbe195c9a9be39e4328480 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 16 Oct 2015 14:12:04 +0200 Subject: convert Link<> to typed Change-Id: I9ce3a85eb5eba35691c376d19436c624df68be33 --- sw/source/ui/index/cnttab.cxx | 11 +++++++---- sw/source/uibase/inc/swuicnttab.hxx | 14 +++++++------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 08e32af3e8f1..57b073269961 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2017,9 +2017,13 @@ void SwTOXEntryTabPage::dispose() // pVoid is used as signal to change all levels of the example IMPL_LINK_TYPED(SwTOXEntryTabPage, ModifyClickHdl, Button*, pVoid, void) { - ModifyHdl(pVoid); + OnModify(pVoid); } -IMPL_LINK(SwTOXEntryTabPage, ModifyHdl, void*, pVoid) +IMPL_LINK_NOARG_TYPED(SwTOXEntryTabPage, ModifyHdl, LinkParamNone*, void) +{ + OnModify(nullptr); +} +void SwTOXEntryTabPage::OnModify(void* pVoid) { UpdateDescriptor(); @@ -2032,7 +2036,6 @@ IMPL_LINK(SwTOXEntryTabPage, ModifyHdl, void*, pVoid) pTOXDlg->CreateOrUpdateExample( pTOXDlg->GetCurrentTOXType().eType, TOX_PAGE_ENTRY, nCurLevel); } - return 0; } bool SwTOXEntryTabPage::FillItemSet( SfxItemSet* ) @@ -2362,7 +2365,7 @@ IMPL_LINK_NOARG_TYPED(SwTOXEntryTabPage, AllLevelsHdl, Button*, void) for(sal_uInt16 i = 1; i < m_pCurrentForm->GetFormMax(); i++) m_pCurrentForm->SetPattern(i, sNewToken); - ModifyHdl(this); + OnModify(this); } } diff --git a/sw/source/uibase/inc/swuicnttab.hxx b/sw/source/uibase/inc/swuicnttab.hxx index 4d51f43b4f79..0a81436deeef 100644 --- a/sw/source/uibase/inc/swuicnttab.hxx +++ b/sw/source/uibase/inc/swuicnttab.hxx @@ -258,9 +258,9 @@ class SwTokenWindow : public VclHBox, public VclBuilderContainer OUString aButtonTexts[TOKEN_END]; // Text of the buttons OUString aButtonHelpTexts[TOKEN_END]; // QuickHelpText of the buttons OUString sCharStyle; - Link aButtonSelectedHdl; - VclPtr pActiveCtrl; - Link<> aModifyHdl; + Link aButtonSelectedHdl; + VclPtr pActiveCtrl; + Link aModifyHdl; OUString accessibleName; OUString sAdditionalAccnameString1; OUString sAdditionalAccnameString2; @@ -301,10 +301,9 @@ public: void SetButtonSelectedHdl(const Link& rLink) { aButtonSelectedHdl = rLink;} - void SetModifyHdl(const Link<>& rLink){aModifyHdl = rLink;} + void SetModifyHdl(const Link& rLink){aModifyHdl = rLink;} - Control* GetActiveControl() - { return pActiveCtrl;} + Control* GetActiveControl() { return pActiveCtrl; } void InsertAtSelection(const OUString& rText, const SwFormToken& aToken); void RemoveControl(SwTOXButton* pDel, bool bInternalCall = false); @@ -429,7 +428,8 @@ class SwTOXEntryTabPage : public SfxTabPage void WriteBackLevel(); void UpdateDescriptor(); - DECL_LINK(ModifyHdl, void*); + DECL_LINK_TYPED(ModifyHdl, LinkParamNone*, void); + void OnModify(void*); DECL_LINK_TYPED(ModifyClickHdl, Button*, void); using SfxTabPage::ActivatePage; -- cgit