diff options
Diffstat (limited to 'dbaccess/source/ui')
24 files changed, 82 insertions, 78 deletions
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 554c289031c3..86338bf43bec 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -178,7 +178,7 @@ IMPL_LINK_NOARG_TYPED(OSqlEdit, OnInvalidateTimer, Timer *, void) m_timerInvalidate.Start(); } -IMPL_LINK_NOARG(OSqlEdit, ModifyHdl) +IMPL_LINK_NOARG_TYPED(OSqlEdit, ModifyHdl, Edit&, void) { if (m_timerUndoActionCreation.IsActive()) m_timerUndoActionCreation.Stop(); @@ -191,8 +191,6 @@ IMPL_LINK_NOARG(OSqlEdit, ModifyHdl) rController.InvalidateFeature(SID_SBA_QRY_EXECUTE); rController.InvalidateFeature(SID_CUT); rController.InvalidateFeature(SID_COPY); - - return 0; } void OSqlEdit::SetText(const OUString& rNewText) diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 93ac96e8bf62..d7bf779767a6 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -101,9 +101,9 @@ namespace dbaui get(m_pTestConnection, "connectionButton"); m_pConnectionURL->SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified)); - m_pJavaDriver->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); + m_pJavaDriver->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); m_pJavaDriver->SetModifyHdl(LINK(this, OConnectionTabPage, OnEditModified)); - m_pUserName->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); + m_pUserName->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); m_pPasswordRequired->SetClickHdl(LINK(this, OGenericAdministrationPage, OnControlModifiedClick)); m_pTestConnection->SetClickHdl(LINK(this,OGenericAdministrationPage,OnTestConnectionClickHdl)); @@ -210,7 +210,6 @@ namespace dbaui break; } - ; AuthenticationMode eAuthMode( DataSourceMetaData::getAuthentication( m_eType ) ); bool bShowUserAuthenfication = ( eAuthMode != AuthNone ); bool bShowUser = ( eAuthMode == AuthUserPwd ); @@ -321,15 +320,14 @@ namespace dbaui m_pTestConnection->Enable(bEnableTestConnection); return true; } - IMPL_LINK(OConnectionTabPage, OnEditModified, Edit*, _pEdit) + IMPL_LINK_TYPED(OConnectionTabPage, OnEditModified, Edit&, _rEdit, void) { - if ( _pEdit == m_pJavaDriver ) + if ( &_rEdit == m_pJavaDriver ) m_pTestJavaDriver->Enable( !m_pJavaDriver->GetText().trim().isEmpty() ); checkTestConnection(); // tell the listener we were modified callModifiedHdl(); - return 0L; } } // namespace dbaui diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx index bd2f3051ac5d..34003c4d51a4 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx @@ -53,7 +53,7 @@ namespace dbaui // called when the test connection button was clicked DECL_LINK_TYPED(OnTestJavaClickHdl, Button*, void); - DECL_LINK(OnEditModified, Edit*); + DECL_LINK_TYPED(OnEditModified, Edit&, void); public: virtual ~OConnectionTabPage(); diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index fd82603a2c3d..efb3b9b0c4e1 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -172,11 +172,10 @@ namespace dbaui return !m_pConnectionURL->IsVisible() || !m_pConnectionURL->GetTextNoPrefix().isEmpty(); } - IMPL_LINK(OConnectionTabPageSetup, OnEditModified, Edit*, /*_pEdit*/) + IMPL_LINK_NOARG_TYPED(OConnectionTabPageSetup, OnEditModified, Edit&, void) { SetRoadmapStateValue(checkTestConnection()); callModifiedHdl(); - return 0L; } } // namespace dbaui diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index 6b9284e65bac..14f5b1a889df 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -44,7 +44,7 @@ namespace dbaui VclPtr<FixedText> m_pHeaderText; // called when the test connection button was clicked - DECL_LINK(OnEditModified,Edit*); + DECL_LINK_TYPED(OnEditModified, Edit&, void); public: virtual ~OConnectionTabPageSetup(); diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 0a106c0d541d..45ddce7b195a 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -148,9 +148,9 @@ using namespace ::com::sun::star; get(m_pFTDefaultPortNumber, "portNumDefLabel"); get(m_pCBUseSSL, "useSSLCheckbutton"); - m_pETHostServer->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); - m_pETBaseDN->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); - m_pNFPortNumber->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); + m_pETHostServer->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); + m_pETBaseDN->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); + m_pNFPortNumber->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); m_pCBUseSSL->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) ); SetRoadmapStateValue(false); } @@ -405,11 +405,11 @@ using namespace ::com::sun::star; //TODO this code snippet is redundant m_pHeaderText->SetText(ModuleRes(_nHeaderTextResId)); - m_pETDatabasename->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); - m_pETHostname->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); - m_pNFPortNumber->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); + m_pETDatabasename->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); + m_pETHostname->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); + m_pNFPortNumber->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); - m_pETDriverClass->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); + m_pETDriverClass->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); m_pPBTestJavaDriver->SetClickHdl(LINK(this,OGeneralSpecialJDBCConnectionPageSetup,OnTestJavaClickHdl)); SFX_ITEMSET_GET(_rCoreAttrs, pUrlItem, SfxStringItem, DSID_CONNECTURL, true); @@ -679,14 +679,13 @@ using namespace ::com::sun::star; aMsg->Execute(); } - IMPL_LINK(OJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit) + IMPL_LINK_TYPED(OJDBCConnectionPageSetup, OnEditModified, Edit&, _rEdit, void) { - if ( _pEdit == m_pETDriverClass ) + if ( &_rEdit == m_pETDriverClass ) m_pPBTestJavaDriver->Enable( !m_pETDriverClass->GetText().isEmpty() ); SetRoadmapStateValue(checkTestConnection()); // tell the listener we were modified callModifiedHdl(); - return 0L; } VclPtr<OGenericAdministrationPage> OSpreadSheetConnectionPageSetup::CreateSpreadSheetTabPage( vcl::Window* pParent, const SfxItemSet& _rAttrSet ) @@ -750,7 +749,7 @@ using namespace ::com::sun::star; get(m_pETUserName, "generalUserNameEntry"); get(m_pCBPasswordRequired, "passRequiredCheckbutton"); get(m_pPBTestConnection, "testConnectionButton"); - m_pETUserName->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); + m_pETUserName->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); m_pCBPasswordRequired->SetClickHdl(LINK(this,OGenericAdministrationPage,OnControlModifiedClick)); m_pPBTestConnection->SetClickHdl(LINK(this,OGenericAdministrationPage,OnTestConnectionClickHdl)); diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx index b15356928a3d..684f9bc85ec2 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -189,7 +189,7 @@ namespace dbaui virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) override; DECL_LINK_TYPED(OnTestJavaClickHdl, Button*, void); - DECL_LINK(OnEditModified,Edit*); + DECL_LINK_TYPED(OnEditModified, Edit&, void); VclPtr<FixedText> m_pFTDriverClass; VclPtr<Edit> m_pETDriverClass; VclPtr<PushButton> m_pPBTestJavaDriver; diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 8c5ea57b9d44..9e13b93c50a7 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -95,16 +95,16 @@ namespace dbaui m_pTextSeparator->InsertEntry(m_aTextNone); // set the modify handlers - m_pFieldSeparator->SetUpdateDataHdl(getControlModifiedLink()); + m_pFieldSeparator->SetUpdateDataHdl(LINK(this, OTextConnectionHelper, OnControlEditModified)); m_pFieldSeparator->SetSelectHdl(LINK(this, OTextConnectionHelper, ComboBoxSelectHdl)); - m_pTextSeparator->SetUpdateDataHdl(getControlModifiedLink()); + m_pTextSeparator->SetUpdateDataHdl(LINK(this, OTextConnectionHelper, OnControlEditModified)); m_pTextSeparator->SetSelectHdl(LINK(this, OTextConnectionHelper, ComboBoxSelectHdl)); m_pCharSet->SetSelectHdl(LINK(this, OTextConnectionHelper, CharsetSelectHdl)); - m_pFieldSeparator->SetModifyHdl(getControlModifiedLink()); - m_pTextSeparator->SetModifyHdl(getControlModifiedLink()); - m_pDecimalSeparator->SetModifyHdl(getControlModifiedLink()); - m_pThousandsSeparator->SetModifyHdl(getControlModifiedLink()); + m_pFieldSeparator->SetModifyHdl(LINK(this, OTextConnectionHelper, OnControlEditModified)); + m_pTextSeparator->SetModifyHdl(LINK(this, OTextConnectionHelper, OnControlEditModified)); + m_pDecimalSeparator->SetModifyHdl(LINK(this, OTextConnectionHelper, OnControlEditModified)); + m_pThousandsSeparator->SetModifyHdl(LINK(this, OTextConnectionHelper, OnControlEditModified)); m_pOwnExtension->SetModifyHdl(LINK(this, OTextConnectionHelper, OnEditModified)); m_pAccessTextFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); m_pAccessCSVFiles->SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); @@ -161,6 +161,11 @@ namespace dbaui getControlModifiedLink().Call(&rBox); } + IMPL_LINK_TYPED(OTextConnectionHelper, OnControlEditModified, Edit&, rEdit, void) + { + getControlModifiedLink().Call(&rEdit); + } + OTextConnectionHelper::~OTextConnectionHelper() { disposeOnce(); @@ -196,10 +201,9 @@ namespace dbaui return 0L; } - IMPL_LINK(OTextConnectionHelper, OnEditModified, Edit*, /*_pEdit*/) + IMPL_LINK_NOARG_TYPED(OTextConnectionHelper, OnEditModified, Edit&, void) { m_aGetExtensionHandler.Call(this); - return 0L; } IMPL_LINK_NOARG_TYPED(OTextConnectionHelper, OnSetExtensionHdl, RadioButton&, void) diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx index 752ccbf22346..625758ba21ce 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx @@ -84,7 +84,8 @@ namespace dbaui Link<> getControlModifiedLink() { return LINK(this, OTextConnectionHelper, OnControlModified); } DECL_LINK_TYPED(OnSetExtensionHdl,RadioButton&,void); DECL_LINK(OnControlModified,Control*); - DECL_LINK(OnEditModified,Edit*); + DECL_LINK_TYPED(OnControlEditModified, Edit&, void); + DECL_LINK_TYPED(OnEditModified, Edit&, void); DECL_LINK_TYPED(CharsetSelectHdl,ListBox&,void); DECL_LINK_TYPED(ComboBoxSelectHdl,ComboBox&,void); diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index 65febc17a78c..954a530c63fc 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -58,7 +58,7 @@ class OPasswordDialog : public ModalDialog VclPtr<OKButton> m_pOKBtn; DECL_LINK_TYPED( OKHdl_Impl, Button*, void ); - DECL_LINK( ModifiedHdl, Edit * ); + DECL_LINK_TYPED( ModifiedHdl, Edit&, void ); public: OPasswordDialog( vcl::Window* pParent,const OUString& _sUserName); @@ -110,10 +110,9 @@ IMPL_LINK_NOARG_TYPED(OPasswordDialog, OKHdl_Impl, Button*, void) } } -IMPL_LINK( OPasswordDialog, ModifiedHdl, Edit *, pEdit ) +IMPL_LINK_TYPED( OPasswordDialog, ModifiedHdl, Edit&, rEdit, void ) { - m_pOKBtn->Enable(!pEdit->GetText().isEmpty()); - return 0; + m_pOKBtn->Enable(!rEdit.GetText().isEmpty()); } // OUserAdmin diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx index 88617c12eb55..521c5cccec56 100644 --- a/dbaccess/source/ui/dlg/admincontrols.cxx +++ b/dbaccess/source/ui/dlg/admincontrols.cxx @@ -143,11 +143,11 @@ namespace dbaui get(m_pSocket, "socket"); get(m_pNamedPipe, "namedpipe"); - m_pDatabaseName->SetModifyHdl( _rControlModificationLink ); - m_pHostName->SetModifyHdl( _rControlModificationLink ); - m_pPort->SetModifyHdl( _rControlModificationLink ); - m_pSocket->SetModifyHdl( _rControlModificationLink ); - m_pNamedPipe->SetModifyHdl( _rControlModificationLink ); + m_pDatabaseName->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) ); + m_pHostName->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) ); + m_pPort->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) ); + m_pSocket->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) ); + m_pNamedPipe->SetModifyHdl( LINK(this, MySQLNativeSettings, EditModifyHdl) ); m_pSocketRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, RadioToggleHdl) ); m_pNamedPipeRadio->SetToggleHdl( LINK(this, MySQLNativeSettings, RadioToggleHdl) ); @@ -174,6 +174,11 @@ namespace dbaui m_aControlModificationLink.Call(&rRadioButton); } + IMPL_LINK_TYPED(MySQLNativeSettings, EditModifyHdl, Edit&, rEdit, void) + { + m_aControlModificationLink.Call(&rEdit); + } + MySQLNativeSettings::~MySQLNativeSettings() { disposeOnce(); diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx index b92b3cd56cb0..807ac514fcde 100644 --- a/dbaccess/source/ui/dlg/admincontrols.hxx +++ b/dbaccess/source/ui/dlg/admincontrols.hxx @@ -51,6 +51,7 @@ namespace dbaui ::svt::ControlDependencyManager m_aControlDependencies; DECL_LINK_TYPED(RadioToggleHdl, RadioButton&, void); + DECL_LINK_TYPED(EditModifyHdl, Edit&, void); public: MySQLNativeSettings( vcl::Window& _rParent, const Link<>& _rControlModificationLink ); diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 8efbeff62cd8..126b90dd31db 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -115,6 +115,10 @@ namespace dbaui { callModifiedHdl(&rCtrl); } + IMPL_LINK_TYPED(OGenericAdministrationPage, OnControlEditModifyHdl, Edit&, rCtrl, void) + { + callModifiedHdl(&rCtrl); + } bool OGenericAdministrationPage::getSelectedDataSource(OUString& _sReturn, OUString& _sCurr) { // collect all ODBC data source names diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index b1247da3910a..7b2585f140b4 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -207,6 +207,7 @@ namespace dbaui is modified. The implementation just calls callModifiedHdl. */ DECL_LINK(OnControlModified, void*); + DECL_LINK_TYPED(OnControlEditModifyHdl, Edit&, void); DECL_LINK_TYPED(OnControlModifiedClick, Button*, void); DECL_LINK_TYPED(ControlModifiedCheckBoxHdl, CheckBox&, void); diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 035bdb8f93bb..11caa93aff42 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -129,7 +129,7 @@ namespace dbaui { get(m_pMaxRowScanLabel, "rowsft"); get(m_pMaxRowScan, "rows"); - m_pMaxRowScan->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlModified)); + m_pMaxRowScan->SetModifyHdl(LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl)); m_pMaxRowScan->SetUseThousandSep(false); m_pMaxRowScanLabel->Show(); m_pMaxRowScan->Show(); @@ -342,8 +342,8 @@ namespace dbaui get(m_pAutoRetrieving, "query"); m_pAutoRetrievingEnabled->SetClickHdl( LINK(this, OGenericAdministrationPage, OnControlModifiedClick) ); - m_pAutoIncrement->SetModifyHdl( LINK(this, OGenericAdministrationPage, OnControlModified) ); - m_pAutoRetrieving->SetModifyHdl( LINK(this, OGenericAdministrationPage, OnControlModified) ); + m_pAutoIncrement->SetModifyHdl( LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl) ); + m_pAutoRetrieving->SetModifyHdl( LINK(this, OGenericAdministrationPage, OnControlEditModifyHdl) ); m_aControlDependencies.enableOnCheckMark( *m_pAutoRetrievingEnabled, *m_pAutoIncrementLabel, *m_pAutoIncrement, *m_pAutoRetrievingLabel, *m_pAutoRetrieving ); diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 6369172f838b..ffad681b4d6b 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -79,7 +79,7 @@ namespace dbaui m_pOptionsLabel->Show(); m_pOptions = get<Edit>("options"); m_pOptions->Show(); - m_pOptions->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); + m_pOptions->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); } if ((m_nControlFlags & CBTP_USE_CHARSET) == CBTP_USE_CHARSET) @@ -433,8 +433,8 @@ namespace dbaui } if ( m_sDefaultJdbcDriverName.getLength() ) { - m_pEDDriverClass->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); - m_pEDDriverClass->SetModifyHdl(LINK(this, OGeneralSpecialJDBCDetailsPage, OnEditModified)); + m_pEDDriverClass->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); + m_pEDDriverClass->SetModifyHdl(LINK(this, OGeneralSpecialJDBCDetailsPage, OnControlEditModifyHdl)); m_pTestJavaDriver->SetClickHdl(LINK(this,OGeneralSpecialJDBCDetailsPage,OnTestJavaClickHdl)); } else @@ -448,9 +448,9 @@ namespace dbaui m_pFTSocket->Show(bShowSocket && !m_bUseClass); m_pEDSocket->Show(bShowSocket && !m_bUseClass); - m_pEDHostname->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); - m_pNFPortNumber->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); - m_pEDSocket->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); + m_pEDHostname->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); + m_pNFPortNumber->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); + m_pEDSocket->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); } OGeneralSpecialJDBCDetailsPage::~OGeneralSpecialJDBCDetailsPage() @@ -545,14 +545,13 @@ namespace dbaui ScopedVclPtrInstance< OSQLMessageBox > aMsg( this, OUString( ModuleRes( nMessage ) ), OUString(), WB_OK | WB_DEF_OK, mt ); aMsg->Execute(); } - IMPL_LINK(OGeneralSpecialJDBCDetailsPage, OnEditModified, Edit*, _pEdit) + void OGeneralSpecialJDBCDetailsPage::callModifiedHdl(void* pControl) { - if ( m_bUseClass && _pEdit == m_pEDDriverClass ) + if ( m_bUseClass && pControl == m_pEDDriverClass ) m_pTestJavaDriver->Enable( !m_pEDDriverClass->GetText().trim().isEmpty() ); // tell the listener we were modified - callModifiedHdl(); - return 0L; + OGenericAdministrationPage::callModifiedHdl(); } // MySQLNativePage @@ -566,7 +565,7 @@ namespace dbaui get(m_pUserName, "username"); get(m_pPasswordRequired, "passwordrequired"); - m_pUserName->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); + m_pUserName->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); m_aMySQLSettings->Show(); } @@ -666,10 +665,10 @@ namespace dbaui m_pNFPortNumber->SetUseThousandSep(false); get(m_pNFRowCount, "LDAPRowCountspinbutton"); - m_pETBaseDN->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); + m_pETBaseDN->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); m_pCBUseSSL->SetToggleHdl( LINK(this, OGenericAdministrationPage, ControlModifiedCheckBoxHdl) ); - m_pNFPortNumber->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); - m_pNFRowCount->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlModified)); + m_pNFPortNumber->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); + m_pNFRowCount->SetModifyHdl(LINK(this,OGenericAdministrationPage,OnControlEditModifyHdl)); m_pNFRowCount->SetUseThousandSep(false); m_iNormalPort = 389; diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index b3c0a555a56a..c6a6eb874956 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -175,9 +175,9 @@ namespace dbaui virtual bool FillItemSet( SfxItemSet* _rCoreAttrs ) override; virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) override; + virtual void callModifiedHdl(void* pControl) override; DECL_LINK_TYPED(OnTestJavaClickHdl, Button*, void); - DECL_LINK(OnEditModified,Edit*); VclPtr<Edit> m_pEDHostname; VclPtr<NumericField> m_pNFPortNumber; @@ -188,9 +188,9 @@ namespace dbaui VclPtr<Edit> m_pEDDriverClass; VclPtr<PushButton> m_pTestJavaDriver; - OUString m_sDefaultJdbcDriverName; - sal_uInt16 m_nPortId; - bool m_bUseClass; + OUString m_sDefaultJdbcDriverName; + sal_uInt16 m_nPortId; + bool m_bUseClass; }; // MySQLNativePage diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 7647308875a8..9bb7810e4959 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -71,7 +71,7 @@ namespace dbaui startComponentListening(xConnComp); m_pSQL->SetModifyHdl(LINK(this, DirectSQLDialog, OnStatementModified)); - OnStatementModified(m_pSQL); + OnStatementModified(*m_pSQL); } DirectSQLDialog::~DirectSQLDialog() @@ -291,7 +291,7 @@ namespace dbaui // set the text in the statement editor OUString sStatement = m_aStatementHistory[_nHistoryPos]; m_pSQL->SetText(sStatement); - OnStatementModified(m_pSQL); + OnStatementModified(*m_pSQL); if (_bUpdateListBox) { @@ -308,10 +308,9 @@ namespace dbaui OSL_FAIL("DirectSQLDialog::switchToHistory: invalid position!"); } - IMPL_LINK_NOARG( DirectSQLDialog, OnStatementModified ) + IMPL_LINK_NOARG_TYPED( DirectSQLDialog, OnStatementModified, Edit&, void ) { m_pExecute->Enable(!m_pSQL->GetText().isEmpty()); - return 0L; } IMPL_LINK_NOARG_TYPED( DirectSQLDialog, OnCloseClick, Button*, void ) diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index 50d2342a1d60..eab7b5f20e6d 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -322,11 +322,10 @@ IMPL_LINK_TYPED(OSaveAsDlg, ButtonClickHdl, Button *, pButton, void) } } -IMPL_LINK(OSaveAsDlg, EditModifyHdl, Edit *, pEdit ) +IMPL_LINK_TYPED(OSaveAsDlg, EditModifyHdl, Edit&, rEdit, void ) { - if (pEdit == m_pImpl->m_pTitle) + if (&rEdit == m_pImpl->m_pTitle) m_pImpl->m_pPB_OK->Enable(!m_pImpl->m_pTitle->GetText().isEmpty()); - return 0; } void OSaveAsDlg::implInitOnlyTitle(const OUString& _rLabel) diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 6c6edc6964a8..ef8f0cc43a28 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -373,15 +373,13 @@ namespace dbaui } } - IMPL_LINK(OParameterDialog, OnValueModified, Control*, /*pBox*/) + IMPL_LINK_NOARG_TYPED(OParameterDialog, OnValueModified, Edit&, void) { // mark the currently selected entry as dirty OSL_ENSURE(static_cast<size_t>(m_nCurrentlySelected) < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !"); m_aVisitedParams[m_nCurrentlySelected] |= EF_DIRTY; m_bNeedErrorOnCurrent = true; - - return 0L; } } // namespace dbaui diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx index eae1c5499b9e..fb1fb1080ee3 100644 --- a/dbaccess/source/ui/inc/directsql.hxx +++ b/dbaccess/source/ui/inc/directsql.hxx @@ -89,7 +89,7 @@ namespace dbaui DECL_LINK_TYPED( OnClose, void*, void ); DECL_LINK_TYPED( OnCloseClick, Button*, void ); DECL_LINK_TYPED( OnListEntrySelected, ListBox&, void ); - DECL_LINK( OnStatementModified, void* ); + DECL_LINK_TYPED( OnStatementModified, Edit&, void ); private: /// adds a statement to the statement history diff --git a/dbaccess/source/ui/inc/dlgsave.hxx b/dbaccess/source/ui/inc/dlgsave.hxx index 2896b68f64ef..5ae14cdf8aa5 100644 --- a/dbaccess/source/ui/inc/dlgsave.hxx +++ b/dbaccess/source/ui/inc/dlgsave.hxx @@ -73,7 +73,7 @@ namespace dbaui OUString getSchema() const; private: DECL_LINK_TYPED(ButtonClickHdl, Button *, void); - DECL_LINK(EditModifyHdl, Edit * ); + DECL_LINK_TYPED(EditModifyHdl, Edit&, void); void implInitOnlyTitle(const OUString& _rLabel); void implInit(); diff --git a/dbaccess/source/ui/inc/paramdialog.hxx b/dbaccess/source/ui/inc/paramdialog.hxx index 424191dfae01..79edb77d937e 100644 --- a/dbaccess/source/ui/inc/paramdialog.hxx +++ b/dbaccess/source/ui/inc/paramdialog.hxx @@ -94,7 +94,7 @@ namespace dbaui private: DECL_LINK_TYPED(OnVisitedTimeout, Timer*, void); - DECL_LINK(OnValueModified, Control*); + DECL_LINK_TYPED(OnValueModified, Edit&, void); DECL_LINK_TYPED(OnEntryListBoxSelected, ListBox&, void); DECL_LINK_TYPED(OnButtonClicked, Button*, void); DECL_LINK_TYPED(OnValueLoseFocusHdl, Control&, void); diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx index a11d636e817b..624982d28dcc 100644 --- a/dbaccess/source/ui/inc/sqledit.hxx +++ b/dbaccess/source/ui/inc/sqledit.hxx @@ -61,7 +61,7 @@ namespace dbaui virtual void KeyInput( const KeyEvent& rKEvt ) override; virtual void GetFocus() override; - DECL_LINK(ModifyHdl, void*); + DECL_LINK_TYPED(ModifyHdl, Edit&, void); public: OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle = WB_LEFT | WB_VSCROLL |WB_BORDER); |