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 /chart2/source | |
parent | 6532cb0e5ec3a59c248b332e868c4c03c31659f1 (diff) |
convert Link<> to typed
Change-Id: I1c501671d72edd5b998e80c7fa1e91dbeb507af8
Diffstat (limited to 'chart2/source')
13 files changed, 42 insertions, 42 deletions
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index e0fc7181c0ad..748dcc15812d 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -404,11 +404,10 @@ IMPL_LINK_NOARG_TYPED( ErrorBarResources, CategoryChosen, Button*, void ) UpdateControlStates(); } -IMPL_LINK_NOARG(ErrorBarResources, SynchronizePosAndNeg) +IMPL_LINK_NOARG_TYPED(ErrorBarResources, SynchronizePosAndNeg, CheckBox&, void) { UpdateControlStates(); PosValueChanged( 0 ); - return 0; } IMPL_LINK_NOARG(ErrorBarResources, PosValueChanged) diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index 57c948c0d5f1..8202e1a529eb 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -88,7 +88,7 @@ void LegendPositionResources::writeToResources( const uno::Reference< frame::XMo xProp->getPropertyValue( "Show" ) >>= bShowLegend; if (m_pCbxShow) m_pCbxShow->Check( bShowLegend ); - PositionEnableHdl(0); + PositionEnableHdl(*m_pCbxShow); //position chart2::LegendPosition ePos; @@ -165,7 +165,7 @@ void LegendPositionResources::writeToModel( const ::com::sun::star::uno::Referen } } -IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl) +IMPL_LINK_NOARG_TYPED(LegendPositionResources, PositionEnableHdl, CheckBox&, void) { bool bEnable = m_pCbxShow == nullptr || m_pCbxShow->IsChecked(); @@ -175,8 +175,6 @@ IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl) m_pRbtBottom->Enable( bEnable ); m_aChangeLink.Call(NULL); - - return 0; } void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs ) diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx index 0e48c337d3f4..fafa6fc25d1f 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx @@ -317,22 +317,21 @@ IMPL_LINK_NOARG(ThreeD_SceneAppearance_TabPage, SelectSchemeHdl) return 0; } -IMPL_LINK_NOARG(ThreeD_SceneAppearance_TabPage, SelectShading) +IMPL_LINK_NOARG_TYPED(ThreeD_SceneAppearance_TabPage, SelectShading, CheckBox&, void) { if( !m_bUpdateOtherControls ) - return 0; + return; m_pCB_Shading->EnableTriState( false ); applyShadeModeToModel(); updateScheme(); - return 0; } -IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines, CheckBox*, pCheckBox ) +IMPL_LINK_TYPED( ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines, CheckBox&, rCheckBox, void ) { if( !m_bUpdateOtherControls ) - return 0; + return; - if( pCheckBox == m_pCB_ObjectLines ) + if( &rCheckBox == m_pCB_ObjectLines ) { m_pCB_ObjectLines->EnableTriState( false ); m_bUpdateOtherControls = false; @@ -345,7 +344,6 @@ IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines, Check m_pCB_RoundedEdge->EnableTriState( false ); applyRoundedEdgeAndObjectLinesToModel(); updateScheme(); - return 0; } } //namespace chart diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx index 80720d031e87..6896466a7d23 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx @@ -45,8 +45,8 @@ public: private: DECL_LINK( SelectSchemeHdl, void* ); - DECL_LINK( SelectShading, void* ); - DECL_LINK( SelectRoundedEdgeOrObjectLines, CheckBox* ); + DECL_LINK_TYPED( SelectShading, CheckBox&, void ); + DECL_LINK_TYPED( SelectRoundedEdgeOrObjectLines, CheckBox&, void ); void initControlsFromModel(); void applyShadeModeToModel(); diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx index b1cf19fbf44f..f0c9c101f2c8 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx @@ -245,14 +245,13 @@ IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, PerspectiveChanged) return 0; } -IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, PerspectiveToggled) +IMPL_LINK_NOARG_TYPED(ThreeD_SceneGeometry_TabPage, PerspectiveToggled, CheckBox&, void) { m_pMFPerspective->Enable( m_pCbxPerspective->IsChecked() ); applyPerspectiveToModel(); - return 0; } -IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled) +IMPL_LINK_NOARG_TYPED(ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled, CheckBox&, void) { ControllerLockHelperGuard aGuard( m_rControllerLockHelper ); @@ -284,8 +283,6 @@ IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, RightAngledAxesToggled) } ThreeDHelper::switchRightAngledAxes( m_xSceneProperties, m_pCbxRightAngledAxes->IsChecked() ); - - return 0; } } //namespace chart diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx index 8bdba7c33dea..be6c44ba1b30 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx @@ -54,8 +54,8 @@ public: DECL_LINK( PerspectiveChanged, void* ); // is called immediately when a field changes DECL_LINK( PerspectiveEdited, void* ); - DECL_LINK( PerspectiveToggled, void* ); - DECL_LINK( RightAngledAxesToggled, void* ); + DECL_LINK_TYPED( PerspectiveToggled, CheckBox&, void ); + DECL_LINK_TYPED( RightAngledAxesToggled, CheckBox&, void ); private: void applyAnglesToModel(); diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 59e5b9c06d35..f356a05b53b9 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -55,7 +55,7 @@ public: void fillParameter( ChartTypeParameter& rParameter ); private: - DECL_LINK( Dim3DLookCheckHdl, void* ); + DECL_LINK_TYPED( Dim3DLookCheckHdl, CheckBox&, void ); DECL_LINK( SelectSchemeHdl, void* ); private: @@ -104,11 +104,10 @@ void Dim3DLookResourceGroup::fillParameter( ChartTypeParameter& rParameter ) rParameter.eThreeDLookScheme = ThreeDLookScheme_Unknown; } -IMPL_LINK_NOARG(Dim3DLookResourceGroup, Dim3DLookCheckHdl) +IMPL_LINK_NOARG_TYPED(Dim3DLookResourceGroup, Dim3DLookCheckHdl, CheckBox&, void) { if(m_pChangeListener) m_pChangeListener->stateChanged(this); - return 0; } IMPL_LINK_NOARG(Dim3DLookResourceGroup, SelectSchemeHdl) @@ -129,7 +128,7 @@ public: void fillParameter( ChartTypeParameter& rParameter ); private: - DECL_LINK( SortByXValuesCheckHdl, void* ); + DECL_LINK_TYPED( SortByXValuesCheckHdl, CheckBox&, void ); private: VclPtr<CheckBox> m_pCB_XValueSorting; @@ -157,11 +156,10 @@ void SortByXValuesResourceGroup::fillParameter( ChartTypeParameter& rParameter ) rParameter.bSortByXValues = m_pCB_XValueSorting->IsChecked(); } -IMPL_LINK_NOARG(SortByXValuesResourceGroup, SortByXValuesCheckHdl) +IMPL_LINK_NOARG_TYPED(SortByXValuesResourceGroup, SortByXValuesCheckHdl, CheckBox&, void) { if(m_pChangeListener) m_pChangeListener->stateChanged(this); - return 0; } class StackingResourceGroup : public ChangingResource @@ -176,7 +174,7 @@ public: private: DECL_LINK_TYPED( StackingChangeHdl, RadioButton&, void ); - DECL_LINK( StackingEnableHdl, void* ); + DECL_LINK_TYPED( StackingEnableHdl, CheckBox&, void ); private: VclPtr<CheckBox> m_pCB_Stacked; @@ -261,11 +259,10 @@ IMPL_LINK_TYPED( StackingResourceGroup, StackingChangeHdl, RadioButton&, rRadio, if( m_pChangeListener && rRadio.IsChecked() ) m_pChangeListener->stateChanged(this); } -IMPL_LINK_NOARG(StackingResourceGroup, StackingEnableHdl) +IMPL_LINK_NOARG_TYPED(StackingResourceGroup, StackingEnableHdl, CheckBox&, void) { if( m_pChangeListener ) m_pChangeListener->stateChanged(this); - return 0; } class GL3DResourceGroup : public ChangingResource @@ -278,7 +275,7 @@ public: void fillParameter( ChartTypeParameter& rParam ); private: - DECL_LINK( SettingChangedHdl, void* ); + DECL_LINK_TYPED( SettingChangedHdl, CheckBox&, void ); private: VclPtr<CheckBox> m_pCB_RoundedEdge; }; @@ -304,11 +301,10 @@ void GL3DResourceGroup::fillParameter( ChartTypeParameter& rParam ) rParam.mbRoundedEdge = m_pCB_RoundedEdge->IsChecked(); } -IMPL_LINK_NOARG( GL3DResourceGroup, SettingChangedHdl ) +IMPL_LINK_NOARG_TYPED( GL3DResourceGroup, SettingChangedHdl, CheckBox&, void ) { if (m_pChangeListener) m_pChangeListener->stateChanged(this); - return 0; } class SplinePropertiesDialog : public ModalDialog diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index 3b6584f7b66e..7888fb849e78 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -119,9 +119,9 @@ RangeChooserTabPage::RangeChooserTabPage( vcl::Window* pParent m_pED_Range->SetUpdateDataHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl )); m_pED_Range->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlEditedHdl )); m_pRB_Rows->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedRadioHdl ) ); - m_pCB_FirstRowAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) ); - m_pCB_FirstColumnAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) ); - m_pCB_TimeBased->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) ); + m_pCB_FirstRowAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedCheckBoxHdl ) ); + m_pCB_FirstColumnAsLabel->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedCheckBoxHdl ) ); + m_pCB_TimeBased->SetToggleHdl( LINK( this, RangeChooserTabPage, ControlChangedCheckBoxHdl ) ); m_pEd_TimeStart->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) ); m_pEd_TimeEnd->SetModifyHdl( LINK( this, RangeChooserTabPage, ControlChangedHdl ) ); @@ -363,6 +363,11 @@ IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlChangedRadioHdl, RadioButton&, ControlChangedHdl(NULL); } +IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlChangedCheckBoxHdl, CheckBox&, void) +{ + ControlChangedHdl(NULL); +} + IMPL_LINK_NOARG(RangeChooserTabPage, ControlChangedHdl) { setDirty(); diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx index 3cbb7eed1a51..bfa75f98e039 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx @@ -73,6 +73,7 @@ protected: //methods DECL_LINK_TYPED( ChooseRangeHdl, Button*, void ); DECL_LINK( ControlChangedHdl, void* ); + DECL_LINK_TYPED( ControlChangedCheckBoxHdl, CheckBox&, void ); DECL_LINK_TYPED( ControlChangedRadioHdl, RadioButton&, void ); DECL_LINK( ControlEditedHdl, void* ); diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx index 8c40e6d43512..ef5a731cb22c 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx @@ -52,9 +52,9 @@ TitlesAndObjectsTabPage::TitlesAndObjectsTabPage( svt::OWizardMachine* pParent m_xTitleResources->SetUpdateDataHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl )); m_xLegendPositionResources->SetChangeHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl )); - m_pCB_Grid_X->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl )); - m_pCB_Grid_Y->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl )); - m_pCB_Grid_Z->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl )); + m_pCB_Grid_X->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeCheckBoxHdl )); + m_pCB_Grid_Y->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeCheckBoxHdl )); + m_pCB_Grid_Z->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeCheckBoxHdl )); } TitlesAndObjectsTabPage::~TitlesAndObjectsTabPage() @@ -145,6 +145,11 @@ void TitlesAndObjectsTabPage::commitToModel() } } + +IMPL_LINK_NOARG_TYPED(TitlesAndObjectsTabPage, ChangeCheckBoxHdl, CheckBox&, void) +{ + ChangeHdl(NULL); +} IMPL_LINK_NOARG(TitlesAndObjectsTabPage, ChangeHdl) { if( m_bCommitToModel ) diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx index 520453ce0452..949e57924179 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx @@ -54,6 +54,7 @@ public: protected: void commitToModel(); DECL_LINK( ChangeHdl, void* ); + DECL_LINK_TYPED( ChangeCheckBoxHdl, CheckBox&, void ); protected: boost::scoped_ptr< TitleResources > m_xTitleResources; diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx index a2b309dc6ca2..efbfc8a11506 100644 --- a/chart2/source/controller/inc/res_ErrorBar.hxx +++ b/chart2/source/controller/inc/res_ErrorBar.hxx @@ -124,7 +124,7 @@ private: DECL_LINK_TYPED( CategoryChosen, Button*, void ); DECL_LINK( CategoryChosen2, void* ); - DECL_LINK( SynchronizePosAndNeg, void * ); + DECL_LINK_TYPED( SynchronizePosAndNeg, CheckBox&, void ); DECL_LINK( PosValueChanged, void * ); DECL_LINK_TYPED( IndicatorChanged, Button *, void ); DECL_LINK_TYPED( ChooseRange, Button *, void ); diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx index 17cd166ac262..348045d2b514 100644 --- a/chart2/source/controller/inc/res_LegendPosition.hxx +++ b/chart2/source/controller/inc/res_LegendPosition.hxx @@ -50,7 +50,7 @@ public: void SetChangeHdl( const Link<>& rLink ); - DECL_LINK( PositionEnableHdl, void* ); + DECL_LINK_TYPED( PositionEnableHdl, CheckBox&, void ); DECL_LINK_TYPED( PositionChangeHdl, RadioButton&, void ); private: |