Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / dbaccess / source / ui / dlg / DBSetupConnectionPages.cxx
blob5ea8e37f50a9f64ea8c5c4e6bf2895b87aa546ee
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #include "DBSetupConnectionPages.hxx"
30 #include "sqlmessage.hxx"
31 #include "dbu_resource.hrc"
32 #include "AutoControls.hrc"
33 #include "dbadminsetup.hrc"
34 #include <svl/itemset.hxx>
35 #include <svl/stritem.hxx>
36 #include <svl/eitem.hxx>
37 #include <svl/intitem.hxx>
38 #include "dsitems.hxx"
39 #include "dsnItem.hxx"
40 #include "dbaccess_helpid.hrc"
41 #include "localresaccess.hxx"
42 #include <vcl/msgbox.hxx>
43 #include <vcl/mnemonic.hxx>
44 #include <svl/cjkoptions.hxx>
45 #include <jvmaccess/virtualmachine.hxx>
46 #include <connectivity/CommonTools.hxx>
47 #include "DriverSettings.hxx"
48 #include "dbadmin.hxx"
49 #include <comphelper/types.hxx>
51 #include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
52 #include <com/sun/star/task/XInteractionHandler.hpp>
53 #include <com/sun/star/sdbc/XDriverAccess.hpp>
54 #include "dbustrings.hrc"
55 #include <svl/filenotation.hxx>
57 #include <unotools/localfilehelper.hxx>
58 #include <unotools/ucbhelper.hxx>
59 #include <ucbhelper/commandenvironment.hxx>
60 #include "finteraction.hxx"
61 #include <unotools/pathoptions.hxx>
62 #include <svtools/roadmapwizard.hxx>
63 #include "TextConnectionHelper.hxx"
64 #include <osl/diagnose.h>
67 //.........................................................................
68 namespace dbaui
70 //.........................................................................
71 using namespace ::com::sun::star;
73 OGenericAdministrationPage* OTextConnectionPageSetup::CreateTextTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
75 return ( new OTextConnectionPageSetup( pParent, _rAttrSet ) );
79 //========================================================================
80 //= OTextConnectionPageSetup
81 //========================================================================
82 DBG_NAME(OTextConnectionPageSetup)
83 //------------------------------------------------------------------------
84 OTextConnectionPageSetup::OTextConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs )
85 :OConnectionTabPageSetup(pParent, PAGE_DBWIZARD_TEXT, _rCoreAttrs, STR_TEXT_HELPTEXT, STR_TEXT_HEADERTEXT, STR_TEXT_PATH_OR_FILE)
87 DBG_CTOR(OTextConnectionPageSetup,NULL);
89 m_pTextConnectionHelper = new OTextConnectionHelper( this, TC_EXTENSION | TC_SEPARATORS );
90 m_pTextConnectionHelper->SetClickHandler(LINK( this, OTextConnectionPageSetup, ImplGetExtensionHdl ) );
92 FreeResource();
96 // -----------------------------------------------------------------------
97 OTextConnectionPageSetup::~OTextConnectionPageSetup()
99 DELETEZ(m_pTextConnectionHelper);
101 DBG_DTOR(OTextConnectionPageSetup,NULL);
104 IMPL_LINK(OTextConnectionPageSetup, ImplGetExtensionHdl, OTextConnectionHelper*, /*_pTextConnectionHelper*/)
106 SetRoadmapStateValue((m_pTextConnectionHelper->GetExtension().Len() > 0) && OConnectionTabPageSetup::checkTestConnection());
107 callModifiedHdl();
108 return sal_True;
112 bool OTextConnectionPageSetup::checkTestConnection()
114 bool bDoEnable = OConnectionTabPageSetup::checkTestConnection();
115 bDoEnable = (m_pTextConnectionHelper->GetExtension().Len() > 0) && bDoEnable;
116 return bDoEnable;
119 // -----------------------------------------------------------------------
120 void OTextConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
122 OConnectionTabPageSetup::fillControls(_rControlList);
123 m_pTextConnectionHelper->fillControls(_rControlList);
125 // -----------------------------------------------------------------------
126 void OTextConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
128 OConnectionTabPageSetup::fillWindows(_rControlList);
129 m_pTextConnectionHelper->fillWindows(_rControlList);
131 // -----------------------------------------------------------------------
132 void OTextConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue)
134 // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
135 sal_Bool bValid, bReadonly;
136 getFlags(_rSet, bValid, bReadonly);
137 OConnectionTabPageSetup::implInitControls( _rSet, _bSaveValue);
138 m_pTextConnectionHelper->implInitControls(_rSet, bValid);
142 // -----------------------------------------------------------------------
143 sal_Bool OTextConnectionPageSetup::FillItemSet( SfxItemSet& _rSet )
145 sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet);
146 bChangedSomething = m_pTextConnectionHelper->FillItemSet(_rSet, bChangedSomething);
147 return bChangedSomething;
151 sal_Bool OTextConnectionPageSetup::prepareLeave(){
152 return m_pTextConnectionHelper->prepareLeave();
156 OGenericAdministrationPage* OLDAPConnectionPageSetup::CreateLDAPTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
158 return ( new OLDAPConnectionPageSetup( pParent, _rAttrSet ) );
162 //========================================================================
163 //= OLDAPPageSetup
164 //========================================================================
165 OLDAPConnectionPageSetup::OLDAPConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs )
166 :OGenericAdministrationPage(pParent, ModuleRes(PAGE_DBWIZARD_LDAP), _rCoreAttrs)
167 ,m_aFTHeaderText (this, ModuleRes(FT_LDAP_HEADERTEXT))
168 ,m_aFTHelpText (this, ModuleRes(FT_LDAP_HELPTEXT))
169 ,m_aFTHostServer (this, ModuleRes(FT_AUTOHOSTNAME))
170 ,m_aETHostServer (this, ModuleRes(ET_AUTOHOSTNAME))
171 ,m_aFTBaseDN (this, ModuleRes(FT_AUTOBASEDN))
172 ,m_aETBaseDN (this, ModuleRes(ET_AUTOBASEDN))
173 ,m_aFTPortNumber (this, ModuleRes(FT_AUTOPORTNUMBER))
174 ,m_aNFPortNumber (this, ModuleRes(NF_AUTOPORTNUMBER))
175 ,m_aFTDefaultPortNumber (this, ModuleRes(FT_AUTOPORTNUMBERDEFAULT))
176 ,m_aCBUseSSL (this, ModuleRes(CB_WIZ_USESSL))
178 SetControlFontWeight(&m_aFTHeaderText);
179 m_aFTDefaultPortNumber.SetText(String(ModuleRes(STR_LDAP_DEFAULT)));
180 m_aETHostServer.SetModifyHdl(getControlModifiedLink());
181 m_aETBaseDN.SetModifyHdl(getControlModifiedLink());
182 m_aNFPortNumber.SetModifyHdl(getControlModifiedLink());
183 m_aCBUseSSL.SetToggleHdl(getControlModifiedLink());
184 SetRoadmapStateValue(sal_False);
185 FreeResource();
188 // -----------------------------------------------------------------------
189 sal_Bool OLDAPConnectionPageSetup::FillItemSet( SfxItemSet& _rSet )
191 sal_Bool bChangedSomething = sal_False;
192 fillString(_rSet,&m_aETBaseDN,DSID_CONN_LDAP_BASEDN, bChangedSomething);
193 fillInt32(_rSet,&m_aNFPortNumber,DSID_CONN_LDAP_PORTNUMBER,bChangedSomething);
195 if ( m_aETHostServer.GetText() != m_aETHostServer.GetSavedValue() )
197 DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rSet.GetItem(DSID_TYPECOLLECTION));
198 ::dbaccess::ODsnTypeCollection* pCollection = NULL;
199 if (pCollectionItem)
200 pCollection = pCollectionItem->getCollection();
201 OSL_ENSURE(pCollection, "OLDAPConnectionPageSetup::FillItemSet : really need a DSN type collection !");
203 String sUrl = pCollection->getPrefix( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:ldap:")));
204 sUrl += m_aETHostServer.GetText();
205 _rSet.Put(SfxStringItem(DSID_CONNECTURL, sUrl));
206 bChangedSomething = sal_True;
209 fillBool(_rSet,&m_aCBUseSSL,DSID_CONN_LDAP_USESSL,bChangedSomething);
210 return bChangedSomething;
212 // -----------------------------------------------------------------------
213 void OLDAPConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
215 _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETHostServer));
216 _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETBaseDN));
217 _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber));
218 _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBUseSSL));
220 // -----------------------------------------------------------------------
221 void OLDAPConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
223 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHelpText));
224 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHostServer));
225 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTBaseDN));
226 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTPortNumber));
227 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDefaultPortNumber));
229 // -----------------------------------------------------------------------
230 void OLDAPConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue)
232 // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
233 sal_Bool bValid, bReadonly;
234 getFlags(_rSet, bValid, bReadonly);
237 SFX_ITEMSET_GET(_rSet, pBaseDN, SfxStringItem, DSID_CONN_LDAP_BASEDN, sal_True);
238 SFX_ITEMSET_GET(_rSet, pPortNumber, SfxInt32Item, DSID_CONN_LDAP_PORTNUMBER, sal_True);
240 if ( bValid )
242 m_aETBaseDN.SetText(pBaseDN->GetValue());
243 m_aNFPortNumber.SetValue(pPortNumber->GetValue());
245 OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
246 callModifiedHdl();
249 // -----------------------------------------------------------------------
250 IMPL_LINK(OLDAPConnectionPageSetup, OnEditModified, Edit*, /*_pEdit*/)
252 sal_Bool bRoadmapState = ((m_aETHostServer.GetText().Len() != 0 ) && ( m_aETBaseDN.GetText().Len() != 0 ) && (m_aFTPortNumber.GetText().Len() != 0 ));
253 SetRoadmapStateValue(bRoadmapState);
254 callModifiedHdl();
255 return 0L;
259 // ----------------------------------------------------------------------- //OGenericAdministrationPage*
260 OMySQLIntroPageSetup* OMySQLIntroPageSetup::CreateMySQLIntroTabPage( Window* _pParent, const SfxItemSet& _rAttrSet )
262 return ( new OMySQLIntroPageSetup( _pParent, _rAttrSet) );
265 DBG_NAME(OMySQLIntroPageSetup)
267 OMySQLIntroPageSetup::OMySQLIntroPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs )
268 :OGenericAdministrationPage(pParent, ModuleRes(PAGE_DBWIZARD_MYSQL_INTRO), _rCoreAttrs)
269 ,m_aRB_ODBCDatabase(this, ModuleRes(RB_CONNECTVIAODBC))
270 ,m_aRB_JDBCDatabase(this, ModuleRes(RB_CONNECTVIAJDBC))
271 ,m_aRB_NATIVEDatabase(this, ModuleRes(RB_CONNECTVIANATIVE))
272 ,m_aFT_ConnectionMode(this, ModuleRes(FT_MYSQLCONNECTIONMODE))
273 ,m_aFT_Helptext(this, ModuleRes(FT_MYSQL_HELPTEXT))
274 ,m_aFT_Headertext(this, ModuleRes(FT_MYSQL_HEADERTEXT))
276 DBG_CTOR(OMySQLIntroPageSetup,NULL);
278 SetControlFontWeight(&m_aFT_Headertext);
279 m_aRB_ODBCDatabase.SetToggleHdl(LINK(this, OMySQLIntroPageSetup, OnSetupModeSelected));
280 m_aRB_JDBCDatabase.SetToggleHdl(LINK(this, OMySQLIntroPageSetup, OnSetupModeSelected));
281 m_aRB_NATIVEDatabase.SetToggleHdl(LINK(this, OMySQLIntroPageSetup, OnSetupModeSelected));
282 FreeResource();
285 IMPL_LINK(OMySQLIntroPageSetup, OnSetupModeSelected, RadioButton*, /*_pBox*/)
287 maClickHdl.Call( this );
288 return true;
291 // -----------------------------------------------------------------------
292 OMySQLIntroPageSetup::~OMySQLIntroPageSetup()
295 DBG_DTOR(OMySQLIntroPageSetup,NULL);
299 // -----------------------------------------------------------------------
300 void OMySQLIntroPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool /*_bSaveValue*/)
302 // show the "Connect directly" option only if the driver is installed
303 DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rSet.GetItem(DSID_TYPECOLLECTION));
304 bool bHasMySQLNative = ( pCollectionItem != NULL ) && pCollectionItem->getCollection()->hasDriver( "sdbc:mysqlc:" );
305 if ( bHasMySQLNative )
306 m_aRB_NATIVEDatabase.Show();
308 // if any of the options is checked, then there's nothing to do
309 if ( m_aRB_ODBCDatabase.IsChecked() || m_aRB_JDBCDatabase.IsChecked() || m_aRB_NATIVEDatabase.IsChecked() )
310 return;
312 // prefer "native" or "JDBC"
313 if ( bHasMySQLNative )
314 m_aRB_NATIVEDatabase.Check();
315 else
316 m_aRB_JDBCDatabase.Check();
320 // -----------------------------------------------------------------------
321 void OMySQLIntroPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& /*_rControlList*/)
325 // -----------------------------------------------------------------------
326 void OMySQLIntroPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlList*/)
331 // -----------------------------------------------------------------------
332 sal_Bool OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/)
334 OSL_FAIL("Who called me?! Please ask oj for more information.");
335 return sal_True;
339 OMySQLIntroPageSetup::ConnectionType OMySQLIntroPageSetup::getMySQLMode()
341 if (m_aRB_JDBCDatabase.IsChecked())
342 return VIA_JDBC;
343 else if (m_aRB_NATIVEDatabase.IsChecked())
344 return VIA_NATIVE;
345 else
346 return VIA_ODBC;
349 // =======================================================================
350 // = MySQLNativeSetupPage
351 // =======================================================================
352 // -----------------------------------------------------------------------
353 MySQLNativeSetupPage::MySQLNativeSetupPage( Window* _pParent, const SfxItemSet& _rCoreAttrs )
354 :OGenericAdministrationPage( _pParent, ModuleRes( PAGE_DBWIZARD_MYSQL_NATIVE ), _rCoreAttrs )
355 ,m_aHeader ( this, ModuleRes( FT_SETUP_WIZARD_HEADER ) )
356 ,m_aHelpText ( this, ModuleRes( FT_SETUP_WIZARD_HELP ) )
357 ,m_aMySQLSettings ( *this, getControlModifiedLink() )
359 SetControlFontWeight( &m_aHeader );
361 LayoutHelper::positionBelow( m_aHelpText, m_aMySQLSettings, UnrelatedControls, 0 );
362 m_aMySQLSettings.Show();
364 SetRoadmapStateValue(sal_False);
365 FreeResource();
368 // -----------------------------------------------------------------------
369 OGenericAdministrationPage* MySQLNativeSetupPage::Create( Window* pParent, const SfxItemSet& _rAttrSet )
371 return new MySQLNativeSetupPage( pParent, _rAttrSet );
374 // -----------------------------------------------------------------------
375 void MySQLNativeSetupPage::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList )
377 m_aMySQLSettings.fillControls( _rControlList );
380 // -----------------------------------------------------------------------
381 void MySQLNativeSetupPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList )
383 _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aHelpText ) );
384 m_aMySQLSettings.fillWindows( _rControlList );
387 // -----------------------------------------------------------------------
388 sal_Bool MySQLNativeSetupPage::FillItemSet( SfxItemSet& _rSet )
390 return m_aMySQLSettings.FillItemSet( _rSet );
393 // -----------------------------------------------------------------------
394 void MySQLNativeSetupPage::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue )
396 m_aMySQLSettings.implInitControls( _rSet );
398 OGenericAdministrationPage::implInitControls( _rSet, _bSaveValue );
400 OnModified( NULL );
403 // -----------------------------------------------------------------------
404 Link MySQLNativeSetupPage::getControlModifiedLink()
406 return LINK( this, MySQLNativeSetupPage, OnModified );
409 // -----------------------------------------------------------------------
410 IMPL_LINK( MySQLNativeSetupPage, OnModified, Edit*, _pEdit )
412 SetRoadmapStateValue( m_aMySQLSettings.canAdvance() );
414 return OGenericAdministrationPage::getControlModifiedLink().Call( _pEdit );
417 //========================================================================
418 //= OMySQLJDBCConnectionPageSetup
419 //========================================================================
420 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)
421 :OGenericAdministrationPage(pParent, ModuleRes(_nResId), _rCoreAttrs)
422 ,m_aFTHelpText (this, ModuleRes(FT_AUTOWIZARDHELPTEXT))
423 ,m_aFTDatabasename (this, ModuleRes(FT_AUTODATABASENAME))
424 ,m_aETDatabasename (this, ModuleRes(ET_AUTODATABASENAME))
425 ,m_aFTHostname (this, ModuleRes(FT_AUTOHOSTNAME))
426 ,m_aETHostname (this, ModuleRes(ET_AUTOHOSTNAME))
427 ,m_aFTPortNumber (this, ModuleRes(FT_AUTOPORTNUMBER))
428 ,m_aFTDefaultPortNumber (this, ModuleRes(FT_AUTOPORTNUMBERDEFAULT))
429 ,m_aNFPortNumber (this, ModuleRes(NF_AUTOPORTNUMBER))
430 ,m_aFTDriverClass (this, ModuleRes(FT_AUTOJDBCDRIVERCLASS))
431 ,m_aETDriverClass (this, ModuleRes(ET_AUTOJDBCDRIVERCLASS))
432 ,m_aPBTestJavaDriver (this, ModuleRes(PB_AUTOTESTDRIVERCLASS))
433 ,m_nPortId(_nPortId)
435 m_aFTDriverClass.SetText(String(ModuleRes(_nDriverClassId)));
437 m_aFTDefaultPortNumber.SetText(String(ModuleRes(_nDefaultPortResId)));
438 String sHelpText = String(ModuleRes(_nHelpTextResId));
439 m_aFTHelpText.SetText(sHelpText);
440 //TODO this code snippet is redundant
441 SetHeaderText(FT_AUTOWIZARDHEADER, _nHeaderTextResId);
443 m_aETDatabasename.SetModifyHdl(getControlModifiedLink());
444 m_aETHostname.SetModifyHdl(getControlModifiedLink());
445 m_aNFPortNumber.SetModifyHdl(getControlModifiedLink());
447 m_aETDriverClass.SetModifyHdl(LINK(this, OGeneralSpecialJDBCConnectionPageSetup, OnEditModified));
448 m_aPBTestJavaDriver.SetClickHdl(LINK(this,OGeneralSpecialJDBCConnectionPageSetup,OnTestJavaClickHdl));
450 SFX_ITEMSET_GET(_rCoreAttrs, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True);
451 SFX_ITEMSET_GET(_rCoreAttrs, pTypesItem, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True);
452 ::dbaccess::ODsnTypeCollection* pTypeCollection = pTypesItem ? pTypesItem->getCollection() : NULL;
453 if (pTypeCollection && pUrlItem && pUrlItem->GetValue().Len() )
455 m_sDefaultJdbcDriverName = pTypeCollection->getJavaDriverClass(pUrlItem->GetValue());
458 SetRoadmapStateValue(sal_False);
459 FreeResource();
463 // -----------------------------------------------------------------------
464 OGenericAdministrationPage* OGeneralSpecialJDBCConnectionPageSetup::CreateMySQLJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
466 return ( new OGeneralSpecialJDBCConnectionPageSetup( pParent,
467 PAGE_DBWIZARD_MYSQL_JDBC,
468 _rAttrSet,
469 DSID_MYSQL_PORTNUMBER ,
470 STR_MYSQL_DEFAULT,
471 STR_MYSQLJDBC_HELPTEXT,
472 STR_MYSQLJDBC_HEADERTEXT,
473 STR_MYSQL_DRIVERCLASSTEXT) );
476 // -----------------------------------------------------------------------
477 OGenericAdministrationPage* OGeneralSpecialJDBCConnectionPageSetup::CreateOracleJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
479 return ( new OGeneralSpecialJDBCConnectionPageSetup( pParent,
480 PAGE_DBWIZARD_ORACLE,
481 _rAttrSet,
482 DSID_ORACLE_PORTNUMBER,
483 STR_ORACLE_DEFAULT,
484 STR_ORACLE_HELPTEXT,
485 STR_ORACLE_HEADERTEXT,
486 STR_ORACLE_DRIVERCLASSTEXT) );
489 // -----------------------------------------------------------------------
490 void OGeneralSpecialJDBCConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
492 _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETDatabasename));
493 _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETDriverClass));
494 _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETHostname));
495 _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber));
497 // -----------------------------------------------------------------------
498 void OGeneralSpecialJDBCConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
500 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHelpText));
501 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDatabasename));
502 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHostname));
503 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTPortNumber));
504 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDefaultPortNumber));
505 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDriverClass));
508 // -----------------------------------------------------------------------
509 sal_Bool OGeneralSpecialJDBCConnectionPageSetup::FillItemSet( SfxItemSet& _rSet )
511 sal_Bool bChangedSomething = sal_False;
512 fillString(_rSet,&m_aETDriverClass,DSID_JDBCDRIVERCLASS,bChangedSomething);
513 fillString(_rSet,&m_aETHostname,DSID_CONN_HOSTNAME,bChangedSomething);
514 fillString(_rSet,&m_aETDatabasename,DSID_DATABASENAME,bChangedSomething);
515 fillInt32(_rSet,&m_aNFPortNumber,m_nPortId,bChangedSomething );
516 return bChangedSomething;
519 // -----------------------------------------------------------------------
520 void OGeneralSpecialJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue)
522 // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
523 sal_Bool bValid, bReadonly;
524 getFlags(_rSet, bValid, bReadonly);
526 SFX_ITEMSET_GET(_rSet, pDatabaseName, SfxStringItem, DSID_DATABASENAME, sal_True);
527 SFX_ITEMSET_GET(_rSet, pDrvItem, SfxStringItem, DSID_JDBCDRIVERCLASS, sal_True);
528 SFX_ITEMSET_GET(_rSet, pHostName, SfxStringItem, DSID_CONN_HOSTNAME, sal_True);
529 SFX_ITEMSET_GET(_rSet, pPortNumber, SfxInt32Item, m_nPortId, sal_True);
531 if ( bValid )
533 m_aETDatabasename.SetText(pDatabaseName->GetValue());
534 m_aETDatabasename.ClearModifyFlag();
536 m_aETDriverClass.SetText(pDrvItem->GetValue());
537 m_aETDriverClass.ClearModifyFlag();
539 m_aETHostname.SetText(pHostName->GetValue());
540 m_aETHostname.ClearModifyFlag();
542 m_aNFPortNumber.SetValue(pPortNumber->GetValue());
543 m_aNFPortNumber.ClearModifyFlag();
545 OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
547 // to get the correct value when saveValue was called by base class
548 if ( !m_aETDriverClass.GetText().Len() )
550 m_aETDriverClass.SetText(m_sDefaultJdbcDriverName);
551 m_aETDriverClass.SetModifyFlag();
553 callModifiedHdl();
555 sal_Bool bRoadmapState = ((m_aETDatabasename.GetText().Len() != 0 ) && ( m_aETHostname.GetText().Len() != 0 ) && (m_aNFPortNumber.GetText().Len() != 0 ) && ( m_aETDriverClass.GetText().Len() != 0 ));
556 SetRoadmapStateValue(bRoadmapState);
559 // -----------------------------------------------------------------------
560 IMPL_LINK(OGeneralSpecialJDBCConnectionPageSetup, OnTestJavaClickHdl, PushButton*, /*_pButton*/)
562 OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
564 sal_Bool bSuccess = sal_False;
567 if ( m_aETDriverClass.GetText().Len() )
569 // TODO chage jvmaccess
570 ::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM(m_pAdminDialog->getORB());
571 bSuccess = ::connectivity::existsJavaClassByName(xJVM,m_aETDriverClass.GetText());
574 catch(::com::sun::star::uno::Exception&)
578 const sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
579 const OSQLMessageBox::MessageType mt = bSuccess ? OSQLMessageBox::Info : OSQLMessageBox::Error;
580 OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String(), WB_OK | WB_DEF_OK, mt );
581 aMsg.Execute();
582 return 0L;
585 // -----------------------------------------------------------------------
586 IMPL_LINK(OGeneralSpecialJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit)
588 if ( _pEdit == &m_aETDriverClass )
589 m_aPBTestJavaDriver.Enable( m_aETDriverClass.GetText().Len() != 0 );
590 sal_Bool bRoadmapState = ((m_aETDatabasename.GetText().Len() != 0 ) && ( m_aETHostname.GetText().Len() != 0 ) && (m_aNFPortNumber.GetText().Len() != 0 ) && ( m_aETDriverClass.GetText().Len() != 0 ));
591 SetRoadmapStateValue(bRoadmapState);
592 callModifiedHdl();
593 return 0L;
596 // -----------------------------------------------------------------------
597 OGenericAdministrationPage* OJDBCConnectionPageSetup::CreateJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
599 return ( new OJDBCConnectionPageSetup( pParent, _rAttrSet));
603 //========================================================================
604 //= OMySQLJDBCConnectionPageSetup
605 //========================================================================
606 OJDBCConnectionPageSetup::OJDBCConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs)
607 :OConnectionTabPageSetup(pParent, PAGE_DBWIZARD_JDBC, _rCoreAttrs, STR_JDBC_HELPTEXT, STR_JDBC_HEADERTEXT, STR_COMMONURL)
608 ,m_aFTDriverClass (this, ModuleRes(FT_AUTOJDBCDRIVERCLASS))
609 ,m_aETDriverClass (this, ModuleRes(ET_AUTOJDBCDRIVERCLASS))
610 ,m_aPBTestJavaDriver (this, ModuleRes(PB_AUTOTESTDRIVERCLASS))
612 m_aETDriverClass.SetModifyHdl(LINK(this, OJDBCConnectionPageSetup, OnEditModified));
613 m_aPBTestJavaDriver.SetClickHdl(LINK(this,OJDBCConnectionPageSetup,OnTestJavaClickHdl));
614 FreeResource();
617 // -----------------------------------------------------------------------
618 void OJDBCConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
620 _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETDriverClass));
623 // -----------------------------------------------------------------------
624 void OJDBCConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
626 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDriverClass));
629 // -----------------------------------------------------------------------
630 sal_Bool OJDBCConnectionPageSetup::FillItemSet( SfxItemSet& _rSet )
632 sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet);
633 fillString(_rSet,&m_aETDriverClass,DSID_JDBCDRIVERCLASS,bChangedSomething);
634 return bChangedSomething;
637 // -----------------------------------------------------------------------
638 void OJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue)
640 // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
641 sal_Bool bValid, bReadonly;
642 getFlags(_rSet, bValid, bReadonly);
644 SFX_ITEMSET_GET(_rSet, pDrvItem, SfxStringItem, DSID_JDBCDRIVERCLASS, sal_True);
646 if ( bValid )
648 if ( !pDrvItem->GetValue().Len() )
650 String sDefaultJdbcDriverName = m_pCollection->getJavaDriverClass(m_eType);
651 if ( sDefaultJdbcDriverName.Len() )
653 m_aETDriverClass.SetText(sDefaultJdbcDriverName);
654 m_aETDriverClass.SetModifyFlag();
657 else
659 m_aETDriverClass.SetText(pDrvItem->GetValue());
660 m_aETDriverClass.ClearModifyFlag();
663 sal_Bool bEnable = pDrvItem->GetValue().Len() != 0;
664 m_aPBTestJavaDriver.Enable(bEnable);
665 OConnectionTabPageSetup::implInitControls(_rSet, _bSaveValue);
667 SetRoadmapStateValue(checkTestConnection());
671 bool OJDBCConnectionPageSetup::checkTestConnection()
673 OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
674 sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
675 bEnableTestConnection = bEnableTestConnection && (m_aETDriverClass.GetText().Len() != 0);
676 return bEnableTestConnection;
680 // -----------------------------------------------------------------------
681 IMPL_LINK(OJDBCConnectionPageSetup, OnTestJavaClickHdl, PushButton*, /*_pButton*/)
683 OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
684 sal_Bool bSuccess = sal_False;
687 if ( m_aETDriverClass.GetText().Len() )
689 // TODO chage jvmaccess
690 ::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM(m_pAdminDialog->getORB());
691 bSuccess = xJVM.is() && ::connectivity::existsJavaClassByName(xJVM,m_aETDriverClass.GetText());
694 catch(::com::sun::star::uno::Exception&)
698 sal_uInt16 nMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
699 OSQLMessageBox aMsg( this, String( ModuleRes( nMessage ) ), String() );
700 aMsg.Execute();
701 return 0L;
704 // -----------------------------------------------------------------------
705 IMPL_LINK(OJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit)
707 if ( _pEdit == &m_aETDriverClass )
708 m_aPBTestJavaDriver.Enable( m_aETDriverClass.GetText().Len() != 0 );
709 SetRoadmapStateValue(checkTestConnection());
710 // tell the listener we were modified
711 callModifiedHdl();
712 return 0L;
716 OGenericAdministrationPage* OSpreadSheetConnectionPageSetup::CreateSpreadSheetTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
718 return ( new OSpreadSheetConnectionPageSetup( pParent, _rAttrSet ) );
721 DBG_NAME(OSpreadSheetConnectionPageSetup)
723 OSpreadSheetConnectionPageSetup::OSpreadSheetConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs )
724 :OConnectionTabPageSetup(pParent, PAGE_DBWIZARD_SPREADSHEET, _rCoreAttrs, STR_SPREADSHEET_HELPTEXT, STR_SPREADSHEET_HEADERTEXT, STR_SPREADSHEETPATH)
725 , m_aCBPasswordrequired(this, ModuleRes(CB_SPREADSHEETPASSWORDREQUIRED))
727 DBG_CTOR(OSpreadSheetConnectionPageSetup,NULL);
729 m_aCBPasswordrequired.SetToggleHdl(getControlModifiedLink());
730 FreeResource();
734 // -----------------------------------------------------------------------
735 OSpreadSheetConnectionPageSetup::~OSpreadSheetConnectionPageSetup()
738 DBG_DTOR(OSpreadSheetConnectionPageSetup,NULL);
742 void OSpreadSheetConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlList*/)
746 // -----------------------------------------------------------------------
747 void OSpreadSheetConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
749 OConnectionTabPageSetup::fillControls(_rControlList);
750 _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBPasswordrequired));
754 // -----------------------------------------------------------------------
755 void OSpreadSheetConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue)
757 OConnectionTabPageSetup::implInitControls(_rSet, _bSaveValue);
760 // -----------------------------------------------------------------------
761 sal_Bool OSpreadSheetConnectionPageSetup::FillItemSet( SfxItemSet& _rSet )
763 sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet);
764 fillBool(_rSet,&m_aCBPasswordrequired,DSID_PASSWORDREQUIRED,bChangedSomething);
765 return bChangedSomething;
768 OGenericAdministrationPage* OAuthentificationPageSetup::CreateAuthentificationTabPage( Window* pParent, const SfxItemSet& _rAttrSet )
770 return ( new OAuthentificationPageSetup( pParent, _rAttrSet) );
773 DBG_NAME(OAuthentificationPageSetup)
775 OAuthentificationPageSetup::OAuthentificationPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs )
776 :OGenericAdministrationPage(pParent, ModuleRes(PAGE_DBWIZARD_AUTHENTIFICATION), _rCoreAttrs )
777 , m_aFTHelpText (this, ModuleRes(FT_AUTHENTIFICATIONHELPTEXT))
778 , m_aFTHeaderText (this, ModuleRes(FT_AUTHENTIFICATIONHEADERTEXT))
779 , m_aFTUserName (this, ModuleRes(FT_GENERALUSERNAME))
780 , m_aETUserName (this, ModuleRes(ET_GENERALUSERNAME))
781 , m_aCBPasswordRequired (this, ModuleRes(CB_GENERALPASSWORDREQUIRED))
782 , m_aPBTestConnection (this, ModuleRes(PB_TESTCONNECTION))
784 DBG_CTOR(OAuthentificationPageSetup,NULL);
786 SetControlFontWeight(&m_aFTHeaderText);
787 m_aETUserName.SetModifyHdl(getControlModifiedLink());
788 m_aCBPasswordRequired.SetClickHdl(getControlModifiedLink());
789 m_aPBTestConnection.SetClickHdl(LINK(this,OGenericAdministrationPage,OnTestConnectionClickHdl));
790 FreeResource();
792 LayoutHelper::fitSizeRightAligned( m_aPBTestConnection );
796 // -----------------------------------------------------------------------
797 OAuthentificationPageSetup::~OAuthentificationPageSetup()
800 DBG_DTOR(OAuthentificationPageSetup,NULL);
804 void OAuthentificationPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
806 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHelpText));
807 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTUserName));
808 _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aPBTestConnection));
811 // -----------------------------------------------------------------------
812 void OAuthentificationPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
814 _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETUserName));
815 _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBPasswordRequired));
818 // -----------------------------------------------------------------------
819 void OAuthentificationPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool /*_bSaveValue*/)
821 // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
822 sal_Bool bValid, bReadonly;
823 getFlags(_rSet, bValid, bReadonly);
824 SFX_ITEMSET_GET(_rSet, pUidItem, SfxStringItem, DSID_USER, sal_True);
825 SFX_ITEMSET_GET(_rSet, pAllowEmptyPwd, SfxBoolItem, DSID_PASSWORDREQUIRED, sal_True);
827 m_aETUserName.SetText(pUidItem->GetValue());
828 m_aCBPasswordRequired.Check(pAllowEmptyPwd->GetValue());
830 m_aETUserName.ClearModifyFlag();
833 // -----------------------------------------------------------------------
834 sal_Bool OAuthentificationPageSetup::FillItemSet( SfxItemSet& _rSet )
836 sal_Bool bChangedSomething = sal_False;
838 if (m_aETUserName.GetText() != m_aETUserName.GetSavedValue())
840 _rSet.Put(SfxStringItem(DSID_USER, m_aETUserName.GetText()));
841 _rSet.Put(SfxStringItem(DSID_PASSWORD, String()));
842 bChangedSomething = sal_True;
844 fillBool(_rSet,&m_aCBPasswordRequired,DSID_PASSWORDREQUIRED,bChangedSomething);
845 return bChangedSomething;
849 OGenericAdministrationPage* OFinalDBPageSetup::CreateFinalDBTabPageSetup( Window* pParent, const SfxItemSet& _rAttrSet)
851 return ( new OFinalDBPageSetup( pParent, _rAttrSet) );
854 DBG_NAME(OFinalDBPageSetup)
856 OFinalDBPageSetup::OFinalDBPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs )
857 :OGenericAdministrationPage(pParent, ModuleRes(PAGE_DBWIZARD_FINAL), _rCoreAttrs )
858 , m_aFTFinalHeader (this, ModuleRes(FT_FINALHEADER))
859 , m_aFTFinalHelpText (this, ModuleRes(FT_FINALHELPTEXT))
860 , m_aRBRegisterDataSource (this, ModuleRes(RB_REGISTERDATASOURCE))
861 , m_aRBDontregisterDataSource (this, ModuleRes(RB_DONTREGISTERDATASOURCE))
862 , m_aFTAdditionalSettings (this, ModuleRes(FT_ADDITIONALSETTINGS))
863 , m_aCBOpenAfterwards (this, ModuleRes(CB_OPENAFTERWARDS))
864 , m_aCBStartTableWizard (this, ModuleRes(CB_STARTTABLEWIZARD))
865 , m_aFTFinalText (this, ModuleRes(FT_FINALTEXT))
867 DBG_CTOR(OFinalDBPageSetup,NULL);
869 String stext = m_aFTFinalHeader.GetText();
870 SetControlFontWeight(&m_aFTFinalHeader);
871 m_aCBOpenAfterwards.SetClickHdl(LINK(this, OFinalDBPageSetup, OnOpenSelected));
872 m_aCBStartTableWizard.SetClickHdl(getControlModifiedLink());
873 m_aRBRegisterDataSource.SetState(sal_True);
874 FreeResource();
876 sal_Int32 nUnrelatedHeight = LogicToPixel( Size( 0, UNRELATED_CONTROLS ), MAP_APPFONT ).Height();
877 sal_Int32 nRelatedHeight = LogicToPixel( Size( 0, RELATED_CONTROLS ), MAP_APPFONT ).Height();
879 ::std::pair<Window*,sal_Int32> pWindows[] = {
880 ::std::pair<Window*,sal_Int32>(&m_aFTFinalHelpText,nRelatedHeight)
881 ,::std::pair<Window*,sal_Int32>(&m_aRBRegisterDataSource,nRelatedHeight)
882 ,::std::pair<Window*,sal_Int32>(&m_aRBDontregisterDataSource,nUnrelatedHeight)
883 ,::std::pair<Window*,sal_Int32>(&m_aFTAdditionalSettings,nRelatedHeight)
884 ,::std::pair<Window*,sal_Int32>(&m_aCBOpenAfterwards,nRelatedHeight)
885 ,::std::pair<Window*,sal_Int32>(&m_aCBStartTableWizard,nUnrelatedHeight)
886 ,::std::pair<Window*,sal_Int32>(&m_aFTFinalText,nUnrelatedHeight)
889 Point aPos(m_aFTFinalHeader.GetPosPixel());
890 Size aStart(m_aFTFinalHeader.GetSizePixel());
891 aPos.Y() += aStart.Height() + nUnrelatedHeight;
892 sal_Int32 nCount = sizeof(pWindows) / sizeof(pWindows[0]);
893 for (sal_Int32 i=0; i < nCount; ++i)
895 aPos.X() = pWindows[i].first->GetPosPixel().X();
896 Size aSize = pWindows[i].first->GetSizePixel();
897 FixedText* pText = dynamic_cast<FixedText*>(pWindows[i].first);
898 if ( pText )
899 aSize = pText->CalcMinimumSize(aSize.Width());
900 pWindows[i].first->SetPosSizePixel(aPos,aSize);
901 aPos.Y() += aSize.Height() + pWindows[i].second;
906 // -----------------------------------------------------------------------
907 OFinalDBPageSetup::~OFinalDBPageSetup()
910 DBG_DTOR(OFinalDBPageSetup,NULL);
913 sal_Bool OFinalDBPageSetup::IsDatabaseDocumentToBeRegistered()
915 return m_aRBRegisterDataSource.IsChecked() && m_aRBRegisterDataSource.IsEnabled();
918 sal_Bool OFinalDBPageSetup::IsDatabaseDocumentToBeOpened()
920 return m_aCBOpenAfterwards.IsChecked() && m_aCBOpenAfterwards.IsEnabled();
923 sal_Bool OFinalDBPageSetup::IsTableWizardToBeStarted()
925 return m_aCBStartTableWizard.IsChecked() && m_aCBStartTableWizard.IsEnabled();
929 void OFinalDBPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList)
931 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTFinalHeader));
932 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTFinalHelpText));
933 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTAdditionalSettings));
934 _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTFinalText));
937 // -----------------------------------------------------------------------
938 void OFinalDBPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList)
940 _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBOpenAfterwards));
941 _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBStartTableWizard));
942 _rControlList.push_back(new OSaveValueWrapper<RadioButton>(&m_aRBRegisterDataSource));
943 _rControlList.push_back(new OSaveValueWrapper<RadioButton>(&m_aRBDontregisterDataSource));
946 // -----------------------------------------------------------------------
947 void OFinalDBPageSetup::implInitControls(const SfxItemSet& /*_rSet*/, sal_Bool /*_bSaveValue*/)
949 m_aCBOpenAfterwards.Check();
952 void OFinalDBPageSetup::enableTableWizardCheckBox( sal_Bool _bSupportsTableCreation)
954 m_aCBStartTableWizard.Enable(_bSupportsTableCreation);
957 // -----------------------------------------------------------------------
958 sal_Bool OFinalDBPageSetup::FillItemSet( SfxItemSet& /*_rSet*/ )
960 return sal_True;
962 // -----------------------------------------------------------------------------
963 IMPL_LINK(OFinalDBPageSetup, OnOpenSelected, CheckBox*, _pBox)
965 m_aCBStartTableWizard.Enable( _pBox->IsEnabled() && _pBox->IsChecked() );
966 callModifiedHdl();
967 // outta here
968 return 0L;
970 //.........................................................................
972 // namespace dbaui
973 //.........................................................................
975 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */