diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-10 15:24:30 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-11 08:48:55 +0200 |
commit | c80fb09256f02379b78f7bb219e94dfbf5277872 (patch) | |
tree | ad5f615dcd45b02d48e7e0b4933d344a06461c1f | |
parent | cf0c04a428754dfd5aa477cebc5441bc74e27005 (diff) |
convert Link<> to typed
Change-Id: I8f64b8f8e1e8ac7ce1475fc5132acb7171237a32
-rw-r--r-- | extensions/source/propctrlr/usercontrol.cxx | 4 | ||||
-rw-r--r-- | extensions/source/propctrlr/usercontrol.hxx | 2 | ||||
-rw-r--r-- | include/vcl/field.hxx | 4 | ||||
-rw-r--r-- | vcl/source/control/field.cxx | 4 |
4 files changed, 6 insertions, 8 deletions
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 43f09b42e978..3a2b02de909f 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -329,7 +329,7 @@ namespace pcr } - IMPL_LINK( OTimeDurationControl, OnCustomConvert, MetricField*, /*pField*/ ) + IMPL_LINK_NOARG_TYPED( OTimeDurationControl, OnCustomConvert, MetricFormatter&, void ) { long nMultiplier = 1; if ( getTypedControlWindow()->GetCurUnitText().equalsIgnoreAsciiCase( "ms" ) ) @@ -342,8 +342,6 @@ namespace pcr nMultiplier = 1000 * 60 * 60; getTypedControlWindow()->SetValue( getTypedControlWindow()->GetLastValue() * nMultiplier ); - - return 0L; } diff --git a/extensions/source/propctrlr/usercontrol.hxx b/extensions/source/propctrlr/usercontrol.hxx index 3fe258a7d9bd..44f1a29e8c61 100644 --- a/extensions/source/propctrlr/usercontrol.hxx +++ b/extensions/source/propctrlr/usercontrol.hxx @@ -152,7 +152,7 @@ namespace pcr ::sal_Int16 SAL_CALL getControlType() throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE; private: - DECL_LINK( OnCustomConvert, MetricField* ); + DECL_LINK_TYPED( OnCustomConvert, MetricFormatter&, void ); }; diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx index e6e117e8198f..8ed681bac67b 100644 --- a/include/vcl/field.hxx +++ b/include/vcl/field.hxx @@ -222,7 +222,7 @@ protected: OUString maCurUnitText; sal_Int64 mnBaseValue; FieldUnit meUnit; - Link<> maCustomConvertLink; + Link<MetricFormatter&,void> maCustomConvertLink; protected: MetricFormatter(); @@ -262,7 +262,7 @@ public: virtual OUString CreateFieldText( sal_Int64 nValue ) const SAL_OVERRIDE; sal_Int64 GetCorrectedValue( FieldUnit eOutUnit ) const; - void SetCustomConvertHdl( const Link<>& rLink ) { maCustomConvertLink = rLink; } + void SetCustomConvertHdl( const Link<MetricFormatter&,void>& rLink ) { maCustomConvertLink = rLink; } }; diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 41a72a92d9c7..25d249c87ab5 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -1766,7 +1766,7 @@ void MetricField::Last() void MetricField::CustomConvert() { - maCustomConvertLink.Call( this ); + maCustomConvertLink.Call( *this ); } MetricBox::MetricBox( vcl::Window* pParent, WinBits nWinStyle ) : @@ -1855,7 +1855,7 @@ void MetricBox::ReformatAll() void MetricBox::CustomConvert() { - maCustomConvertLink.Call( this ); + maCustomConvertLink.Call( *this ); } void MetricBox::InsertValue( sal_Int64 nValue, FieldUnit eInUnit, sal_Int32 nPos ) |