From 3c99f8500f657ed84b316390d5175a6f5e56bc69 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 4 Oct 2015 15:05:38 +0200 Subject: convert Link<> to typed Change-Id: Iec15042138e0715459b2c9e872a7464d75a6b1eb Reviewed-on: https://gerrit.libreoffice.org/19305 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- dbaccess/source/ui/dlg/generalpage.cxx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'dbaccess/source/ui/dlg/generalpage.cxx') diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 7286e93acb0c..23ecc2a54ed3 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -406,14 +406,14 @@ namespace dbaui OGenericAdministrationPage::Reset(_rCoreAttrs); } - IMPL_LINK( OGeneralPageWizard, OnEmbeddedDBTypeSelected, ListBox*, _pBox ) + IMPL_LINK_TYPED( OGeneralPageWizard, OnEmbeddedDBTypeSelected, ListBox&, _rBox, void ) { // get the type from the entry data - const sal_Int32 nSelected = _pBox->GetSelectEntryPos(); + const sal_Int32 nSelected = _rBox.GetSelectEntryPos(); if (static_cast(nSelected) >= m_aEmbeddedURLPrefixes.size() ) { SAL_WARN("dbaccess.ui.OGeneralPage", "Got out-of-range value '" << nSelected << "' from the DatasourceType selection ListBox's GetSelectEntryPos(): no corresponding URL prefix"); - return 0L; + return; } const OUString sURLPrefix = m_aEmbeddedURLPrefixes[ nSelected ]; @@ -423,17 +423,17 @@ namespace dbaui // tell the listener we were modified callModifiedHdl(); // outta here - return 0L; + return; } - IMPL_LINK( OGeneralPage, OnDatasourceTypeSelected, ListBox*, _pBox ) + IMPL_LINK_TYPED( OGeneralPage, OnDatasourceTypeSelected, ListBox&, _rBox, void ) { // get the type from the entry data - const sal_Int32 nSelected = _pBox->GetSelectEntryPos(); + const sal_Int32 nSelected = _rBox.GetSelectEntryPos(); if (static_cast(nSelected) >= m_aURLPrefixes.size() ) { SAL_WARN("dbaccess.ui.OGeneralPage", "Got out-of-range value '" << nSelected << "' from the DatasourceType selection ListBox's GetSelectEntryPos(): no corresponding URL prefix"); - return 0L; + return; } const OUString sURLPrefix = m_aURLPrefixes[ nSelected ]; @@ -442,8 +442,6 @@ namespace dbaui onTypeSelected( sURLPrefix ); // tell the listener we were modified callModifiedHdl(); - // outta here - return 0L; } // OGeneralPageDialog @@ -704,20 +702,19 @@ namespace dbaui if ( m_aCreationModeHandler.IsSet() ) m_aCreationModeHandler.Call( *this ); - OnEmbeddedDBTypeSelected( m_pEmbeddedDBType ); + OnEmbeddedDBTypeSelected( *m_pEmbeddedDBType ); } IMPL_LINK_NOARG_TYPED( OGeneralPageWizard, OnSetupModeSelected, Button*, void ) { if ( m_aCreationModeHandler.IsSet() ) m_aCreationModeHandler.Call( *this ); - OnDatasourceTypeSelected(m_pDatasourceType); + OnDatasourceTypeSelected(*m_pDatasourceType); } - IMPL_LINK( OGeneralPageWizard, OnDocumentSelected, ListBox*, /*_pBox*/ ) + IMPL_LINK_NOARG_TYPED( OGeneralPageWizard, OnDocumentSelected, ListBox&, void ) { m_aDocumentSelectionHandler.Call( *this ); - return 0L; } IMPL_LINK_NOARG_TYPED( OGeneralPageWizard, OnOpenDocument, Button*, void ) -- cgit