diff options
Diffstat (limited to 'dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 104 |
1 files changed, 6 insertions, 98 deletions
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 6564699e3cf8..e822953961cb 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -57,11 +57,8 @@ #include "TextConnectionHelper.hxx" #include <osl/diagnose.h> - -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star; OGenericAdministrationPage* OTextConnectionPageSetup::CreateTextTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) @@ -69,12 +66,8 @@ using namespace ::com::sun::star; return ( new OTextConnectionPageSetup( pParent, _rAttrSet ) ); } - - //======================================================================== - //= OTextConnectionPageSetup - //======================================================================== + // OTextConnectionPageSetup DBG_NAME(OTextConnectionPageSetup) -//------------------------------------------------------------------------ OTextConnectionPageSetup::OTextConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OConnectionTabPageSetup(pParent, PAGE_DBWIZARD_TEXT, _rCoreAttrs, STR_TEXT_HELPTEXT, STR_TEXT_HEADERTEXT, STR_TEXT_PATH_OR_FILE) { @@ -86,8 +79,6 @@ DBG_NAME(OTextConnectionPageSetup) FreeResource(); } - - // ----------------------------------------------------------------------- OTextConnectionPageSetup::~OTextConnectionPageSetup() { DELETEZ(m_pTextConnectionHelper); @@ -102,7 +93,6 @@ DBG_NAME(OTextConnectionPageSetup) return sal_True; } - bool OTextConnectionPageSetup::checkTestConnection() { bool bDoEnable = OConnectionTabPageSetup::checkTestConnection(); @@ -110,19 +100,16 @@ DBG_NAME(OTextConnectionPageSetup) return bDoEnable; } - // ----------------------------------------------------------------------- void OTextConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OConnectionTabPageSetup::fillControls(_rControlList); m_pTextConnectionHelper->fillControls(_rControlList); } - // ----------------------------------------------------------------------- void OTextConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OConnectionTabPageSetup::fillWindows(_rControlList); m_pTextConnectionHelper->fillWindows(_rControlList); } - // ----------------------------------------------------------------------- void OTextConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -132,8 +119,6 @@ DBG_NAME(OTextConnectionPageSetup) m_pTextConnectionHelper->implInitControls(_rSet, bValid); } - - // ----------------------------------------------------------------------- sal_Bool OTextConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); @@ -141,21 +126,16 @@ DBG_NAME(OTextConnectionPageSetup) return bChangedSomething; } - sal_Bool OTextConnectionPageSetup::prepareLeave(){ return m_pTextConnectionHelper->prepareLeave(); } - OGenericAdministrationPage* OLDAPConnectionPageSetup::CreateLDAPTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OLDAPConnectionPageSetup( pParent, _rAttrSet ) ); } - - //======================================================================== - //= OLDAPPageSetup - //======================================================================== + // OLDAPPageSetup OLDAPConnectionPageSetup::OLDAPConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OGenericAdministrationPage(pParent, ModuleRes(PAGE_DBWIZARD_LDAP), _rCoreAttrs) ,m_aFTHeaderText (this, ModuleRes(FT_LDAP_HEADERTEXT)) @@ -179,7 +159,6 @@ DBG_NAME(OTextConnectionPageSetup) FreeResource(); } - // ----------------------------------------------------------------------- sal_Bool OLDAPConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = sal_False; @@ -203,7 +182,6 @@ DBG_NAME(OTextConnectionPageSetup) fillBool(_rSet,&m_aCBUseSSL,DSID_CONN_LDAP_USESSL,bChangedSomething); return bChangedSomething; } - // ----------------------------------------------------------------------- void OLDAPConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETHostServer)); @@ -211,7 +189,6 @@ DBG_NAME(OTextConnectionPageSetup) _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber)); _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBUseSSL)); } - // ----------------------------------------------------------------------- void OLDAPConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHelpText)); @@ -220,14 +197,12 @@ DBG_NAME(OTextConnectionPageSetup) _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTPortNumber)); _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDefaultPortNumber)); } - // ----------------------------------------------------------------------- void OLDAPConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) sal_Bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); - SFX_ITEMSET_GET(_rSet, pBaseDN, SfxStringItem, DSID_CONN_LDAP_BASEDN, sal_True); SFX_ITEMSET_GET(_rSet, pPortNumber, SfxInt32Item, DSID_CONN_LDAP_PORTNUMBER, sal_True); @@ -240,7 +215,6 @@ DBG_NAME(OTextConnectionPageSetup) callModifiedHdl(); } - // ----------------------------------------------------------------------- IMPL_LINK(OLDAPConnectionPageSetup, OnEditModified, Edit*, /*_pEdit*/) { sal_Bool bRoadmapState = ((!m_aETHostServer.GetText().isEmpty() ) && ( !m_aETBaseDN.GetText().isEmpty() ) && (!m_aFTPortNumber.GetText().isEmpty() )); @@ -249,8 +223,6 @@ DBG_NAME(OTextConnectionPageSetup) return 0L; } - - // ----------------------------------------------------------------------- //OGenericAdministrationPage* OMySQLIntroPageSetup* OMySQLIntroPageSetup::CreateMySQLIntroTabPage( Window* _pParent, const SfxItemSet& _rAttrSet ) { return ( new OMySQLIntroPageSetup( _pParent, _rAttrSet) ); @@ -282,15 +254,12 @@ DBG_NAME(OMySQLIntroPageSetup) return true; } - // ----------------------------------------------------------------------- OMySQLIntroPageSetup::~OMySQLIntroPageSetup() { DBG_DTOR(OMySQLIntroPageSetup,NULL); } - - // ----------------------------------------------------------------------- void OMySQLIntroPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool /*_bSaveValue*/) { // show the "Connect directly" option only if the driver is installed @@ -310,26 +279,20 @@ DBG_NAME(OMySQLIntroPageSetup) m_aRB_JDBCDatabase.Check(); } - - // ----------------------------------------------------------------------- void OMySQLIntroPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) { } - // ----------------------------------------------------------------------- void OMySQLIntroPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) { } - - // ----------------------------------------------------------------------- sal_Bool OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/) { OSL_FAIL("Who called me?! Please ask oj for more information."); return sal_True; } - OMySQLIntroPageSetup::ConnectionType OMySQLIntroPageSetup::getMySQLMode() { if (m_aRB_JDBCDatabase.IsChecked()) @@ -340,10 +303,7 @@ DBG_NAME(OMySQLIntroPageSetup) return VIA_ODBC; } - // ======================================================================= - // = MySQLNativeSetupPage - // ======================================================================= - // ----------------------------------------------------------------------- + // MySQLNativeSetupPage MySQLNativeSetupPage::MySQLNativeSetupPage( Window* _pParent, const SfxItemSet& _rCoreAttrs ) :OGenericAdministrationPage( _pParent, ModuleRes( PAGE_DBWIZARD_MYSQL_NATIVE ), _rCoreAttrs ) ,m_aHeader ( this, ModuleRes( FT_SETUP_WIZARD_HEADER ) ) @@ -359,32 +319,27 @@ DBG_NAME(OMySQLIntroPageSetup) FreeResource(); } - // ----------------------------------------------------------------------- OGenericAdministrationPage* MySQLNativeSetupPage::Create( Window* pParent, const SfxItemSet& _rAttrSet ) { return new MySQLNativeSetupPage( pParent, _rAttrSet ); } - // ----------------------------------------------------------------------- void MySQLNativeSetupPage::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList ) { m_aMySQLSettings.fillControls( _rControlList ); } - // ----------------------------------------------------------------------- void MySQLNativeSetupPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ) { _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aHelpText ) ); m_aMySQLSettings.fillWindows( _rControlList ); } - // ----------------------------------------------------------------------- sal_Bool MySQLNativeSetupPage::FillItemSet( SfxItemSet& _rSet ) { return m_aMySQLSettings.FillItemSet( _rSet ); } - // ----------------------------------------------------------------------- void MySQLNativeSetupPage::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) { m_aMySQLSettings.implInitControls( _rSet ); @@ -394,13 +349,11 @@ DBG_NAME(OMySQLIntroPageSetup) OnModified( NULL ); } - // ----------------------------------------------------------------------- Link MySQLNativeSetupPage::getControlModifiedLink() { return LINK( this, MySQLNativeSetupPage, OnModified ); } - // ----------------------------------------------------------------------- IMPL_LINK( MySQLNativeSetupPage, OnModified, Edit*, _pEdit ) { SetRoadmapStateValue( m_aMySQLSettings.canAdvance() ); @@ -408,9 +361,7 @@ DBG_NAME(OMySQLIntroPageSetup) return OGenericAdministrationPage::getControlModifiedLink().Call( _pEdit ); } - //======================================================================== - //= OMySQLJDBCConnectionPageSetup - //======================================================================== + // OMySQLJDBCConnectionPageSetup OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( Window* pParent,sal_uInt16 _nResId, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, sal_uInt16 _nDefaultPortResId, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderTextResId, sal_uInt16 _nDriverClassId) :OGenericAdministrationPage(pParent, ModuleRes(_nResId), _rCoreAttrs) ,m_aFTHelpText (this, ModuleRes(FT_AUTOWIZARDHELPTEXT)) @@ -453,8 +404,6 @@ DBG_NAME(OMySQLIntroPageSetup) FreeResource(); } - - // ----------------------------------------------------------------------- OGenericAdministrationPage* OGeneralSpecialJDBCConnectionPageSetup::CreateMySQLJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OGeneralSpecialJDBCConnectionPageSetup( pParent, @@ -467,7 +416,6 @@ DBG_NAME(OMySQLIntroPageSetup) STR_MYSQL_DRIVERCLASSTEXT) ); } - // ----------------------------------------------------------------------- OGenericAdministrationPage* OGeneralSpecialJDBCConnectionPageSetup::CreateOracleJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OGeneralSpecialJDBCConnectionPageSetup( pParent, @@ -480,7 +428,6 @@ DBG_NAME(OMySQLIntroPageSetup) STR_ORACLE_DRIVERCLASSTEXT) ); } - // ----------------------------------------------------------------------- void OGeneralSpecialJDBCConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETDatabasename)); @@ -488,7 +435,6 @@ DBG_NAME(OMySQLIntroPageSetup) _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETHostname)); _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber)); } - // ----------------------------------------------------------------------- void OGeneralSpecialJDBCConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHelpText)); @@ -499,7 +445,6 @@ DBG_NAME(OMySQLIntroPageSetup) _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDriverClass)); } - // ----------------------------------------------------------------------- sal_Bool OGeneralSpecialJDBCConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = sal_False; @@ -510,7 +455,6 @@ DBG_NAME(OMySQLIntroPageSetup) return bChangedSomething; } - // ----------------------------------------------------------------------- void OGeneralSpecialJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -550,7 +494,6 @@ DBG_NAME(OMySQLIntroPageSetup) SetRoadmapStateValue(bRoadmapState); } - // ----------------------------------------------------------------------- IMPL_LINK(OGeneralSpecialJDBCConnectionPageSetup, OnTestJavaClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -577,7 +520,6 @@ DBG_NAME(OMySQLIntroPageSetup) return 0L; } - // ----------------------------------------------------------------------- IMPL_LINK(OGeneralSpecialJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit) { if ( _pEdit == &m_aETDriverClass ) @@ -588,16 +530,12 @@ DBG_NAME(OMySQLIntroPageSetup) return 0L; } - // ----------------------------------------------------------------------- OGenericAdministrationPage* OJDBCConnectionPageSetup::CreateJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OJDBCConnectionPageSetup( pParent, _rAttrSet)); } - - //======================================================================== - //= OMySQLJDBCConnectionPageSetup - //======================================================================== + // OMySQLJDBCConnectionPageSetup OJDBCConnectionPageSetup::OJDBCConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs) :OConnectionTabPageSetup(pParent, PAGE_DBWIZARD_JDBC, _rCoreAttrs, STR_JDBC_HELPTEXT, STR_JDBC_HEADERTEXT, STR_COMMONURL) ,m_aFTDriverClass (this, ModuleRes(FT_AUTOJDBCDRIVERCLASS)) @@ -609,19 +547,16 @@ DBG_NAME(OMySQLIntroPageSetup) FreeResource(); } - // ----------------------------------------------------------------------- void OJDBCConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETDriverClass)); } - // ----------------------------------------------------------------------- void OJDBCConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDriverClass)); } - // ----------------------------------------------------------------------- sal_Bool OJDBCConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); @@ -629,7 +564,6 @@ DBG_NAME(OMySQLIntroPageSetup) return bChangedSomething; } - // ----------------------------------------------------------------------- void OJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -662,7 +596,6 @@ DBG_NAME(OMySQLIntroPageSetup) SetRoadmapStateValue(checkTestConnection()); } - bool OJDBCConnectionPageSetup::checkTestConnection() { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -671,8 +604,6 @@ DBG_NAME(OMySQLIntroPageSetup) return bEnableTestConnection; } - - // ----------------------------------------------------------------------- IMPL_LINK(OJDBCConnectionPageSetup, OnTestJavaClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -697,7 +628,6 @@ DBG_NAME(OMySQLIntroPageSetup) return 0L; } - // ----------------------------------------------------------------------- IMPL_LINK(OJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit) { if ( _pEdit == &m_aETDriverClass ) @@ -708,7 +638,6 @@ DBG_NAME(OMySQLIntroPageSetup) return 0L; } - OGenericAdministrationPage* OSpreadSheetConnectionPageSetup::CreateSpreadSheetTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OSpreadSheetConnectionPageSetup( pParent, _rAttrSet ) ); @@ -726,20 +655,16 @@ DBG_NAME(OSpreadSheetConnectionPageSetup) FreeResource(); } - - // ----------------------------------------------------------------------- OSpreadSheetConnectionPageSetup::~OSpreadSheetConnectionPageSetup() { DBG_DTOR(OSpreadSheetConnectionPageSetup,NULL); } - void OSpreadSheetConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) { } - // ----------------------------------------------------------------------- void OSpreadSheetConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OConnectionTabPageSetup::fillControls(_rControlList); @@ -747,13 +672,11 @@ DBG_NAME(OSpreadSheetConnectionPageSetup) } - // ----------------------------------------------------------------------- void OSpreadSheetConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { OConnectionTabPageSetup::implInitControls(_rSet, _bSaveValue); } - // ----------------------------------------------------------------------- sal_Bool OSpreadSheetConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); @@ -788,15 +711,12 @@ DBG_NAME(OAuthentificationPageSetup) LayoutHelper::fitSizeRightAligned( m_aPBTestConnection ); } - - // ----------------------------------------------------------------------- OAuthentificationPageSetup::~OAuthentificationPageSetup() { DBG_DTOR(OAuthentificationPageSetup,NULL); } - void OAuthentificationPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHelpText)); @@ -804,14 +724,12 @@ DBG_NAME(OAuthentificationPageSetup) _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aPBTestConnection)); } - // ----------------------------------------------------------------------- void OAuthentificationPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETUserName)); _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBPasswordRequired)); } - // ----------------------------------------------------------------------- void OAuthentificationPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool /*_bSaveValue*/) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -826,7 +744,6 @@ DBG_NAME(OAuthentificationPageSetup) m_aETUserName.ClearModifyFlag(); } - // ----------------------------------------------------------------------- sal_Bool OAuthentificationPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = sal_False; @@ -841,7 +758,6 @@ DBG_NAME(OAuthentificationPageSetup) return bChangedSomething; } - OGenericAdministrationPage* OFinalDBPageSetup::CreateFinalDBTabPageSetup( Window* pParent, const SfxItemSet& _rAttrSet) { return ( new OFinalDBPageSetup( pParent, _rAttrSet) ); @@ -897,8 +813,6 @@ DBG_NAME(OFinalDBPageSetup) } } - - // ----------------------------------------------------------------------- OFinalDBPageSetup::~OFinalDBPageSetup() { @@ -920,7 +834,6 @@ DBG_NAME(OFinalDBPageSetup) return m_aCBStartTableWizard.IsChecked() && m_aCBStartTableWizard.IsEnabled(); } - void OFinalDBPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTFinalHeader)); @@ -929,7 +842,6 @@ DBG_NAME(OFinalDBPageSetup) _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTFinalText)); } - // ----------------------------------------------------------------------- void OFinalDBPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBOpenAfterwards)); @@ -938,7 +850,6 @@ DBG_NAME(OFinalDBPageSetup) _rControlList.push_back(new OSaveValueWrapper<RadioButton>(&m_aRBDontregisterDataSource)); } - // ----------------------------------------------------------------------- void OFinalDBPageSetup::implInitControls(const SfxItemSet& /*_rSet*/, sal_Bool /*_bSaveValue*/) { m_aCBOpenAfterwards.Check(); @@ -949,12 +860,10 @@ DBG_NAME(OFinalDBPageSetup) m_aCBStartTableWizard.Enable(_bSupportsTableCreation); } - // ----------------------------------------------------------------------- sal_Bool OFinalDBPageSetup::FillItemSet( SfxItemSet& /*_rSet*/ ) { return sal_True; } - // ----------------------------------------------------------------------------- IMPL_LINK(OFinalDBPageSetup, OnOpenSelected, CheckBox*, _pBox) { m_aCBStartTableWizard.Enable( _pBox->IsEnabled() && _pBox->IsChecked() ); @@ -962,9 +871,8 @@ DBG_NAME(OFinalDBPageSetup) // outta here return 0L; } -//......................................................................... } + // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |