summaryrefslogtreecommitdiff
path: root/sw/source/ui/misc
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/misc
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/misc')
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/misc/num.cxx2
-rw-r--r--sw/source/ui/misc/pgfnote.cxx2
-rw-r--r--sw/source/ui/misc/pggrid.cxx8
-rw-r--r--sw/source/ui/misc/srtdlg.cxx2
-rw-r--r--sw/source/ui/misc/titlepage.cxx2
6 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index b1413b3d60e1..46132d095073 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -1072,7 +1072,7 @@ void SwGlossaryDlg::ShowPreview()
//create example
if (!pExampleFrame)
{
- Link aLink(LINK(this, SwGlossaryDlg, PreviewLoadedHdl));
+ Link<> aLink(LINK(this, SwGlossaryDlg, PreviewLoadedHdl));
pExampleFrame = new SwOneExampleFrame( *m_pExampleWIN,
EX_SHOW_ONLINE_LAYOUT, &aLink );
}
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 86f38ed7a559..0cd2f805018c 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -116,7 +116,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(vcl::Window* pParent,
m_pAlign2LB->SetDropDownLineCount( m_pAlign2LB->GetEntryCount() );
m_pAlign2FT->SetText( m_pAlignFT->GetText() );
- Link aLk = LINK(this, SwNumPositionTabPage, DistanceHdl);
+ Link<> aLk = LINK(this, SwNumPositionTabPage, DistanceHdl);
m_pDistBorderMF->SetUpHdl(aLk);
m_pDistNumMF->SetUpHdl(aLk);
m_pIndentMF->SetUpHdl(aLk);
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 43a013598177..6a2b42a12f58 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -187,7 +187,7 @@ void SwFootNotePage::Reset(const SfxItemSet *rSet)
}
m_pMaxHeightPageBtn->SetClickHdl(LINK(this,SwFootNotePage,HeightPage));
m_pMaxHeightBtn->SetClickHdl(LINK(this,SwFootNotePage,HeightMetric));
- Link aLk = LINK(this, SwFootNotePage, HeightModify);
+ Link<> aLk = LINK(this, SwFootNotePage, HeightModify);
m_pMaxHeightEdit->SetLoseFocusHdl( aLk );
m_pDistEdit->SetLoseFocusHdl( aLk );
m_pLineDistEdit->SetLoseFocusHdl( aLk );
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 100a2c4d8d67..f725eba0734d 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -76,7 +76,7 @@ SwTextGridPage::SwTextGridPage(vcl::Window *pParent, const SfxItemSet &rSet) :
get(m_pPrintCB,"checkCB_PRINT");
get(m_pColorLB,"listLB_COLOR");
- Link aLink = LINK(this, SwTextGridPage, CharorLineChangedHdl);
+ Link<> aLink = LINK(this, SwTextGridPage, CharorLineChangedHdl);
m_pCharsPerLineNF->SetUpHdl(aLink);
m_pCharsPerLineNF->SetDownHdl(aLink);
m_pCharsPerLineNF->SetLoseFocusHdl(aLink);
@@ -84,7 +84,7 @@ SwTextGridPage::SwTextGridPage(vcl::Window *pParent, const SfxItemSet &rSet) :
m_pLinesPerPageNF->SetDownHdl(aLink);
m_pLinesPerPageNF->SetLoseFocusHdl(aLink);
- Link aSizeLink = LINK(this, SwTextGridPage, TextSizeChangedHdl);
+ Link<> aSizeLink = LINK(this, SwTextGridPage, TextSizeChangedHdl);
m_pTextSizeMF->SetUpHdl(aSizeLink);
m_pTextSizeMF->SetDownHdl(aSizeLink);
m_pTextSizeMF->SetLoseFocusHdl(aSizeLink);
@@ -95,12 +95,12 @@ SwTextGridPage::SwTextGridPage(vcl::Window *pParent, const SfxItemSet &rSet) :
m_pCharWidthMF->SetDownHdl(aSizeLink);
m_pCharWidthMF->SetLoseFocusHdl(aSizeLink);
- Link aGridTypeHdl = LINK(this, SwTextGridPage, GridTypeHdl);
+ Link<> aGridTypeHdl = LINK(this, SwTextGridPage, GridTypeHdl);
m_pNoGridRB->SetClickHdl(aGridTypeHdl);
m_pLinesGridRB->SetClickHdl(aGridTypeHdl);
m_pCharsGridRB->SetClickHdl(aGridTypeHdl);
- Link aModifyLk = LINK(this, SwTextGridPage, GridModifyHdl);
+ Link<> aModifyLk = LINK(this, SwTextGridPage, GridModifyHdl);
m_pColorLB->SetSelectHdl(aModifyLk);
m_pPrintCB->SetClickHdl(aModifyLk);
m_pRubyBelowCB->SetClickHdl(aModifyLk);
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 3856070dbf63..1fd265201f01 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -178,7 +178,7 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell &rShell)
}
// initialise
- Link aLk = LINK(this,SwSortDlg, CheckHdl);
+ Link<> aLk = LINK(this,SwSortDlg, CheckHdl);
m_pKeyCB1->SetClickHdl( aLk );
m_pKeyCB2->SetClickHdl( aLk );
m_pKeyCB3->SetClickHdl( aLk );
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 5f888f3f7497..ecf49356c47c 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -216,7 +216,7 @@ SwTitlePageDlg::SwTitlePageDlg( vcl::Window *pParent ) :
m_pDocumentStartRB->Check();
m_pPageStartNF->Enable(false);
m_pPageStartNF->SetValue(lcl_GetCurrentPage(mpSh));
- Link aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl);
+ Link<> aStartPageHdl = LINK(this, SwTitlePageDlg, StartPageHdl);
m_pDocumentStartRB->SetClickHdl(aStartPageHdl);
m_pPageStartRB->SetClickHdl(aStartPageHdl);