summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-15 08:13:49 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-16 09:11:29 +0000
commit6f1313b3d44ea54e9a331e0fc00871081fa662fe (patch)
treefa6d9b6da04daedcb63ea2a0bc8c414288ed8bc6 /chart2
parent14bf708ef586b15dffed66ffaf524baf4d8fcbfa (diff)
convert Link<> to typed
Change-Id: Icbba339dac0be31e30dff021bba06a219f8aecd6 Reviewed-on: https://gerrit.libreoffice.org/19405 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.cxx3
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.hxx2
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx10
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx18
-rw-r--r--chart2/source/controller/dialogs/res_Titles.cxx2
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.cxx12
-rw-r--r--chart2/source/controller/dialogs/res_Trendline.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx16
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx8
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx20
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.hxx4
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx10
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.hxx4
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx9
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.hxx2
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx6
-rw-r--r--chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx1
-rw-r--r--chart2/source/controller/inc/res_ErrorBar.hxx4
-rw-r--r--chart2/source/controller/inc/res_Titles.hxx2
-rw-r--r--chart2/source/controller/sidebar/ChartErrorBarPanel.cxx12
-rw-r--r--chart2/source/controller/sidebar/ChartErrorBarPanel.hxx3
21 files changed, 67 insertions, 83 deletions
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index a039467d1ddb..9a410fd74bc1 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -1227,11 +1227,10 @@ void CombiColumnLineChartDialogController::setTemplateProperties( const uno::Ref
}
}
-IMPL_LINK_NOARG(CombiColumnLineChartDialogController, ChangeLineCountHdl)
+IMPL_LINK_NOARG_TYPED(CombiColumnLineChartDialogController, ChangeLineCountHdl, Edit&, void)
{
if( m_pChangeListener )
m_pChangeListener->stateChanged(this);
- return 0;
}
void CombiColumnLineChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
{
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
index 60d4dcce3bc9..f3b80ffccc71 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.hxx
@@ -278,7 +278,7 @@ public:
virtual void setTemplateProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xTemplateProps ) const throw (::com::sun::star::uno::RuntimeException) override;
private:
- DECL_LINK( ChangeLineCountHdl, void* );
+ DECL_LINK_TYPED( ChangeLineCountHdl, Edit&, void );
private:
VclPtr<FixedText> m_pFT_NumberOfLines;
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 00f2be300cea..e70242d46213 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -186,8 +186,8 @@ private:
Link<SeriesHeaderEdit*,void> m_aChangeLink;
void notifyChanges();
- DECL_LINK( SeriesNameChanged, void * );
- DECL_LINK( SeriesNameEdited, void * );
+ DECL_LINK_TYPED( SeriesNameChanged, Edit&, void );
+ DECL_LINK_TYPED( SeriesNameEdited, Edit&, void );
static Image GetChartTypeImage(
const Reference< chart2::XChartType > & xChartType,
@@ -326,16 +326,14 @@ void SeriesHeader::SetEditChangedHdl( const Link<SeriesHeaderEdit*,void> & rLink
m_aChangeLink = rLink;
}
-IMPL_LINK_NOARG(SeriesHeader, SeriesNameChanged)
+IMPL_LINK_NOARG_TYPED(SeriesHeader, SeriesNameChanged, Edit&, void)
{
notifyChanges();
- return 0;
}
-IMPL_LINK_NOARG(SeriesHeader, SeriesNameEdited)
+IMPL_LINK_NOARG_TYPED(SeriesHeader, SeriesNameEdited, Edit&, void)
{
m_bSeriesNameChangePending = true;
- return 0;
}
void SeriesHeader::SetGetFocusHdl( const Link<Control&,void>& rLink )
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 7f8d9485c294..a77a042eedc9 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -406,10 +406,10 @@ IMPL_LINK_NOARG_TYPED( ErrorBarResources, CategoryChosen, Button*, void )
IMPL_LINK_NOARG_TYPED(ErrorBarResources, SynchronizePosAndNeg, CheckBox&, void)
{
UpdateControlStates();
- PosValueChanged( 0 );
+ PosValueChanged( *m_pMfPositive );
}
-IMPL_LINK_NOARG(ErrorBarResources, PosValueChanged)
+IMPL_LINK_NOARG_TYPED(ErrorBarResources, PosValueChanged, Edit&, void)
{
if( m_pCbSyncPosNeg->IsChecked())
{
@@ -421,8 +421,6 @@ IMPL_LINK_NOARG(ErrorBarResources, PosValueChanged)
else
m_pMfNegative->SetValue( m_pMfPositive->GetValue());
}
-
- return 0;
}
IMPL_LINK_NOARG_TYPED(ErrorBarResources, IndicatorChanged, Button*, void)
@@ -472,21 +470,19 @@ IMPL_LINK_TYPED( ErrorBarResources, ChooseRange, Button*, pButton, void )
m_pCurrentRangeChoosingField = 0;
}
-IMPL_LINK( ErrorBarResources, RangeChanged, Edit *, pEdit )
+IMPL_LINK_TYPED( ErrorBarResources, RangeChanged, Edit&, rEdit, void )
{
- if( pEdit == m_pEdRangePositive )
+ if( &rEdit == m_pEdRangePositive )
{
m_bRangePosUnique = true;
- PosValueChanged( 0 );
+ PosValueChanged( *m_pMfPositive );
}
else
{
m_bRangeNegUnique = true;
}
- isRangeFieldContentValid( *pEdit );
-
- return 0;
+ isRangeFieldContentValid( rEdit );
}
void ErrorBarResources::Reset(const SfxItemSet& rInAttrs)
@@ -705,7 +701,7 @@ void ErrorBarResources::listeningFinished(
{
m_pCurrentRangeChoosingField->SetText( aRange );
m_pCurrentRangeChoosingField->GrabFocus();
- PosValueChanged( 0 );
+ PosValueChanged( *m_pMfPositive );
}
m_pCurrentRangeChoosingField = 0;
diff --git a/chart2/source/controller/dialogs/res_Titles.cxx b/chart2/source/controller/dialogs/res_Titles.cxx
index 5186acf1ddcd..4998e849fdc6 100644
--- a/chart2/source/controller/dialogs/res_Titles.cxx
+++ b/chart2/source/controller/dialogs/res_Titles.cxx
@@ -54,7 +54,7 @@ TitleResources::~TitleResources()
{
}
-void TitleResources::SetUpdateDataHdl( const Link<>& rLink )
+void TitleResources::SetUpdateDataHdl( const Link<Edit&,void>& rLink )
{
sal_uLong nTimeout = 4*EDIT_UPDATEDATA_TIMEOUT;
diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx
index 5862f13eea77..c5fcb3c5ab2b 100644
--- a/chart2/source/controller/dialogs/res_Trendline.cxx
+++ b/chart2/source/controller/dialogs/res_Trendline.cxx
@@ -77,7 +77,7 @@ TrendlineResources::TrendlineResources( vcl::Window * pParent, const SfxItemSet&
m_pRB_Polynomial->SetClickHdl( aLink );
m_pRB_MovingAverage->SetClickHdl( aLink );
- Link<> aLink2 = LINK(this, TrendlineResources, ChangeValue );
+ Link<Edit&,void> aLink2 = LINK(this, TrendlineResources, ChangeValue );
m_pNF_Degree->SetModifyHdl( aLink2 );
m_pNF_Period->SetModifyHdl( aLink2 );
m_pFmtFld_InterceptValue->SetModifyHdl( aLink2 );
@@ -316,9 +316,9 @@ void TrendlineResources::UpdateControlStates()
m_pCB_ShowCorrelationCoeff->Enable( !bMovingAverage );
}
-IMPL_LINK( TrendlineResources, ChangeValue, void *, pNumericField)
+IMPL_LINK_TYPED( TrendlineResources, ChangeValue, Edit&, rNumericField, void)
{
- if( pNumericField == m_pNF_Degree )
+ if( &rNumericField == m_pNF_Degree )
{
if( !m_pRB_Polynomial->IsChecked() )
{
@@ -326,7 +326,7 @@ IMPL_LINK( TrendlineResources, ChangeValue, void *, pNumericField)
SelectTrendLine(m_pRB_Polynomial);
}
}
- else if( pNumericField == m_pNF_Period )
+ else if( &rNumericField == m_pNF_Period )
{
if( !m_pRB_MovingAverage->IsChecked() )
{
@@ -334,14 +334,12 @@ IMPL_LINK( TrendlineResources, ChangeValue, void *, pNumericField)
SelectTrendLine(m_pRB_MovingAverage);
}
}
- else if( pNumericField == m_pFmtFld_InterceptValue )
+ else if( &rNumericField == m_pFmtFld_InterceptValue )
{
if( !m_pCB_SetIntercept->IsChecked() )
m_pCB_SetIntercept->Check();
}
UpdateControlStates();
-
- return 0;
}
void TrendlineResources::SetNumFormatter( SvNumberFormatter* pFormatter )
diff --git a/chart2/source/controller/dialogs/res_Trendline.hxx b/chart2/source/controller/dialogs/res_Trendline.hxx
index d69581cbde4e..9fe50e672023 100644
--- a/chart2/source/controller/dialogs/res_Trendline.hxx
+++ b/chart2/source/controller/dialogs/res_Trendline.hxx
@@ -79,7 +79,7 @@ private:
void UpdateControlStates();
DECL_LINK_TYPED( SelectTrendLine, Button *, void );
- DECL_LINK( ChangeValue, void *);
+ DECL_LINK_TYPED( ChangeValue, Edit&, void);
};
} // namespace chart
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index f0c9c101f2c8..93f17f3f2de2 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -100,8 +100,8 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( vcl::Window* pWindow
m_pMFZRotation->SetValue(m_nZRotation);
const sal_uLong nTimeout = 4*EDIT_UPDATEDATA_TIMEOUT;
- Link<> aAngleChangedLink( LINK( this, ThreeD_SceneGeometry_TabPage, AngleChanged ));
- Link<> aAngleEditedLink( LINK( this, ThreeD_SceneGeometry_TabPage, AngleEdited ));
+ Link<Edit&,void> aAngleChangedLink( LINK( this, ThreeD_SceneGeometry_TabPage, AngleChanged ));
+ Link<Edit&,void> aAngleEditedLink( LINK( this, ThreeD_SceneGeometry_TabPage, AngleEdited ));
m_pMFXRotation->EnableUpdateData( nTimeout );
m_pMFXRotation->SetUpdateDataHdl( aAngleChangedLink );
@@ -197,19 +197,17 @@ void ThreeD_SceneGeometry_TabPage::applyAnglesToModel()
m_bAngleChangePending = false;
}
-IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, AngleEdited)
+IMPL_LINK_NOARG_TYPED(ThreeD_SceneGeometry_TabPage, AngleEdited, Edit&, void)
{
m_nXRotation = m_pMFXRotation->GetValue();
m_nYRotation = m_pMFYRotation->GetValue();
m_bAngleChangePending = true;
- return 0;
}
-IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, AngleChanged)
+IMPL_LINK_NOARG_TYPED(ThreeD_SceneGeometry_TabPage, AngleChanged, Edit&, void)
{
applyAnglesToModel();
- return 0;
}
void ThreeD_SceneGeometry_TabPage::applyPerspectiveToModel()
@@ -233,16 +231,14 @@ void ThreeD_SceneGeometry_TabPage::applyPerspectiveToModel()
m_bPerspectiveChangePending = false;
}
-IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, PerspectiveEdited)
+IMPL_LINK_NOARG_TYPED(ThreeD_SceneGeometry_TabPage, PerspectiveEdited, Edit&, void)
{
m_bPerspectiveChangePending = true;
- return 0;
}
-IMPL_LINK_NOARG(ThreeD_SceneGeometry_TabPage, PerspectiveChanged)
+IMPL_LINK_NOARG_TYPED(ThreeD_SceneGeometry_TabPage, PerspectiveChanged, Edit&, void)
{
applyPerspectiveToModel();
- return 0;
}
IMPL_LINK_NOARG_TYPED(ThreeD_SceneGeometry_TabPage, PerspectiveToggled, CheckBox&, void)
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
index bae9ba1d9ed2..b9e6eaadb0d6 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx
@@ -46,14 +46,14 @@ public:
void commitPendingChanges();
// is called by timer to apply changes to model
- DECL_LINK( AngleChanged, void* );
+ DECL_LINK_TYPED( AngleChanged, Edit&, void );
// is called immediately when a field changes
- DECL_LINK( AngleEdited, void* );
+ DECL_LINK_TYPED( AngleEdited, Edit&, void );
// is called by timer to apply changes to model
- DECL_LINK( PerspectiveChanged, void* );
+ DECL_LINK_TYPED( PerspectiveChanged, Edit&, void );
// is called immediately when a field changes
- DECL_LINK( PerspectiveEdited, void* );
+ DECL_LINK_TYPED( PerspectiveEdited, Edit&, void );
DECL_LINK_TYPED( PerspectiveToggled, CheckBox&, void );
DECL_LINK_TYPED( RightAngledAxesToggled, CheckBox&, void );
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 7925d7cfeafb..0ef5a70395ba 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -733,14 +733,14 @@ IMPL_LINK_NOARG_TYPED(DataSourceTabPage, DownButtonClickedHdl, Button*, void)
}
}
-IMPL_LINK( DataSourceTabPage, RangeModifiedHdl, Edit*, pEdit )
+IMPL_LINK_TYPED( DataSourceTabPage, RangeModifiedHdl, Edit&, rEdit, void )
{
// note: isValid sets the color of the edit field
- if( isRangeFieldContentValid( *pEdit ))
+ if( isRangeFieldContentValid( rEdit ))
{
setDirty();
- updateModelFromControl( pEdit );
- if( pEdit == m_pEDT_RANGE )
+ updateModelFromControl( &rEdit );
+ if( &rEdit == m_pEDT_RANGE )
{
if( ! lcl_UpdateCurrentSeriesName( *m_pLB_SERIES ))
fillSeriesListBox();
@@ -749,18 +749,16 @@ IMPL_LINK( DataSourceTabPage, RangeModifiedHdl, Edit*, pEdit )
// enable/disable OK button
isValid();
-
- return 0;
}
-IMPL_LINK( DataSourceTabPage, RangeUpdateDataHdl, Edit*, pEdit )
+IMPL_LINK_TYPED( DataSourceTabPage, RangeUpdateDataHdl, Edit&, rEdit, void )
{
// note: isValid sets the color of the edit field
- if( isRangeFieldContentValid( *pEdit ))
+ if( isRangeFieldContentValid( rEdit ))
{
setDirty();
- updateModelFromControl( pEdit );
- if( pEdit == m_pEDT_RANGE )
+ updateModelFromControl( &rEdit );
+ if( &rEdit == m_pEDT_RANGE )
{
if( ! lcl_UpdateCurrentSeriesName( *m_pLB_SERIES ))
fillSeriesListBox();
@@ -768,8 +766,6 @@ IMPL_LINK( DataSourceTabPage, RangeUpdateDataHdl, Edit*, pEdit )
}
// enable/disable OK button
isValid();
-
- return 0;
}
void DataSourceTabPage::listeningFinished(
diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx
index 4915e476ea56..672efc3527b0 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.hxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.hxx
@@ -79,8 +79,8 @@ protected:
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_TYPED( RangeModifiedHdl, Edit&, void );
+ DECL_LINK_TYPED( RangeUpdateDataHdl, Edit&, void );
DECL_LINK_TYPED( UpButtonClickedHdl, Button*, void );
DECL_LINK_TYPED( DownButtonClickedHdl, Button*, void );
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 7888fb849e78..aeb0e6c5d356 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -351,29 +351,27 @@ bool RangeChooserTabPage::isValid()
return bIsValid;
}
-IMPL_LINK_NOARG(RangeChooserTabPage, ControlEditedHdl)
+IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlEditedHdl, Edit&, void)
{
setDirty();
isValid();
- return 0;
}
IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlChangedRadioHdl, RadioButton&, void)
{
- ControlChangedHdl(NULL);
+ ControlChangedHdl(*m_pED_Range);
}
IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlChangedCheckBoxHdl, CheckBox&, void)
{
- ControlChangedHdl(NULL);
+ ControlChangedHdl(*m_pED_Range);
}
-IMPL_LINK_NOARG(RangeChooserTabPage, ControlChangedHdl)
+IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ControlChangedHdl, Edit&, void)
{
setDirty();
if( isValid())
changeDialogModelAccordingToControls();
- return 0;
}
IMPL_LINK_NOARG_TYPED(RangeChooserTabPage, ChooseRangeHdl, Button*, void)
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.hxx b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
index 4fb2f594bc1a..cd0804ff0a58 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.hxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.hxx
@@ -72,10 +72,10 @@ protected: //methods
void setDirty();
DECL_LINK_TYPED( ChooseRangeHdl, Button*, void );
- DECL_LINK( ControlChangedHdl, void* );
+ DECL_LINK_TYPED( ControlChangedHdl, Edit&, void );
DECL_LINK_TYPED( ControlChangedCheckBoxHdl, CheckBox&, void );
DECL_LINK_TYPED( ControlChangedRadioHdl, RadioButton&, void );
- DECL_LINK( ControlEditedHdl, void* );
+ DECL_LINK_TYPED( ControlEditedHdl, Edit&, void );
protected: //member
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index 5206848b4df7..ece435b7d433 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -157,12 +157,11 @@ void ScaleTabPage::dispose()
SfxTabPage::dispose();
}
-IMPL_STATIC_LINK(
- ScaleTabPage, FmtFieldModifiedHdl, FormattedField*, pFmtFied )
+IMPL_STATIC_LINK_TYPED(
+ ScaleTabPage, FmtFieldModifiedHdl, Edit&, rEdit, void )
{
- if( pFmtFied )
- pFmtFied->SetDefaultValue( pFmtFied->GetValue() );
- return 0;
+ FormattedField& rFmtField = static_cast<FormattedField&>(rEdit);
+ rFmtField.SetDefaultValue( rFmtField.GetValue() );
}
void ScaleTabPage::StateChanged( StateChangedType nType )
diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx
index b6f4803151cb..c4d2bc6d8194 100644
--- a/chart2/source/controller/dialogs/tp_Scale.hxx
+++ b/chart2/source/controller/dialogs/tp_Scale.hxx
@@ -101,7 +101,7 @@ private:
DECL_LINK_TYPED( SelectAxisTypeHdl, ListBox&, void );
DECL_LINK_TYPED( EnableValueHdl, Button*, void );
- DECL_STATIC_LINK( ScaleTabPage, FmtFieldModifiedHdl, FormattedField* );
+ DECL_STATIC_LINK_TYPED( ScaleTabPage, FmtFieldModifiedHdl, Edit&, void);
/** shows a warning window due to an invalid input.
diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
index ef5a731cb22c..982bacbf27d1 100644
--- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
+++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.cxx
@@ -49,7 +49,7 @@ TitlesAndObjectsTabPage::TitlesAndObjectsTabPage( svt::OWizardMachine* pParent
get(m_pCB_Grid_Y, "y");
get(m_pCB_Grid_Z, "z");
- m_xTitleResources->SetUpdateDataHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl ));
+ m_xTitleResources->SetUpdateDataHdl( LINK( this, TitlesAndObjectsTabPage, ChangeEditHdl ));
m_xLegendPositionResources->SetChangeHdl( LINK( this, TitlesAndObjectsTabPage, ChangeHdl ));
m_pCB_Grid_X->SetToggleHdl( LINK( this, TitlesAndObjectsTabPage, ChangeCheckBoxHdl ));
@@ -150,6 +150,10 @@ IMPL_LINK_NOARG_TYPED(TitlesAndObjectsTabPage, ChangeCheckBoxHdl, CheckBox&, voi
{
ChangeHdl(NULL);
}
+IMPL_LINK_NOARG_TYPED(TitlesAndObjectsTabPage, ChangeEditHdl, Edit&, 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 ec7bfd9bd1b9..8cf86a570ef4 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( ChangeEditHdl, Edit&, void );
DECL_LINK_TYPED( ChangeCheckBoxHdl, CheckBox&, void );
protected:
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index 901ef38619f9..8105e92df53e 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -125,10 +125,10 @@ private:
DECL_LINK_TYPED( CategoryChosen, Button*, void );
DECL_LINK_TYPED( CategoryChosen2, ListBox&, void );
DECL_LINK_TYPED( SynchronizePosAndNeg, CheckBox&, void );
- DECL_LINK( PosValueChanged, void * );
+ DECL_LINK_TYPED( PosValueChanged, Edit&, void );
DECL_LINK_TYPED( IndicatorChanged, Button *, void );
DECL_LINK_TYPED( ChooseRange, Button *, void );
- DECL_LINK( RangeChanged, Edit * );
+ DECL_LINK_TYPED( RangeChanged, Edit&, void );
void UpdateControlStates();
bool isRangeFieldContentValid( Edit & rEdit );
diff --git a/chart2/source/controller/inc/res_Titles.hxx b/chart2/source/controller/inc/res_Titles.hxx
index 05e22efd4e35..79c1ce777142 100644
--- a/chart2/source/controller/inc/res_Titles.hxx
+++ b/chart2/source/controller/inc/res_Titles.hxx
@@ -35,7 +35,7 @@ public:
void writeToResources( const TitleDialogData& rInput );
void readFromResources( TitleDialogData& rOutput );
- void SetUpdateDataHdl( const Link<>& rLink );
+ void SetUpdateDataHdl( const Link<Edit&,void>& rLink );
bool IsModified();
void ClearModifyFlag();
diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
index 0777408c85f6..9b44f0d77383 100644
--- a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx
@@ -296,7 +296,7 @@ void ChartErrorBarPanel::Initialize()
mpLBType->SetSelectHdl(LINK(this, ChartErrorBarPanel, ListBoxHdl));
- Link<> aLink2 = LINK(this, ChartErrorBarPanel, NumericFieldHdl);
+ Link<Edit&,void> aLink2 = LINK(this, ChartErrorBarPanel, NumericFieldHdl);
mpMFPos->SetModifyHdl(aLink2);
mpMFNeg->SetModifyHdl(aLink2);
}
@@ -420,16 +420,14 @@ IMPL_LINK_NOARG_TYPED(ChartErrorBarPanel, ListBoxHdl, ListBox&, void)
setTypePos(mxModel, aCID, nPos);
}
-IMPL_LINK(ChartErrorBarPanel, NumericFieldHdl, NumericField*, pMetricField)
+IMPL_LINK_TYPED(ChartErrorBarPanel, NumericFieldHdl, Edit&, rMetricField, void)
{
OUString aCID = getCID(mxModel);
- double nVal = pMetricField->GetValue();
- if (pMetricField == mpMFPos.get())
+ double nVal = static_cast<NumericField&>(rMetricField).GetValue();
+ if (&rMetricField == mpMFPos.get())
setValue(mxModel, aCID, nVal, true);
- else if (pMetricField == mpMFNeg.get())
+ else if (&rMetricField == mpMFNeg.get())
setValue(mxModel, aCID, nVal, false);
-
- return 0;
}
}} // end of namespace ::chart::sidebar
diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
index 9ed600e34193..ed7a0e65cc38 100644
--- a/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
@@ -24,6 +24,7 @@ class FixedText;
class ListBox;
class NumericField;
class MetricField;
+class Edit;
namespace chart {
@@ -90,7 +91,7 @@ private:
DECL_LINK_TYPED(RadioBtnHdl, RadioButton&, void);
DECL_LINK_TYPED(ListBoxHdl, ListBox&, void);
- DECL_LINK(NumericFieldHdl, NumericField*);
+ DECL_LINK_TYPED(NumericFieldHdl, Edit&, void);
};
} } // end of namespace ::chart::sidebar