diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-19 09:11:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-26 11:15:35 +0200 |
commit | 167bc621ef825ed5b961502fe9324a675ee34e42 (patch) | |
tree | 523838d8adc14a62f846529ee6eab3343b2fe87b /chart2 | |
parent | 46a27805fb707544a844a961a3743b8b992282f0 (diff) |
Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
Diffstat (limited to 'chart2')
27 files changed, 80 insertions, 104 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 92c6cb668f56..946bb702cac9 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -640,10 +640,10 @@ void SchAttribTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) } } -IMPL_LINK_NOARG(SchAttribTabDlg, OKPressed) +IMPL_LINK_TYPED(SchAttribTabDlg, OKPressed, Button*, pButton, void) { m_bOKPressed = true; - return m_aOriginalOKClickHdl.Call( this ); + m_aOriginalOKClickHdl.Call( pButton ); } } //namespace chart diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 5ee6d2afc6b8..0c532e081d9f 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -178,12 +178,12 @@ void DataLabelResources::SetNumberFormatter( SvNumberFormatter* pFormatter ) m_pNumberFormatter = pFormatter; } -IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) +IMPL_LINK_TYPED( DataLabelResources, NumberFormatDialogHdl, Button *, pButton, void ) { if( !m_pPool || !m_pNumberFormatter ) { OSL_FAIL("Missing item pool or number formatter"); - return 1; + return; } if( pButton == m_pPB_NumberFormatForValue && !m_pCBNumber->IsChecked()) @@ -224,15 +224,13 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) rbMixedState = rbSourceMixedState = true; } } - return 0; } -IMPL_LINK( DataLabelResources, CheckHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( DataLabelResources, CheckHdl, Button*, pBox, void ) { if( pBox ) - pBox->EnableTriState( false ); + static_cast<CheckBox*>(pBox)->EnableTriState( false ); EnableControls(); - return 0; } void DataLabelResources::EnableControls() diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx index cfb4758cc29b..acfc93a30dde 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.hxx +++ b/chart2/source/controller/dialogs/res_DataLabel.hxx @@ -85,8 +85,8 @@ private: VclPtr<vcl::Window> m_pWindow; SfxItemPool* m_pPool; - DECL_LINK(NumberFormatDialogHdl, PushButton * ); - DECL_LINK(CheckHdl, CheckBox* ); + DECL_LINK_TYPED(NumberFormatDialogHdl, Button *, void ); + DECL_LINK_TYPED(CheckHdl, Button*, void ); void EnableControls(); }; diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 44377b08f22a..e0fc7181c0ad 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -138,7 +138,7 @@ ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pPa m_pRbPercent->SetClickHdl( LINK( this, ErrorBarResources, CategoryChosen )); m_pRbFunction->SetClickHdl( LINK( this, ErrorBarResources, CategoryChosen )); m_pRbRange->SetClickHdl( LINK( this, ErrorBarResources, CategoryChosen )); - m_pLbFunction->SetSelectHdl( LINK( this, ErrorBarResources, CategoryChosen )); + m_pLbFunction->SetSelectHdl( LINK( this, ErrorBarResources, CategoryChosen2 )); m_pCbSyncPosNeg->Check( false ); m_pCbSyncPosNeg->SetToggleHdl( LINK( this, ErrorBarResources, SynchronizePosAndNeg )); @@ -340,7 +340,13 @@ void ErrorBarResources::UpdateControlStates() } } -IMPL_LINK_NOARG( ErrorBarResources, CategoryChosen ) +IMPL_LINK_NOARG( ErrorBarResources, CategoryChosen2 ) +{ + CategoryChosen(NULL); + return 0; +} + +IMPL_LINK_NOARG_TYPED( ErrorBarResources, CategoryChosen, Button*, void ) { m_bErrorKindUnique = true; SvxChartKindError eOldError = m_eErrorKind; @@ -396,7 +402,6 @@ IMPL_LINK_NOARG( ErrorBarResources, CategoryChosen ) } UpdateControlStates(); - return 0; } IMPL_LINK_NOARG(ErrorBarResources, SynchronizePosAndNeg) @@ -422,7 +427,7 @@ IMPL_LINK_NOARG(ErrorBarResources, PosValueChanged) return 0; } -IMPL_LINK_NOARG(ErrorBarResources, IndicatorChanged) +IMPL_LINK_NOARG_TYPED(ErrorBarResources, IndicatorChanged, Button*, void) { m_bIndicatorUnique = true; if( m_pRbBoth->IsChecked()) @@ -435,14 +440,13 @@ IMPL_LINK_NOARG(ErrorBarResources, IndicatorChanged) m_bIndicatorUnique = false; UpdateControlStates(); - return 0; } -IMPL_LINK( ErrorBarResources, ChooseRange, PushButton*, pButton ) +IMPL_LINK_TYPED( ErrorBarResources, ChooseRange, Button*, pButton, void ) { OSL_ASSERT( m_apRangeSelectionHelper.get()); if( ! m_apRangeSelectionHelper.get()) - return 0; + return; OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr ); OUString aUIString; @@ -468,8 +472,6 @@ IMPL_LINK( ErrorBarResources, ChooseRange, PushButton*, pButton ) } else m_pCurrentRangeChoosingField = 0; - - return 0; } IMPL_LINK( ErrorBarResources, RangeChanged, Edit *, pEdit ) diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index 98f1641c9f06..5862f13eea77 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -69,7 +69,7 @@ TrendlineResources::TrendlineResources( vcl::Window * pParent, const SfxItemSet& pTabPage->get(m_pFI_MovingAverage,"imageMovingAverage"); FillValueSets(); - Link<> aLink = LINK(this, TrendlineResources, SelectTrendLine ); + Link<Button*,void> aLink = LINK(this, TrendlineResources, SelectTrendLine ); m_pRB_Linear->SetClickHdl( aLink ); m_pRB_Logarithmic->SetClickHdl( aLink ); m_pRB_Exponential->SetClickHdl( aLink ); @@ -77,10 +77,10 @@ TrendlineResources::TrendlineResources( vcl::Window * pParent, const SfxItemSet& m_pRB_Polynomial->SetClickHdl( aLink ); m_pRB_MovingAverage->SetClickHdl( aLink ); - aLink = LINK(this, TrendlineResources, ChangeValue ); - m_pNF_Degree->SetModifyHdl( aLink ); - m_pNF_Period->SetModifyHdl( aLink ); - m_pFmtFld_InterceptValue->SetModifyHdl( aLink ); + Link<> aLink2 = LINK(this, TrendlineResources, ChangeValue ); + m_pNF_Degree->SetModifyHdl( aLink2 ); + m_pNF_Period->SetModifyHdl( aLink2 ); + m_pFmtFld_InterceptValue->SetModifyHdl( aLink2 ); Reset( rInAttrs ); UpdateControlStates(); @@ -89,7 +89,7 @@ TrendlineResources::TrendlineResources( vcl::Window * pParent, const SfxItemSet& TrendlineResources::~TrendlineResources() {} -IMPL_LINK( TrendlineResources, SelectTrendLine, RadioButton *, pRadioButton ) +IMPL_LINK_TYPED( TrendlineResources, SelectTrendLine, Button *, pRadioButton, void ) { if( pRadioButton == m_pRB_Linear ) m_eTrendLineType = CHREGRESS_LINEAR; @@ -106,8 +106,6 @@ IMPL_LINK( TrendlineResources, SelectTrendLine, RadioButton *, pRadioButton ) m_bTrendLineUnique = true; UpdateControlStates(); - - return 0; } void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) diff --git a/chart2/source/controller/dialogs/res_Trendline.hxx b/chart2/source/controller/dialogs/res_Trendline.hxx index 03c3ebe3bd87..d69581cbde4e 100644 --- a/chart2/source/controller/dialogs/res_Trendline.hxx +++ b/chart2/source/controller/dialogs/res_Trendline.hxx @@ -78,7 +78,7 @@ private: sal_Int32 m_nNbPoints; void UpdateControlStates(); - DECL_LINK( SelectTrendLine, RadioButton * ); + DECL_LINK_TYPED( SelectTrendLine, Button *, void ); DECL_LINK( ChangeValue, void *); }; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index 04c725429f83..44f7acae528c 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -415,7 +415,7 @@ IMPL_LINK_NOARG(ThreeD_SceneIllumination_TabPage, PreviewSelectHdl) return 0; } -IMPL_LINK( ThreeD_SceneIllumination_TabPage, ColorDialogHdl, Button*, pButton ) +IMPL_LINK_TYPED( ThreeD_SceneIllumination_TabPage, ColorDialogHdl, Button*, pButton, void ) { bool bIsAmbientLight = (pButton==m_pBtn_AmbientLight_Color); ColorLB* pListBox = ( bIsAmbientLight ? m_pLB_AmbientLight : m_pLB_LightSource); @@ -449,7 +449,6 @@ IMPL_LINK( ThreeD_SceneIllumination_TabPage, ColorDialogHdl, Button*, pButton ) } SelectColorHdl( pListBox ); } - return 0; } IMPL_LINK( ThreeD_SceneIllumination_TabPage, SelectColorHdl, ColorLB*, pListBox ) @@ -482,10 +481,11 @@ IMPL_LINK( ThreeD_SceneIllumination_TabPage, SelectColorHdl, ColorLB*, pListBox return 0; } -IMPL_LINK( ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl, LightButton*, pButton ) +IMPL_LINK_TYPED( ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl, Button*, pBtn, void ) { + LightButton* pButton = static_cast<LightButton*>(pBtn); if( !pButton ) - return 0; + return; LightSourceInfo* pInfo = 0; sal_Int32 nL=0; @@ -525,7 +525,6 @@ IMPL_LINK( ThreeD_SceneIllumination_TabPage, ClickLightSourceButtonHdl, LightBut lcl_selectColor( *m_pLB_LightSource, pInfo->aLightSource.nDiffuseColor ); } this->updatePreview(); - return 0; } void ThreeD_SceneIllumination_TabPage::updatePreview() diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx index a94f1dcb6386..cb368ca33163 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx @@ -60,9 +60,9 @@ public: virtual void dispose() SAL_OVERRIDE; private: - DECL_LINK( ClickLightSourceButtonHdl, LightButton* ); + DECL_LINK_TYPED( ClickLightSourceButtonHdl, Button*, void ); DECL_LINK( SelectColorHdl, ColorLB* ); - DECL_LINK( ColorDialogHdl, Button* ); + DECL_LINK_TYPED( ColorDialogHdl, Button*, void ); DECL_LINK( PreviewChangeHdl, void* ); DECL_LINK( PreviewSelectHdl, void* ); diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 9fac6a5c3824..f478eb08aa99 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -298,7 +298,7 @@ void SchAxisLabelTabPage::SetComplexCategories( bool bComplexCategories ) // event handling routines -IMPL_LINK_NOARG(SchAxisLabelTabPage, ToggleShowLabel) +IMPL_LINK_NOARG_TYPED(SchAxisLabelTabPage, ToggleShowLabel, Button*, void) { bool bEnable = ( m_pCbShowDescription->GetState() != TRISTATE_FALSE ); @@ -315,8 +315,6 @@ IMPL_LINK_NOARG(SchAxisLabelTabPage, ToggleShowLabel) m_pFtTextDirection->Enable( bEnable ); m_pLbTextDirection->Enable( bEnable ); - - return 0L; } } //namespace chart diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx index ef591d0ea028..96ed45c47152 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx @@ -65,7 +65,7 @@ private: bool m_bHasInitialStacking; /// false = checkbox in tristate bool m_bComplexCategories; - DECL_LINK ( ToggleShowLabel, void* ); + DECL_LINK_TYPED ( ToggleShowLabel, Button*, void ); public: SchAxisLabelTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ); diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 84b9cc2d63bb..0a819d64d3e7 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -497,8 +497,8 @@ public: private: DECL_LINK( LineTypeChangeHdl, void* ); - DECL_LINK( SplineDetailsDialogHdl, void* ); - DECL_LINK( SteppedDetailsDialogHdl, void* ); + DECL_LINK_TYPED( SplineDetailsDialogHdl, Button*, void ); + DECL_LINK_TYPED( SteppedDetailsDialogHdl, Button*, void ); SplinePropertiesDialog& getSplinePropertiesDialog(); SteppedPropertiesDialog& getSteppedPropertiesDialog(); @@ -595,7 +595,7 @@ IMPL_LINK_NOARG(SplineResourceGroup, LineTypeChangeHdl) m_pChangeListener->stateChanged(this); return 0; } -IMPL_LINK_NOARG(SplineResourceGroup, SplineDetailsDialogHdl) +IMPL_LINK_NOARG_TYPED(SplineResourceGroup, SplineDetailsDialogHdl, Button*, void) { ChartTypeParameter aOldParameter; @@ -614,9 +614,8 @@ IMPL_LINK_NOARG(SplineResourceGroup, SplineDetailsDialogHdl) m_pLB_LineType->SelectEntryPos( iOldLineTypePos ); getSplinePropertiesDialog().fillControls( aOldParameter ); } - return 0; } -IMPL_LINK_NOARG(SplineResourceGroup, SteppedDetailsDialogHdl) +IMPL_LINK_NOARG_TYPED(SplineResourceGroup, SteppedDetailsDialogHdl, Button*, void) { ChartTypeParameter aOldParameter; @@ -635,7 +634,6 @@ IMPL_LINK_NOARG(SplineResourceGroup, SteppedDetailsDialogHdl) m_pLB_LineType->SelectEntryPos( iOldLineTypePos ); getSteppedPropertiesDialog().fillControls( aOldParameter ); } - return 0; } class GeometryResourceGroup : public ChangingResource diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 66e8944d264b..9c7bc8bdff74 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -572,13 +572,13 @@ IMPL_LINK_NOARG(DataSourceTabPage, RoleSelectionChangedHdl) return 0; } -IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl) +IMPL_LINK_NOARG_TYPED(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, void) { OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr ); m_pCurrentRangeChoosingField = m_pEDT_RANGE; if( !m_pEDT_RANGE->GetText().isEmpty() && ! updateModelFromControl( m_pCurrentRangeChoosingField )) - return 0; + return; SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); bool bHasSelectedEntry = (pEntry != 0); @@ -611,26 +611,23 @@ IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl) } else m_pCurrentRangeChoosingField = 0; - - return 0; } -IMPL_LINK_NOARG(DataSourceTabPage, CategoriesRangeButtonClickedHdl) +IMPL_LINK_NOARG_TYPED(DataSourceTabPage, CategoriesRangeButtonClickedHdl, Button*, void) { OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr ); m_pCurrentRangeChoosingField = m_pEDT_CATEGORIES; if( !m_pEDT_CATEGORIES->GetText().isEmpty() && ! updateModelFromControl( m_pCurrentRangeChoosingField )) - return 0; + return; OUString aStr( SCH_RESSTR( m_pFT_CATEGORIES->IsVisible() ? STR_DATA_SELECT_RANGE_FOR_CATEGORIES : STR_DATA_SELECT_RANGE_FOR_DATALABELS )); lcl_enableRangeChoosing( true, m_pParentDialog ); m_rDialogModel.getRangeSelectionHelper()->chooseRange( m_rDialogModel.getCategoriesRange(), aStr, *this ); - return 0; } -IMPL_LINK_NOARG(DataSourceTabPage, AddButtonClickedHdl) +IMPL_LINK_NOARG_TYPED(DataSourceTabPage, AddButtonClickedHdl, Button*, void) { m_rDialogModel.startControllerLockTimer(); SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); @@ -666,11 +663,9 @@ IMPL_LINK_NOARG(DataSourceTabPage, AddButtonClickedHdl) m_pLB_SERIES->Select( pNextEntry ); } SeriesSelectionChangedHdl( 0 ); - - return 0; } -IMPL_LINK_NOARG(DataSourceTabPage, RemoveButtonClickedHdl) +IMPL_LINK_NOARG_TYPED(DataSourceTabPage, RemoveButtonClickedHdl, Button*, void) { m_rDialogModel.startControllerLockTimer(); SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); @@ -710,11 +705,9 @@ IMPL_LINK_NOARG(DataSourceTabPage, RemoveButtonClickedHdl) } SeriesSelectionChangedHdl( 0 ); } - - return 0; } -IMPL_LINK_NOARG(DataSourceTabPage, UpButtonClickedHdl) +IMPL_LINK_NOARG_TYPED(DataSourceTabPage, UpButtonClickedHdl, Button*, void) { m_rDialogModel.startControllerLockTimer(); SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); @@ -727,11 +720,9 @@ IMPL_LINK_NOARG(DataSourceTabPage, UpButtonClickedHdl) fillSeriesListBox(); SeriesSelectionChangedHdl(0); } - - return 0; } -IMPL_LINK_NOARG(DataSourceTabPage, DownButtonClickedHdl) +IMPL_LINK_NOARG_TYPED(DataSourceTabPage, DownButtonClickedHdl, Button*, void) { m_rDialogModel.startControllerLockTimer(); SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); @@ -744,8 +735,6 @@ IMPL_LINK_NOARG(DataSourceTabPage, DownButtonClickedHdl) fillSeriesListBox(); SeriesSelectionChangedHdl(0); } - - return 0; } IMPL_LINK( DataSourceTabPage, RangeModifiedHdl, Edit*, pEdit ) diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index b949f81f50e2..92f8db40541b 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -75,14 +75,14 @@ protected: DECL_LINK( SeriesSelectionChangedHdl, void* ); DECL_LINK( RoleSelectionChangedHdl, void* ); - DECL_LINK( MainRangeButtonClickedHdl, void* ); - DECL_LINK( CategoriesRangeButtonClickedHdl, void* ); - DECL_LINK( AddButtonClickedHdl, void* ); - DECL_LINK( RemoveButtonClickedHdl, void* ); + DECL_LINK_TYPED( MainRangeButtonClickedHdl, Button*, void ); + DECL_LINK_TYPED( CategoriesRangeButtonClickedHdl, Button*, void ); + DECL_LINK_TYPED( AddButtonClickedHdl, Button*, void ); + DECL_LINK_TYPED( RemoveButtonClickedHdl, Button*, void ); DECL_LINK( RangeModifiedHdl, Edit* ); DECL_LINK( RangeUpdateDataHdl, Edit* ); - DECL_LINK( UpButtonClickedHdl, void* ); - DECL_LINK( DownButtonClickedHdl, void* ); + DECL_LINK_TYPED( UpButtonClickedHdl, Button*, void ); + DECL_LINK_TYPED( DownButtonClickedHdl, Button*, void ); // ____ RangeSelectionListenerParent ____ virtual void listeningFinished( const OUString & rNewRange ) SAL_OVERRIDE; diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index 2c9cd5d23685..db5467cdcdbf 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -366,7 +366,7 @@ IMPL_LINK_NOARG(RangeChooserTabPage, ControlChangedHdl) return 0; } -IMPL_LINK_NOARG(RangeChooserTabPage, ChooseRangeHdl) +IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ChooseRangeHdl, Button*, void) { OUString aRange = m_pED_Range->GetText(); // using assignment for broken gcc 3.3 @@ -374,8 +374,6 @@ IMPL_LINK_NOARG(RangeChooserTabPage, ChooseRangeHdl) lcl_enableRangeChoosing( true, m_pParentDialog ); m_rDialogModel.getRangeSelectionHelper()->chooseRange( aRange, aTitle, *this ); - - return 0; } void RangeChooserTabPage::listeningFinished( const OUString & rNewRange ) diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx index 8d6ad51fb28b..f8ad825f7e7d 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx @@ -71,7 +71,7 @@ protected: //methods bool isValid(); void setDirty(); - DECL_LINK( ChooseRangeHdl, void* ); + DECL_LINK_TYPED( ChooseRangeHdl, Button*, void ); DECL_LINK( ControlChangedHdl, void* ); DECL_LINK( ControlEditedHdl, void* ); diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 4a430b9efb84..0b9e69e647cf 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -218,8 +218,9 @@ void ScaleTabPage::EnableControls() EnableValueHdl(m_pCbx_AutoTimeResolution); } -IMPL_LINK( ScaleTabPage, EnableValueHdl, CheckBox *, pCbx ) +IMPL_LINK_TYPED( ScaleTabPage, EnableValueHdl, Button *, pButton, void ) { + CheckBox * pCbx = static_cast<CheckBox*>(pButton); bool bEnable = pCbx && !pCbx->IsChecked() && pCbx->IsEnabled(); if (pCbx == m_pCbxAutoMin) { @@ -248,7 +249,6 @@ IMPL_LINK( ScaleTabPage, EnableValueHdl, CheckBox *, pCbx ) { m_pFmtFldOrigin->Enable( bEnable ); } - return 0; } enum AxisTypeListBoxEntry diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx index 959e831dbe26..c1143afab46b 100644 --- a/chart2/source/controller/dialogs/tp_Scale.hxx +++ b/chart2/source/controller/dialogs/tp_Scale.hxx @@ -100,7 +100,7 @@ private: void EnableControls(); DECL_LINK( SelectAxisTypeHdl, void* ); - DECL_LINK( EnableValueHdl, CheckBox* ); + DECL_LINK_TYPED( EnableValueHdl, Button*, void ); DECL_STATIC_LINK( ScaleTabPage, FmtFieldModifiedHdl, FormattedField* ); /** shows a warning window due to an invalid input. diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx index 06a4e5d3fbf5..a70a4e8b6ce1 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -87,14 +87,12 @@ void SchOptionTabPage::dispose() SfxTabPage::dispose(); } -IMPL_LINK_NOARG(SchOptionTabPage, EnableHdl) +IMPL_LINK_NOARG_TYPED(SchOptionTabPage, EnableHdl, Button*, void) { if( m_nAllSeriesAxisIndex == 0 ) m_pCBAxisSideBySide->Enable( m_pRbtAxis2->IsChecked()); else if( m_nAllSeriesAxisIndex == 1 ) m_pCBAxisSideBySide->Enable( m_pRbtAxis1->IsChecked()); - - return 0; } VclPtr<SfxTabPage> SchOptionTabPage::Create(vcl::Window* pWindow, diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx index a6e7eda853a3..5db962921c8b 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx @@ -62,7 +62,7 @@ private: //member VclPtr<CheckBox> m_pCBIncludeHiddenCells; - DECL_LINK(EnableHdl, void * ); + DECL_LINK_TYPED(EnableHdl, Button*, void ); sal_Int32 m_nAllSeriesAxisIndex; diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx index 0119c3d033c6..af82da8fe7a0 100644 --- a/chart2/source/controller/inc/dlg_ObjectProperties.hxx +++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx @@ -122,8 +122,8 @@ private: virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage) SAL_OVERRIDE; - Link<> m_aOriginalOKClickHdl; - DECL_LINK( OKPressed, void * ); + Link<Button*,void> m_aOriginalOKClickHdl; + DECL_LINK_TYPED( OKPressed, Button*, void ); public: SchAttribTabDlg(vcl::Window* pParent, const SfxItemSet* pAttr, diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx index 85917809db48..a2b309dc6ca2 100644 --- a/chart2/source/controller/inc/res_ErrorBar.hxx +++ b/chart2/source/controller/inc/res_ErrorBar.hxx @@ -122,11 +122,12 @@ private: bool m_bHasInternalDataProvider; bool m_bEnableDataTableDialog; - DECL_LINK( CategoryChosen, void * ); + DECL_LINK_TYPED( CategoryChosen, Button*, void ); + DECL_LINK( CategoryChosen2, void* ); DECL_LINK( SynchronizePosAndNeg, void * ); DECL_LINK( PosValueChanged, void * ); - DECL_LINK( IndicatorChanged, void * ); - DECL_LINK( ChooseRange, PushButton * ); + DECL_LINK_TYPED( IndicatorChanged, Button *, void ); + DECL_LINK_TYPED( ChooseRange, Button *, void ); DECL_LINK( RangeChanged, Edit * ); void UpdateControlStates(); diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.cxx b/chart2/source/controller/sidebar/ChartAxisPanel.cxx index 3866b98e4d42..572974b38097 100644 --- a/chart2/source/controller/sidebar/ChartAxisPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAxisPanel.cxx @@ -238,7 +238,7 @@ void ChartAxisPanel::Initialize() updateData(); - Link<> aLink = LINK(this, ChartAxisPanel, CheckBoxHdl); + Link<Button*,void> aLink = LINK(this, ChartAxisPanel, CheckBoxHdl); mpCBShowLabel->SetClickHdl(aLink); mpCBReverse->SetClickHdl(aLink); @@ -328,8 +328,9 @@ void ChartAxisPanel::SelectionInvalid() { } -IMPL_LINK(ChartAxisPanel, CheckBoxHdl, CheckBox*, pCheckbox) +IMPL_LINK_TYPED(ChartAxisPanel, CheckBoxHdl, Button*, pButton, void) { + CheckBox* pCheckbox = static_cast<CheckBox*>(pButton); OUString aCID = getCID(mxModel); bool bChecked = pCheckbox->IsChecked(); @@ -340,8 +341,6 @@ IMPL_LINK(ChartAxisPanel, CheckBoxHdl, CheckBox*, pCheckbox) } else if (pCheckbox == mpCBReverse.get()) setReverse(mxModel, aCID, bChecked); - - return 0; } IMPL_LINK_NOARG(ChartAxisPanel, ListBoxHdl) diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.hxx b/chart2/source/controller/sidebar/ChartAxisPanel.hxx index b38a32f05211..50c0021c2f26 100644 --- a/chart2/source/controller/sidebar/ChartAxisPanel.hxx +++ b/chart2/source/controller/sidebar/ChartAxisPanel.hxx @@ -92,7 +92,7 @@ private: void Initialize(); - DECL_LINK(CheckBoxHdl, CheckBox*); + DECL_LINK_TYPED(CheckBoxHdl, Button*, void); DECL_LINK(ListBoxHdl, void*); }; diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx index 2545e49c4b47..2cbb42c2424d 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx @@ -356,7 +356,7 @@ void ChartElementsPanel::Initialize() xBroadcaster->addModifyListener(mxListener); updateData(); - Link<> aLink = LINK(this, ChartElementsPanel, CheckBoxHdl); + Link<Button*,void> aLink = LINK(this, ChartElementsPanel, CheckBoxHdl); mpCBTitle->SetClickHdl(aLink); mpCBSubtitle->SetClickHdl(aLink); mpCBXAxis->SetClickHdl(aLink); @@ -475,8 +475,9 @@ void ChartElementsPanel::updateModel( xBroadcasterNew->addModifyListener(mxListener); } -IMPL_LINK(ChartElementsPanel, CheckBoxHdl, CheckBox*, pCheckBox) +IMPL_LINK_TYPED(ChartElementsPanel, CheckBoxHdl, Button*, pButton, void) { + CheckBox* pCheckBox = static_cast<CheckBox*>(pButton); bool bChecked = pCheckBox->IsChecked(); if (pCheckBox == mpCBTitle.get()) setTitleVisible(mxModel, TitleHelper::MAIN_TITLE, bChecked); @@ -515,8 +516,6 @@ IMPL_LINK(ChartElementsPanel, CheckBoxHdl, CheckBox*, pCheckBox) setGridVisible(mxModel, GridType::VERT_MINOR, bChecked); else if (pCheckBox == mpCBGridHorizontalMinor.get()) setGridVisible(mxModel, GridType::HOR_MINOR, bChecked); - - return 0; } IMPL_LINK_NOARG(ChartElementsPanel, LegendPosHdl) diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.hxx b/chart2/source/controller/sidebar/ChartElementsPanel.hxx index 50ceb72088ba..99553a196323 100644 --- a/chart2/source/controller/sidebar/ChartElementsPanel.hxx +++ b/chart2/source/controller/sidebar/ChartElementsPanel.hxx @@ -108,7 +108,7 @@ private: void Initialize(); - DECL_LINK(CheckBoxHdl, CheckBox*); + DECL_LINK_TYPED(CheckBoxHdl, Button*, void); DECL_LINK(LegendPosHdl, void*); }; diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index 763262009086..f2c82e10f172 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -352,15 +352,15 @@ void ChartSeriesPanel::Initialize() updateData(); - Link<> aLink = LINK(this, ChartSeriesPanel, CheckBoxHdl); + Link<Button*,void> aLink = LINK(this, ChartSeriesPanel, CheckBoxHdl); mpCBLabel->SetClickHdl(aLink); mpCBTrendline->SetClickHdl(aLink); mpCBXError->SetClickHdl(aLink); mpCBYError->SetClickHdl(aLink); - aLink = LINK(this, ChartSeriesPanel, RadioBtnHdl); - mpRBPrimaryAxis->SetToggleHdl(aLink); - mpRBSecondaryAxis->SetToggleHdl(aLink); + Link<> aLink2 = LINK(this, ChartSeriesPanel, RadioBtnHdl); + mpRBPrimaryAxis->SetToggleHdl(aLink2); + mpRBSecondaryAxis->SetToggleHdl(aLink2); mpLBLabelPlacement->SetSelectHdl(LINK(this, ChartSeriesPanel, ListBoxHdl)); } @@ -459,8 +459,9 @@ void ChartSeriesPanel::SelectionInvalid() { } -IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox) +IMPL_LINK_TYPED(ChartSeriesPanel, CheckBoxHdl, Button*, pButton, void) { + CheckBox* pCheckBox = static_cast<CheckBox*>(pButton); bool bChecked = pCheckBox->IsChecked(); OUString aCID = getCID(mxModel); if (pCheckBox == mpCBLabel.get()) @@ -471,8 +472,6 @@ IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox) setErrorBarVisible(mxModel, aCID, false, bChecked); else if (pCheckBox == mpCBYError.get()) setErrorBarVisible(mxModel, aCID, true, bChecked); - - return 0; } IMPL_LINK_NOARG(ChartSeriesPanel, RadioBtnHdl) diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx index be580cbf0c8b..947fb90487cf 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx @@ -108,7 +108,7 @@ private: void Initialize(); - DECL_LINK(CheckBoxHdl, CheckBox*); + DECL_LINK_TYPED(CheckBoxHdl, Button*, void); DECL_LINK(RadioBtnHdl, void*); DECL_LINK(ListBoxHdl, void*); }; |