[Libreoffice-commits] core.git: chart2/source cui/source dbaccess/source filter/source include/sfx2 include/svx include/vcl sc/source sd/source sfx2/source svx/source sw/source vcl/inc vcl/source

Noel Grandin noel at peralex.com
Thu Sep 10 02:39:05 PDT 2015


 chart2/source/controller/dialogs/res_LegendPosition.cxx        |    5 -
 chart2/source/controller/dialogs/tp_ChartType.cxx              |    7 -
 chart2/source/controller/dialogs/tp_RangeChooser.cxx           |    7 +
 chart2/source/controller/dialogs/tp_RangeChooser.hxx           |    1 
 chart2/source/controller/inc/res_LegendPosition.hxx            |    2 
 chart2/source/controller/sidebar/ChartErrorBarPanel.cxx        |   12 +--
 chart2/source/controller/sidebar/ChartErrorBarPanel.hxx        |    2 
 chart2/source/controller/sidebar/ChartSeriesPanel.cxx          |    6 -
 chart2/source/controller/sidebar/ChartSeriesPanel.hxx          |    2 
 cui/source/dialogs/colorpicker.cxx                             |   20 ++---
 dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx              |    3 
 dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx              |    2 
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx                |    3 
 dbaccess/source/ui/dlg/TextConnectionHelper.hxx                |    2 
 dbaccess/source/ui/dlg/admincontrols.cxx                       |   12 ++-
 dbaccess/source/ui/dlg/admincontrols.hxx                       |    3 
 filter/source/pdf/impdialog.cxx                                |   29 ++++---
 filter/source/pdf/impdialog.hxx                                |   12 +--
 include/sfx2/printopt.hxx                                      |    8 +-
 include/svx/compressgraphicdialog.hxx                          |    2 
 include/vcl/button.hxx                                         |    4 -
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx    |   11 +-
 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx              |   10 +-
 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx |    4 -
 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx |    4 -
 sc/source/ui/dbgui/PivotLayoutDialog.cxx                       |   38 ++++++----
 sc/source/ui/inc/AnalysisOfVarianceDialog.hxx                  |    3 
 sc/source/ui/inc/PivotLayoutDialog.hxx                         |    6 +
 sc/source/ui/inc/SamplingDialog.hxx                            |    3 
 sc/source/ui/inc/StatisticsInputOutputDialog.hxx               |    2 
 sc/source/ui/inc/StatisticsTwoVariableDialog.hxx               |    2 
 sc/source/ui/inc/mvtabdlg.hxx                                  |    2 
 sc/source/ui/miscdlgs/mvtabdlg.cxx                             |    6 -
 sc/source/ui/optdlg/calcoptionsdlg.cxx                         |    3 
 sc/source/ui/optdlg/calcoptionsdlg.hxx                         |    2 
 sd/source/ui/animations/SlideTransitionPane.cxx                |    3 
 sd/source/ui/animations/SlideTransitionPane.hxx                |    2 
 sfx2/source/dialog/printopt.cxx                                |   26 ++----
 svx/source/dialog/compressgraphicdialog.cxx                    |    3 
 sw/source/ui/dialog/ascfldlg.cxx                               |    5 -
 sw/source/uibase/inc/ascfldlg.hxx                              |    2 
 vcl/inc/printdlg.hxx                                           |    3 
 vcl/source/control/button.cxx                                  |    2 
 vcl/source/window/printdlg.cxx                                 |   20 +++--
 44 files changed, 160 insertions(+), 146 deletions(-)

New commits:
commit f4e951a61a20edd6efbd244966e851aa378e66ad
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Sep 9 11:41:20 2015 +0200

    convert Link<> to typed
    
    Change-Id: I603463d0486d4d0f21ebbdc6eca900db58bb090f

diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 0bace68..57c948c 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 211703e..b638ca4 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 db5467c..3b6584f 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 f8ad825..3cbb7ee 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 b9f6dfe..17cd166 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 032795f..6a455ec 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 bdfd954..2182635 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 f2c82e1..e8032f7 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 947fb90..bd3d3e3 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*);
 };
 
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 148f9a2..50210b2 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -990,7 +990,7 @@ public:
     void update_color(sal_uInt16 n = UPDATE_ALL);
 
     DECL_LINK(ColorModifyHdl, void*);
-    DECL_LINK(ModeModifyHdl, void*);
+    DECL_LINK_TYPED(ModeModifyHdl, RadioButton&, void);
 
     sal_Int32 GetColor() const;
 
@@ -1089,13 +1089,13 @@ ColorPickerDialog::ColorPickerDialog( vcl::Window* pParent, sal_Int32 nColor, sa
 
     mpEDHex->SetModifyHdl( aLink );
 
-    aLink = LINK( this, ColorPickerDialog, ModeModifyHdl );
-    mpRBRed->SetToggleHdl( aLink );
-    mpRBGreen->SetToggleHdl( aLink );
-    mpRBBlue->SetToggleHdl( aLink );
-    mpRBHue->SetToggleHdl( aLink );
-    mpRBSaturation->SetToggleHdl( aLink );
-    mpRBBrightness->SetToggleHdl( aLink );
+    Link<RadioButton&,void> aLink2 = LINK( this, ColorPickerDialog, ModeModifyHdl );
+    mpRBRed->SetToggleHdl( aLink2 );
+    mpRBGreen->SetToggleHdl( aLink2 );
+    mpRBBlue->SetToggleHdl( aLink2 );
+    mpRBHue->SetToggleHdl( aLink2 );
+    mpRBSaturation->SetToggleHdl( aLink2 );
+    mpRBBrightness->SetToggleHdl( aLink2 );
 
     Image aSliderImage( maSliderImage );
 
@@ -1421,7 +1421,7 @@ IMPL_LINK(ColorPickerDialog, ColorModifyHdl, void *, p)
     return 0;
 }
 
-IMPL_LINK_NOARG(ColorPickerDialog, ModeModifyHdl)
+IMPL_LINK_NOARG_TYPED(ColorPickerDialog, ModeModifyHdl, RadioButton&, void)
 {
     ColorMode eMode = HUE;
 
@@ -1451,8 +1451,6 @@ IMPL_LINK_NOARG(ColorPickerDialog, ModeModifyHdl)
         meMode = eMode;
         update_color(UPDATE_COLORCHOOSER | UPDATE_COLORSLIDER);
     }
-
-    return 0;
 }
 
 void ColorPickerDialog::setColorComponent( sal_uInt16 nComp, double dValue )
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index 54ae2b4..b8e744c 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -271,10 +271,9 @@ using namespace ::com::sun::star;
         OGenericAdministrationPage::dispose();
     }
 
-    IMPL_LINK(OMySQLIntroPageSetup, OnSetupModeSelected, RadioButton*, /*_pBox*/)
+    IMPL_LINK_NOARG_TYPED(OMySQLIntroPageSetup, OnSetupModeSelected, RadioButton&, void)
     {
         maClickHdl.Call( this );
-        return long(true);
     }
 
     void OMySQLIntroPageSetup::implInitControls(const SfxItemSet& _rSet, bool /*_bSaveValue*/)
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
index 2bdaef0..4237fab 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx
@@ -232,7 +232,7 @@ namespace dbaui
         VclPtr<RadioButton>         m_pNATIVEDatabase;
         Link<OMySQLIntroPageSetup *, void> maClickHdl;
 
-        DECL_LINK(OnSetupModeSelected, RadioButton*);
+        DECL_LINK_TYPED(OnSetupModeSelected, RadioButton&, void);
 
     };
 
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index a6b307d..8139d88 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -192,13 +192,12 @@ namespace dbaui
         return 0L;
     }
 
-    IMPL_LINK(OTextConnectionHelper, OnSetExtensionHdl, RadioButton*, /*_pRadioButton*/)
+    IMPL_LINK_NOARG_TYPED(OTextConnectionHelper, OnSetExtensionHdl, RadioButton&, void)
     {
         bool bDoEnable = m_pAccessOtherFiles->IsChecked();
         m_pOwnExtension->Enable(bDoEnable);
         m_pExtensionExample->Enable(bDoEnable);
         m_aGetExtensionHandler.Call(this);
-        return 0L;
     }
 
     void OTextConnectionHelper::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
index 135e4dc..6a2f1d9 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx
@@ -82,7 +82,7 @@ namespace dbaui
     protected:
         void callModifiedHdl() const { if (m_aModifiedHandler.IsSet()) m_aModifiedHandler.Call(const_cast<OTextConnectionHelper *>(this)); }
         Link<> getControlModifiedLink() { return LINK(this, OTextConnectionHelper, OnControlModified); }
-        DECL_LINK(OnSetExtensionHdl,RadioButton*);
+        DECL_LINK_TYPED(OnSetExtensionHdl,RadioButton&,void);
         DECL_LINK(OnControlModified,Control*);
         DECL_LINK(OnEditModified,Edit*);
 
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index da655ca..39db714 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -126,7 +126,8 @@ namespace dbaui
 
     // MySQLNativeSettings
     MySQLNativeSettings::MySQLNativeSettings( vcl::Window& _rParent, const Link<>& _rControlModificationLink )
-        :TabPage( &_rParent, "MysqlNativeSettings", "dbaccess/ui/mysqlnativesettings.ui" )
+        :TabPage( &_rParent, "MysqlNativeSettings", "dbaccess/ui/mysqlnativesettings.ui" ),
+        m_aControlModificationLink(_rControlModificationLink)
     {
         get(m_pDatabaseNameLabel, "dbnamelabel");
         get(m_pDatabaseName, "dbname");
@@ -147,8 +148,8 @@ namespace dbaui
         m_pPort->SetModifyHdl( _rControlModificationLink );
         m_pSocket->SetModifyHdl( _rControlModificationLink );
         m_pNamedPipe->SetModifyHdl( _rControlModificationLink );
-        m_pSocketRadio->SetToggleHdl( _rControlModificationLink );
-        m_pNamedPipeRadio->SetToggleHdl( _rControlModificationLink );
+        m_pSocketRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, RadioToggleHdl) );
+        m_pNamedPipeRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, RadioToggleHdl) );
 
         m_aControlDependencies.enableOnRadioCheck( *m_pHostPortRadio, *m_pHostNameLabel, *m_pHostName, *m_pPortLabel, *m_pPort, *m_pDefaultPort );
         m_aControlDependencies.enableOnRadioCheck( *m_pSocketRadio, *m_pSocket );
@@ -168,6 +169,11 @@ namespace dbaui
 #endif
     }
 
+    IMPL_LINK_TYPED(MySQLNativeSettings, RadioToggleHdl, RadioButton&, rRadioButton, void)
+    {
+        m_aControlModificationLink.Call(&rRadioButton);
+    }
+
     MySQLNativeSettings::~MySQLNativeSettings()
     {
         disposeOnce();
diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx
index c4e805c..d186575 100644
--- a/dbaccess/source/ui/dlg/admincontrols.hxx
+++ b/dbaccess/source/ui/dlg/admincontrols.hxx
@@ -47,9 +47,10 @@ namespace dbaui
         VclPtr<FixedText>           m_pDefaultPort;
         VclPtr<Edit>                m_pSocket;
         VclPtr<Edit>                m_pNamedPipe;
-
+        Link<>                      m_aControlModificationLink;
         ::svt::ControlDependencyManager
                             m_aControlDependencies;
+        DECL_LINK_TYPED(RadioToggleHdl, RadioButton&, void);
 
     public:
         MySQLNativeSettings( vcl::Window& _rParent, const Link<>& _rControlModificationLink );
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 8ff8bcf..5d89feb 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -596,7 +596,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( ImpPDFTabDialog* paParent )
     mpRbRange->SetToggleHdl( LINK( this, ImpPDFTabGeneralPage, TogglePagesHdl ) );
 
     mpRbAll->Check();
-    TogglePagesHdl( NULL );
+    TogglePagesHdl();
 
     mpRbSelection->Enable( paParent->mbSelectionPresent );
     mbIsPresentation = paParent->mbIsPresentation;
@@ -742,12 +742,16 @@ VclPtr<SfxTabPage> ImpPDFTabGeneralPage::Create( vcl::Window* pParent,
 }
 
 
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePagesHdl)
+IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, TogglePagesHdl, RadioButton&, void)
+{
+    TogglePagesHdl();
+}
+
+void ImpPDFTabGeneralPage::TogglePagesHdl()
 {
     mpEdPages->Enable( mpRbRange->IsChecked() );
     if ( mpRbRange->IsChecked() )
         mpEdPages->GrabFocus();
-    return 0;
 }
 
 
@@ -758,10 +762,9 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl)
 }
 
 
-IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleCompressionHdl)
+IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleCompressionHdl, RadioButton&, void)
 {
     mpQualityFrame->Enable(mpRbJPEGCompression->IsChecked());
-    return 0;
 }
 
 
@@ -1016,20 +1019,23 @@ void ImpPDFTabOpnFtrPage::SetFilterConfigItem( const  ImpPDFTabDialog* paParent
     {
         mpRbPgLyContinueFacing->SetToggleHdl( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl ) );
         mpCbPgLyFirstOnLeft->Check( paParent->mbFirstPageLeft );
-        ToggleRbPgLyContinueFacingHdl( NULL );
+        ToggleRbPgLyContinueFacingHdl();
     }
 }
 
-IMPL_LINK_NOARG(ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl)
+IMPL_LINK_NOARG_TYPED(ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, RadioButton&, void)
+{
+    ToggleRbPgLyContinueFacingHdl();
+}
+
+void ImpPDFTabOpnFtrPage::ToggleRbPgLyContinueFacingHdl()
 {
     mpCbPgLyFirstOnLeft->Enable( mpRbPgLyContinueFacing->IsChecked() );
-    return 0;
 }
 
-IMPL_LINK_NOARG( ImpPDFTabOpnFtrPage, ToggleRbMagnHdl )
+IMPL_LINK_NOARG_TYPED( ImpPDFTabOpnFtrPage, ToggleRbMagnHdl, RadioButton&, void )
 {
     mpNumZoom->Enable( mpRbMagnZoom->IsChecked() );
-    return 0;
 }
 
 
@@ -1077,10 +1083,9 @@ void ImpPDFTabViewerPage::dispose()
     SfxTabPage::dispose();
 }
 
-IMPL_LINK_NOARG( ImpPDFTabViewerPage, ToggleRbBookmarksHdl )
+IMPL_LINK_NOARG_TYPED( ImpPDFTabViewerPage, ToggleRbBookmarksHdl, RadioButton&, void )
 {
     m_pNumBookmarkLevels->Enable( m_pRbVisibleBookmarkLevels->IsChecked() );
-    return 0;
 }
 
 VclPtr<SfxTabPage> ImpPDFTabViewerPage::Create( vcl::Window* pParent,
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index 39f9e78..4dfbe30 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -231,12 +231,13 @@ class ImpPDFTabGeneralPage : public SfxTabPage
 
     VclPtr<ImpPDFTabDialog> mpaParent;
 
-    DECL_LINK( TogglePagesHdl, void* );
-    DECL_LINK( ToggleCompressionHdl, void* );
+    DECL_LINK_TYPED( TogglePagesHdl, RadioButton&, void );
+    DECL_LINK_TYPED( ToggleCompressionHdl, RadioButton&, void );
     DECL_LINK( ToggleReduceImageResolutionHdl, void* );
     DECL_LINK( ToggleWatermarkHdl, void* );
     DECL_LINK( ToggleAddStreamHdl, void* );
     DECL_LINK( ToggleExportFormFieldsHdl, void* );
+    void TogglePagesHdl();
 
 public:
     DECL_LINK( ToggleExportPDFAHdl, void* );
@@ -277,8 +278,9 @@ class ImpPDFTabOpnFtrPage : public SfxTabPage
 
     bool                    mbUseCTLFont;
 
-    DECL_LINK( ToggleRbPgLyContinueFacingHdl, void* );
-    DECL_LINK( ToggleRbMagnHdl, void* );
+    DECL_LINK_TYPED( ToggleRbPgLyContinueFacingHdl, RadioButton&, void );
+    DECL_LINK_TYPED( ToggleRbMagnHdl, RadioButton&, void );
+    void ToggleRbPgLyContinueFacingHdl();
 
 public:
     ImpPDFTabOpnFtrPage( vcl::Window* pParent,
@@ -313,7 +315,7 @@ class ImpPDFTabViewerPage : public SfxTabPage
     VclPtr<RadioButton>                m_pRbVisibleBookmarkLevels;
     VclPtr<NumericField>               m_pNumBookmarkLevels;
 
-    DECL_LINK( ToggleRbBookmarksHdl, void* );
+    DECL_LINK_TYPED( ToggleRbBookmarksHdl, RadioButton&, void );
 public:
     ImpPDFTabViewerPage( vcl::Window* pParent,
                          const SfxItemSet& rSet );
diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index b876bc4..60faa1c 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -73,15 +73,15 @@ private:
     PrinterOptions      maPrinterOptions;
     PrinterOptions      maPrintFileOptions;
 
-                        DECL_DLLPRIVATE_LINK( ToggleOutputPrinterRBHdl, RadioButton* pButton );
-                        DECL_DLLPRIVATE_LINK( ToggleOutputPrintFileRBHdl, RadioButton* pButton );
+                        DECL_DLLPRIVATE_LINK_TYPED( ToggleOutputPrinterRBHdl, RadioButton&, void );
+                        DECL_DLLPRIVATE_LINK_TYPED( ToggleOutputPrintFileRBHdl, RadioButton&, void);
 
                         DECL_DLLPRIVATE_LINK_TYPED( ClickReduceTransparencyCBHdl, Button*, void );
                         DECL_DLLPRIVATE_LINK_TYPED( ClickReduceGradientsCBHdl, Button*, void );
                         DECL_DLLPRIVATE_LINK_TYPED( ClickReduceBitmapsCBHdl, Button*, void );
 
-                        DECL_DLLPRIVATE_LINK( ToggleReduceGradientsStripesRBHdl, RadioButton* pButton );
-                        DECL_DLLPRIVATE_LINK( ToggleReduceBitmapsResolutionRBHdl, RadioButton* pButton );
+                        DECL_DLLPRIVATE_LINK_TYPED( ToggleReduceGradientsStripesRBHdl, RadioButton&, void );
+                        DECL_DLLPRIVATE_LINK_TYPED( ToggleReduceBitmapsResolutionRBHdl, RadioButton&, void );
 
     SAL_DLLPRIVATE void ImplUpdateControls( const PrinterOptions* pCurrentOptions );
     SAL_DLLPRIVATE void ImplSaveControls( PrinterOptions* pCurrentOptions );
diff --git a/include/svx/compressgraphicdialog.hxx b/include/svx/compressgraphicdialog.hxx
index 1d3f33c..eacf312 100644
--- a/include/svx/compressgraphicdialog.hxx
+++ b/include/svx/compressgraphicdialog.hxx
@@ -66,7 +66,7 @@ private:
     DECL_LINK( NewWidthModifiedHdl, void* );
     DECL_LINK( NewHeightModifiedHdl, void* );
     DECL_LINK( ResolutionModifiedHdl, void* );
-    DECL_LINK( ToggleCompressionRB, void* );
+    DECL_LINK_TYPED( ToggleCompressionRB, RadioButton&, void );
     DECL_LINK( ToggleReduceResolutionRB, void* );
 
     DECL_LINK_TYPED( CalculateClickHdl, Button*, void );
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 6dc7a32..10a241c 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -284,7 +284,7 @@ private:
     bool            mbSaveValue;
     bool            mbRadioCheck;
     bool            mbStateChanged;
-    Link<>          maToggleHdl;
+    Link<RadioButton&,void> maToggleHdl;
     // when mbLegacyNoTextAlign is set then the old behaviour where
     // the WB_LEFT, WB_RIGHT & WB_CENTER affect the image placement
     // occurs, otherwise the image ( radiobutton circle ) is placed
@@ -372,7 +372,7 @@ public:
     Size            CalcMinimumSize( long nMaxWidth = 0 ) const;
     virtual Size    GetOptimalSize() const SAL_OVERRIDE;
 
-    void            SetToggleHdl( const Link<>& rLink ) { maToggleHdl = rLink; }
+    void            SetToggleHdl( const Link<RadioButton&,void>& rLink ) { maToggleHdl = rLink; }
 
     /** GetRadioButtonGroup returns a list of pointers to <code>RadioButton</code>s in the same group.
 
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index ddd48bd..3eb3ba0 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -113,7 +113,7 @@ ScAnalysisOfVarianceDialog::ScAnalysisOfVarianceDialog(
     mpSingleFactorRadio->Check();
     mpTwoFactorRadio->Check(false);
 
-    FactorChanged(NULL);
+    FactorChanged();
 }
 
 ScAnalysisOfVarianceDialog::~ScAnalysisOfVarianceDialog()
@@ -140,7 +140,12 @@ sal_Int16 ScAnalysisOfVarianceDialog::GetUndoNameId()
     return STR_ANALYSIS_OF_VARIANCE_UNDO_NAME;
 }
 
-IMPL_LINK_NOARG( ScAnalysisOfVarianceDialog, FactorChanged )
+IMPL_LINK_NOARG_TYPED( ScAnalysisOfVarianceDialog, FactorChanged, RadioButton&, void )
+{
+    FactorChanged();
+}
+
+void ScAnalysisOfVarianceDialog::FactorChanged()
 {
     if (mpSingleFactorRadio->IsChecked())
     {
@@ -156,8 +161,6 @@ IMPL_LINK_NOARG( ScAnalysisOfVarianceDialog, FactorChanged )
         mpRowsPerSampleField->Enable(false); // Rows per sample not yet implemented
         meFactor = TWO_FACTOR;
     }
-
-    return 0;
 }
 
 void ScAnalysisOfVarianceDialog::RowColumn(ScRangeList& rRangeList, AddressWalkerWriter& aOutput, FormulaTemplate& aTemplate,
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index 4afc721..0d71b26 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -116,7 +116,7 @@ void ScSamplingDialog::Init()
     mpOutputRangeEdit->GrabFocus();
     mpPeriodicMethodRadio->Check();
 
-    ToggleSamplingMethod(NULL);
+    ToggleSamplingMethod();
 }
 
 void ScSamplingDialog::GetRangeFromSelection()
@@ -323,7 +323,12 @@ IMPL_LINK_NOARG(ScSamplingDialog, SamplingSizeValueModified)
     return 0;
 }
 
-IMPL_LINK_NOARG(ScSamplingDialog, ToggleSamplingMethod)
+IMPL_LINK_NOARG_TYPED(ScSamplingDialog, ToggleSamplingMethod, RadioButton&, void)
+{
+    ToggleSamplingMethod();
+}
+
+void ScSamplingDialog::ToggleSamplingMethod()
 {
     if (mpRandomMethodRadio->IsChecked())
     {
@@ -335,7 +340,6 @@ IMPL_LINK_NOARG(ScSamplingDialog, ToggleSamplingMethod)
         mpPeriod->Enable(true);
         mpSampleSize->Enable(false);
     }
-    return 0;
 }
 
 IMPL_LINK_NOARG(ScSamplingDialog, RefInputModifyHandler)
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index 536bdc4..c676bda 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -219,14 +219,12 @@ IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, LoseFocusHandler )
     return 0;
 }
 
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, GroupByChanged )
+IMPL_LINK_NOARG_TYPED( ScStatisticsInputOutputDialog, GroupByChanged, RadioButton&, void )
 {
     if (mpGroupByColumnsRadio->IsChecked())
         mGroupedBy = BY_COLUMN;
     else if (mpGroupByRowsRadio->IsChecked())
         mGroupedBy = BY_ROW;
-
-    return 0;
 }
 
 IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, RefInputModifyHandler )
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index 9b629cf..44fdfec 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -242,14 +242,12 @@ IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, LoseFocusHandler )
     return 0;
 }
 
-IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, GroupByChanged )
+IMPL_LINK_NOARG_TYPED( ScStatisticsTwoVariableDialog, GroupByChanged, RadioButton&, void )
 {
     if (mpGroupByColumnsRadio->IsChecked())
         mGroupedBy = BY_COLUMN;
     else if (mpGroupByRowsRadio->IsChecked())
         mGroupedBy = BY_ROW;
-
-    return 0;
 }
 
 IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, RefInputModifyHandler )
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 72589c5..85203ca 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -110,9 +110,9 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
     get(mpDestinationButton,          "destination-button");
 
     // Source UI
-    aLink = LINK(this, ScPivotLayoutDialog, ToggleSource);
-    mpSourceRadioNamedRange->SetToggleHdl(aLink);
-    mpSourceRadioSelection->SetToggleHdl(aLink);
+    Link<RadioButton&,void> aLink2 = LINK(this, ScPivotLayoutDialog, ToggleSource);
+    mpSourceRadioNamedRange->SetToggleHdl(aLink2);
+    mpSourceRadioSelection->SetToggleHdl(aLink2);
 
     mpSourceEdit->SetReferences(this, mpSourceRadioSelection);
     mpSourceButton->SetReferences(this, mpSourceEdit);
@@ -129,10 +129,10 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
     mpSourceListBox->SetSelectHdl(LINK(this, ScPivotLayoutDialog, SourceEditModified));
 
     // Destination UI
-    aLink = LINK(this, ScPivotLayoutDialog, ToggleDestination);
-    mpDestinationRadioNewSheet->SetToggleHdl(aLink);
-    mpDestinationRadioNamedRange->SetToggleHdl(aLink);
-    mpDestinationRadioSelection->SetToggleHdl(aLink);
+    aLink2 = LINK(this, ScPivotLayoutDialog, ToggleDestination);
+    mpDestinationRadioNewSheet->SetToggleHdl(aLink2);
+    mpDestinationRadioNamedRange->SetToggleHdl(aLink2);
+    mpDestinationRadioSelection->SetToggleHdl(aLink2);
 
     mpDestinationEdit->SetReferences(this, mpDestinationRadioNewSheet);
     mpDestinationButton->SetReferences(this, mpDestinationEdit);
@@ -237,7 +237,7 @@ void ScPivotLayoutDialog::SetupSource()
             // Source is probably a DB Range
             mpSourceRadioNamedRange->Disable();
             mpSourceRadioSelection->Disable();
-            ToggleSource(NULL);
+            ToggleSource();
             return;
         }
         else
@@ -250,7 +250,7 @@ void ScPivotLayoutDialog::SetupSource()
     {
         mpSourceRadioNamedRange->Disable();
         mpSourceRadioSelection->Disable();
-        ToggleSource(NULL);
+        ToggleSource();
         return;
     }
 
@@ -289,7 +289,7 @@ void ScPivotLayoutDialog::SetupSource()
     if (mpSourceListBox->GetEntryCount() <= 0)
         mpSourceRadioNamedRange->Disable();
 
-    ToggleSource(NULL);
+    ToggleSource();
 }
 
 void ScPivotLayoutDialog::SetupDestination()
@@ -331,7 +331,7 @@ void ScPivotLayoutDialog::SetupDestination()
         }
     }
 
-    ToggleDestination(NULL);
+    ToggleDestination();
 }
 
 void ScPivotLayoutDialog::FillValuesToListBoxes()
@@ -688,7 +688,12 @@ IMPL_LINK_NOARG(ScPivotLayoutDialog, SourceEditModified)
     return 0;
 }
 
-IMPL_LINK_NOARG(ScPivotLayoutDialog, ToggleSource)
+IMPL_LINK_NOARG_TYPED(ScPivotLayoutDialog, ToggleSource, RadioButton&, void)
+{
+    ToggleSource();
+}
+
+void ScPivotLayoutDialog::ToggleSource()
 {
     bool bNamedRange = mpSourceRadioNamedRange->IsChecked();
     bool bSelection = mpSourceRadioSelection->IsChecked();
@@ -696,17 +701,20 @@ IMPL_LINK_NOARG(ScPivotLayoutDialog, ToggleSource)
     mpSourceButton->Enable(bSelection);
     mpSourceEdit->Enable(bSelection);
     UpdateSourceRange();
-    return 0;
 }
 
-IMPL_LINK_NOARG(ScPivotLayoutDialog, ToggleDestination)
+IMPL_LINK_NOARG_TYPED(ScPivotLayoutDialog, ToggleDestination, RadioButton&, void)
+{
+    ToggleDestination();
+}
+
+void ScPivotLayoutDialog::ToggleDestination()
 {
     bool bNamedRange = mpDestinationRadioNamedRange->IsChecked();
     bool bSelection = mpDestinationRadioSelection->IsChecked();
     mpDestinationListBox->Enable(bNamedRange);
     mpDestinationButton->Enable(bSelection);
     mpDestinationEdit->Enable(bSelection);
-    return 0;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
index 3a5d75b..21da5a3 100644
--- a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
+++ b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx
@@ -38,7 +38,8 @@ private:
     VclPtr<RadioButton>  mpTwoFactorRadio;
     VclPtr<NumericField> mpRowsPerSampleField;
 
-    DECL_LINK(FactorChanged,   void*);
+    DECL_LINK_TYPED(FactorChanged, RadioButton&, void);
+    void FactorChanged();
 
     AnovaFactor meFactor;
 
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx
index 839119f..a299d3f 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -92,9 +92,11 @@ private:
     DECL_LINK_TYPED(OKClicked,           Button*, void);
     DECL_LINK(GetFocusHandler,        Control*);
     DECL_LINK(LoseFocusHandler,       void*);
-    DECL_LINK(ToggleSource,           void*);
-    DECL_LINK(ToggleDestination,      void*);
+    DECL_LINK_TYPED(ToggleSource,        RadioButton&, void);
+    DECL_LINK_TYPED(ToggleDestination,   RadioButton&, void);
     DECL_LINK(SourceEditModified, void*);
+    void ToggleSource();
+    void ToggleDestination();
     virtual bool Close() SAL_OVERRIDE;
 
     ScPivotParam maPivotParameters;
diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx
index 544475f..15b54d7 100644
--- a/sc/source/ui/inc/SamplingDialog.hxx
+++ b/sc/source/ui/inc/SamplingDialog.hxx
@@ -76,8 +76,9 @@ private:
     DECL_LINK( GetFocusHandler,  Control* );
     DECL_LINK( LoseFocusHandler, void* );
     DECL_LINK( SamplingSizeValueModified, void* );
-    DECL_LINK( ToggleSamplingMethod, void* );
+    DECL_LINK_TYPED( ToggleSamplingMethod, RadioButton&, void );
     DECL_LINK( RefInputModifyHandler, void* );
+    void ToggleSamplingMethod();
 };
 
 #endif
diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
index 22a41d7..340e5fb 100644
--- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
+++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
@@ -79,7 +79,7 @@ private:
     void Init();
     void GetRangeFromSelection();
 
-    DECL_LINK( GroupByChanged,   void* );
+    DECL_LINK_TYPED( GroupByChanged, RadioButton&, void );
     DECL_LINK_TYPED( OkClicked, Button*, void );
     DECL_LINK( GetFocusHandler,  Control* );
     DECL_LINK( LoseFocusHandler, void* );
diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
index d02a54e..0a18619 100644
--- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
+++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
@@ -82,7 +82,7 @@ private:
     void Init();
     void GetRangeFromSelection();
 
-    DECL_LINK( GroupByChanged,   void* );
+    DECL_LINK_TYPED( GroupByChanged, RadioButton&, void );
     DECL_LINK_TYPED( OkClicked, Button*, void );
     DECL_LINK( GetFocusHandler,  Control* );
     DECL_LINK( LoseFocusHandler, void* );
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index 1512f9d..a758072 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -77,7 +77,7 @@ private:
     void    InitDocListBox  ();
     DECL_LINK_TYPED( OkHdl, Button*, void );
     DECL_LINK( SelHdl, ListBox * );
-    DECL_LINK( CheckBtnHdl, void * );
+    DECL_LINK_TYPED( CheckBtnHdl, RadioButton&, void );
     DECL_LINK( CheckNameHdl, Edit * );
 };
 
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 6840c52..6c9f4a9 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -255,12 +255,10 @@ void ScMoveTableDlg::InitDocListBox()
 
 // Handler:
 
-IMPL_LINK( ScMoveTableDlg, CheckBtnHdl, void *, pBtn )
+IMPL_LINK_TYPED( ScMoveTableDlg, CheckBtnHdl, RadioButton&, rBtn, void )
 {
-    if (pBtn == pBtnCopy)
+    if (&rBtn == pBtnCopy)
         ResetRenameInput();
-
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED(ScMoveTableDlg, OkHdl, Button*, void)
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index ad012fc..c1b02b2 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -240,10 +240,9 @@ IMPL_LINK(ScCalcOptionsDialog, SpinOpenCLMinSizeHdl, NumericField*, pSpin)
     return 0;
 }
 
-IMPL_LINK_NOARG(ScCalcOptionsDialog, BtnAutomaticSelectHdl)
+IMPL_LINK_NOARG_TYPED(ScCalcOptionsDialog, BtnAutomaticSelectHdl, RadioButton&, void)
 {
     OpenCLAutomaticSelectionChanged();
-    return 0;
 }
 
 IMPL_LINK_NOARG_TYPED(ScCalcOptionsDialog, DeviceSelHdl, SvTreeListBox*, void)
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index c47e178..4ee896d 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -38,7 +38,7 @@ public:
     virtual ~ScCalcOptionsDialog();
     virtual void dispose() SAL_OVERRIDE;
 
-    DECL_LINK( BtnAutomaticSelectHdl, void* );
+    DECL_LINK_TYPED( BtnAutomaticSelectHdl, RadioButton&, void );
     DECL_LINK_TYPED( DeviceSelHdl, SvTreeListBox*, void );
     DECL_LINK( EditModifiedHdl, Edit * );
     DECL_STATIC_LINK_TYPED( ScCalcOptionsDialog, TestClickHdl, Button*, void );
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 91285b0..0948e80 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -1005,11 +1005,10 @@ IMPL_LINK_NOARG(SlideTransitionPane, TransitionSelected)
     return 0;
 }
 
-IMPL_LINK_NOARG(SlideTransitionPane, AdvanceSlideRadioButtonToggled)
+IMPL_LINK_NOARG_TYPED(SlideTransitionPane, AdvanceSlideRadioButtonToggled, RadioButton&, void)
 {
     updateControlState();
     applyToSelectedPages();
-    return 0;
 }
 
 IMPL_LINK_NOARG(SlideTransitionPane, AdvanceTimeModified)
diff --git a/sd/source/ui/animations/SlideTransitionPane.hxx b/sd/source/ui/animations/SlideTransitionPane.hxx
index ab640bf..24196b7 100644
--- a/sd/source/ui/animations/SlideTransitionPane.hxx
+++ b/sd/source/ui/animations/SlideTransitionPane.hxx
@@ -90,7 +90,7 @@ private:
     DECL_LINK_TYPED( AutoPreviewClicked, Button*, void );
 
     DECL_LINK( TransitionSelected, void * );
-    DECL_LINK( AdvanceSlideRadioButtonToggled, void * );
+    DECL_LINK_TYPED( AdvanceSlideRadioButtonToggled, RadioButton&, void );
     DECL_LINK( AdvanceTimeModified, void * );
     DECL_LINK( SpeedListBoxSelected, void * );
     DECL_LINK( SoundListBoxSelected, void * );
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index 8c25b8f..a78cbf6 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -289,7 +289,7 @@ IMPL_LINK_NOARG_TYPED( SfxCommonPrintOptionsTabPage, ClickReduceGradientsCBHdl,
     m_pReduceGradientsColorRB->Enable( bEnable );
     m_pReduceGradientsStepCountNF->Enable( bEnable );
 
-    ToggleReduceGradientsStripesRBHdl(m_pReduceGradientsStripesRB);
+    ToggleReduceGradientsStripesRBHdl(*m_pReduceGradientsStripesRB);
 }
 
 IMPL_LINK_NOARG_TYPED( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, Button*, void )
@@ -302,45 +302,37 @@ IMPL_LINK_NOARG_TYPED( SfxCommonPrintOptionsTabPage, ClickReduceBitmapsCBHdl, Bu
     m_pReduceBitmapsTransparencyCB->Enable( bEnable );
     m_pReduceBitmapsResolutionLB->Enable( bEnable );
 
-    ToggleReduceBitmapsResolutionRBHdl(m_pReduceBitmapsResolutionRB);
+    ToggleReduceBitmapsResolutionRBHdl(*m_pReduceBitmapsResolutionRB);
 }
 
-IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, RadioButton*, pButton )
+IMPL_LINK_NOARG_TYPED( SfxCommonPrintOptionsTabPage, ToggleReduceGradientsStripesRBHdl, RadioButton&, void )
 {
-    (void)pButton; //unused
     const bool bEnable = m_pReduceGradientsCB->IsChecked() && m_pReduceGradientsStripesRB->IsChecked();
 
     m_pReduceGradientsStepCountNF->Enable( bEnable );
-
-    return 0;
 }
 
-IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, RadioButton*, pButton )
+IMPL_LINK_NOARG_TYPED( SfxCommonPrintOptionsTabPage, ToggleReduceBitmapsResolutionRBHdl, RadioButton&, void )
 {
-    (void)pButton; //unused
     const bool bEnable = m_pReduceBitmapsCB->IsChecked() && m_pReduceBitmapsResolutionRB->IsChecked();
 
     m_pReduceBitmapsResolutionLB->Enable( bEnable );
-
-    return 0;
 }
 
-IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton*, pButton )
+IMPL_LINK_TYPED( SfxCommonPrintOptionsTabPage, ToggleOutputPrinterRBHdl, RadioButton&, rButton, void )
 {
-    if( pButton->IsChecked() )
+    if( rButton.IsChecked() )
     {
         ImplUpdateControls( &maPrinterOptions );
         bOutputForPrinter = true;
     }
     else
         ImplSaveControls( &maPrinterOptions );
-
-    return 0;
 }
 
-IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton*, pButton )
+IMPL_LINK_TYPED( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton&, rButton, void )
 {
-    if( pButton->IsChecked() )
+    if( rButton.IsChecked() )
     {
         ImplUpdateControls( &maPrintFileOptions );
         bOutputForPrinter = false;
@@ -351,8 +343,6 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton
         ImplSaveControls( &maPrintFileOptions );
         m_pPDFCB->Enable();
     }
-
-    return 0;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index c398969..19ce031 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -319,14 +319,13 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, ResolutionModifiedHdl )
     return 0L;
 }
 
-IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleCompressionRB )
+IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, ToggleCompressionRB, RadioButton&, void )
 {
     bool choice = m_pLosslessRB->IsChecked();
     m_pCompressionMF->Enable(choice);
     m_pCompressionSlider->Enable(choice);
     m_pQualityMF->Enable(!choice);
     m_pQualitySlider->Enable(!choice);
-    return 0L;
 }
 
 IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleReduceResolutionRB )
diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx
index 85e040c..c9f5f31 100644
--- a/sw/source/ui/dialog/ascfldlg.cxx
+++ b/sw/source/ui/dialog/ascfldlg.cxx
@@ -394,11 +394,10 @@ IMPL_LINK( SwAsciiFilterDlg, CharSetSelHdl, SvxTextEncodingBox*, pBox )
     return 0;
 }
 
-IMPL_LINK( SwAsciiFilterDlg, LineEndHdl, RadioButton*, pBtn )
+IMPL_LINK_TYPED( SwAsciiFilterDlg, LineEndHdl, RadioButton&, rBtn, void )
 {
     if( m_bSaveLineStatus )
-        pBtn->SaveValue();
-    return 0;
+        rBtn.SaveValue();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/ascfldlg.hxx b/sw/source/uibase/inc/ascfldlg.hxx
index b7e6938..bd2b822 100644
--- a/sw/source/uibase/inc/ascfldlg.hxx
+++ b/sw/source/uibase/inc/ascfldlg.hxx
@@ -43,7 +43,7 @@ class SwAsciiFilterDlg : public SfxModalDialog
     bool                m_bSaveLineStatus;
 
     DECL_LINK( CharSetSelHdl, SvxTextEncodingBox* );
-    DECL_LINK( LineEndHdl, RadioButton* );
+    DECL_LINK_TYPED( LineEndHdl, RadioButton&, void );
     void SetCRLF( LineEnd eEnd );
     LineEnd GetCRLF() const;
 
diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx
index 65fbc59..198bc0f 100644
--- a/vcl/inc/printdlg.hxx
+++ b/vcl/inc/printdlg.hxx
@@ -243,11 +243,12 @@ namespace vcl
         DECL_LINK( SelectHdl, ListBox* );
         DECL_LINK_TYPED( ClickHdl, Button*, void );
         DECL_LINK( ToggleHdl, void* );
+        DECL_LINK_TYPED( ToggleRadioHdl, RadioButton&, void );
         DECL_LINK( ModifyHdl, Edit* );
         DECL_LINK( UIOptionsChanged, void* );
 
         DECL_LINK( UIOption_CheckHdl, CheckBox* );
-        DECL_LINK( UIOption_RadioHdl, RadioButton* );
+        DECL_LINK_TYPED( UIOption_RadioHdl, RadioButton&, void );
         DECL_LINK( UIOption_SelectHdl, ListBox* );
         DECL_LINK( UIOption_ModifyHdl, Edit* );
 
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 59fb68a..a9e616b 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2636,7 +2636,7 @@ bool RadioButton::PreNotify( NotifyEvent& rNEvt )
 
 void RadioButton::Toggle()
 {
-    ImplCallEventListenersAndHandler( VCLEVENT_RADIOBUTTON_TOGGLE, [this] () { maToggleHdl.Call(this); } );
+    ImplCallEventListenersAndHandler( VCLEVENT_RADIOBUTTON_TOGGLE, [this] () { maToggleHdl.Call(*this); } );
 }
 
 bool RadioButton::SetModeRadioImage( const Image& rImage )
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index acde652..37fbfdc 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -680,7 +680,7 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC
     maOptionsPage.mpPapersizeFromSetup->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) );
     maJobPage.mpReverseOrderBox->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) );
     maOptionsPage.mpCollateSingleJobsBox->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) );
-    maNUpPage.mpPagesBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) );
+    maNUpPage.mpPagesBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleRadioHdl ) );
     // setup modify hdl
     mpPageEdit->SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
     maJobPage.mpCopyCountField->SetModifyHdl( LINK( this, PrintDialog, ModifyHdl ) );
@@ -1006,7 +1006,7 @@ void PrintDialog::setupOptionalUI()
                 pVal->Value >>= bVal;
             maNUpPage.mpBrochureBtn->Check( bVal );
             maNUpPage.mpBrochureBtn->Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != NULL );
-            maNUpPage.mpBrochureBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleHdl ) );
+            maNUpPage.mpBrochureBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleRadioHdl ) );
 
             maPropertyToWindowMap[ aPropertyName ].push_back( maNUpPage.mpBrochureBtn );
             maControlToPropertyMap[maNUpPage.mpBrochureBtn] = aPropertyName;
@@ -1546,6 +1546,11 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox )
     return 0;
 }
 
+IMPL_LINK_TYPED( PrintDialog, ToggleRadioHdl, RadioButton&, rButton, void )
+{
+    ClickHdl(static_cast<Button*>(&rButton));
+}
+
 IMPL_LINK( PrintDialog, ToggleHdl, void*, pButton )
 {
     ClickHdl(static_cast<Button*>(pButton));
@@ -1774,18 +1779,18 @@ IMPL_LINK( PrintDialog, UIOption_CheckHdl, CheckBox*, i_pBox )
     return 0;
 }
 
-IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn )
+IMPL_LINK_TYPED( PrintDialog, UIOption_RadioHdl, RadioButton&, i_rBtn, void )
 {
     // this handler gets called for all radiobuttons that get unchecked, too
     // however we only want one notificaction for the new value (that is for
     // the button that gets checked)
-    if( i_pBtn->IsChecked() )
+    if( i_rBtn.IsChecked() )
     {
-        PropertyValue* pVal = getValueForWindow( i_pBtn );
-        auto it = maControlToNumValMap.find( i_pBtn );
+        PropertyValue* pVal = getValueForWindow( &i_rBtn );
+        auto it = maControlToNumValMap.find( &i_rBtn );
         if( pVal && it != maControlToNumValMap.end() )
         {
-            makeEnabled( i_pBtn );
+            makeEnabled( &i_rBtn );
 
             sal_Int32 nVal = it->second;
             pVal->Value <<= nVal;
@@ -1800,7 +1805,6 @@ IMPL_LINK( PrintDialog, UIOption_RadioHdl, RadioButton*, i_pBtn )
             preparePreview();
         }
     }
-    return 0;
 }
 
 IMPL_LINK( PrintDialog, UIOption_SelectHdl, ListBox*, i_pBox )


More information about the Libreoffice-commits mailing list