diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-10-04 15:05:38 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-12 10:48:13 +0000 |
commit | 3c99f8500f657ed84b316390d5175a6f5e56bc69 (patch) | |
tree | 749f16652560a50d409b12a23bf1a5d93b3cd2d5 /dbaccess | |
parent | bbadb38539eb233ac45b267034066a7274181c65 (diff) |
convert Link<> to typed
Change-Id: Iec15042138e0715459b2c9e872a7464d75a6b1eb
Reviewed-on: https://gerrit.libreoffice.org/19305
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess')
30 files changed, 92 insertions, 80 deletions
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index fbe4ddc8d587..500f7dfeb471 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -517,7 +517,7 @@ void OFieldDescControl::SetControlText( sal_uInt16 nControlId, const OUString& r OUString sOld = pBoolDefault->GetSelectEntry(); pBoolDefault->SelectEntry(rText); if (sOld != rText) - LINK(this, OFieldDescControl, ChangeHdl).Call(pBoolDefault); + LINK(this, OFieldDescControl, ChangeHdl).Call(*pBoolDefault); } break; case FIELD_PROPERTY_DEFAULT: @@ -549,7 +549,7 @@ void OFieldDescControl::SetControlText( sal_uInt16 nControlId, const OUString& r OUString sOld = pAutoIncrement->GetSelectEntry(); pAutoIncrement->SelectEntry(rText); if (sOld != rText) - LINK(this, OFieldDescControl, ChangeHdl).Call(pAutoIncrement); + LINK(this, OFieldDescControl, ChangeHdl).Call(*pAutoIncrement); } break; @@ -622,16 +622,16 @@ void OFieldDescControl::SetModified(bool /*bModified*/) { } -IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) +IMPL_LINK_TYPED( OFieldDescControl, ChangeHdl, ListBox&, rListBox, void ) { if ( !pActFieldDescr ) - return 0; + return; - if ( pListBox->IsValueChangedFromSaved() ) + if ( rListBox.IsValueChangedFromSaved() ) SetModified(true); // Special treatment for Bool fields - if(pListBox == pRequired && pBoolDefault ) + if(&rListBox == pRequired && pBoolDefault ) { // If pRequired = sal_True then the sal_Bool field must NOT contain <<none>> OUString sDef = BoolStringUI(::comphelper::getString(pActFieldDescr->GetControlDefault())); @@ -652,9 +652,9 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) } // A special treatment only for AutoIncrement - if (pListBox == pAutoIncrement) + if (&rListBox == pAutoIncrement) { - if(pListBox->GetSelectEntryPos() == 1) + if(rListBox.GetSelectEntryPos() == 1) { // no DeactivateAggregate( tpAutoIncrementValue ); if(pActFieldDescr->IsPrimaryKey()) @@ -682,7 +682,7 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) ArrangeAggregates(); } - if(pListBox == m_pType) + if(&rListBox == m_pType) { TOTypeInfoSP pTypeInfo = getTypeInfo(m_pType->GetSelectEntryPos()); pActFieldDescr->FillFromTypeInfo(pTypeInfo,true,false); // SetType(pTypeInfo); @@ -690,8 +690,6 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) DisplayData(pActFieldDescr); CellModified(-1, m_pType->GetPos()); } - - return 0; } // Rearrange all Controls, such that they are in fixed order and really on top diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 20c906f96441..771266a5cfe6 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -454,7 +454,7 @@ namespace dbaui lateUIInit(); - Link<> aLink(LINK(this, OTableListBoxControl, OnTableChanged)); + Link<ListBox&,void> aLink(LINK(this, OTableListBoxControl, OnTableChanged)); m_pLeftTable->SetSelectHdl(aLink); m_pRightTable->SetSelectHdl(aLink); } @@ -514,9 +514,9 @@ namespace dbaui m_pLeftTable->GrabFocus(); } - IMPL_LINK( OTableListBoxControl, OnTableChanged, ListBox*, pListBox ) + IMPL_LINK_TYPED( OTableListBoxControl, OnTableChanged, ListBox&, rListBox, void ) { - OUString strSelected(pListBox->GetSelectEntry()); + OUString strSelected(rListBox.GetSelectEntry()); OTableWindow* pLeft = NULL; OTableWindow* pRight = NULL; @@ -524,7 +524,7 @@ namespace dbaui if ( m_pTableMap->size() == 2 ) { ListBox* pOther; - if (pListBox == m_pLeftTable) + if (&rListBox == m_pLeftTable) pOther = m_pRightTable; else pOther = m_pLeftTable; @@ -555,7 +555,7 @@ namespace dbaui pLoop = aFind->second; OSL_ENSURE(pLoop != NULL, "ORelationDialog::OnTableChanged: invalid ListBox entry!"); // We need to find strSelect, because we filled the ListBoxes with the table names with which we compare now - if (pListBox == m_pLeftTable) + if (&rListBox == m_pLeftTable) { // Insert the previously selected Entry on the left side on the right side m_pRightTable->InsertEntry(m_strCurrentLeft); @@ -588,12 +588,11 @@ namespace dbaui } } - pListBox->GrabFocus(); + rListBox.GrabFocus(); m_pRC_Tables->setWindowTables(pLeft,pRight); NotifyCellChange(); - return 0; } void OTableListBoxControl::NotifyCellChange() diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 8139d8805b83..bbe4db6bfbb6 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -99,7 +99,7 @@ namespace dbaui m_pFieldSeparator->SetSelectHdl(getControlModifiedLink()); m_pTextSeparator->SetUpdateDataHdl(getControlModifiedLink()); m_pTextSeparator->SetSelectHdl(getControlModifiedLink()); - m_pCharSet->SetSelectHdl(getControlModifiedLink()); + m_pCharSet->SetSelectHdl(LINK(this, OTextConnectionHelper, CharsetSelectHdl)); m_pFieldSeparator->SetModifyHdl(getControlModifiedLink()); m_pTextSeparator->SetModifyHdl(getControlModifiedLink()); @@ -151,6 +151,11 @@ namespace dbaui Show(); } + IMPL_LINK_TYPED(OTextConnectionHelper, CharsetSelectHdl, ListBox&, rListBox, void) + { + getControlModifiedLink().Call(&rListBox); + } + OTextConnectionHelper::~OTextConnectionHelper() { disposeOnce(); diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx index 6a2f1d90f8fb..89474ed541b1 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx @@ -85,6 +85,7 @@ namespace dbaui DECL_LINK_TYPED(OnSetExtensionHdl,RadioButton&,void); DECL_LINK(OnControlModified,Control*); DECL_LINK(OnEditModified,Edit*); + DECL_LINK_TYPED(CharsetSelectHdl,ListBox&,void); private: OUString GetSeparator( const ComboBox& rBox, const OUString& rList ); diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index e4a7c8d46e9a..023bccd470e9 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -275,13 +275,12 @@ IMPL_LINK_TYPED( OUserAdmin, UserHdl, Button *, pButton, void ) } } -IMPL_LINK( OUserAdmin, ListDblClickHdl, ListBox *, /*pListBox*/ ) +IMPL_LINK_NOARG_TYPED( OUserAdmin, ListDblClickHdl, ListBox&, void ) { m_TableCtrl->setUserName(GetUser()); m_TableCtrl->UpdateTables(); m_TableCtrl->DeactivateCell(); m_TableCtrl->ActivateCell(m_TableCtrl->GetCurRow(),m_TableCtrl->GetCurColumnId()); - return 0; } OUString OUserAdmin::GetUser() diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx index 7e5682103130..6cf91135bb7c 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.hxx +++ b/dbaccess/source/ui/dlg/UserAdmin.hxx @@ -55,7 +55,7 @@ protected: OUString m_UserName; // methods - DECL_LINK( ListDblClickHdl, ListBox * ); + DECL_LINK_TYPED( ListDblClickHdl, ListBox&, void ); DECL_LINK_TYPED( UserHdl, Button *, void ); void FillUserNames(); diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 2c2dbbef65d7..513d939a0073 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -120,7 +120,7 @@ namespace dbaui get(m_pBooleanComparisonModeLabel, "comparisonft"); get(m_pBooleanComparisonMode, "comparison"); m_pBooleanComparisonMode->SetDropDownLineCount( 4 ); - m_pBooleanComparisonMode->SetSelectHdl( getControlModifiedLink() ); + m_pBooleanComparisonMode->SetSelectHdl( LINK(this, SpecialSettingsPage, BooleanComparisonSelectHdl) ); m_pBooleanComparisonModeLabel->Show(); m_pBooleanComparisonMode->Show(); } @@ -136,6 +136,11 @@ namespace dbaui } } + IMPL_LINK_TYPED(SpecialSettingsPage, BooleanComparisonSelectHdl, ListBox&, rListBox, void) + { + getControlModifiedLink().Call(&rListBox); + } + SpecialSettingsPage::~SpecialSettingsPage() { disposeOnce(); diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx index b6054d413a55..9d31cd4f2918 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hxx +++ b/dbaccess/source/ui/dlg/advancedsettings.hxx @@ -91,6 +91,7 @@ namespace dbaui private: void impl_initBooleanSettings(); + DECL_LINK_TYPED(BooleanComparisonSelectHdl, ListBox&, void); }; // GeneratedValuesPage diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index f86314a3155b..26fe737feb97 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -243,10 +243,9 @@ IMPL_LINK_NOARG_TYPED( ODbaseIndexDialog, RemoveAllClickHdl, Button*, void ) checkButtons(); } -IMPL_LINK( ODbaseIndexDialog, OnListEntrySelected, ListBox*, /*NOTINTERESTEDIN*/ ) +IMPL_LINK_NOARG_TYPED( ODbaseIndexDialog, OnListEntrySelected, ListBox&, void ) { checkButtons(); - return 0; } IMPL_LINK( ODbaseIndexDialog, TableSelectHdl, ComboBox*, pComboBox ) diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx index be5ac35d6b7e..9cf8ac1ada4c 100644 --- a/dbaccess/source/ui/dlg/dbfindex.hxx +++ b/dbaccess/source/ui/dlg/dbfindex.hxx @@ -89,7 +89,7 @@ protected: DECL_LINK_TYPED( AddAllClickHdl, Button*, void ); DECL_LINK_TYPED( RemoveAllClickHdl, Button*, void ); DECL_LINK_TYPED( OKClickHdl, Button*, void ); - DECL_LINK( OnListEntrySelected, ListBox* ); + DECL_LINK_TYPED( OnListEntrySelected, ListBox&, void ); OUString m_aDSN; TableInfoList m_aTableInfoList; diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 18943cbf3c26..bf8d8569ad18 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -90,10 +90,15 @@ namespace dbaui m_pCharsetLabel->Show(); m_pCharset = get<CharSetListBox>("charset"); m_pCharset->Show(); - m_pCharset->SetSelectHdl(getControlModifiedLink()); + m_pCharset->SetSelectHdl(LINK(this, OCommonBehaviourTabPage, CharsetSelectHdl)); } } + IMPL_LINK_TYPED(OCommonBehaviourTabPage, CharsetSelectHdl, ListBox&, rListBox, void) + { + getControlModifiedLink().Call(&rListBox); + } + OCommonBehaviourTabPage::~OCommonBehaviourTabPage() { disposeOnce(); diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index 7ab4d970a469..c035af296823 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -82,6 +82,8 @@ namespace dbaui // <method>OGenericAdministrationPage::fillWindows</method> virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) SAL_OVERRIDE; + private: + DECL_LINK_TYPED(CharsetSelectHdl, ListBox&, void); }; // ODbaseDetailsPage diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 30885ab5cc5f..7647308875a8 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -328,7 +328,7 @@ namespace dbaui executeCurrent(); } - IMPL_LINK_NOARG( DirectSQLDialog, OnListEntrySelected ) + IMPL_LINK_NOARG_TYPED( DirectSQLDialog, OnListEntrySelected, ListBox&, void ) { if (!m_pSQLHistory->IsTravelSelect()) { @@ -336,7 +336,6 @@ namespace dbaui if (LISTBOX_ENTRY_NOTFOUND != nSelected) switchToHistory(nSelected, false); } - return 0L; } } // namespace dbaui 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<size_t>(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<size_t>(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 ) diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index f7f05720f4e0..5330cc8fab65 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -97,7 +97,7 @@ namespace dbaui /// sets the title of the parent dialog virtual void setParentTitle( const OUString& _sURLPrefix ); - DECL_LINK(OnDatasourceTypeSelected, ListBox*); + DECL_LINK_TYPED(OnDatasourceTypeSelected, ListBox&, void); }; // OGeneralPageDialog @@ -185,10 +185,10 @@ namespace dbaui void initializeEmbeddedDBList(); protected: - DECL_LINK( OnEmbeddedDBTypeSelected, ListBox* ); + DECL_LINK_TYPED( OnEmbeddedDBTypeSelected, ListBox&, void ); DECL_LINK_TYPED( OnCreateDatabaseModeSelected, Button*, void ); DECL_LINK_TYPED( OnSetupModeSelected, Button*, void ); - DECL_LINK( OnDocumentSelected, ListBox* ); + DECL_LINK_TYPED( OnDocumentSelected, ListBox&, void ); DECL_LINK_TYPED( OnOpenDocument, Button*, void ); }; diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index 235393ae249c..975b96a4b090 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -406,8 +406,9 @@ namespace dbaui } } - IMPL_LINK( IndexFieldsControl, OnListEntrySelected, ListBox*, _pBox ) + IMPL_LINK( IndexFieldsControl, OnListEntrySelected, void*, p ) { + ListBox* _pBox = static_cast<ListBox*>(p); if (!_pBox->IsTravelSelect() && m_aModifyHdl.IsSet()) m_aModifyHdl.Call(this); diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 2a8fedd2607a..6c6edc6964a8 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -130,7 +130,7 @@ namespace dbaui void OParameterDialog::Construct() { - m_pAllParams->SetSelectHdl(LINK(this, OParameterDialog, OnEntrySelected)); + m_pAllParams->SetSelectHdl(LINK(this, OParameterDialog, OnEntryListBoxSelected)); m_pParam->SetLoseFocusHdl(LINK(this, OParameterDialog, OnValueLoseFocusHdl)); m_pParam->SetModifyHdl(LINK(this, OParameterDialog, OnValueModified)); m_pTravelNext->SetClickHdl(LINK(this, OParameterDialog, OnButtonClicked)); @@ -140,7 +140,7 @@ namespace dbaui if (m_pAllParams->GetEntryCount()) { m_pAllParams->SelectEntryPos(0); - LINK(this, OParameterDialog, OnEntrySelected).Call(m_pAllParams); + OnEntrySelected(); if (m_pAllParams->GetEntryCount() == 1) { @@ -226,7 +226,7 @@ namespace dbaui else if (m_pOKBtn == pButton) { // transfer the current values into the Any - if (LINK(this, OParameterDialog, OnEntrySelected).Call(m_pAllParams) != 0L) + if (OnEntrySelected()) { // there was an error interpreting the current text m_bNeedErrorOnCurrent = true; // we're are out of the complex web :) of direct and indirect calls to OnValueLoseFocus now, @@ -277,7 +277,7 @@ namespace dbaui nNext = (nCurrent + 1) % nCount; m_pAllParams->SelectEntryPos(nNext); - LINK(this, OParameterDialog, OnEntrySelected).Call(m_pAllParams); + OnEntrySelected(); m_bNeedErrorOnCurrent = true; // we're are out of the complex web :) of direct and indirect calls to OnValueLoseFocus now, // so the next time it is called we need an error message, again .... @@ -285,7 +285,12 @@ namespace dbaui } } - IMPL_LINK(OParameterDialog, OnEntrySelected, ListBox*, /*pList*/) + IMPL_LINK_NOARG_TYPED(OParameterDialog, OnEntryListBoxSelected, ListBox&, void) + { + OnEntrySelected(); + } + + bool OParameterDialog::OnEntrySelected() { if (m_aResetVisitFlag.IsActive()) { @@ -299,7 +304,7 @@ namespace dbaui if (OnValueLoseFocus()) { // there was an error interpreting the text m_pAllParams->SelectEntryPos(m_nCurrentlySelected); - return 1L; + return true; } m_aFinalValues[m_nCurrentlySelected].Value <<= OUString(m_pParam->GetText()); @@ -319,7 +324,7 @@ namespace dbaui m_aResetVisitFlag.SetTimeout(1000); m_aResetVisitFlag.Start(); - return 0L; + return false; } IMPL_LINK_NOARG_TYPED(OParameterDialog, OnVisitedTimeout, Timer*, void) diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 764ce8ff2042..46cab6256d30 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -551,7 +551,7 @@ void DlgFilterCrit::SetLine( sal_uInt16 nIdx,const PropertyValue& _rItem,bool _b sName = _rItem.Name; // select the appropriate field name SelectField( *pColumnListControl, sName ); - ListSelectHdl( pColumnListControl ); + ListSelectHdl( *pColumnListControl ); // select the appropriate condition pPredicateListControl->SelectEntryPos( GetSelectionPos( (sal_Int32)_rItem.Handle, *pPredicateListControl ) ); @@ -681,16 +681,16 @@ void DlgFilterCrit::EnableLines() m_pET_WHEREVALUE3->Disable(); } -IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox ) +IMPL_LINK_TYPED( DlgFilterCrit, ListSelectHdl, ListBox&, rListBox, void ) { OUString aName; ListBox* pComp; - if(pListBox == m_pLB_WHEREFIELD1) + if(&rListBox == m_pLB_WHEREFIELD1) { aName = LbText(*m_pLB_WHEREFIELD1); pComp = m_pLB_WHERECOMP1; } - else if(pListBox == m_pLB_WHEREFIELD2) + else if(&rListBox == m_pLB_WHEREFIELD2) { aName = LbText(*m_pLB_WHEREFIELD2); pComp = m_pLB_WHERECOMP2; @@ -736,13 +736,11 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox ) pComp->SelectEntryPos(0); EnableLines(); - return 0; } -IMPL_LINK( DlgFilterCrit, ListSelectCompHdl, ListBox *, /*pListBox*/ ) +IMPL_LINK_NOARG_TYPED( DlgFilterCrit, ListSelectCompHdl, ListBox&, void ) { EnableLines(); - return 0; } void DlgFilterCrit::BuildWherePart() diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index d04714332942..9d7ff34d15c9 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -143,10 +143,9 @@ void DlgOrderCrit::dispose() ModalDialog::dispose(); } -IMPL_LINK( DlgOrderCrit, FieldListSelectHdl, ListBox *, /*pListBox*/ ) +IMPL_LINK_NOARG_TYPED( DlgOrderCrit, FieldListSelectHdl, ListBox&, void ) { EnableLines(); - return 0; } void DlgOrderCrit::impl_initializeOrderList_nothrow() diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx index f5fefbd3033a..fdbe72116fd4 100644 --- a/dbaccess/source/ui/inc/FieldDescControl.hxx +++ b/dbaccess/source/ui/inc/FieldDescControl.hxx @@ -117,7 +117,7 @@ namespace dbaui DECL_LINK_TYPED( OnScroll, ScrollBar*, void); DECL_LINK_TYPED( FormatClickHdl, Button *, void ); - DECL_LINK( ChangeHdl, ListBox * ); + DECL_LINK_TYPED( ChangeHdl, ListBox&, void ); // used by ActivatePropertyField DECL_LINK_TYPED( OnControlFocusLost, Control&, void ); diff --git a/dbaccess/source/ui/inc/RelationControl.hxx b/dbaccess/source/ui/inc/RelationControl.hxx index 12973d55b9f5..fc23f23ab900 100644 --- a/dbaccess/source/ui/inc/RelationControl.hxx +++ b/dbaccess/source/ui/inc/RelationControl.hxx @@ -41,7 +41,7 @@ namespace dbaui OUString m_strCurrentLeft; OUString m_strCurrentRight; private: - DECL_LINK( OnTableChanged, ListBox* ); + DECL_LINK_TYPED( OnTableChanged, ListBox&, void ); public: OTableListBoxControl(VclBuilderContainer* _pParent, const OJoinTableView::OTableWindowMap* _pTableMap, diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx index e8778521e50a..e25a0c148b99 100644 --- a/dbaccess/source/ui/inc/WTypeSelect.hxx +++ b/dbaccess/source/ui/inc/WTypeSelect.hxx @@ -91,7 +91,7 @@ namespace dbaui friend class OWizTypeSelectControl; friend class OWizTypeSelectList; - DECL_LINK( ColumnSelectHdl, MultiListBox* ); + DECL_LINK_TYPED( ColumnSelectHdl, ListBox&, void ); DECL_LINK_TYPED( ButtonClickHdl, Button *, void ); protected: VclPtr<OWizTypeSelectList> m_pColumnNames; diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx index 972261f59822..8b0e4a1a2163 100644 --- a/dbaccess/source/ui/inc/directsql.hxx +++ b/dbaccess/source/ui/inc/directsql.hxx @@ -88,7 +88,7 @@ namespace dbaui DECL_LINK_TYPED( OnExecute, Button*, void ); DECL_LINK_TYPED( OnClose, void*, void ); DECL_LINK_TYPED( OnCloseClick, Button*, void ); - DECL_LINK( OnListEntrySelected, void* ); + DECL_LINK_TYPED( OnListEntrySelected, ListBox&, void ); DECL_LINK( OnStatementModified, void* ); private: diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx index 53229d06ed56..207fd9cf6266 100644 --- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx +++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx @@ -84,7 +84,7 @@ namespace dbaui bool isNewField() const { return GetCurRow() >= (sal_Int32)m_aFields.size(); } - DECL_LINK( OnListEntrySelected, ListBox* ); + DECL_LINK( OnListEntrySelected, void* ); private: using ::svt::EditBrowseBox::Init; diff --git a/dbaccess/source/ui/inc/paramdialog.hxx b/dbaccess/source/ui/inc/paramdialog.hxx index bf73aa551cda..19addb46e505 100644 --- a/dbaccess/source/ui/inc/paramdialog.hxx +++ b/dbaccess/source/ui/inc/paramdialog.hxx @@ -95,10 +95,11 @@ namespace dbaui private: DECL_LINK_TYPED(OnVisitedTimeout, Timer*, void); DECL_LINK(OnValueModified, Control*); - DECL_LINK(OnEntrySelected, ListBox*); + DECL_LINK_TYPED(OnEntryListBoxSelected, ListBox&, void); DECL_LINK_TYPED(OnButtonClicked, Button*, void); DECL_LINK_TYPED(OnValueLoseFocusHdl, Control&, void); bool OnValueLoseFocus(); + bool OnEntrySelected(); }; } // namespace dbaui diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx index d09f69064bf3..3347734bfcd0 100644 --- a/dbaccess/source/ui/inc/queryfilter.hxx +++ b/dbaccess/source/ui/inc/queryfilter.hxx @@ -91,8 +91,8 @@ namespace dbaui ::dbtools::OPredicateInputController m_aPredicateInput; static void SelectField( ListBox& rBox, const OUString& rField ); - DECL_LINK( ListSelectHdl, ListBox * ); - DECL_LINK( ListSelectCompHdl, ListBox * ); + DECL_LINK_TYPED( ListSelectHdl, ListBox&, void ); + DECL_LINK_TYPED( ListSelectCompHdl, ListBox&, void ); void SetLine( sal_uInt16 nIdx,const css::beans::PropertyValue& _rItem,bool _bOr ); void EnableLines(); diff --git a/dbaccess/source/ui/inc/queryorder.hxx b/dbaccess/source/ui/inc/queryorder.hxx index 9e65263b038f..6b086812e1d9 100644 --- a/dbaccess/source/ui/inc/queryorder.hxx +++ b/dbaccess/source/ui/inc/queryorder.hxx @@ -75,7 +75,7 @@ namespace dbaui VclPtr<ListBox> m_aColumnList[DOG_ROWS]; VclPtr<ListBox> m_aValueList[DOG_ROWS]; - DECL_LINK( FieldListSelectHdl, ListBox * ); + DECL_LINK_TYPED( FieldListSelectHdl, ListBox&, void ); void EnableLines(); public: diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index aa7125916aeb..7b04c4913a10 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -281,7 +281,7 @@ OUString OWizTypeSelect::GetTitle() const return ModuleRes(STR_WIZ_TYPE_SELECT_TITEL); } -IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, /*pListBox*/ ) +IMPL_LINK_NOARG_TYPED( OWizTypeSelect, ColumnSelectHdl, ListBox&, void ) { OUString aColumnName( m_pColumnNames->GetSelectEntry() ); @@ -290,7 +290,6 @@ IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, /*pListBox*/ ) m_pTypeControl->DisplayData(pField); m_pTypeControl->Enable(m_pColumnNames->GetSelectEntryCount() == 1 ); - return 0; } void OWizTypeSelect::Reset() @@ -324,7 +323,7 @@ void OWizTypeSelect::ActivatePage( ) m_pColumnNames->SelectEntryPos(static_cast<sal_uInt16>(m_nDisplayRow)); m_nDisplayRow = 0; - m_pColumnNames->GetSelectHdl().Call(m_pColumnNames); + m_pColumnNames->GetSelectHdl().Call(*m_pColumnNames); } bool OWizTypeSelect::LeavePage() @@ -444,7 +443,7 @@ bool OWizTypeSelectList::PreNotify( NotifyEvent& rEvt ) } } } - GetSelectHdl().Call(this); + GetSelectHdl().Call(*this); } break; } diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx index 84c901cbd9a0..417b0b1a748c 100644 --- a/dbaccess/source/ui/querydesign/querydlg.cxx +++ b/dbaccess/source/ui/querydesign/querydlg.cxx @@ -153,10 +153,10 @@ void DlgQryJoin::dispose() ModalDialog::dispose(); } -IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) +IMPL_LINK_NOARG_TYPED( DlgQryJoin, LBChangeHdl, ListBox&, void ) { if (m_pLB_JoinType->GetSelectEntryPos() == m_pLB_JoinType->GetSavedValue() ) - return 1; + return; m_pLB_JoinType->SaveValue(); m_pML_HelpText->SetText(OUString()); @@ -237,7 +237,6 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) } m_pML_HelpText->SetText( sHelpText ); - return 1; } IMPL_LINK_NOARG_TYPED( DlgQryJoin, OKClickHdl, Button*, void ) @@ -325,7 +324,7 @@ void DlgQryJoin::setJoinType(EJoinType _eNewJoinType) } } - LBChangeHdl(m_pLB_JoinType); + LBChangeHdl(*m_pLB_JoinType); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx index eeb8fea63328..b69b7b9e0e3a 100644 --- a/dbaccess/source/ui/querydesign/querydlg.hxx +++ b/dbaccess/source/ui/querydesign/querydlg.hxx @@ -55,7 +55,7 @@ namespace dbaui DECL_LINK_TYPED( OKClickHdl, Button*, void ); - DECL_LINK( LBChangeHdl, ListBox* ); + DECL_LINK_TYPED( LBChangeHdl, ListBox&, void ); DECL_LINK_TYPED( NaturalToggleHdl, CheckBox&, void ); /** setJoinType enables and set the new join type |