diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-11 13:27:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-14 10:00:44 +0200 |
commit | 2a4ccc0c1e836fb7cde991c1233ca5a63599ec8b (patch) | |
tree | 74fee8c81b010cfef46fab0b96e5eb984726d25a /sc | |
parent | 6532cb0e5ec3a59c248b332e868c4c03c31659f1 (diff) |
convert Link<> to typed
Change-Id: I1c501671d72edd5b998e80c7fa1e91dbeb507af8
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/cctrl/checklistmenu.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/foptmgr.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/inc/RandomNumberGeneratorDialog.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/checklistmenu.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/foptmgr.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/namedlg.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/inc/sharedocdlg.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/sharedocdlg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/namedlg/namedlg.cxx | 23 |
10 files changed, 29 insertions, 23 deletions
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx index ff9b751c9590..7482da61a6f2 100644 --- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx @@ -130,7 +130,7 @@ void ScRandomNumberGeneratorDialog::Init() mpEnableRounding->SetToggleHdl( LINK( this, ScRandomNumberGeneratorDialog, CheckChanged )); DistributionChanged(NULL); - CheckChanged(NULL); + CheckChanged(*mpEnableSeed); } void ScRandomNumberGeneratorDialog::GetRangeFromSelection() @@ -417,11 +417,10 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, Parameter2ValueModified) return 0; } -IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, CheckChanged) +IMPL_LINK_NOARG_TYPED(ScRandomNumberGeneratorDialog, CheckChanged, CheckBox&, void) { mpSeed->Enable(mpEnableSeed->IsChecked()); mpDecimalPlaces->Enable(mpEnableRounding->IsChecked()); - return 0; } IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged) diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 4fae698269fa..9911d3b8c9ae 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1215,6 +1215,10 @@ IMPL_LINK_NOARG_TYPED(ScCheckListMenuWindow, TriStateHdl, Button*, void) mePrevToggleAllState = maChkToggleAll->GetState(); } +IMPL_LINK_NOARG_TYPED(ScCheckListMenuWindow, EdModifyCheckBoxHdl, CheckBox&, void) +{ + EdModifyHdl(nullptr); +} IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl) { OUString aSearchText = maEdSearch->GetText(); diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index 2b1cd62f3c35..29b6dc2c5e93 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -253,11 +253,11 @@ IMPL_LINK( ScFilterOptionsMgr, EdAreaModifyHdl, Edit*, pEd ) return 0; } -IMPL_LINK( ScFilterOptionsMgr, BtnCopyResultHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( ScFilterOptionsMgr, BtnCopyResultHdl, CheckBox&, rBox, void ) { - if ( pBox == pBtnCopyResult ) + if ( &rBox == pBtnCopyResult ) { - if ( pBox->IsChecked() ) + if ( rBox.IsChecked() ) { pBtnDestPers->Enable(); pLbCopyArea->Enable(); @@ -273,8 +273,6 @@ IMPL_LINK( ScFilterOptionsMgr, BtnCopyResultHdl, CheckBox*, pBox ) pRbCopyArea->Disable(); } } - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx index dc751e490431..a588b503d727 100644 --- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx +++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx @@ -80,7 +80,7 @@ private: DECL_LINK( Parameter1ValueModified, void* ); DECL_LINK( Parameter2ValueModified, void* ); DECL_LINK( DistributionChanged, void* ); - DECL_LINK( CheckChanged, void* ); + DECL_LINK_TYPED( CheckChanged, CheckBox&, void ); }; diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 5f42cfcdb76e..f3289aa2e640 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -332,6 +332,7 @@ private: DECL_LINK_TYPED( TriStateHdl, Button*, void ); DECL_LINK_TYPED( CheckHdl, SvTreeListBox*, void ); DECL_LINK( EdModifyHdl, void* ); + DECL_LINK_TYPED( EdModifyCheckBoxHdl, CheckBox&, void ); private: VclPtr<Edit> maEdSearch; diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx index ee27b40f5fc5..e5626ba48435 100644 --- a/sc/source/ui/inc/foptmgr.hxx +++ b/sc/source/ui/inc/foptmgr.hxx @@ -79,7 +79,7 @@ private: // Handler: DECL_LINK( EdAreaModifyHdl, Edit* ); DECL_LINK( LbAreaSelHdl, ListBox* ); - DECL_LINK( BtnCopyResultHdl, CheckBox* ); + DECL_LINK_TYPED( BtnCopyResultHdl, CheckBox&, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_FOPTMGR_HXX diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx index 6678b31ef813..9a8329ab00d1 100644 --- a/sc/source/ui/inc/namedlg.hxx +++ b/sc/source/ui/inc/namedlg.hxx @@ -105,6 +105,7 @@ private: DECL_LINK_TYPED( AddBtnHdl, Button*, void ); DECL_LINK_TYPED( RemoveBtnHdl, Button*, void ); DECL_LINK( EdModifyHdl, void * ); + DECL_LINK_TYPED( EdModifyCheckBoxHdl, CheckBox&, void ); DECL_LINK( AssignGetFocusHdl, void * ); DECL_LINK_TYPED( SelectionChangedHdl_Impl, SvTreeListBox*, void ); DECL_LINK( ScopeChangedHdl, void* ); diff --git a/sc/source/ui/inc/sharedocdlg.hxx b/sc/source/ui/inc/sharedocdlg.hxx index 41f53111b40a..85abd56dccfd 100644 --- a/sc/source/ui/inc/sharedocdlg.hxx +++ b/sc/source/ui/inc/sharedocdlg.hxx @@ -44,7 +44,7 @@ private: ScViewData* mpViewData; ScDocShell* mpDocShell; - DECL_LINK( ToggleHandle, void* ); + DECL_LINK_TYPED( ToggleHandle, CheckBox&, void ); public: ScShareDocumentDlg( vcl::Window* pParent, ScViewData* pViewData ); diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx index 9cb3ca29bccb..2a82c9883fcc 100644 --- a/sc/source/ui/miscdlgs/sharedocdlg.cxx +++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx @@ -119,11 +119,9 @@ void ScShareDocumentDlg::dispose() ModalDialog::dispose(); } -IMPL_LINK_NOARG(ScShareDocumentDlg, ToggleHandle) +IMPL_LINK_NOARG_TYPED(ScShareDocumentDlg, ToggleHandle, CheckBox&, void) { m_pFtWarning->Enable( m_pCbShare->IsChecked() ); - - return 0; } bool ScShareDocumentDlg::IsShareDocumentChecked() const diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index eee65db5258d..1a103ede8c0c 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -149,10 +149,10 @@ void ScNameDlg::Init() m_pEdName->SetModifyHdl ( LINK( this, ScNameDlg, EdModifyHdl ) ); m_pLbScope->SetSelectHdl( LINK(this, ScNameDlg, ScopeChangedHdl) ); m_pBtnDelete->SetClickHdl ( LINK( this, ScNameDlg, RemoveBtnHdl ) ); - m_pBtnPrintArea->SetToggleHdl( LINK(this, ScNameDlg, EdModifyHdl ) ); - m_pBtnCriteria->SetToggleHdl( LINK(this, ScNameDlg, EdModifyHdl ) ); - m_pBtnRowHeader->SetToggleHdl( LINK(this, ScNameDlg, EdModifyHdl ) ); - m_pBtnColHeader->SetToggleHdl( LINK(this, ScNameDlg, EdModifyHdl ) ); + m_pBtnPrintArea->SetToggleHdl( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) ); + m_pBtnCriteria->SetToggleHdl( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) ); + m_pBtnRowHeader->SetToggleHdl( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) ); + m_pBtnColHeader->SetToggleHdl( LINK(this, ScNameDlg, EdModifyCheckBoxHdl ) ); // Initialize scope list. m_pLbScope->InsertEntry(maGlobalNameStr); @@ -253,10 +253,10 @@ void ScNameDlg::UpdateChecks(ScRangeData* pData) // handlers, triggering handlers while already processing a handler can // ( and does in this case ) corrupt the internal data - m_pBtnCriteria->SetToggleHdl( Link<>() ); - m_pBtnPrintArea->SetToggleHdl( Link<>() ); - m_pBtnColHeader->SetToggleHdl( Link<>() ); - m_pBtnRowHeader->SetToggleHdl( Link<>() ); + m_pBtnCriteria->SetToggleHdl( Link<CheckBox&,void>() ); + m_pBtnPrintArea->SetToggleHdl( Link<CheckBox&,void>() ); + m_pBtnColHeader->SetToggleHdl( Link<CheckBox&,void>() ); + m_pBtnRowHeader->SetToggleHdl( Link<CheckBox&,void>() ); m_pBtnCriteria->Check( pData->HasType( RT_CRITERIA ) ); m_pBtnPrintArea->Check( pData->HasType( RT_PRINTAREA ) ); @@ -264,7 +264,7 @@ void ScNameDlg::UpdateChecks(ScRangeData* pData) m_pBtnRowHeader->Check( pData->HasType( RT_ROWHEADER ) ); // Restore handlers so user input is processed again - Link<> aToggleHandler = LINK( this, ScNameDlg, EdModifyHdl ); + Link<CheckBox&,void> aToggleHandler = LINK( this, ScNameDlg, EdModifyCheckBoxHdl ); m_pBtnCriteria->SetToggleHdl( aToggleHandler ); m_pBtnPrintArea->SetToggleHdl( aToggleHandler ); m_pBtnColHeader->SetToggleHdl( aToggleHandler ); @@ -503,6 +503,11 @@ IMPL_LINK_NOARG_TYPED(ScNameDlg, RemoveBtnHdl, Button*, void) RemovePushed(); } +IMPL_LINK_NOARG_TYPED(ScNameDlg, EdModifyCheckBoxHdl, CheckBox&, void) +{ + NameModified(); +} + IMPL_LINK_NOARG(ScNameDlg, EdModifyHdl) { NameModified(); |