2004-08-02 09:45:10 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-08 08:57:15 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-08-02 09:45:10 -05:00
|
|
|
*
|
2005-09-08 08:57:15 -05:00
|
|
|
* $RCSfile: dbwiz.cxx,v $
|
2004-08-02 09:45:10 -05:00
|
|
|
*
|
2007-11-01 09:12:00 -05:00
|
|
|
* $Revision: 1.17 $
|
2004-08-02 09:45:10 -05:00
|
|
|
*
|
2007-11-01 09:12:00 -05:00
|
|
|
* last change: $Author: hr $ $Date: 2007-11-01 15:12:00 $
|
2004-08-02 09:45:10 -05:00
|
|
|
*
|
2005-09-08 08:57:15 -05:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2004-08-02 09:45:10 -05:00
|
|
|
*
|
|
|
|
*
|
2005-09-08 08:57:15 -05:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2004-08-02 09:45:10 -05:00
|
|
|
*
|
2005-09-08 08:57:15 -05:00
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
2004-08-02 09:45:10 -05:00
|
|
|
*
|
2005-09-08 08:57:15 -05:00
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2004-08-02 09:45:10 -05:00
|
|
|
*
|
2005-09-08 08:57:15 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
2004-08-02 09:45:10 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-17 01:08:13 -05:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_dbaccess.hxx"
|
|
|
|
|
2004-08-02 09:45:10 -05:00
|
|
|
#ifndef DBAUI_DBWIZ_HXX
|
|
|
|
#include "dbwiz.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBAUI_DBADMIN_HRC_
|
|
|
|
#include "dbadmin.hrc"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBU_DLG_HRC_
|
|
|
|
#include "dbu_dlg.hrc"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBAUI_DATASOURCEITEMS_HXX_
|
|
|
|
#include "dsitems.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _SFXSTRITEM_HXX
|
|
|
|
#include <svtools/stritem.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _SFXENUMITEM_HXX
|
|
|
|
#include <svtools/eitem.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _SFXINTITEM_HXX
|
|
|
|
#include <svtools/intitem.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _SV_MSGBOX_HXX
|
|
|
|
#include <vcl/msgbox.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef DBACCESS_SHARED_DBUSTRINGS_HRC
|
|
|
|
#include "dbustrings.hrc"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBAUI_ADMINPAGES_HXX_
|
|
|
|
#include "adminpages.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBAUI_GENERALPAGE_HXX_
|
|
|
|
#include "generalpage.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBAUI_LOCALRESACCESS_HXX_
|
|
|
|
#include "localresaccess.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBAUI_STRINGLISTITEM_HXX_
|
|
|
|
#include "stringlistitem.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBAUI_PROPERTYSETITEM_HXX_
|
|
|
|
#include "propertysetitem.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _UNOTOOLS_CONFIGNODE_HXX_
|
|
|
|
#include <unotools/confignode.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef DBAUI_CONNECTIONPAGE_HXX
|
|
|
|
#include "ConnectionPage.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef DBAUI_DRIVERSETTINGS_HXX
|
|
|
|
#include "DriverSettings.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBAUI_DBADMINIMPL_HXX_
|
|
|
|
#include "DbAdminImpl.hxx"
|
|
|
|
#endif
|
|
|
|
#ifndef _DBA_DBACCESS_HELPID_HRC_
|
|
|
|
#include "dbaccess_helpid.hrc"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//.........................................................................
|
|
|
|
namespace dbaui
|
|
|
|
{
|
|
|
|
//.........................................................................
|
|
|
|
using namespace svt;
|
|
|
|
using namespace com::sun::star::uno;
|
|
|
|
using namespace com::sun::star::sdbc;
|
|
|
|
using namespace com::sun::star::lang;
|
|
|
|
using namespace com::sun::star::util;
|
|
|
|
using namespace com::sun::star::beans;
|
|
|
|
using namespace com::sun::star::container;
|
|
|
|
|
2004-10-27 07:02:39 -05:00
|
|
|
#define START_PAGE 0
|
|
|
|
#define CONNECTION_PAGE 1
|
|
|
|
#define ADDITIONAL_PAGE_DBASE 2
|
|
|
|
#define ADDITIONAL_PAGE_FLAT 3
|
|
|
|
#define ADDITIONAL_PAGE_LDAP 4
|
|
|
|
#define ADDITIONAL_PAGE_ADABAS 5
|
|
|
|
#define ADDITIONAL_PAGE_MYSQL_JDBC 6
|
|
|
|
#define ADDITIONAL_PAGE_MYSQL_ODBC 7
|
|
|
|
#define ADDITIONAL_PAGE_ORACLE_JDBC 8
|
|
|
|
#define ADDITIONAL_PAGE_ADO 9
|
|
|
|
#define ADDITIONAL_PAGE_ODBC 10
|
|
|
|
#define ADDITIONAL_USERDEFINED 11
|
2004-08-02 09:45:10 -05:00
|
|
|
|
|
|
|
|
|
|
|
DBG_NAME(ODbTypeWizDialog)
|
|
|
|
//=========================================================================
|
|
|
|
//= ODbTypeWizDialog
|
|
|
|
//=========================================================================
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent
|
|
|
|
,SfxItemSet* _pItems
|
|
|
|
,const Reference< XMultiServiceFactory >& _rxORB
|
|
|
|
,const ::com::sun::star::uno::Any& _aDataSourceName
|
|
|
|
)
|
|
|
|
:OWizardMachine(_pParent, ModuleRes(DLG_DATABASE_TYPE_CHANGE), WZB_NEXT | WZB_PREVIOUS | WZB_FINISH | WZB_CANCEL | WZB_HELP, sal_True)
|
2006-06-19 21:06:18 -05:00
|
|
|
,m_pOutSet(NULL)
|
2004-08-02 09:45:10 -05:00
|
|
|
,m_bResetting(sal_False)
|
|
|
|
,m_bApplied(sal_False)
|
|
|
|
,m_bUIEnabled( sal_True )
|
|
|
|
{
|
|
|
|
DBG_CTOR(ODbTypeWizDialog,NULL);
|
|
|
|
m_pImpl = ::std::auto_ptr<ODbDataSourceAdministrationHelper>(new ODbDataSourceAdministrationHelper(_rxORB,this,this));
|
2005-06-30 10:32:42 -05:00
|
|
|
m_pImpl->setDataSourceOrName(_aDataSourceName);
|
2004-08-02 09:45:10 -05:00
|
|
|
Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource();
|
|
|
|
m_pOutSet = new SfxItemSet( *_pItems->GetPool(), _pItems->GetRanges() );
|
|
|
|
|
|
|
|
m_pImpl->translateProperties(xDatasource, *m_pOutSet);
|
|
|
|
m_eType = m_pImpl->getDatasourceType(*m_pOutSet);
|
|
|
|
|
|
|
|
SetPageSizePixel(LogicToPixel(::Size(PAGE_X, PAGE_Y), MAP_APPFONT));
|
|
|
|
ShowButtonFixedLine(sal_True);
|
|
|
|
defaultButton(WZB_NEXT);
|
|
|
|
enableButtons(WZB_FINISH, sal_False);
|
|
|
|
|
|
|
|
m_pPrevPage->SetHelpId(HID_DBWIZ_PREVIOUS);
|
|
|
|
m_pNextPage->SetHelpId(HID_DBWIZ_NEXT);
|
|
|
|
m_pCancel->SetHelpId(HID_DBWIZ_CANCEL);
|
|
|
|
m_pFinish->SetHelpId(HID_DBWIZ_FINISH);
|
|
|
|
m_pHelp->SetUniqueId(UID_DBWIZ_HELP);
|
|
|
|
// no local resources needed anymore
|
|
|
|
FreeResource();
|
|
|
|
ActivatePage();
|
|
|
|
}
|
|
|
|
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
ODbTypeWizDialog::~ODbTypeWizDialog()
|
|
|
|
{
|
|
|
|
DBG_DTOR(ODbTypeWizDialog,NULL);
|
|
|
|
delete m_pOutSet;
|
|
|
|
}
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
IMPL_LINK(ODbTypeWizDialog, OnTypeSelected, OGeneralPage*, _pTabPage)
|
|
|
|
{
|
|
|
|
m_eType = _pTabPage->GetSelectedType();
|
2005-03-10 09:49:19 -06:00
|
|
|
switch(m_eType)
|
|
|
|
{
|
|
|
|
case DST_MOZILLA:
|
|
|
|
case DST_OUTLOOK:
|
|
|
|
case DST_OUTLOOKEXP:
|
|
|
|
case DST_EVOLUTION:
|
2005-12-19 10:16:54 -06:00
|
|
|
case DST_KAB:
|
2007-09-13 11:58:43 -05:00
|
|
|
case DST_MACAB:
|
2005-03-10 09:49:19 -06:00
|
|
|
enableButtons(WZB_NEXT,sal_False);
|
|
|
|
enableButtons(WZB_FINISH,sal_True);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
enableButtons(WZB_NEXT,sal_True);
|
|
|
|
enableButtons(WZB_FINISH,sal_False);
|
|
|
|
break;
|
|
|
|
}
|
2004-08-02 09:45:10 -05:00
|
|
|
return 1L;
|
|
|
|
}
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
WizardTypes::WizardState ODbTypeWizDialog::determineNextState(WizardState _nCurrentState)
|
|
|
|
{
|
|
|
|
WizardTypes::WizardState nNextState = WZS_INVALID_STATE;
|
|
|
|
switch(_nCurrentState)
|
|
|
|
{
|
|
|
|
case START_PAGE:
|
2005-03-10 09:49:19 -06:00
|
|
|
switch(m_eType)
|
|
|
|
{
|
|
|
|
case DST_MOZILLA:
|
|
|
|
case DST_OUTLOOK:
|
|
|
|
case DST_OUTLOOKEXP:
|
|
|
|
case DST_EVOLUTION:
|
2005-12-19 10:16:54 -06:00
|
|
|
case DST_KAB:
|
2007-09-13 11:58:43 -05:00
|
|
|
case DST_MACAB:
|
2005-03-10 09:49:19 -06:00
|
|
|
nNextState = WZS_INVALID_STATE;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
nNextState = CONNECTION_PAGE;
|
|
|
|
break;
|
|
|
|
}
|
2004-08-02 09:45:10 -05:00
|
|
|
break;
|
|
|
|
case CONNECTION_PAGE:
|
|
|
|
switch(m_eType)
|
|
|
|
{
|
|
|
|
case DST_MOZILLA:
|
2005-02-21 05:43:25 -06:00
|
|
|
case DST_THUNDERBIRD:
|
2004-08-02 09:45:10 -05:00
|
|
|
case DST_OUTLOOK:
|
|
|
|
case DST_OUTLOOKEXP:
|
|
|
|
case DST_EVOLUTION:
|
2005-12-19 10:16:54 -06:00
|
|
|
case DST_KAB:
|
2007-09-13 11:58:43 -05:00
|
|
|
case DST_MACAB:
|
2004-08-02 09:45:10 -05:00
|
|
|
case DST_MSACCESS:
|
|
|
|
case DST_JDBC:
|
|
|
|
case DST_CALC:
|
|
|
|
nNextState = WZS_INVALID_STATE;
|
|
|
|
break;
|
2004-10-27 07:02:39 -05:00
|
|
|
case DST_DBASE:
|
|
|
|
nNextState = ADDITIONAL_PAGE_DBASE;
|
|
|
|
break;
|
|
|
|
case DST_FLAT:
|
|
|
|
nNextState = ADDITIONAL_PAGE_FLAT;
|
|
|
|
break;
|
|
|
|
case DST_LDAP:
|
|
|
|
nNextState = ADDITIONAL_PAGE_LDAP;
|
|
|
|
break;
|
|
|
|
case DST_ADABAS:
|
|
|
|
nNextState = ADDITIONAL_PAGE_ADABAS;
|
|
|
|
break;
|
|
|
|
case DST_MYSQL_JDBC:
|
|
|
|
nNextState = ADDITIONAL_PAGE_MYSQL_JDBC;
|
|
|
|
break;
|
|
|
|
case DST_MYSQL_ODBC:
|
|
|
|
nNextState = ADDITIONAL_PAGE_MYSQL_ODBC;
|
|
|
|
break;
|
|
|
|
case DST_ORACLE_JDBC:
|
|
|
|
nNextState = ADDITIONAL_PAGE_ORACLE_JDBC;
|
|
|
|
break;
|
|
|
|
case DST_ADO:
|
|
|
|
nNextState = ADDITIONAL_PAGE_ADO;
|
|
|
|
break;
|
|
|
|
case DST_ODBC:
|
|
|
|
nNextState = ADDITIONAL_PAGE_ODBC;
|
|
|
|
break;
|
2004-08-02 09:45:10 -05:00
|
|
|
default:
|
2004-10-27 07:02:39 -05:00
|
|
|
nNextState = WZS_INVALID_STATE;
|
2004-08-02 09:45:10 -05:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return nNextState;
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
const SfxItemSet* ODbTypeWizDialog::getOutputSet() const
|
|
|
|
{
|
|
|
|
return m_pOutSet;
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
SfxItemSet* ODbTypeWizDialog::getWriteOutputSet()
|
|
|
|
{
|
|
|
|
return m_pOutSet;
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
2005-01-21 10:14:46 -06:00
|
|
|
::std::pair< Reference<XConnection>,sal_Bool> ODbTypeWizDialog::createConnection()
|
2004-08-02 09:45:10 -05:00
|
|
|
{
|
|
|
|
return m_pImpl->createConnection();
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
2007-11-01 09:12:00 -05:00
|
|
|
Reference< XMultiServiceFactory > ODbTypeWizDialog::getORB() const
|
2004-08-02 09:45:10 -05:00
|
|
|
{
|
|
|
|
return m_pImpl->getORB();
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
Reference< XDriver > ODbTypeWizDialog::getDriver()
|
|
|
|
{
|
|
|
|
return m_pImpl->getDriver();
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
DATASOURCE_TYPE ODbTypeWizDialog::getDatasourceType(const SfxItemSet& _rSet) const
|
|
|
|
{
|
|
|
|
return m_pImpl->getDatasourceType(_rSet);
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void ODbTypeWizDialog::clearPassword()
|
|
|
|
{
|
|
|
|
m_pImpl->clearPassword();
|
|
|
|
}
|
2004-10-27 07:02:39 -05:00
|
|
|
|
2004-08-02 09:45:10 -05:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
TabPage* ODbTypeWizDialog::createPage(WizardState _nState)
|
|
|
|
{
|
|
|
|
USHORT nStringId = STR_PAGETITLE_ADVANCED;
|
|
|
|
TabPage* pPage = NULL;
|
|
|
|
switch(_nState)
|
|
|
|
{
|
|
|
|
case START_PAGE: // start state
|
2005-06-30 10:32:42 -05:00
|
|
|
{
|
2004-08-02 09:45:10 -05:00
|
|
|
pPage = OGeneralPage::Create(this,*m_pOutSet);
|
2005-06-30 10:32:42 -05:00
|
|
|
OGeneralPage* pGeneralPage = static_cast< OGeneralPage* >( pPage );
|
|
|
|
pGeneralPage->SetTypeSelectHandler( LINK( this, ODbTypeWizDialog, OnTypeSelected));
|
|
|
|
// pGeneralPage->SetCreationModeHandler( LINK( this, ODbTypeWizDialog, TODO ) );
|
2004-08-02 09:45:10 -05:00
|
|
|
nStringId = STR_PAGETITLE_GENERAL;
|
2005-06-30 10:32:42 -05:00
|
|
|
}
|
|
|
|
break;
|
2004-08-02 09:45:10 -05:00
|
|
|
case CONNECTION_PAGE:
|
|
|
|
pPage = OConnectionTabPage::Create(this,*m_pOutSet);
|
|
|
|
nStringId = STR_PAGETITLE_CONNECTION;
|
|
|
|
break;
|
|
|
|
|
2004-10-27 07:02:39 -05:00
|
|
|
case ADDITIONAL_PAGE_DBASE:
|
|
|
|
pPage = ODriversSettings::CreateDbase(this,*m_pOutSet);
|
|
|
|
break;
|
|
|
|
case ADDITIONAL_PAGE_FLAT:
|
|
|
|
pPage = ODriversSettings::CreateText(this,*m_pOutSet);
|
|
|
|
break;
|
|
|
|
case ADDITIONAL_PAGE_LDAP:
|
|
|
|
pPage = ODriversSettings::CreateLDAP(this,*m_pOutSet);
|
|
|
|
break;
|
|
|
|
case ADDITIONAL_PAGE_ADABAS:
|
|
|
|
pPage = ODriversSettings::CreateAdabas(this,*m_pOutSet);
|
|
|
|
break;
|
|
|
|
case ADDITIONAL_PAGE_MYSQL_JDBC:
|
|
|
|
pPage = ODriversSettings::CreateMySQLJDBC(this,*m_pOutSet);
|
|
|
|
break;
|
|
|
|
case ADDITIONAL_PAGE_MYSQL_ODBC:
|
|
|
|
pPage = ODriversSettings::CreateMySQLODBC(this,*m_pOutSet);
|
|
|
|
break;
|
|
|
|
case ADDITIONAL_PAGE_ORACLE_JDBC:
|
|
|
|
pPage = ODriversSettings::CreateOracleJDBC(this,*m_pOutSet);
|
|
|
|
break;
|
|
|
|
case ADDITIONAL_PAGE_ADO:
|
|
|
|
pPage = ODriversSettings::CreateAdo(this,*m_pOutSet);
|
|
|
|
break;
|
|
|
|
case ADDITIONAL_PAGE_ODBC:
|
|
|
|
pPage = ODriversSettings::CreateODBC(this,*m_pOutSet);
|
|
|
|
break;
|
|
|
|
case ADDITIONAL_USERDEFINED:
|
|
|
|
pPage = ODriversSettings::CreateUser(this,*m_pOutSet);
|
2004-08-02 09:45:10 -05:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
OSL_ENSURE(0,"Wrong state!");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// register ourself as modified listener
|
|
|
|
if ( pPage )
|
|
|
|
{
|
|
|
|
static_cast<OGenericAdministrationPage*>(pPage)->SetServiceFactory(m_pImpl->getORB());
|
|
|
|
static_cast<OGenericAdministrationPage*>(pPage)->SetAdminDialog(this,this);
|
|
|
|
// open our own resource block, as the page titles are strings local to this block
|
2006-05-04 02:41:29 -05:00
|
|
|
LocalResourceAccess aDummy(DLG_DATABASE_ADMINISTRATION, RSC_TABDIALOG);
|
2004-08-02 09:45:10 -05:00
|
|
|
|
2007-04-26 01:58:29 -05:00
|
|
|
pPage->SetText(String(ModuleRes(nStringId)));
|
2004-08-02 09:45:10 -05:00
|
|
|
defaultButton( _nState == START_PAGE ? WZB_NEXT : WZB_FINISH );
|
|
|
|
enableButtons( WZB_FINISH, _nState == START_PAGE ? sal_False : sal_True);
|
|
|
|
pPage->Show();
|
|
|
|
}
|
|
|
|
return pPage;
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
sal_Bool ODbTypeWizDialog::leaveState(WizardState _nState)
|
|
|
|
{
|
|
|
|
SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(_nState));
|
|
|
|
if ( pPage )
|
|
|
|
pPage->FillItemSet(*m_pOutSet);
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
void ODbTypeWizDialog::setTitle(const ::rtl::OUString& _sTitle)
|
|
|
|
{
|
|
|
|
SetText(_sTitle);
|
|
|
|
}
|
|
|
|
//-------------------------------------------------------------------------
|
2007-05-10 04:24:58 -05:00
|
|
|
void ODbTypeWizDialog::enableConfirmSettings( bool _bEnable )
|
|
|
|
{
|
|
|
|
enableButtons( WZB_FINISH, _bEnable );
|
|
|
|
// TODO:
|
|
|
|
// this is hacky. At the moment, this method is used in only one case (#b6532894#).
|
|
|
|
// As soon as it is to be used more wide-spread, we should find a proper concept
|
|
|
|
// for enabling both the Next and Finish buttons, depending on the current page state.
|
|
|
|
// Plus, the concept must also care for the case where those pages are embedded into
|
|
|
|
// anormal tab dialog.
|
|
|
|
}
|
|
|
|
//-------------------------------------------------------------------------
|
2004-08-02 09:45:10 -05:00
|
|
|
sal_Bool ODbTypeWizDialog::saveDatasource()
|
|
|
|
{
|
|
|
|
SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(getCurrentState()));
|
|
|
|
if ( pPage )
|
|
|
|
pPage->FillItemSet(*m_pOutSet);
|
|
|
|
return sal_True;
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
IWizardPage* ODbTypeWizDialog::getWizardPage(TabPage* _pCurrentPage) const
|
|
|
|
{
|
|
|
|
OGenericAdministrationPage* pPage = static_cast<OGenericAdministrationPage*>(_pCurrentPage);
|
|
|
|
return pPage;
|
|
|
|
}
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
sal_Bool ODbTypeWizDialog::onFinish(sal_Int32 _nResult)
|
|
|
|
{
|
|
|
|
saveDatasource();
|
|
|
|
return m_pImpl->saveChanges(*m_pOutSet) ? OWizardMachine::onFinish(_nResult) : sal_False;
|
|
|
|
}
|
|
|
|
//.........................................................................
|
|
|
|
} // namespace dbaui
|
|
|
|
//.........................................................................
|