summaryrefslogtreecommitdiff
path: root/sc/source/ui/StatisticsDialogs
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 /sc/source/ui/StatisticsDialogs
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 'sc/source/ui/StatisticsDialogs')
-rw-r--r--sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/SamplingDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx2
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx2
4 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 5583760ba2e2..ecc1a8bcdf8b 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -112,7 +112,7 @@ void ScRandomNumberGeneratorDialog::Init()
mpButtonClose->SetClickHdl( LINK( this, ScRandomNumberGeneratorDialog, CloseClicked ) );
mpButtonApply->SetClickHdl( LINK( this, ScRandomNumberGeneratorDialog, ApplyClicked ) );
- Link aLink = LINK( this, ScRandomNumberGeneratorDialog, GetFocusHandler );
+ Link<> aLink = LINK( this, ScRandomNumberGeneratorDialog, GetFocusHandler );
mpInputRangeEdit->SetGetFocusHdl( aLink );
mpInputRangeButton->SetGetFocusHdl( aLink );
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index f985adb04648..e8bd197f7949 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -87,7 +87,7 @@ void ScSamplingDialog::Init()
mpButtonOk->SetClickHdl( LINK( this, ScSamplingDialog, OkClicked ) );
mpButtonOk->Enable(false);
- Link aLink = LINK( this, ScSamplingDialog, GetFocusHandler );
+ Link<> aLink = LINK( this, ScSamplingDialog, GetFocusHandler );
mpInputRangeEdit->SetGetFocusHdl( aLink );
mpInputRangeButton->SetGetFocusHdl( aLink );
mpOutputRangeEdit->SetGetFocusHdl( aLink );
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index 8e2fa67a455c..8887c5a1425c 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -111,7 +111,7 @@ void ScStatisticsInputOutputDialog::Init()
mpButtonOk->SetClickHdl( LINK( this, ScStatisticsInputOutputDialog, OkClicked ) );
mpButtonOk->Enable(false);
- Link aLink = LINK( this, ScStatisticsInputOutputDialog, GetFocusHandler );
+ Link<> aLink = LINK( this, ScStatisticsInputOutputDialog, GetFocusHandler );
mpInputRangeEdit->SetGetFocusHdl( aLink );
mpInputRangeButton->SetGetFocusHdl( aLink );
mpOutputRangeEdit->SetGetFocusHdl( aLink );
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index 8dc5ade17d61..ce7cdf7744ba 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -92,7 +92,7 @@ void ScStatisticsTwoVariableDialog::Init()
mpButtonOk->SetClickHdl( LINK( this, ScStatisticsTwoVariableDialog, OkClicked ) );
mpButtonOk->Enable(false);
- Link aLink = LINK( this, ScStatisticsTwoVariableDialog, GetFocusHandler );
+ Link<> aLink = LINK( this, ScStatisticsTwoVariableDialog, GetFocusHandler );
mpVariable1RangeEdit->SetGetFocusHdl( aLink );
mpVariable1RangeButton->SetGetFocusHdl( aLink );
mpVariable2RangeEdit->SetGetFocusHdl( aLink );