summaryrefslogtreecommitdiff
path: root/sc/source/ui/dbgui
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/dbgui
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/dbgui')
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx2
-rw-r--r--sc/source/ui/dbgui/csvtablebox.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx6
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/sortkeydlg.cxx2
-rw-r--r--sc/source/ui/dbgui/textimportoptions.cxx2
7 files changed, 9 insertions, 9 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 6858d5df706e..e6e2b9890039 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -78,7 +78,7 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
maAddressDetails (mpDocument->GetAddressConvention(), 0, 0),
mbDialogLostFocus (false)
{
- Link aLink;
+ Link<> aLink;
get(mpListBoxField, "listbox-fields");
get(mpListBoxPage, "listbox-page");
diff --git a/sc/source/ui/dbgui/csvtablebox.cxx b/sc/source/ui/dbgui/csvtablebox.cxx
index 9dab72200314..3dab776b8a1b 100644
--- a/sc/source/ui/dbgui/csvtablebox.cxx
+++ b/sc/source/ui/dbgui/csvtablebox.cxx
@@ -38,7 +38,7 @@ ScCsvTableBox::ScCsvTableBox( vcl::Window* pParent, WinBits nBits ) :
maHScroll->SetLineSize( 1 );
maVScroll->SetLineSize( 1 );
- Link aLink = LINK( this, ScCsvTableBox, CsvCmdHdl );
+ Link<> aLink = LINK( this, ScCsvTableBox, CsvCmdHdl );
SetCmdHdl( aLink );
maRuler->SetCmdHdl( aLink );
maGrid->SetCmdHdl( aLink );
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index e3584d570015..8ac10bee2fa3 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -452,7 +452,7 @@ void ScFilterDlg::SetActive()
{
pEdCopyArea->GrabFocus();
if ( pEdCopyArea->GetModifyHdl().IsSet() )
- ((Link&)pEdCopyArea->GetModifyHdl()).Call( pEdCopyArea );
+ ((Link<>&)pEdCopyArea->GetModifyHdl()).Call( pEdCopyArea );
}
else
GrabFocus();
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 3c56ba69ca4a..e63ac13b4abb 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -370,7 +370,7 @@ ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatNa
lcl_FillCombo( *pCbTextSep, aTextSepList, mcTextSep );
pCbTextSep->SetText( sTextSeparators );
- Link aSeparatorHdl =LINK( this, ScImportAsciiDlg, SeparatorHdl );
+ Link<> aSeparatorHdl =LINK( this, ScImportAsciiDlg, SeparatorHdl );
pCbTextSep->SetSelectHdl( aSeparatorHdl );
pCbTextSep->SetModifyHdl( aSeparatorHdl );
pCkbTab->SetClickHdl( aSeparatorHdl );
@@ -774,8 +774,8 @@ IMPL_LINK( ScImportAsciiDlg, ColTypeHdl, ScCsvTableBox*, pTableBox )
pFtType->Enable( bEnable );
pLbType->Enable( bEnable );
- Link aSelHdl = pLbType->GetSelectHdl();
- pLbType->SetSelectHdl( Link() );
+ Link<> aSelHdl = pLbType->GetSelectHdl();
+ pLbType->SetSelectHdl( Link<>() );
if( bEmpty )
pLbType->SetNoSelection();
else if( bEnable )
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index 028963d76556..120669101b1b 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -255,7 +255,7 @@ void ScSpecialFilterDlg::SetActive()
{
pEdCopyArea->GrabFocus();
if ( pEdCopyArea->GetModifyHdl().IsSet() )
- ((Link&)pEdCopyArea->GetModifyHdl()).Call( pEdCopyArea );
+ ((Link<>&)pEdCopyArea->GetModifyHdl()).Call( pEdCopyArea );
}
else if ( pRefInputEdit == pEdFilterArea )
{
diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx
index 9e0b76e821f8..e0518cd06d7f 100644
--- a/sc/source/ui/dbgui/sortkeydlg.cxx
+++ b/sc/source/ui/dbgui/sortkeydlg.cxx
@@ -85,7 +85,7 @@ ScSortKeyCtrl::ScSortKeyCtrl(SfxTabPage* pParent, ScSortKeyItems& rItems)
m_rVertScroll.SetRangeMin( 0 );
m_rVertScroll.SetVisibleSize( 0xFFFF );
- Link aScrollLink = LINK( this, ScSortKeyCtrl, ScrollHdl );
+ Link<> aScrollLink = LINK( this, ScSortKeyCtrl, ScrollHdl );
m_rVertScroll.SetScrollHdl( aScrollLink );
}
diff --git a/sc/source/ui/dbgui/textimportoptions.cxx b/sc/source/ui/dbgui/textimportoptions.cxx
index 211b6d233e1b..e0be3a2bc573 100644
--- a/sc/source/ui/dbgui/textimportoptions.cxx
+++ b/sc/source/ui/dbgui/textimportoptions.cxx
@@ -72,7 +72,7 @@ bool ScTextImportOptionsDlg::isDateConversionSet() const
void ScTextImportOptionsDlg::init()
{
- Link aLink = LINK( this, ScTextImportOptionsDlg, OKHdl );
+ Link<> aLink = LINK( this, ScTextImportOptionsDlg, OKHdl );
m_pBtnOk->SetClickHdl(aLink);
aLink = LINK( this, ScTextImportOptionsDlg, RadioHdl );
m_pRbAutomatic->SetClickHdl(aLink);