summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-09 11:41:20 +0200
committerNoel Grandin <noel@peralex.com>2015-09-10 11:38:30 +0200
commitf4e951a61a20edd6efbd244966e851aa378e66ad (patch)
treef4879e437b88432069001e7e3dadd2649cd33a14 /chart2/source/controller
parent823150ff153a6e02781b1b2b09ea6eb528111d2e (diff)
convert Link<> to typed
Change-Id: I603463d0486d4d0f21ebbdc6eca900db58bb090f
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/dialogs/res_LegendPosition.cxx5
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx7
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx7
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hxx1
-rw-r--r--chart2/source/controller/inc/res_LegendPosition.hxx2
-rw-r--r--chart2/source/controller/sidebar/ChartErrorBarPanel.cxx12
-rw-r--r--chart2/source/controller/sidebar/ChartErrorBarPanel.hxx2
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.cxx6
-rw-r--r--chart2/source/controller/sidebar/ChartSeriesPanel.hxx2
9 files changed, 22 insertions, 22 deletions
diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 0bace68f9495..57c948c0d5f1 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -227,14 +227,13 @@ void LegendPositionResources::writeToItemSet( SfxItemSet& rOutAttrs ) const
rOutAttrs.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, m_pCbxShow == nullptr || m_pCbxShow->IsChecked()) );
}
-IMPL_LINK( LegendPositionResources, PositionChangeHdl, RadioButton*, pRadio )
+IMPL_LINK_TYPED( LegendPositionResources, PositionChangeHdl, RadioButton&, rRadio, void )
{
//for each radio click there are coming two change events
//first uncheck of previous button -> ignore that call
//the second call gives the check of the new button
- if( pRadio && pRadio->IsChecked() )
+ if( rRadio.IsChecked() )
m_aChangeLink.Call(NULL);
- return 0;
}
void LegendPositionResources::SetChangeHdl( const Link<>& rLink )
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 211703e4a83f..b638ca467cad 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -173,7 +173,7 @@ public:
void fillParameter( ChartTypeParameter& rParameter );
private:
- DECL_LINK( StackingChangeHdl, RadioButton* );
+ DECL_LINK_TYPED( StackingChangeHdl, RadioButton&, void );
DECL_LINK( StackingEnableHdl, void* );
private:
@@ -251,14 +251,13 @@ void StackingResourceGroup::fillParameter( ChartTypeParameter& rParameter )
else if(m_pRB_Stack_Z->IsChecked())
rParameter.eStackMode = GlobalStackMode_STACK_Z;
}
-IMPL_LINK( StackingResourceGroup, StackingChangeHdl, RadioButton*, pRadio )
+IMPL_LINK_TYPED( StackingResourceGroup, StackingChangeHdl, RadioButton&, rRadio, void )
{
//for each radio click there are coming two change events
//first uncheck of previous button -> ignore that call
//the second call gives the check of the new button
- if( m_pChangeListener && pRadio && pRadio->IsChecked() )
+ if( m_pChangeListener && rRadio.IsChecked() )
m_pChangeListener->stateChanged(this);
- return 0;
}
IMPL_LINK_NOARG(StackingResourceGroup, StackingEnableHdl)
{
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index db5467cdcdbf..3b6584f7b66e 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -118,7 +118,7 @@ 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, ControlChangedHdl ) );
+ 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 ) );
@@ -358,6 +358,11 @@ IMPL_LINK_NOARG(RangeChooserTabPage, ControlEditedHdl)
return 0;
}
+IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlChangedRadioHdl, RadioButton&, 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 f8ad825f7e7d..3cbb7eed1a51 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( ControlChangedRadioHdl, RadioButton&, void );
DECL_LINK( ControlEditedHdl, void* );
protected: //member
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx b/chart2/source/controller/inc/res_LegendPosition.hxx
index b9f6dfec702b..17cd166ac262 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -51,7 +51,7 @@ public:
void SetChangeHdl( const Link<>& rLink );
DECL_LINK( PositionEnableHdl, void* );
- DECL_LINK( PositionChangeHdl, RadioButton* );
+ DECL_LINK_TYPED( PositionChangeHdl, RadioButton&, void );
private:
void impl_setRadioButtonToggleHdl();
diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
index 032795ff7396..6a455ecf1656 100644
--- a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
@@ -289,16 +289,16 @@ void ChartErrorBarPanel::Initialize()
updateData();
- Link<> aLink = LINK(this, ChartErrorBarPanel, RadioBtnHdl);
+ Link<RadioButton&,void> aLink = LINK(this, ChartErrorBarPanel, RadioBtnHdl);
mpRBPosAndNeg->SetToggleHdl(aLink);
mpRBPos->SetToggleHdl(aLink);
mpRBNeg->SetToggleHdl(aLink);
mpLBType->SetSelectHdl(LINK(this, ChartErrorBarPanel, ListBoxHdl));
- aLink = LINK(this, ChartErrorBarPanel, NumericFieldHdl);
- mpMFPos->SetModifyHdl(aLink);
- mpMFNeg->SetModifyHdl(aLink);
+ Link<> aLink2 = LINK(this, ChartErrorBarPanel, NumericFieldHdl);
+ mpMFPos->SetModifyHdl(aLink2);
+ mpMFNeg->SetModifyHdl(aLink2);
}
void ChartErrorBarPanel::updateData()
@@ -402,7 +402,7 @@ void ChartErrorBarPanel::updateModel(
xBroadcasterNew->addModifyListener(mxListener);
}
-IMPL_LINK_NOARG(ChartErrorBarPanel, RadioBtnHdl)
+IMPL_LINK_NOARG_TYPED(ChartErrorBarPanel, RadioBtnHdl, RadioButton&, void)
{
OUString aCID = getCID(mxModel);
bool bPos = mpRBPosAndNeg->IsChecked() || mpRBPos->IsChecked();
@@ -410,8 +410,6 @@ IMPL_LINK_NOARG(ChartErrorBarPanel, RadioBtnHdl)
setShowPositiveError(mxModel, aCID, bPos);
setShowNegativeError(mxModel, aCID, bNeg);
-
- return 0;
}
IMPL_LINK_NOARG(ChartErrorBarPanel, ListBoxHdl)
diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
index bdfd9548af1f..2182635dcd9f 100644
--- a/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
@@ -88,7 +88,7 @@ private:
void Initialize();
- DECL_LINK(RadioBtnHdl, void*);
+ DECL_LINK_TYPED(RadioBtnHdl, RadioButton&, void);
DECL_LINK(ListBoxHdl, void*);
DECL_LINK(NumericFieldHdl, NumericField*);
};
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index f2c82e10f172..e8032f7e9f85 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -358,7 +358,7 @@ void ChartSeriesPanel::Initialize()
mpCBXError->SetClickHdl(aLink);
mpCBYError->SetClickHdl(aLink);
- Link<> aLink2 = LINK(this, ChartSeriesPanel, RadioBtnHdl);
+ Link<RadioButton&,void> aLink2 = LINK(this, ChartSeriesPanel, RadioBtnHdl);
mpRBPrimaryAxis->SetToggleHdl(aLink2);
mpRBSecondaryAxis->SetToggleHdl(aLink2);
@@ -474,14 +474,12 @@ IMPL_LINK_TYPED(ChartSeriesPanel, CheckBoxHdl, Button*, pButton, void)
setErrorBarVisible(mxModel, aCID, true, bChecked);
}
-IMPL_LINK_NOARG(ChartSeriesPanel, RadioBtnHdl)
+IMPL_LINK_NOARG_TYPED(ChartSeriesPanel, RadioBtnHdl, RadioButton&, void)
{
OUString aCID = getCID(mxModel);
bool bChecked = mpRBPrimaryAxis->IsChecked();
setAttachedAxisType(mxModel, aCID, bChecked);
-
- return 0;
}
IMPL_LINK_NOARG(ChartSeriesPanel, ListBoxHdl)
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index 947fb90487cf..bd3d3e3234c0 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -109,7 +109,7 @@ private:
void Initialize();
DECL_LINK_TYPED(CheckBoxHdl, Button*, void);
- DECL_LINK(RadioBtnHdl, void*);
+ DECL_LINK_TYPED(RadioBtnHdl, RadioButton&, void);
DECL_LINK(ListBoxHdl, void*);
};