summaryrefslogtreecommitdiff
path: root/sw/source/ui/config
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-30 10:20:00 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-30 10:20:00 +0200
commit3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed (patch)
treebdfd28afe5a452060e3d985c5f01b45f4b7bc2cd /sw/source/ui/config
parent57d254d42b6e1d836bd21e6fb2e968af2b511c7d (diff)
Gradually typed Link
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
Diffstat (limited to 'sw/source/ui/config')
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx2
-rw-r--r--sw/source/ui/config/optload.cxx4
-rw-r--r--sw/source/ui/config/optpage.cxx14
3 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 72f201c365f9..578909554f0b 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -425,7 +425,7 @@ SwAuthenticationSettingsDialog::SwAuthenticationSettingsDialog(
get(m_pOKPB,"ok");
m_pAuthenticationCB->SetClickHdl( LINK( this, SwAuthenticationSettingsDialog, CheckBoxHdl_Impl));
- Link aRBLink = LINK( this, SwAuthenticationSettingsDialog, RadioButtonHdl_Impl );
+ Link<> aRBLink = LINK( this, SwAuthenticationSettingsDialog, RadioButtonHdl_Impl );
m_pSeparateAuthenticationRB->SetClickHdl( aRBLink );
m_pSMTPAfterPOPRB->SetClickHdl( aRBLink );
m_pOKPB->SetClickHdl( LINK( this, SwAuthenticationSettingsDialog, OKHdl_Impl));
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 9764b8f22cb6..5f0cc8b5222c 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -121,7 +121,7 @@ SwLoadOptPage::SwLoadOptPage(vcl::Window* pParent, const SfxItemSet& rSet)
m_pUseCharUnit->Hide();
}
- Link aLink = LINK(this, SwLoadOptPage, StandardizedPageCountCheckHdl);
+ Link<> aLink = LINK(this, SwLoadOptPage, StandardizedPageCountCheckHdl);
m_pShowStandardizedPageCount->SetClickHdl(aLink);
}
@@ -523,7 +523,7 @@ SwCaptionOptPage::SwCaptionOptPage( vcl::Window* pParent, const SfxItemSet& rSet
m_pLbLevel->SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 );
m_pEdDelim->SetText( sDelim );
- Link aLk = LINK( this, SwCaptionOptPage, ModifyHdl );
+ Link<> aLk = LINK( this, SwCaptionOptPage, ModifyHdl );
m_pCategoryBox->SetModifyHdl( aLk );
m_pNumberingSeparatorED->SetModifyHdl( aLk );
m_pTextEdit->SetModifyHdl( aLk );
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 4b02931e58eb..3186484c52a4 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -341,7 +341,7 @@ SwAddPrinterTabPage::SwAddPrinterTabPage(vcl::Window* pParent,
get(m_pPaperFromSetupCB, "papertray");
get(m_pFaxLB, "fax");
- Link aLk = LINK( this, SwAddPrinterTabPage, AutoClickHdl);
+ Link<> aLk = LINK( this, SwAddPrinterTabPage, AutoClickHdl);
m_pGrfCB->SetClickHdl( aLk );
m_pRightPageCB->SetClickHdl( aLk );
m_pLeftPageCB->SetClickHdl( aLk );
@@ -609,14 +609,14 @@ SwStdFontTabPage::SwStdFontTabPage( vcl::Window* pParent,
pListBox ->SetModifyHdl( LINK(this, SwStdFontTabPage, ModifyHdl));
pLabelBox ->SetModifyHdl( LINK(this, SwStdFontTabPage, ModifyHdl));
pIdxBox ->SetModifyHdl( LINK(this, SwStdFontTabPage, ModifyHdl));
- Link aFocusLink = LINK( this, SwStdFontTabPage, LoseFocusHdl);
+ Link<> aFocusLink = LINK( this, SwStdFontTabPage, LoseFocusHdl);
pStandardBox->SetLoseFocusHdl( aFocusLink );
pTitleBox ->SetLoseFocusHdl( aFocusLink );
pListBox ->SetLoseFocusHdl( aFocusLink );
pLabelBox ->SetLoseFocusHdl( aFocusLink );
pIdxBox ->SetLoseFocusHdl( aFocusLink );
- Link aModifyHeightLink( LINK( this, SwStdFontTabPage, ModifyHeightHdl));
+ Link<> aModifyHeightLink( LINK( this, SwStdFontTabPage, ModifyHeightHdl));
pStandardHeightLB->SetModifyHdl( aModifyHeightLink );
pTitleHeightLB-> SetModifyHdl( aModifyHeightLink );
pListHeightLB-> SetModifyHdl( aModifyHeightLink );
@@ -1147,7 +1147,7 @@ SwTableOptionsTabPage::SwTableOptionsTabPage( vcl::Window* pParent, const SfxIte
get(pFixPropRB,"fixprop");
get(pVarRB,"var");
- Link aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl));
+ Link<> aLnk(LINK(this, SwTableOptionsTabPage, CheckBoxHdl));
pNumFormattingCB->SetClickHdl(aLnk);
pNumFmtFormattingCB->SetClickHdl(aLnk);
pHeaderCB->SetClickHdl(aLnk);
@@ -1827,7 +1827,7 @@ SwRedlineOptionsTabPage::SwRedlineOptionsTabPage( vcl::Window* pParent,
pDeletedLB->RemoveEntry(4);
pDeletedLB->RemoveEntry(3);
- Link aLk = LINK(this, SwRedlineOptionsTabPage, AttribHdl);
+ Link<> aLk = LINK(this, SwRedlineOptionsTabPage, AttribHdl);
pInsertLB->SetSelectHdl( aLk );
pDeletedLB->SetSelectHdl( aLk );
pChangedLB->SetSelectHdl( aLk );
@@ -2359,7 +2359,7 @@ SwCompareOptionsTabPage::SwCompareOptionsTabPage( vcl::Window* pParent, const S
get(m_pLenNF, "ignorelen");
get(m_pStoreRsidCB, "storeRSID");
- Link aLnk( LINK( this, SwCompareOptionsTabPage, ComparisonHdl ) );
+ Link<> aLnk( LINK( this, SwCompareOptionsTabPage, ComparisonHdl ) );
m_pAutoRB->SetClickHdl( aLnk );
m_pWordRB->SetClickHdl( aLnk );
m_pCharRB->SetClickHdl( aLnk );
@@ -2588,7 +2588,7 @@ void SwTestTabPage::Reset( const SfxItemSet* )
void SwTestTabPage::Init()
{
// handler
- Link aLk = LINK( this, SwTestTabPage, AutoClickHdl );
+ Link<> aLk = LINK( this, SwTestTabPage, AutoClickHdl );
m_pTest1CBox->SetClickHdl( aLk );
m_pTest2CBox->SetClickHdl( aLk );
m_pTest3CBox->SetClickHdl( aLk );