From f4e951a61a20edd6efbd244966e851aa378e66ad Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 9 Sep 2015 11:41:20 +0200 Subject: convert Link<> to typed Change-Id: I603463d0486d4d0f21ebbdc6eca900db58bb090f --- 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 ++- 6 files changed, 15 insertions(+), 10 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 54ae2b4e6138..b8e744cbb373 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 2bdaef0aa384..4237fabec45f 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -232,7 +232,7 @@ namespace dbaui VclPtr m_pNATIVEDatabase; Link 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 a6b307dbed7e..8139d8805b83 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 135e4dc53102..6a2f1d90f8fb 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(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 da655cad39cc..39db714b11c9 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 c4e805cd6fc2..d1865751a3bf 100644 --- a/dbaccess/source/ui/dlg/admincontrols.hxx +++ b/dbaccess/source/ui/dlg/admincontrols.hxx @@ -47,9 +47,10 @@ namespace dbaui VclPtr m_pDefaultPort; VclPtr m_pSocket; VclPtr m_pNamedPipe; - + Link<> m_aControlModificationLink; ::svt::ControlDependencyManager m_aControlDependencies; + DECL_LINK_TYPED(RadioToggleHdl, RadioButton&, void); public: MySQLNativeSettings( vcl::Window& _rParent, const Link<>& _rControlModificationLink ); -- cgit