diff options
Diffstat (limited to 'dbaccess')
64 files changed, 32 insertions, 4689 deletions
diff --git a/dbaccess/AllLangResTarget_adabasui.mk b/dbaccess/AllLangResTarget_adabasui.mk deleted file mode 100644 index f0a8dde3e14f..000000000000 --- a/dbaccess/AllLangResTarget_adabasui.mk +++ /dev/null @@ -1,47 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# Major Contributor(s): -# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> -# (initial developer) -# -# All Rights Reserved. -# -# For minor contributions see the git repository. -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 3 or later (the "GPLv3+"), or -# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), -# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable -# instead of those above. - -$(eval $(call gb_AllLangResTarget_AllLangResTarget,adabasui)) - -$(eval $(call gb_AllLangResTarget_set_reslocation,adabasui,dbaccess)) - -$(eval $(call gb_AllLangResTarget_add_srs,adabasui,\ - dbaccess/adabasui \ -)) - -$(eval $(call gb_SrsTarget_SrsTarget,dbaccess/adabasui)) - -$(eval $(call gb_SrsTarget_set_include,dbaccess/adabasui,\ - $$(INCLUDE) \ - -I$(realpath $(SRCDIR)/dbaccess/inc) \ -)) - -$(eval $(call gb_SrsTarget_add_files,dbaccess/adabasui,\ - dbaccess/source/ext/adabas/AdabasNewDb.src \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/dbaccess/AllLangResTarget_dbu.mk b/dbaccess/AllLangResTarget_dbu.mk index 177bfa307a01..f0957eaaf13e 100644 --- a/dbaccess/AllLangResTarget_dbu.mk +++ b/dbaccess/AllLangResTarget_dbu.mk @@ -49,7 +49,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\ dbaccess/source/ui/control/TableGrantCtrl.src \ dbaccess/source/ui/control/tabletree.src \ dbaccess/source/ui/control/undosqledit.src \ - dbaccess/source/ui/dlg/AdabasStat.src \ dbaccess/source/ui/dlg/admincontrols.src \ dbaccess/source/ui/dlg/adtabdlg.src \ dbaccess/source/ui/dlg/advancedsettings.src \ diff --git a/dbaccess/AllLangResTarget_dbui.mk b/dbaccess/AllLangResTarget_dbui.mk index bb67ab05c8b0..d46190243722 100644 --- a/dbaccess/AllLangResTarget_dbui.mk +++ b/dbaccess/AllLangResTarget_dbui.mk @@ -50,7 +50,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbui,\ dbaccess/source/ui/control/TableGrantCtrl.src \ dbaccess/source/ui/control/tabletree.src \ dbaccess/source/ui/control/undosqledit.src \ - dbaccess/source/ui/dlg/AdabasStat.src \ dbaccess/source/ui/dlg/admincontrols.src \ dbaccess/source/ui/dlg/adtabdlg.src \ dbaccess/source/ui/dlg/advancedsettings.src \ diff --git a/dbaccess/Library_adabasui.mk b/dbaccess/Library_adabasui.mk deleted file mode 100644 index de00e7754413..000000000000 --- a/dbaccess/Library_adabasui.mk +++ /dev/null @@ -1,71 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# Major Contributor(s): -# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> -# (initial developer) -# -# All Rights Reserved. -# -# For minor contributions see the git repository. -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 3 or later (the "GPLv3+"), or -# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), -# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable -# instead of those above. - -$(eval $(call gb_Library_Library,adabasui)) - -$(eval $(call gb_Library_set_include,adabasui,\ - $$(INCLUDE) \ -)) - -$(eval $(call gb_Library_add_defs,adabasui,\ - -DCOMPMOD_NAMESPACE=adabasui \ -)) - -$(eval $(call gb_Library_add_api,adabasui,\ - offapi \ - udkapi \ -)) - -$(eval $(call gb_Library_add_linked_libs,adabasui,\ - comphelper \ - cppu \ - cppuhelper \ - dbtools \ - sal \ - sfx \ - svl \ - svt \ - tk \ - tl \ - ucbhelper \ - utl \ - vcl \ - $(gb_STDLIBS) \ -)) - -$(eval $(call gb_Library_set_componentfile,adabasui,dbaccess/source/ext/adabas/adabasui)) - -$(eval $(call gb_Library_add_exception_objects,adabasui,\ - dbaccess/source/ext/adabas/Acomponentmodule \ - dbaccess/source/ext/adabas/AdabasNewDb \ - dbaccess/source/ext/adabas/adabasuistrings \ - dbaccess/source/ext/adabas/ANewDb \ - dbaccess/source/ext/adabas/Aservices \ - dbaccess/source/ext/adabas/ASqlNameEdit \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk index 9097874879d5..e096c2d32ad9 100644 --- a/dbaccess/Library_dbu.mk +++ b/dbaccess/Library_dbu.mk @@ -130,7 +130,6 @@ $(eval $(call gb_Library_add_exception_objects,dbu,\ dbaccess/source/ui/control/toolboxcontroller \ dbaccess/source/ui/control/undosqledit \ dbaccess/source/ui/control/VertSplitView \ - dbaccess/source/ui/dlg/AdabasStat \ dbaccess/source/ui/dlg/admincontrols \ dbaccess/source/ui/dlg/adminpages \ dbaccess/source/ui/dlg/adtabdlg \ diff --git a/dbaccess/Library_dbui.mk b/dbaccess/Library_dbui.mk index f17a8b7ff333..84fe364d14ee 100644 --- a/dbaccess/Library_dbui.mk +++ b/dbaccess/Library_dbui.mk @@ -157,7 +157,6 @@ $(eval $(call gb_Library_add_exception_objects,dbui,\ dbaccess/source/ui/dlg/DBSetupConnectionPages \ dbaccess/source/ui/dlg/UserAdminDlg \ dbaccess/source/ui/dlg/UserAdmin \ - dbaccess/source/ui/dlg/AdabasStat \ dbaccess/source/ui/dlg/tablespage \ dbaccess/source/ui/dlg/DbAdminImpl \ dbaccess/source/ui/dlg/TablesSingleDlg \ diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc index bb37eb5affff..810453b94e4a 100644 --- a/dbaccess/inc/dbaccess_helpid.hrc +++ b/dbaccess/inc/dbaccess_helpid.hrc @@ -48,7 +48,6 @@ #define HID_DSADMIN_PAGE_DBASE "DBACCESS_HID_DSADMIN_PAGE_DBASE" #define HID_DSADMIN_PAGE_JDBC "DBACCESS_HID_DSADMIN_PAGE_JDBC" #define HID_DSADMIN_PAGE_ODBC "DBACCESS_HID_DSADMIN_PAGE_ODBC" -#define HID_DSADMIN_PAGE_ADABAS "DBACCESS_HID_DSADMIN_PAGE_ADABAS" #define HID_DSADMIN_PAGE_TEXT "DBACCESS_HID_DSADMIN_PAGE_TEXT" #define HID_DSADMIN_TABLE_SUBSCRIPTION "DBACCESS_HID_DSADMIN_TABLE_SUBSCRIPTION" #define HID_DSADMIN_DSACTIONS_NEWDS "DBACCESS_HID_DSADMIN_DSACTIONS_NEWDS" @@ -284,7 +283,6 @@ #define HID_DSADMIN_MYSQL_DATABASE "DBACCESS_HID_DSADMIN_MYSQL_DATABASE" #define HID_DSADMIN_MYSQL_ODBC_DATASOURCE "DBACCESS_HID_DSADMIN_MYSQL_ODBC_DATASOURCE" #define HID_DSADMIN_ODBC_DATASOURCE "DBACCESS_HID_DSADMIN_ODBC_DATASOURCE" -#define HID_DSADMIN_ADABAS_DATABASE "DBACCESS_HID_DSADMIN_ADABAS_DATABASE" #define HID_DSADMIN_MSACCESS_MDB_FILE "DBACCESS_HID_DSADMIN_MSACCESS_MDB_FILE" #define HID_DSADMIN_PAGE_MSACCESS "DBACCESS_HID_DSADMIN_PAGE_MSACCESS" #define HID_DSADMIN_FLAT_PATH "DBACCESS_HID_DSADMIN_FLAT_PATH" @@ -330,7 +328,6 @@ #define HID_DSADMIN_TYPE_DIALOG "DBACCESS_HID_DSADMIN_TYPE_DIALOG" #define HID_DSADMIN_ENABLEOUTERJOIN "DBACCESS_HID_DSADMIN_ENABLEOUTERJOIN" -#define HID_DSADMIN_ADABASADMIN "DBACCESS_HID_DSADMIN_ADABASADMIN" #define HID_DSADMIN_USERADMIN "DBACCESS_HID_DSADMIN_USERADMIN" #define HID_DBWIZ_PREVIOUS "DBACCESS_HID_DBWIZ_PREVIOUS" @@ -380,9 +377,6 @@ #define HID_PAGE_DBWIZARD_LDAP_CB_USESSL "DBACCESS_HID_PAGE_DBWIZARD_LDAP_CB_USESSL" #define HID_PAGE_DBWIZARD_LDAP_PB_TESTLDAPCONNECTION "DBACCESS_HID_PAGE_DBWIZARD_LDAP_PB_TESTLDAPCONNECTION" -#define HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME "DBACCESS_HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME" -#define HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME "DBACCESS_HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME" - #define HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAODBC "DBACCESS_HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAODBC" #define HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAJDBC "DBACCESS_HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAJDBC" @@ -439,28 +433,6 @@ #define HID_DSADMIN_RESPECTRESULTSETTYPE "DBACCESS_HID_DSADMIN_RESPECTRESULTSETTYPE" // this one below have hid in number space HID_SBA_START -#define HID_DLG_ADABAS_NEWDB "DBACCESS_HID_DLG_ADABAS_NEWDB" -#define HID_DLG_ADABAS_DBNAME "DBACCESS_HID_DLG_ADABAS_DBNAME" -#define HID_DLG_ADABAS_SYSUSR "DBACCESS_HID_DLG_ADABAS_SYSUSR" -#define HID_DLG_ADABAS_SYSPWD "DBACCESS_HID_DLG_ADABAS_SYSPWD" -#define HID_DLG_ADABAS_CONUSR "DBACCESS_HID_DLG_ADABAS_CONUSR" -#define HID_DLG_ADABAS_CONPWD "DBACCESS_HID_DLG_ADABAS_CONPWD" -#define HID_DLG_ADABAS_DATADEVSPACE_SIZE "DBACCESS_HID_DLG_ADABAS_DATADEVSPACE_SIZE" -#define HID_DLG_ADABAS_CACHE_SIZE "DBACCESS_HID_DLG_ADABAS_CACHE_SIZE" -#define HID_DLG_ADABAS_USR "DBACCESS_HID_DLG_ADABAS_USR" -#define HID_DLG_ADABAS_DOMAINPWD "DBACCESS_HID_DLG_ADABAS_DOMAINPWD" -#define HID_DLG_ADABAS_RESTORE "DBACCESS_HID_DLG_ADABAS_RESTORE" -#define HID_DLG_ADABAS_PBRESTORE "DBACCESS_HID_DLG_ADABAS_PBRESTORE" -#define HID_DLG_ADABAS_SYSDEVSPACE "DBACCESS_HID_DLG_ADABAS_SYSDEVSPACE" -#define HID_DLG_ADABAS_PBSYSDEVSPACE "DBACCESS_HID_DLG_ADABAS_PBSYSDEVSPACE" -#define HID_DLG_ADABAS_TRANSACTIONLOG "DBACCESS_HID_DLG_ADABAS_TRANSACTIONLOG" -#define HID_DLG_ADABAS_PBTRANSACTIONLOG "DBACCESS_HID_DLG_ADABAS_PBTRANSACTIONLOG" -#define HID_DLG_ADABAS_DATADEVSPACE "DBACCESS_HID_DLG_ADABAS_DATADEVSPACE" -#define HID_DLG_ADABAS_PBDATADEVSPACE "DBACCESS_HID_DLG_ADABAS_PBDATADEVSPACE" -#define HID_DLG_ADABAS_TRANSACTIONLOG_SIZE "DBACCESS_HID_DLG_ADABAS_TRANSACTIONLOG_SIZE" -#define HID_DLG_ADABAS_CON_PWD "DBACCESS_HID_DLG_ADABAS_CON_PWD" -#define HID_DLG_ADABAS_SYS_PWD "DBACCESS_HID_DLG_ADABAS_SYS_PWD" -#define HID_DLG_ADABAS_DOMAIN_PWD "DBACCESS_HID_DLG_ADABAS_DOMAIN_PWD" #define HID_DLG_JOIN_TABADD "DBACCESS_HID_DLG_JOIN_TABADD" diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx index fcdd4d55c644..1d27c5e9bea0 100644 --- a/dbaccess/source/core/dataaccess/ModelImpl.cxx +++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx @@ -1079,12 +1079,6 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings() AsciiPropertyValue( "AutoIncrementCreation", makeAny( ::rtl::OUString() ) ), AsciiPropertyValue( "AutoRetrievingStatement", makeAny( ::rtl::OUString() ) ), AsciiPropertyValue( "IsAutoRetrievingEnabled", makeAny( (sal_Bool)sal_False ) ), - // known Adabas D driver setting - AsciiPropertyValue( "ShutdownDatabase", makeAny( (sal_Bool)sal_False ) ), - AsciiPropertyValue( "DataCacheSizeIncrement", makeAny( (sal_Int32)20 ) ), - AsciiPropertyValue( "DataCacheSize", makeAny( (sal_Int32)20 ) ), - AsciiPropertyValue( "ControlUser", makeAny( ::rtl::OUString() ) ), - AsciiPropertyValue( "ControlPassword", makeAny( ::rtl::OUString() ) ), // known LDAP driver settings AsciiPropertyValue( "HostName", makeAny( ::rtl::OUString() ) ), AsciiPropertyValue( "PortNumber", makeAny( (sal_Int32)389 ) ), diff --git a/dbaccess/source/core/inc/dbamiscres.hrc b/dbaccess/source/core/inc/dbamiscres.hrc index a383ed4189d2..a7099af86b05 100644 --- a/dbaccess/source/core/inc/dbamiscres.hrc +++ b/dbaccess/source/core/inc/dbamiscres.hrc @@ -32,7 +32,7 @@ // string ids (relative to other resources, that's why not unique) #define STR_MYSQL_ODBC 1 #define STR_MYSQL_JDBC 2 -#define STR_ADABAS 3 + // FREE #define STR_ORACLE_JDBC 4 #define STR_JDBC 5 #define STR_ODBC 6 diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index e54d0db86b81..76f339dcc6e6 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -243,12 +243,6 @@ void ODsnTypeCollection::extractHostNamePort(const ::rtl::OUString& _rDsn,String { lcl_extractHostAndPort(sUrl,_sDatabaseName,_nPortNumber); } - else if ( _rDsn.matchIgnoreAsciiCaseAsciiL("sdbc:adabas:",sizeof("sdbc:adabas:")-1) ) - { - if ( comphelper::string::getTokenCount(sUrl, ':') == 2 ) - _rsHostname = sUrl.GetToken(0,':'); - _sDatabaseName = sUrl.GetToken(comphelper::string::getTokenCount(sUrl, ':') - 1, ':'); - } else if ( _rDsn.matchIgnoreAsciiCaseAsciiL("sdbc:mysql:mysqlc:",sizeof("sdbc:mysql:mysqlc:")-1) || _rDsn.matchIgnoreAsciiCaseAsciiL("sdbc:mysql:jdbc:",sizeof("sdbc:mysql:jdbc:")-1) ) { lcl_extractHostAndPort(sUrl,_rsHostname,_nPortNumber); @@ -422,7 +416,6 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const { KnownPrefix( "sdbc:calc:", DST_CALC, false ), KnownPrefix( "sdbc:flat:", DST_FLAT, false ), - KnownPrefix( "sdbc:adabas:", DST_ADABAS, false ), KnownPrefix( "sdbc:odbc:", DST_ODBC, false ), KnownPrefix( "sdbc:dbase:", DST_DBASE, false ), KnownPrefix( "sdbc:mysql:odbc:", DST_MYSQL_ODBC, false ), @@ -490,9 +483,6 @@ void ODsnTypeCollection::fillPageIds(const ::rtl::OUString& _sURL,::std::vector< case DST_ORACLE_JDBC: _rOutPathIds.push_back(PAGE_DBSETUPWIZARD_ORACLE); break; - case DST_ADABAS: - _rOutPathIds.push_back(PAGE_DBSETUPWIZARD_ADABAS); - break; case DST_LDAP: _rOutPathIds.push_back(PAGE_DBSETUPWIZARD_LDAP); break; diff --git a/dbaccess/source/ext/adabas/ANewDb.cxx b/dbaccess/source/ext/adabas/ANewDb.cxx deleted file mode 100644 index 38311fde9076..000000000000 --- a/dbaccess/source/ext/adabas/ANewDb.cxx +++ /dev/null @@ -1,151 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "ANewDb.hxx" -#include <cppuhelper/typeprovider.hxx> -#include <connectivity/dbexception.hxx> -#include "AdabasNewDb.hxx" -#include "adabasuistrings.hrc" -#include <vcl/msgbox.hxx> - -using namespace adabasui; -using namespace dbtools; - -using namespace ::com::sun::star::sdbc; -using namespace ::com::sun::star::sdbcx; -using namespace ::com::sun::star::sdb; - -extern "C" void SAL_CALL createRegistryInfo_OAdabasCreateDialog() -{ - static OMultiInstanceAutoRegistration< OAdabasCreateDialog > aAutoRegistration; -} - - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::beans; - -//========================================================================= -//------------------------------------------------------------------------- -OAdabasCreateDialog::OAdabasCreateDialog(const Reference< XMultiServiceFactory >& _rxORB) - :OAdabasCreateDialogBase(_rxORB) - ,m_pDialog(NULL) -{ - registerProperty(PROPERTY_CREATECATALOG, PROPERTY_ID_CREATECATALOG, PropertyAttribute::TRANSIENT,&m_xCreateCatalog, ::getCppuType(&m_xCreateCatalog)); - registerProperty(PROPERTY_DATABASENAME, PROPERTY_ID_DATABASENAME, PropertyAttribute::TRANSIENT,&m_sDatabaseName, ::getCppuType(&m_sDatabaseName)); - registerProperty(PROPERTY_CONTROL_USER, PROPERTY_ID_CONTROL_USER, PropertyAttribute::TRANSIENT,&m_sControlUser, ::getCppuType(&m_sControlUser)); - registerProperty(PROPERTY_CONTROL_PASSWORD, PROPERTY_ID_CONTROL_PASSWORD, PropertyAttribute::TRANSIENT,&m_sControlPassword, ::getCppuType(&m_sControlPassword)); - registerProperty(PROPERTY_USER, PROPERTY_ID_USER, PropertyAttribute::TRANSIENT,&m_sUser, ::getCppuType(&m_sUser)); - registerProperty(PROPERTY_PASSWORD, PROPERTY_ID_PASSWORD, PropertyAttribute::TRANSIENT,&m_sUserPassword, ::getCppuType(&m_sUserPassword)); - registerProperty(PROPERTY_CACHESIZE, PROPERTY_ID_CACHESIZE, PropertyAttribute::TRANSIENT,&m_nCacheSize, ::getCppuType(&m_nCacheSize)); -} - -//------------------------------------------------------------------------- -Sequence<sal_Int8> SAL_CALL OAdabasCreateDialog::getImplementationId( ) throw(RuntimeException) -{ - static ::cppu::OImplementationId aId; - return aId.getImplementationId(); -} - -//------------------------------------------------------------------------- -Reference< XInterface > SAL_CALL OAdabasCreateDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) -{ - return *(new OAdabasCreateDialog(_rxFactory)); -} - -//------------------------------------------------------------------------- -::rtl::OUString SAL_CALL OAdabasCreateDialog::getImplementationName() throw(RuntimeException) -{ - return getImplementationName_Static(); -} - -//------------------------------------------------------------------------- -::rtl::OUString OAdabasCreateDialog::getImplementationName_Static() throw(RuntimeException) -{ - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.adabasui.AdabasCreateDialog")); -} - -//------------------------------------------------------------------------- -::comphelper::StringSequence SAL_CALL OAdabasCreateDialog::getSupportedServiceNames() throw(RuntimeException) -{ - return getSupportedServiceNames_Static(); -} - -//------------------------------------------------------------------------- -::comphelper::StringSequence OAdabasCreateDialog::getSupportedServiceNames_Static() throw(RuntimeException) -{ - ::comphelper::StringSequence aSupported(1); - aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.AdabasCreationDialog")); - return aSupported; -} - -//------------------------------------------------------------------------- -Reference<XPropertySetInfo> SAL_CALL OAdabasCreateDialog::getPropertySetInfo() throw(RuntimeException) -{ - Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); - return xInfo; -} - -//------------------------------------------------------------------------- -::cppu::IPropertyArrayHelper& OAdabasCreateDialog::getInfoHelper() -{ - return *const_cast<OAdabasCreateDialog*>(this)->getArrayHelper(); -} - -//------------------------------------------------------------------------------ -::cppu::IPropertyArrayHelper* OAdabasCreateDialog::createArrayHelper( ) const -{ - Sequence< Property > aProps; - describeProperties(aProps); - return new ::cppu::OPropertyArrayHelper(aProps); -} - -//------------------------------------------------------------------------------ -Dialog* OAdabasCreateDialog::createDialog(Window* _pParent) -{ - if(!m_xCreateCatalog.is()) - throw SQLException(); - m_pDialog = new OAdabasNewDbDlg(_pParent,m_xCreateCatalog,m_aContext.getLegacyServiceFactory()); - return m_pDialog; -} -// ----------------------------------------------------------------------------- -void OAdabasCreateDialog::executedDialog(sal_Int16 _nExecutionResult) -{ - if(m_pDialog && _nExecutionResult == RET_OK) - { // fill the variables - m_sDatabaseName = m_pDialog->GetDatabaseName(); - m_sControlUser = m_pDialog->GetControlUser(); - m_sControlPassword = m_pDialog->GetControlPassword(); - m_sUser = m_pDialog->GetUser(); - m_sUserPassword = m_pDialog->GetUserPassword(); - m_nCacheSize = m_pDialog->GetCacheSize(); - } -} -// ----------------------------------------------------------------------------- - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/ANewDb.hxx b/dbaccess/source/ext/adabas/ANewDb.hxx deleted file mode 100644 index cf725930dd0a..000000000000 --- a/dbaccess/source/ext/adabas/ANewDb.hxx +++ /dev/null @@ -1,97 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#ifndef ADABASUI_NEWDB_HXX -#define ADABASUI_NEWDB_HXX - -#include <svtools/genericunodialog.hxx> -#include "Acomponentmodule.hxx" -#include <com/sun/star/sdbcx/XCreateCatalog.hpp> - - - -//......................................................................... -namespace adabasui -{ -//......................................................................... - class OAdabasNewDbDlg; - typedef ::svt::OGenericUnoDialog OAdabasCreateDialogBase; - class OAdabasCreateDialog - :public OAdabasCreateDialogBase - ,public ::comphelper::OPropertyArrayUsageHelper< OAdabasCreateDialog > - ,public OModuleResourceClient - { - protected: - OAdabasNewDbDlg* m_pDialog; // just to avoid a cast - // <properties> - ::rtl::OUString m_sDatabaseName; - ::rtl::OUString m_sControlUser; - ::rtl::OUString m_sControlPassword; - ::rtl::OUString m_sUser; - ::rtl::OUString m_sUserPassword; - sal_Int32 m_nCacheSize; - - ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XCreateCatalog> m_xCreateCatalog; - // </properties> - protected: - OAdabasCreateDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); - - public: - // XTypeProvider - virtual com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() throw(com::sun::star::uno::RuntimeException); - virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(com::sun::star::uno::RuntimeException); - - // XServiceInfo - static methods - static com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( com::sun::star::uno::RuntimeException ); - static ::rtl::OUString getImplementationName_Static(void) throw( com::sun::star::uno::RuntimeException ); - static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > - SAL_CALL Create(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&); - - // XPropertySet - virtual com::sun::star::uno::Reference<com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(com::sun::star::uno::RuntimeException); - virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - - // OPropertyArrayUsageHelper - virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; - - protected: - // OGenericUnoDialog overridables - virtual Dialog* createDialog(Window* _pParent); - virtual void executedDialog(sal_Int16 _nExecutionResult); - }; -//......................................................................... -} // namespace adabasui -//......................................................................... - -#endif // ADABASUI_NEWDB_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/ASQLNameEdit.hxx b/dbaccess/source/ext/adabas/ASQLNameEdit.hxx deleted file mode 100644 index be2c27acf9d9..000000000000 --- a/dbaccess/source/ext/adabas/ASQLNameEdit.hxx +++ /dev/null @@ -1,59 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef ADABASUI_SQLNAMEEDIT_HXX -#define ADABASUI_SQLNAMEEDIT_HXX - -#include <vcl/edit.hxx> -#include <vcl/combobox.hxx> - -namespace adabasui -{ - class OSQLNameChecker - { - public: - sal_Bool checkString(const ::rtl::OUString& _sOldValue,const ::rtl::OUString& _sToCheck,::rtl::OUString& _rsCorrected); - }; - //================================================================== - class OSQLNameEdit : public Edit - ,public OSQLNameChecker - { - public: - OSQLNameEdit(Window* _pParent,const ResId& _rRes) - : Edit(_pParent,_rRes) - { - } - - // Edit - virtual void Modify(); - }; -} -#endif // DBAUI_SQLNAMEEDIT_HXX - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/ASqlNameEdit.cxx b/dbaccess/source/ext/adabas/ASqlNameEdit.cxx deleted file mode 100644 index 4745568c69e8..000000000000 --- a/dbaccess/source/ext/adabas/ASqlNameEdit.cxx +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "ASQLNameEdit.hxx" -namespace adabasui -{ - //------------------------------------------------------------------ - sal_Bool isCharOk(sal_Unicode _cChar) - { - return ( - (_cChar >= 'A' && _cChar <= 'Z') || - _cChar == '_' || - ((_cChar >= '0' && _cChar <= '9')) || - ((_cChar >= 'a' && _cChar <= 'z')) - ); - } - //------------------------------------------------------------------ - sal_Bool OSQLNameChecker::checkString( const ::rtl::OUString& _sOldValue, - const ::rtl::OUString& _sToCheck, - ::rtl::OUString& _rsCorrected) - { - sal_Bool bCorrected = sal_False; - XubString sSavedValue = _sOldValue; - XubString sText = _sToCheck; - xub_StrLen nMatch = 0; - for ( xub_StrLen i=nMatch;i < sText.Len(); ++i ) - { - if ( !isCharOk( sText.GetBuffer()[i]) ) - { - _rsCorrected += sText.Copy( nMatch, i - nMatch ); - bCorrected = sal_True; - nMatch = i + 1; - } - } - _rsCorrected += sText.Copy( nMatch, sText.Len() - nMatch ); - return bCorrected; - } - //------------------------------------------------------------------ - void OSQLNameEdit::Modify() - { - ::rtl::OUString sCorrected; - if ( checkString( GetSavedValue(),GetText(),sCorrected ) ) - { - Selection aSel = GetSelection(); - aSel.setMax( aSel.getMin() ); - SetText( sCorrected, aSel ); - - SaveValue(); - } - Edit::Modify(); - } -} -// ----------------------------------------------------------------------------- - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/Acomponentmodule.cxx b/dbaccess/source/ext/adabas/Acomponentmodule.cxx deleted file mode 100644 index f139b02a4215..000000000000 --- a/dbaccess/source/ext/adabas/Acomponentmodule.cxx +++ /dev/null @@ -1,295 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include "Acomponentmodule.hxx" - -#include <tools/resmgr.hxx> -#include <svl/solar.hrc> -#include <comphelper/sequence.hxx> -#include <osl/diagnose.h> - -#define ENTER_MOD_METHOD() \ - ::osl::MutexGuard aGuard(s_aMutex); \ - ensureImpl() - -//......................................................................... -namespace COMPMOD_NAMESPACE -{ -//......................................................................... - - using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::lang; - using namespace ::com::sun::star::registry; - using namespace ::comphelper; - using namespace ::cppu; - - //========================================================================= - //= OModuleImpl - //========================================================================= - /** implementation for <type>OModule</type>. not threadsafe, has to be guarded by it's owner - */ - class OModuleImpl - { - ResMgr* m_pRessources; - sal_Bool m_bInitialized; - ByteString m_sFilePrefix; - - public: - /// ctor - OModuleImpl(); - ~OModuleImpl(); - - /// get the manager for the ressources of the module - ResMgr* getResManager(); - void setResourceFilePrefix(const ::rtl::OString& _rPrefix) { m_sFilePrefix = _rPrefix; } - }; - - //------------------------------------------------------------------------- - OModuleImpl::OModuleImpl() - :m_pRessources(NULL) - ,m_bInitialized(sal_False) - { - } - - //------------------------------------------------------------------------- - OModuleImpl::~OModuleImpl() - { - if (m_pRessources) - delete m_pRessources; - } - - //------------------------------------------------------------------------- - ResMgr* OModuleImpl::getResManager() - { - // note that this method is not threadsafe, which counts for the whole class ! - if (!m_pRessources && !m_bInitialized) - { - OSL_ENSURE(m_sFilePrefix.Len(), "OModuleImpl::getResManager: no resource file prefix!"); - // create a manager with a fixed prefix - ByteString aMgrName = m_sFilePrefix; - - m_pRessources = ResMgr::CreateResMgr(aMgrName.GetBuffer()); - OSL_ENSURE(m_pRessources, - (ByteString("OModuleImpl::getResManager: could not create the resource manager (file name: ") - += aMgrName - += ByteString(")!")).GetBuffer()); - - m_bInitialized = sal_True; - } - return m_pRessources; - } - - //========================================================================= - //= OModule - //========================================================================= - ::osl::Mutex OModule::s_aMutex; - sal_Int32 OModule::s_nClients = 0; - OModuleImpl* OModule::s_pImpl = NULL; - ::rtl::OString OModule::s_sResPrefix; - //------------------------------------------------------------------------- - ResMgr* OModule::getResManager() - { - ENTER_MOD_METHOD(); - return s_pImpl->getResManager(); - } - - //------------------------------------------------------------------------- - void OModule::setResourceFilePrefix(const ::rtl::OString& _rPrefix) - { - ::osl::MutexGuard aGuard(s_aMutex); - s_sResPrefix = _rPrefix; - if (s_pImpl) - s_pImpl->setResourceFilePrefix(_rPrefix); - } - - //------------------------------------------------------------------------- - void OModule::registerClient() - { - ::osl::MutexGuard aGuard(s_aMutex); - ++s_nClients; - } - - //------------------------------------------------------------------------- - void OModule::revokeClient() - { - ::osl::MutexGuard aGuard(s_aMutex); - if (!--s_nClients && s_pImpl) - { - delete s_pImpl; - s_pImpl = NULL; - } - } - - //------------------------------------------------------------------------- - void OModule::ensureImpl() - { - if (s_pImpl) - return; - s_pImpl = new OModuleImpl(); - s_pImpl->setResourceFilePrefix(s_sResPrefix); - } - - //-------------------------------------------------------------------------- - //- registration helper - //-------------------------------------------------------------------------- - - Sequence< ::rtl::OUString >* OModule::s_pImplementationNames = NULL; - Sequence< Sequence< ::rtl::OUString > >* OModule::s_pSupportedServices = NULL; - Sequence< sal_Int64 >* OModule::s_pCreationFunctionPointers = NULL; - Sequence< sal_Int64 >* OModule::s_pFactoryFunctionPointers = NULL; - - //-------------------------------------------------------------------------- - void OModule::registerComponent( - const ::rtl::OUString& _rImplementationName, - const Sequence< ::rtl::OUString >& _rServiceNames, - ComponentInstantiation _pCreateFunction, - FactoryInstantiation _pFactoryFunction) - { - if (!s_pImplementationNames) - { - OSL_ENSURE(!s_pSupportedServices && !s_pCreationFunctionPointers && !s_pFactoryFunctionPointers, - "OModule::registerComponent : inconsistent state (the pointers (1)) !"); - s_pImplementationNames = new Sequence< ::rtl::OUString >; - s_pSupportedServices = new Sequence< Sequence< ::rtl::OUString > >; - s_pCreationFunctionPointers = new Sequence< sal_Int64 >; - s_pFactoryFunctionPointers = new Sequence< sal_Int64 >; - } - OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, - "OModule::registerComponent : inconsistent state (the pointers (2)) !"); - - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), - "OModule::registerComponent : inconsistent state !"); - - sal_Int32 nOldLen = s_pImplementationNames->getLength(); - s_pImplementationNames->realloc(nOldLen + 1); - s_pSupportedServices->realloc(nOldLen + 1); - s_pCreationFunctionPointers->realloc(nOldLen + 1); - s_pFactoryFunctionPointers->realloc(nOldLen + 1); - - s_pImplementationNames->getArray()[nOldLen] = _rImplementationName; - s_pSupportedServices->getArray()[nOldLen] = _rServiceNames; - s_pCreationFunctionPointers->getArray()[nOldLen] = reinterpret_cast<sal_Int64>(_pCreateFunction); - s_pFactoryFunctionPointers->getArray()[nOldLen] = reinterpret_cast<sal_Int64>(_pFactoryFunction); - } - - //-------------------------------------------------------------------------- - void OModule::revokeComponent(const ::rtl::OUString& _rImplementationName) - { - if (!s_pImplementationNames) - { - OSL_FAIL("OModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); - return; - } - OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, - "OModule::revokeComponent : inconsistent state (the pointers) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), - "OModule::revokeComponent : inconsistent state !"); - - sal_Int32 nLen = s_pImplementationNames->getLength(); - const ::rtl::OUString* pImplNames = s_pImplementationNames->getConstArray(); - for (sal_Int32 i=0; i<nLen; ++i, ++pImplNames) - { - if (pImplNames->equals(_rImplementationName)) - { - removeElementAt(*s_pImplementationNames, i); - removeElementAt(*s_pSupportedServices, i); - removeElementAt(*s_pCreationFunctionPointers, i); - removeElementAt(*s_pFactoryFunctionPointers, i); - break; - } - } - - if (s_pImplementationNames->getLength() == 0) - { - delete s_pImplementationNames; s_pImplementationNames = NULL; - delete s_pSupportedServices; s_pSupportedServices = NULL; - delete s_pCreationFunctionPointers; s_pCreationFunctionPointers = NULL; - delete s_pFactoryFunctionPointers; s_pFactoryFunctionPointers = NULL; - } - } - - //-------------------------------------------------------------------------- - Reference< XInterface > OModule::getComponentFactory( - const ::rtl::OUString& _rImplementationName, - const Reference< XMultiServiceFactory >& _rxServiceManager) - { - OSL_ENSURE(_rxServiceManager.is(), "OModule::getComponentFactory : invalid argument (service manager) !"); - OSL_ENSURE(!_rImplementationName.isEmpty(), "OModule::getComponentFactory : invalid argument (implementation name) !"); - - if (!s_pImplementationNames) - { - OSL_FAIL("OModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); - return NULL; - } - OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, - "OModule::getComponentFactory : inconsistent state (the pointers) !"); - OSL_ENSURE( (s_pImplementationNames->getLength() == s_pSupportedServices->getLength()) - && (s_pImplementationNames->getLength() == s_pCreationFunctionPointers->getLength()) - && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), - "OModule::getComponentFactory : inconsistent state !"); - - - Reference< XInterface > xReturn; - - - sal_Int32 nLen = s_pImplementationNames->getLength(); - const ::rtl::OUString* pImplName = s_pImplementationNames->getConstArray(); - const Sequence< ::rtl::OUString >* pServices = s_pSupportedServices->getConstArray(); - const sal_Int64* pComponentFunction = s_pCreationFunctionPointers->getConstArray(); - const sal_Int64* pFactoryFunction = s_pFactoryFunctionPointers->getConstArray(); - - for (sal_Int32 i=0; i<nLen; ++i, ++pImplName, ++pServices, ++pComponentFunction, ++pFactoryFunction) - { - if (pImplName->equals(_rImplementationName)) - { - const FactoryInstantiation FactoryInstantiationFunction = reinterpret_cast<const FactoryInstantiation>(*pFactoryFunction); - const ComponentInstantiation ComponentInstantiationFunction = reinterpret_cast<const ComponentInstantiation>(*pComponentFunction); - - xReturn = FactoryInstantiationFunction( _rxServiceManager, *pImplName, ComponentInstantiationFunction, *pServices, NULL); - if (xReturn.is()) - { - xReturn->acquire(); - return xReturn.get(); - } - } - } - - return NULL; - } - - -//......................................................................... -} // namespace COMPMOD_NAMESPACE -//......................................................................... - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/Acomponentmodule.hxx b/dbaccess/source/ext/adabas/Acomponentmodule.hxx deleted file mode 100644 index 7625ca26e810..000000000000 --- a/dbaccess/source/ext/adabas/Acomponentmodule.hxx +++ /dev/null @@ -1,265 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_ -#define _EXTENSIONS_COMPONENT_MODULE_HXX_ - -/** you may find this file helpfull if you implement a component (in it's own library) which can't use - the usual infrastructure.<br/> - More precise, you find helper classes to ease the use of resources and the registration of services. - <p> - You need to define a preprocessor variable COMPMOD_NAMESPACE in order to use this file. Set it to a string - which should be used as namespace for the classes defined herein.</p> -*/ - -#include <osl/mutex.hxx> -#include <tools/resid.hxx> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XSingleServiceFactory.hpp> -#include <com/sun/star/uno/Sequence.hxx> -#include <com/sun/star/registry/XRegistryKey.hpp> -#include <cppuhelper/factory.hxx> -#include <rtl/string.hxx> - -class ResMgr; - -//......................................................................... -namespace COMPMOD_NAMESPACE -{ -//......................................................................... - -typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > (SAL_CALL *FactoryInstantiation) - ( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rServiceManager, - const ::rtl::OUString & _rComponentName, - ::cppu::ComponentInstantiation _pCreateFunction, - const ::com::sun::star::uno::Sequence< ::rtl::OUString > & _rServiceNames, - rtl_ModuleCount* _pModuleCounter - ); - - //========================================================================= - //= OModule - //========================================================================= - class OModuleImpl; - class OModule - { - friend class OModuleResourceClient; - - private: - OModule(); - // not implemented. OModule is a static class - - protected: - // resource administration - static ::osl::Mutex s_aMutex; /// access safety - static sal_Int32 s_nClients; /// number of registered clients - static OModuleImpl* s_pImpl; /// impl class. lives as long as at least one client for the module is registered - static ::rtl::OString s_sResPrefix; - - // auto registration administration - static ::com::sun::star::uno::Sequence< ::rtl::OUString >* - s_pImplementationNames; - static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::rtl::OUString > >* - s_pSupportedServices; - static ::com::sun::star::uno::Sequence< sal_Int64 >* - s_pCreationFunctionPointers; - static ::com::sun::star::uno::Sequence< sal_Int64 >* - s_pFactoryFunctionPointers; - - public: - // cna be set as long as no resource has been accessed ... - static void setResourceFilePrefix(const ::rtl::OString& _rPrefix); - - /// get the vcl res manager of the module - static ResMgr* getResManager(); - - /** register a component implementing a service with the given data. - @param _rImplementationName - the implementation name of the component - @param _rServiceNames - the services the component supports - @param _pCreateFunction - a function for creating an instance of the component - @param _pFactoryFunction - a function for creating a factory for that component - @see revokeComponent - */ - static void registerComponent( - const ::rtl::OUString& _rImplementationName, - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rServiceNames, - ::cppu::ComponentInstantiation _pCreateFunction, - FactoryInstantiation _pFactoryFunction); - - /** revoke the registration for the specified component - @param _rImplementationName - the implementation name of the component - */ - static void revokeComponent( - const ::rtl::OUString& _rImplementationName); - - /** creates a Factory for the component with the given implementation name. - <p>Usually used from within component_getFactory.<p/> - @param _rxServiceManager - a pointer to an XMultiServiceFactory interface as got in component_getFactory - @param _pImplementationName - the implementation name of the component - @return - the XInterface access to a factory for the component - */ - static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getComponentFactory( - const ::rtl::OUString& _rImplementationName, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxServiceManager - ); - - protected: - /// register a client for the module - static void registerClient(); - /// revoke a client for the module - static void revokeClient(); - - private: - /** ensure that the impl class exists - @precond m_aMutex is guarded when this method gets called - */ - static void ensureImpl(); - }; - - //========================================================================= - //= OModuleResourceClient - //========================================================================= - /** base class for objects which uses any global module-specific ressources - */ - class OModuleResourceClient - { - public: - OModuleResourceClient() { OModule::registerClient(); } - ~OModuleResourceClient() { OModule::revokeClient(); } - }; - - //========================================================================= - //= ModuleRes - //========================================================================= - /** specialized ResId, using the ressource manager provided by the global module - */ - class ModuleRes : public ::ResId - { - public: - ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { } - }; - - //========================================================================== - //= OMultiInstanceAutoRegistration - //========================================================================== - template <class TYPE> - class OMultiInstanceAutoRegistration - { - public: - /** automatically registeres a multi instance component - <p>Assumed that the template argument has the three methods - <ul> - <li><code>static ::rtl::OUString getImplementationName_Static()</code><li/> - <li><code>static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static()</code><li/> - <li><code>static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > - Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&)</code> - </li> - <ul/> - the instantiation of this object will automatically register the class via <method>OModule::registerComponent</method>. - <p/> - The factory creation function used is <code>::cppu::createSingleFactory</code>. - @see OOneInstanceAutoRegistration - */ - OMultiInstanceAutoRegistration(); - ~OMultiInstanceAutoRegistration(); - }; - - template <class TYPE> - OMultiInstanceAutoRegistration<TYPE>::OMultiInstanceAutoRegistration() - { - OModule::registerComponent( - TYPE::getImplementationName_Static(), - TYPE::getSupportedServiceNames_Static(), - TYPE::Create, - ::cppu::createSingleFactory - ); - } - - template <class TYPE> - OMultiInstanceAutoRegistration<TYPE>::~OMultiInstanceAutoRegistration() - { - OModule::revokeComponent(TYPE::getImplementationName_Static()); - } - - //========================================================================== - //= OOneInstanceAutoRegistration - //========================================================================== - template <class TYPE> - class OOneInstanceAutoRegistration - { - public: - /** automatically registeres a single instance component - <p>Assumed that the template argument has the three methods - <ul> - <li><code>static ::rtl::OUString getImplementationName_Static()</code><li/> - <li><code>static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static()</code><li/> - <li><code>static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > - Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&)</code> - </li> - <ul/> - the instantiation of this object will automatically register the class via <method>OModule::registerComponent</method>. - <p/> - The factory creation function used is <code>::cppu::createOneInstanceFactory</code>. - @see OOneInstanceAutoRegistration - */ - OOneInstanceAutoRegistration(); - ~OOneInstanceAutoRegistration(); - }; - - template <class TYPE> - OOneInstanceAutoRegistration<TYPE>::OOneInstanceAutoRegistration() - { - OModule::registerComponent( - TYPE::getImplementationName_Static(), - TYPE::getSupportedServiceNames_Static(), - TYPE::Create, - ::cppu::createOneInstanceFactory - ); - } - - template <class TYPE> - OOneInstanceAutoRegistration<TYPE>::~OOneInstanceAutoRegistration() - { - OModule::revokeComponent(TYPE::getImplementationName_Static()); - } - -//......................................................................... -} // namespace COMPMOD_NAMESPACE -//......................................................................... - -#endif // _EXTENSIONS_COMPONENT_MODULE_HXX_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/AdabasNewDb.cxx b/dbaccess/source/ext/adabas/AdabasNewDb.cxx deleted file mode 100644 index c1abf3f46e68..000000000000 --- a/dbaccess/source/ext/adabas/AdabasNewDb.cxx +++ /dev/null @@ -1,752 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "AdabasNewDb.hxx" -#include "AdabasNewDb.hrc" - -#include <osl/process.h> -#include <vcl/msgbox.hxx> -#include <sfx2/passwd.hxx> -#include <tools/urlobj.hxx> -#include <tools/stream.hxx> -#include <tools/debug.hxx> -#include "Acomponentmodule.hxx" -#include <unotools/tempfile.hxx> -#include "adabasui_resource.hrc" -#include <ucbhelper/content.hxx> -#include <vcl/waitobj.hxx> -#include <unotools/pathoptions.hxx> -#include <toolkit/unohlp.hxx> -#include <com/sun/star/beans/PropertyValue.hpp> -#include <comphelper/extract.hxx> -#include <comphelper/string.hxx> -#include <unotools/tempfile.hxx> -#include <unotools/localfilehelper.hxx> -#include <com/sun/star/sdbc/SQLException.hpp> -#include <com/sun/star/ui/dialogs/TemplateDescription.hpp> -#include <unotools/ucbhelper.hxx> -#include <connectivity/dbtools.hxx> -#include <connectivity/dbexception.hxx> -#include "adabasuistrings.hrc" -#include <osl/thread.hxx> -#include <osl/file.hxx> - - -using namespace adabasui; -using namespace ucbhelper; -using namespace utl; -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::sdbcx; -using namespace ::com::sun::star::sdbc; -using namespace ::com::sun::star::ucb; -using namespace ::com::sun::star::lang; -namespace adabasui -{ - class ODatabaseCreator : public ::osl::Thread - { - Link m_aTerminateHandler; - Sequence< PropertyValue> m_aValues; - Reference<XCreateCatalog> m_xCreateCatalog; - Reference< XMultiServiceFactory > m_xORB; - Window* m_pErrorWindow; - public: - ODatabaseCreator(const Reference<XCreateCatalog>& _rxCreateCatalog - ,Window* _pErrorWindow - ,const Reference< XMultiServiceFactory >& _xORB - ,const Sequence< PropertyValue>& _rValues) - : m_aValues(_rValues) - , m_xCreateCatalog(_rxCreateCatalog) - , m_xORB(_xORB) - , m_pErrorWindow(_pErrorWindow) - {} - - void setTerminateHandler(const Link& _aTerminateHandler) { m_aTerminateHandler = _aTerminateHandler; } - - protected: - - /// Working method which should be overridden. - virtual void SAL_CALL run(); - virtual void SAL_CALL onTerminated(); - }; - - void SAL_CALL ODatabaseCreator::run() - { - try - { - m_xCreateCatalog->createCatalog(m_aValues); - } - catch(SQLException& e) - { - ::dbtools::showError(::dbtools::SQLExceptionInfo(e),VCLUnoHelper::GetInterface(m_pErrorWindow),m_xORB); - } - catch(Exception&) - { - OSL_ASSERT(0); - } - } - void SAL_CALL ODatabaseCreator::onTerminated() - { - if ( m_aTerminateHandler.IsSet() ) - m_aTerminateHandler.Call(NULL); - } -} -DBG_NAME( OAdabasNewDbDlg ) -//======================================================================== -OAdabasNewDbDlg::OAdabasNewDbDlg( Window* pParent, - const Reference<XCreateCatalog>& _rxCreateCatalog, - const Reference< XMultiServiceFactory >& _rxORB, - sal_Bool _bRestore) - :ModalDialog( pParent, ModuleRes( DLG_ADABAS_NEWDB )) - ,m_FT_DATABASENAME( this, ModuleRes( FT_DATABASENAME ) ) - ,m_ET_DATABASENAME( this, ModuleRes( ET_DATABASENAME ) ) - ,m_FL_USER( this, ModuleRes( FL_USER ) ) - ,m_FT_SYSUSR( this, ModuleRes( FT_SYSUSR ) ) - ,m_FT_CONUSR( this, ModuleRes( FT_CONUSR ) ) - ,m_FT_DOMAIN_USR( this, ModuleRes( FT_DOMAIN_USR ) ) - ,m_ET_SYSUSR( this, ModuleRes( ET_SYSUSR ) ) - ,m_PB_SYSPWD( this, ModuleRes( PB_SYSPWD ) ) - ,m_ET_CONUSR( this, ModuleRes( ET_CONUSR ) ) - ,m_PB_CONPWD( this, ModuleRes( PB_CONPWD ) ) - ,m_ET_DOMAIN_USR( this, ModuleRes( ET_DOMAIN_USR ) ) - ,m_PB_DOMAINPWD( this, ModuleRes( PB_DOMAINPWD ) ) - ,m_BMP_CON( this, ModuleRes( BMP_CON ) ) - ,m_BMP_SYS( this, ModuleRes( BMP_SYS ) ) - ,m_BMP_DOMAIN( this, ModuleRes( BMP_DOMAIN ) ) - ,m_FT_RESTORE( this, ModuleRes( FT_RESTORE ) ) - ,m_ET_RESTORE( this, ModuleRes( ET_RESTORE ) ) - ,m_PB_RESTORE( this, ModuleRes( PB_RESTORE ) ) - ,m_FL_DBSETTINGS( this, ModuleRes( FL_DBSETTINGS ) ) - ,m_FT_SYSDEVSPACE( this, ModuleRes( FT_SYSDEVSPACE ) ) - ,m_FT_TRANSACTIONLOG( this, ModuleRes( FT_TRANSACTIONLOG ) ) - ,m_FT_DATADEVSPACE( this, ModuleRes( FT_DATADEVSPACE ) ) - ,m_ET_SYSDEVSPACE( this, ModuleRes( ET_SYSDEVSPACE ) ) - ,m_PB_SYSDEVSPACE( this, ModuleRes( PB_SYSDEVSPACE ) ) - ,m_ET_TRANSACTIONLOG( this, ModuleRes( ET_TRANSACTIONLOG ) ) - ,m_PB_TRANSACTIONLOG( this, ModuleRes( PB_TRANSACTIONLOG ) ) - ,m_ET_DATADEVSPACE( this, ModuleRes( ET_DATADEVSPACE ) ) - ,m_PB_DATADEVSPACE( this, ModuleRes( PB_DATADEVSPACE ) ) - ,m_FT_TRANSACTIONLOG_SIZE( this, ModuleRes( FT_TRANSACTIONLOG_SIZE ) ) - ,m_NF_TRANSACTIONLOG_SIZE( this, ModuleRes( NF_TRANSACTIONLOG_SIZE ) ) - ,m_FT_DATADEVSPACE_SIZE( this, ModuleRes( FT_DATADEVSPACE_SIZE ) ) - ,m_NF_DATADEVSPACE_SIZE( this, ModuleRes( NF_DATADEVSPACE_SIZE ) ) - ,m_FT_CACHE_SIZE( this, ModuleRes( FT_CACHE_SIZE ) ) - ,m_NF_CACHE_SIZE( this, ModuleRes( NF_CACHE_SIZE ) ) - ,m_FL_END( this, ModuleRes( FL_END ) ) - ,m_PB_OK( this, ModuleRes( PB_OK ) ) - ,m_PB_CANCEL( this, ModuleRes( PB_CANCEL ) ) - ,m_xCreateCatalog(_rxCreateCatalog) - ,m_xORB(_rxORB) - ,m_bRestore(_bRestore) - ,m_nSetBitmap(0) -{ - DBG_CTOR( OAdabasNewDbDlg, NULL ); - FreeResource(); - if(m_bRestore) - { - m_FL_DBSETTINGS.SetPosPixel(m_FL_DBSETTINGS.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_FT_SYSDEVSPACE.SetPosPixel(m_FT_SYSDEVSPACE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_FT_TRANSACTIONLOG.SetPosPixel(m_FT_TRANSACTIONLOG.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_FT_DATADEVSPACE.SetPosPixel(m_FT_DATADEVSPACE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_ET_SYSDEVSPACE.SetPosPixel(m_ET_SYSDEVSPACE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_PB_SYSDEVSPACE.SetPosPixel(m_PB_SYSDEVSPACE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_ET_TRANSACTIONLOG.SetPosPixel(m_ET_TRANSACTIONLOG.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_PB_TRANSACTIONLOG.SetPosPixel(m_PB_TRANSACTIONLOG.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_ET_DATADEVSPACE.SetPosPixel(m_ET_DATADEVSPACE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_PB_DATADEVSPACE.SetPosPixel(m_PB_DATADEVSPACE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_FT_TRANSACTIONLOG_SIZE.SetPosPixel(m_FT_TRANSACTIONLOG_SIZE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_NF_TRANSACTIONLOG_SIZE.SetPosPixel(m_NF_TRANSACTIONLOG_SIZE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_FT_DATADEVSPACE_SIZE.SetPosPixel(m_FT_DATADEVSPACE_SIZE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_NF_DATADEVSPACE_SIZE.SetPosPixel(m_NF_DATADEVSPACE_SIZE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_FT_CACHE_SIZE.SetPosPixel(m_FT_CACHE_SIZE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_NF_CACHE_SIZE.SetPosPixel(m_NF_CACHE_SIZE.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_PB_OK.SetPosPixel(m_PB_OK.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - m_PB_CANCEL.SetPosPixel(m_PB_CANCEL.GetPosPixel()-LogicToPixel( Point(0,14), MAP_APPFONT )); - - Size aSize(GetSizePixel().Width(),GetSizePixel().Height()-LogicToPixel( Size(0,14), MAP_APPFONT ).Height()); - SetSizePixel(aSize); - - m_FT_SYSUSR.Hide(); - m_FT_DOMAIN_USR.Hide(); - m_FL_USER.SetText(ModuleRes(STR_BACKUPFILE_LOAD)); - m_PB_SYSPWD.Hide(); - m_PB_DOMAINPWD.Hide(); - m_ET_SYSUSR.Hide(); - m_ET_DOMAIN_USR.Hide(); - - m_ET_SYSUSR.SetText(String::CreateFromAscii("DUMMY")); - m_BMP_SYS.Hide(); - m_BMP_DOMAIN.Hide(); - m_ET_RESTORE.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - m_ET_RESTORE.SetLoseFocusHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - m_ET_RESTORE.SetMaxTextLen(40); - } - else - { - m_FT_RESTORE.Hide(); - m_ET_RESTORE.Hide(); - m_PB_RESTORE.Hide(); - - m_ET_SYSUSR.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - m_ET_CONUSR.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - m_ET_DOMAIN_USR.Enable(sal_False); - - } - - - m_ET_SYSDEVSPACE.SetLoseFocusHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - m_ET_TRANSACTIONLOG.SetLoseFocusHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - m_ET_DATADEVSPACE.SetLoseFocusHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - - m_ET_SYSDEVSPACE.SetMaxTextLen(40); - m_ET_TRANSACTIONLOG.SetMaxTextLen(40); - m_ET_DATADEVSPACE.SetMaxTextLen(40); - - m_NF_TRANSACTIONLOG_SIZE.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - m_NF_DATADEVSPACE_SIZE.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - m_NF_CACHE_SIZE.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - - m_NF_TRANSACTIONLOG_SIZE.SetMin(10); - m_NF_DATADEVSPACE_SIZE.SetMin(10); - m_NF_CACHE_SIZE.SetMin(4); - - m_NF_TRANSACTIONLOG_SIZE.SetMax(LONG_MAX); - m_NF_DATADEVSPACE_SIZE.SetMax(LONG_MAX); - m_NF_CACHE_SIZE.SetMax(LONG_MAX); - - m_NF_TRANSACTIONLOG_SIZE.SetValue(20); - m_NF_DATADEVSPACE_SIZE.SetValue(20); - m_NF_CACHE_SIZE.SetValue(4); - - m_NF_TRANSACTIONLOG_SIZE.SetDecimalDigits(0); - m_NF_DATADEVSPACE_SIZE.SetDecimalDigits(0); - m_NF_CACHE_SIZE.SetDecimalDigits(0); - - m_ET_DATABASENAME.SetMaxTextLen( 8 ); - - m_PB_CONPWD.SetClickHdl( LINK(this,OAdabasNewDbDlg,PwdClickHdl)); - m_PB_SYSPWD.SetClickHdl( LINK(this,OAdabasNewDbDlg,PwdClickHdl)); - m_PB_DOMAINPWD.SetClickHdl( LINK(this,OAdabasNewDbDlg,PwdClickHdl)); - - m_PB_RESTORE.SetClickHdl( LINK(this,OAdabasNewDbDlg,LoadButtonClickHdl)); - - m_PB_SYSDEVSPACE.SetClickHdl( LINK(this,OAdabasNewDbDlg,ButtonClickHdl)); - m_PB_TRANSACTIONLOG.SetClickHdl( LINK(this,OAdabasNewDbDlg,ButtonClickHdl)); - m_PB_DATADEVSPACE.SetClickHdl( LINK(this,OAdabasNewDbDlg,ButtonClickHdl)); - - m_BMP_CON.SetImage( ModuleRes(UNCHECK_RED) ); - m_BMP_SYS.SetImage( ModuleRes(UNCHECK_RED) ); - m_BMP_DOMAIN.SetImage( ModuleRes(UNCHECK_RED) ); - - static String s_sRoot(RTL_CONSTASCII_USTRINGPARAM("DBROOT")); - static String s_sConfig(RTL_CONSTASCII_USTRINGPARAM("DBCONFIG")); - static String s_sWork(RTL_CONSTASCII_USTRINGPARAM("DBWORK")); - - sal_Bool bError = fillEnvironmentVariable(s_sWork,m_sDbWork); - if ( bError || !m_sDbWork.Len() ) - bError = fillEnvironmentVariable(s_sRoot,m_sDbWork); - - bError = fillEnvironmentVariable(s_sConfig,m_sDbConfig); - if ( bError || !m_sDbConfig.Len() ) - bError = fillEnvironmentVariable(s_sRoot,m_sDbConfig); - - if ( m_sDbConfig.Len() && m_sDbWork.Len() ) - { - m_sDbConfig.AppendAscii("/"); - m_sDbWork.AppendAscii("/"); - - String sDefaultName,sExt; - sDefaultName.AssignAscii("MYDB"); - String sConfig = m_sDbConfig; - sConfig.AppendAscii("config"); - TempFile aDefaultDatabase(sDefaultName,&sExt,&sConfig); - aDefaultDatabase.EnableKillingFile(); - INetURLObject aURL(aDefaultDatabase.GetURL()); - - m_ET_DATABASENAME.SetText(aURL.GetName()); - m_DBName = m_ET_DATABASENAME.GetText(); - - // create temp names for my files - // here we need only a name the creation is done by the driver - // so we delete the files after we get a valid name - // with this we avoiding to mention anything when the user presses cancel - - String aSysExt; - sal_Bool bValid = sal_True; - { - aSysExt.AssignAscii(".sys"); - ::utl::TempFile aTmpFile(m_ET_DATABASENAME.GetText(),&aSysExt,&m_sDbWork); - aTmpFile.EnableKillingFile(); - bValid = aTmpFile.IsValid(); - if(bValid) - LocalFileHelper::ConvertURLToPhysicalName(aTmpFile.GetURL(),m_SYSDEV_File); - } - { - aSysExt.AssignAscii(".trs"); - ::utl::TempFile aTmpFile(m_ET_DATABASENAME.GetText(),&aSysExt,&m_sDbWork); - aTmpFile.EnableKillingFile(); - bValid = !bValid || aTmpFile.IsValid(); - if(aTmpFile.IsValid()) - LocalFileHelper::ConvertURLToPhysicalName(aTmpFile.GetURL(),m_TRANSDEV_File); - } - { - aSysExt.AssignAscii(".dat"); - ::utl::TempFile aTmpFile(m_ET_DATABASENAME.GetText(),&aSysExt,&m_sDbWork); - aTmpFile.EnableKillingFile(); - bValid = !bValid || aTmpFile.IsValid(); - if(aTmpFile.IsValid()) - LocalFileHelper::ConvertURLToPhysicalName(aTmpFile.GetURL(),m_DATADEV_File); - } - if(!bValid) // we found a file which isn't valid so we report an error message - PostUserEvent(LINK(this, OAdabasNewDbDlg, OnNoAccessRights)); - - } - - if(m_SYSDEV_File.getLength() < 41 && m_TRANSDEV_File.getLength() < 41 && m_DATADEV_File.getLength() < 41) - { - m_ET_SYSDEVSPACE.SetText(m_SYSDEV_File ); - m_ET_TRANSACTIONLOG.SetText(m_TRANSDEV_File); - m_ET_DATADEVSPACE.SetText(m_DATADEV_File); - } - else - { - m_SYSDEV_File = m_TRANSDEV_File = m_DATADEV_File = String(); - PostUserEvent(LINK(this, OAdabasNewDbDlg, OnNoDefaultPath)); - } - - m_ET_CONUSR.SetText(String::CreateFromAscii("CONTROL")); - - m_PB_OK.SetClickHdl(LINK(this,OAdabasNewDbDlg,ImplOKHdl)); - m_PB_OK.Enable(sal_False); - - m_ET_DATABASENAME.SetModifyHdl( LINK(this,OAdabasNewDbDlg,LoseFocusHdl)); - -} -// ----------------------------------------------------------------------- -OAdabasNewDbDlg::~OAdabasNewDbDlg() -{ - DBG_DTOR( OAdabasNewDbDlg, NULL ); -} -//------------------------------------------------------------------ -IMPL_LINK(OAdabasNewDbDlg, OnError, void*, /*_pArg*/) -{ - String sErrorMsg(ModuleRes(STR_ERROR_IN_ADABAS_INSTALLATION)); - ErrorBox(this, WB_OK, sErrorMsg).Execute(); - EndDialog(RET_CANCEL); - return 0L; -} -//------------------------------------------------------------------ -IMPL_LINK(OAdabasNewDbDlg, OnNoDefaultPath, void*, /*_pArg*/) -{ - String sErrorMsg(ModuleRes(STR_ADABAS_NO_DEFAULTNAME)); - ErrorBox(this, WB_OK, sErrorMsg).Execute(); - return 0L; -} -//------------------------------------------------------------------ -IMPL_LINK(OAdabasNewDbDlg, OnNoAccessRights, void*, /*_pArg*/) -{ - String sErrorMsg(ModuleRes(STR_ADABAS_NO_ACCESSRIGHTS)); - ErrorBox(this, WB_OK, sErrorMsg).Execute(); - return 0L; -} - -// ----------------------------------------------------------------------- -IMPL_LINK( OAdabasNewDbDlg, ImplOKHdl, OKButton*, /*EMPTYARG*/ ) -{ - m_SYSDEV_File = m_ET_SYSDEVSPACE.GetText(); - m_TRANSDEV_File = m_ET_TRANSACTIONLOG.GetText(); - m_DATADEV_File = m_ET_DATADEVSPACE.GetText(); - - m_Backup_File = m_ET_RESTORE.GetText(); - if(m_bRestore) - { - INetURLObject aURL; - aURL.SetSmartProtocol(INET_PROT_FILE); - aURL.SetURL(m_Backup_File); - Content aContent(aURL.GetURLNoPass(),Reference<XCommandEnvironment>()); - try - { - if(!aContent.isDocument()) - { - String aString1 = String(ModuleRes(STR_ADABAS_NO_BACKUP_FILE)); - String aString2 = String(ModuleRes(STR_STAT_WARNING)); - SQLException aSql(aString1,NULL,aString2,1000,Any()); - return 0; - } - - } - catch(Exception&) - { - String aString1 = String(ModuleRes(STR_ADABAS_NO_BACKUP_FILE)); - String aString2 = String(ModuleRes(STR_STAT_WARNING)); - SQLException aSql(aString1,NULL,aString2,1000,Any()); - throw aSql; - } - if(m_Backup_File.Len() > 40) - { - InfoBox aInfo(this,ModuleRes(INFO_STR_MAX_FILE_LENGTH)); - String aMsg(aInfo.GetMessText()); - aMsg.SearchAndReplace(String::CreateFromAscii("\'#\'"),String::CreateFromAscii("40")); - aInfo.SetMessText(aMsg); - aInfo.Execute(); - return 0; - } - } - else if(m_SYSDEV_File.getLength() > 40 || m_TRANSDEV_File.getLength() > 40 || m_DATADEV_File.getLength() > 40) - { - InfoBox aInfo(this,ModuleRes(INFO_STR_MAX_FILE_LENGTH)); - String aMsg(aInfo.GetMessText()); - aMsg.SearchAndReplace(String::CreateFromAscii("\'#\'"),String::CreateFromAscii("40")); - aInfo.SetMessText(aMsg); - aInfo.Execute(); - return 0; - } - - - sal_Bool bOk = sal_False; - - { - // we need url - rtl::OUString sTemp; - bOk = LocalFileHelper::ConvertPhysicalNameToURL(m_DATADEV_File,sTemp); - m_DATADEV_File = sTemp; - sTemp = rtl::OUString(); - bOk = LocalFileHelper::ConvertPhysicalNameToURL(m_SYSDEV_File,sTemp); - m_SYSDEV_File = sTemp; - sTemp = rtl::OUString(); - bOk = LocalFileHelper::ConvertPhysicalNameToURL(m_TRANSDEV_File,sTemp); - m_TRANSDEV_File = sTemp; - } - String aErrorMessage = String(ModuleRes(STR_DEVSPACE_NO_FILE)); - if(m_SYSDEV_File.isEmpty()) - aErrorMessage.SearchAndReplace(String::CreateFromAscii("$name$"),String::CreateFromAscii("SYSDEVSPACE")); - else if(m_TRANSDEV_File.isEmpty()) - aErrorMessage.SearchAndReplace(String::CreateFromAscii("$name$"),String::CreateFromAscii("TRANSACTIONLOG")); - else if(m_DATADEV_File.isEmpty()) - aErrorMessage.SearchAndReplace(String::CreateFromAscii("$name$"),String::CreateFromAscii("DATDEVSPACE")); - else if(m_ET_SYSUSR.GetText() == m_ET_CONUSR.GetText()) - aErrorMessage = String(ModuleRes(STR_NO_SAME_USER)); - else - bOk = sal_True; - - - if (!bOk) - { - ErrorBox(this, WB_OK, aErrorMessage).Execute(); - return sal_False; - } - - sal_Int32 nPos = 0; - Sequence< PropertyValue> aCreateArgs(m_bRestore ? 14 : 12); - aCreateArgs[nPos].Name = PROPERTY_CONTROL_USER; - aCreateArgs[nPos++].Value <<= ::rtl::OUString(m_ET_CONUSR.GetText().ToUpperAscii()); - aCreateArgs[nPos].Name = PROPERTY_CONTROL_PASSWORD; - aCreateArgs[nPos++].Value <<= ::rtl::OUString(m_ConPwd); - aCreateArgs[nPos].Name = PROPERTY_USER; - aCreateArgs[nPos++].Value <<= ::rtl::OUString(m_ET_SYSUSR.GetText().ToUpperAscii()); - aCreateArgs[nPos].Name = PROPERTY_PASSWORD; - aCreateArgs[nPos++].Value <<= ::rtl::OUString(m_SysPwd); - aCreateArgs[nPos].Name = PROPERTY_DOMAINPASSWORD; - aCreateArgs[nPos++].Value <<= ::rtl::OUString(m_DomainPwd); - aCreateArgs[nPos].Name = PROPERTY_CACHESIZE; - aCreateArgs[nPos++].Value <<= ::rtl::OUString::valueOf(sal_Int32(m_NF_CACHE_SIZE.GetValue()*256)); - aCreateArgs[nPos].Name = PROPERTY_DATABASENAME; - aCreateArgs[nPos++].Value <<= ::rtl::OUString(m_ET_DATABASENAME.GetText().ToUpperAscii()); - aCreateArgs[nPos].Name = PROPERTY_DATADEVSPACE; - aCreateArgs[nPos++].Value <<= m_DATADEV_File; - aCreateArgs[nPos].Name = PROPERTY_SYSDEVSPACE; - aCreateArgs[nPos++].Value <<= m_SYSDEV_File; - aCreateArgs[nPos].Name = PROPERTY_TRANSACTION_LOG; - aCreateArgs[nPos++].Value <<= m_TRANSDEV_File; - aCreateArgs[nPos].Name = PROPERTY_DATADEVSIZE; - aCreateArgs[nPos++].Value <<= sal_Int32(m_NF_DATADEVSPACE_SIZE.GetValue()*256); - aCreateArgs[nPos].Name = PROPERTY_LOGDEVSIZE; - aCreateArgs[nPos++].Value <<= sal_Int32(m_NF_TRANSACTIONLOG_SIZE.GetValue()*256); - - if(m_bRestore) - { - aCreateArgs[nPos].Name = PROPERTY_RESTOREDATABASE; - aCreateArgs[nPos++].Value <<= ::cppu::bool2any(sal_True); - aCreateArgs[nPos].Name = PROPERTY_BACKUPNAME; - aCreateArgs[nPos++].Value <<= ::rtl::OUString(m_Backup_File); - } - - Disable(); - - m_aCreatorWait = ::std::auto_ptr<WaitObject>(new WaitObject(this)); - m_aCreatorThread = ::std::auto_ptr<ODatabaseCreator>(new ODatabaseCreator(m_xCreateCatalog,this,m_xORB,aCreateArgs)); - m_aCreatorThread->setTerminateHandler(LINK(this,OAdabasNewDbDlg,TerminateHdl)); - m_aCreatorThread->create(); - - return sal_True; -} -//------------------------------------------------------------------------- -IMPL_LINK( OAdabasNewDbDlg, TerminateHdl, void*, /*NOTUSABLE*/ ) -{ - EndDialog(RET_OK); - return 0; -} -//------------------------------------------------------------------------ -IMPL_LINK( OAdabasNewDbDlg, LoseFocusHdl, Edit *, pEdit ) -{ - if(&m_ET_SYSDEVSPACE == pEdit) - m_SYSDEV_File = pEdit->GetText(); - else if(&m_ET_TRANSACTIONLOG == pEdit) - m_TRANSDEV_File = pEdit->GetText(); - else if(&m_ET_DATADEVSPACE == pEdit) - m_DATADEV_File = pEdit->GetText(); - else if(&m_ET_RESTORE == pEdit) - m_Backup_File = pEdit->GetText(); - else if(&m_ET_DATABASENAME == pEdit) - {// check if the new dbname already exists - String sNewDbName = pEdit->GetText(); - String sConfig = m_sDbConfig; - sConfig.AppendAscii("config/"); - sConfig += sNewDbName; - if(UCBContentHelper::IsDocument(sConfig)) - { - String sErrorMessage = String(ModuleRes(STR_ADABAS_DB_EXISTS)); - ErrorBox(this, WB_OK, sErrorMessage).Execute(); - m_DBName.Erase(); - } - else if ( m_DBName.SearchAscii(" ") != STRING_NOTFOUND ) - { - String sErrorMessage = String(ModuleRes(STR_ADABAS_DB_EXISTS)); - ErrorBox(this, WB_OK, sErrorMessage).Execute(); - m_DBName = m_DBName.GetToken(0,' '); - } - else - m_DBName = sNewDbName; - } - - CheckBitmaps(); - return 0; -} -//------------------------------------------------------------------------ -IMPL_LINK( OAdabasNewDbDlg, LoadButtonClickHdl, Button *, /*pButton*/ ) -{ - ::sfx2::FileDialogHelper aLoad( - ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, 0); - if(!m_Backup_File.Len()) - aLoad.SetDisplayDirectory(SvtPathOptions().GetWorkPath()); - else - aLoad.SetDisplayDirectory(m_Backup_File); - if (aLoad.Execute()) - { - INetURLObject aUrl(aLoad.GetPath()); - m_Backup_File = aUrl.PathToFileName(); - if(m_Backup_File.Len() > 40) - { - InfoBox aInfo(this,ModuleRes(INFO_STR_MAX_FILE_LENGTH)); - String aMsg(aInfo.GetMessText()); - aMsg.SearchAndReplace(String::CreateFromAscii("\'#\'"),String::CreateFromAscii("40")); - aInfo.SetMessText(aMsg); - } - m_ET_RESTORE.SetText(m_Backup_File); - } - CheckBitmaps(); - return 0; -} -//------------------------------------------------------------------------ -IMPL_LINK( OAdabasNewDbDlg, ButtonClickHdl, Button *, pButton ) -{ - ::sfx2::FileDialogHelper aFileDlg( - ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0); - - String aPath; - if(pButton == &m_PB_SYSDEVSPACE) - aPath = m_SYSDEV_File; - else if(pButton == &m_PB_TRANSACTIONLOG) - aPath = m_TRANSDEV_File; - else if(pButton == &m_PB_DATADEVSPACE) - aPath = m_DATADEV_File; - - rtl::OUString sUrl; - ::utl::LocalFileHelper::ConvertPhysicalNameToURL(aPath,sUrl); - aFileDlg.SetDisplayDirectory(sUrl); - - - - if (aFileDlg.Execute() == ERRCODE_NONE) - { - INetURLObject aUrl(aFileDlg.GetPath()); - if(pButton == &m_PB_SYSDEVSPACE) - { - m_SYSDEV_File = aUrl.PathToFileName(); - if(m_SYSDEV_File.getLength() > 40) - { - InfoBox aInfo(this,ModuleRes(INFO_STR_MAX_FILE_LENGTH)); - String aMsg(aInfo.GetMessText()); - aMsg.SearchAndReplace(String::CreateFromAscii("\'#\'"),String::CreateFromAscii("40")); - aInfo.SetMessText(aMsg); - aInfo.Execute(); - return 0; - } - m_ET_SYSDEVSPACE.SetText(aUrl.PathToFileName()); - } - else if(pButton == &m_PB_TRANSACTIONLOG) - { - m_TRANSDEV_File = aUrl.PathToFileName(); - if(m_TRANSDEV_File.getLength() > 40) - { - InfoBox aInfo(this,ModuleRes(INFO_STR_MAX_FILE_LENGTH)); - String aMsg(aInfo.GetMessText()); - aMsg.SearchAndReplace(String::CreateFromAscii("\'#\'"),String::CreateFromAscii("40")); - aInfo.SetMessText(aMsg); - aInfo.Execute(); - return 0; - } - m_ET_TRANSACTIONLOG.SetText(aUrl.PathToFileName()); - } - else if(pButton == &m_PB_DATADEVSPACE) - { - m_DATADEV_File = aUrl.PathToFileName(); - if(m_DATADEV_File.getLength() > 40) - { - InfoBox aInfo(this,ModuleRes(INFO_STR_MAX_FILE_LENGTH)); - String aMsg(aInfo.GetMessText()); - aMsg.SearchAndReplace(String::CreateFromAscii("\'#\'"),String::CreateFromAscii("40")); - aInfo.SetMessText(aMsg); - aInfo.Execute(); - return 0; - } - m_ET_DATADEVSPACE.SetText(aUrl.PathToFileName()); - } - } - - CheckBitmaps(); - return 0; -} -//------------------------------------------------------------------------ -IMPL_LINK( OAdabasNewDbDlg, PwdClickHdl, Button *, pButton ) -{ - SfxPasswordDialog aDlg(this); - aDlg.ShowExtras(SHOWEXTRAS_CONFIRM); - if(aDlg.Execute()) - { - String sPwd = aDlg.GetPassword().ToUpperAscii(); - // no space in password allowed - if ( comphelper::string::getTokenCount(sPwd, ' ') == 1 ) - { - if(pButton == &m_PB_CONPWD) - { - m_ConPwd = sPwd; - m_nSetBitmap &=~2; - } - else if(pButton == &m_PB_SYSPWD) - { - m_SysPwd = sPwd; - if(!m_DomainPwd.Len()) - { - m_nSetBitmap = 1; - m_DomainPwd = m_SysPwd; - } - if(!m_ConPwd.Len()) - { - m_nSetBitmap |= 2; - m_ConPwd = m_SysPwd; - } - - } - else if(pButton == &m_PB_DOMAINPWD) - { - m_DomainPwd = sPwd; - m_nSetBitmap &=~1; - } - } - else - { - String sErrorMsg(ModuleRes(STR_ADABAS_PASSWORD_ILLEGAL)); - ErrorBox(this, WB_OK, sErrorMsg).Execute(); - } - } - CheckBitmaps(); - return 0; -} -//------------------------------------------------------------------------ -void OAdabasNewDbDlg::CheckBitmaps() -{ - sal_Int16 i=0; - if(m_ConPwd.Len() && m_ET_CONUSR.GetText().Len()) - i++,m_BMP_CON.SetImage(ModuleRes(((m_nSetBitmap & 2) == 2) ? DEFAULT_BLUE : CHECK_GREEN)); - else - m_BMP_CON.SetImage(ModuleRes(UNCHECK_RED)); - - if(!m_bRestore) - { - if(m_SysPwd.Len() && m_ET_SYSUSR.GetText().Len()) - i++,m_BMP_SYS.SetImage(ModuleRes(CHECK_GREEN)); - else - m_BMP_SYS.SetImage(ModuleRes(UNCHECK_RED)); - - if(m_DomainPwd.Len() ) - i++,m_BMP_DOMAIN.SetImage(ModuleRes(((m_nSetBitmap & 1) == 1) ? DEFAULT_BLUE : CHECK_GREEN)); - else - m_BMP_DOMAIN.SetImage(ModuleRes(UNCHECK_RED)); - } - else if(m_Backup_File.Len()) - i+=2; - - if(m_ET_SYSDEVSPACE.GetText().Len() && m_ET_TRANSACTIONLOG.GetText().Len() && m_ET_DATADEVSPACE.GetText().Len() && - m_ET_SYSDEVSPACE.GetText() != m_ET_TRANSACTIONLOG.GetText() && m_ET_SYSDEVSPACE.GetText() != m_ET_DATADEVSPACE.GetText() && - m_ET_DATADEVSPACE.GetText() != m_ET_TRANSACTIONLOG.GetText()) - i++; - - if(m_DBName.Len()) - i++; - - m_PB_OK.Enable(i == 5); -} -// ----------------------------------------------------------------------------- -sal_Bool OAdabasNewDbDlg::fillEnvironmentVariable(const ::rtl::OUString& _sVariableName,String& _rsValue) -{ - rtl_uString* pDbVar = NULL; - sal_Bool bError = sal_False; - if(osl_getEnvironment(_sVariableName.pData,&pDbVar) == osl_Process_E_None && pDbVar) - { - _rsValue = pDbVar; - rtl::OUString sTemp; - LocalFileHelper::ConvertPhysicalNameToURL(_rsValue, sTemp); - _rsValue = sTemp; - rtl_uString_release(pDbVar); - pDbVar = NULL; - - // ensure dir exists - osl::FileBase::RC rc = osl::Directory::createPath(_rsValue); - if(rc != osl::FileBase::E_None && rc != osl::FileBase::E_EXIST) - { - bError = sal_True; - PostUserEvent(LINK(this, OAdabasNewDbDlg, OnError)); - } - } - return bError; -} -// ----------------------------------------------------------------------------- - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/AdabasNewDb.hrc b/dbaccess/source/ext/adabas/AdabasNewDb.hrc deleted file mode 100644 index 30216a30e6b7..000000000000 --- a/dbaccess/source/ext/adabas/AdabasNewDb.hrc +++ /dev/null @@ -1,78 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef ADABASUI_ADABASNEWDB_HRC -#define ADABASUI_ADABASNEWDB_HRC - - -#define PB_SYSDEVSPACE 1 -#define PB_TRANSACTIONLOG 2 -#define PB_DATADEVSPACE 3 -#define PB_DOMAINPWD 4 -#define PB_CONPWD 5 -#define PB_SYSPWD 6 -#define PB_OK 7 -#define PB_CANCEL 8 -#define PB_RESTORE 9 - -#define NF_TRANSACTIONLOG_SIZE 1 -#define NF_DATADEVSPACE_SIZE 2 -#define NF_CACHE_SIZE 3 - -#define ET_SYSUSR 1 -#define ET_DOMAIN_USR 2 -#define ET_CONUSR 3 -#define ET_SYSDEVSPACE 4 -#define ET_TRANSACTIONLOG 5 -#define ET_DATADEVSPACE 6 -#define ET_RESTORE 7 -#define ET_DATABASENAME 8 - -#define FT_SYSUSR 1 -#define FT_DOMAIN_USR 2 -#define FT_TRANSACTIONLOG_SIZE 3 -#define FT_DATADEVSPACE_SIZE 4 -#define FT_CONUSR 6 -#define FT_SYSDEVSPACE 7 -#define FT_TRANSACTIONLOG 8 -#define FT_DATADEVSPACE 9 -#define FT_CACHE_SIZE 10 -#define FT_RESTORE 11 -#define FT_DATABASENAME 12 - -#define FL_USER 1 -#define FL_DBSETTINGS 2 -#define FL_END 3 - -#define BMP_CON 1 -#define BMP_SYS 2 -#define BMP_DOMAIN 3 - -#define STR_BACKUPFILE_LOAD 1 - -#endif // ADABASUI_ADABASNEWDB_HRC - diff --git a/dbaccess/source/ext/adabas/AdabasNewDb.hxx b/dbaccess/source/ext/adabas/AdabasNewDb.hxx deleted file mode 100644 index e8e5acc45e51..000000000000 --- a/dbaccess/source/ext/adabas/AdabasNewDb.hxx +++ /dev/null @@ -1,151 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef ADABASUI_ADABAS_CREATEDB_HXX -#define ADABASUI_ADABAS_CREATEDB_HXX - - -#include <vcl/dialog.hxx> - -#include <vcl/fixed.hxx> -#include <vcl/button.hxx> -#include <vcl/field.hxx> -#include <vcl/edit.hxx> -#include <com/sun/star/sdbcx/XCreateCatalog.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <sfx2/filedlghelper.hxx> -#include <memory> -#include "ASQLNameEdit.hxx" - -class WaitObject; - -namespace adabasui -{ - class ODatabaseCreator; - //======================================================================== - // ADABAS for new db; is called from typepage - //======================================================================== - class OAdabasNewDbDlg : public ModalDialog - { - private: - FixedText m_FT_DATABASENAME; - OSQLNameEdit m_ET_DATABASENAME; - - FixedLine m_FL_USER; - FixedText m_FT_SYSUSR; - FixedText m_FT_CONUSR; - FixedText m_FT_DOMAIN_USR; - - OSQLNameEdit m_ET_SYSUSR; - PushButton m_PB_SYSPWD; - OSQLNameEdit m_ET_CONUSR; - PushButton m_PB_CONPWD; - OSQLNameEdit m_ET_DOMAIN_USR; - PushButton m_PB_DOMAINPWD; - - FixedImage m_BMP_CON; - FixedImage m_BMP_SYS; - FixedImage m_BMP_DOMAIN; - - FixedText m_FT_RESTORE; - Edit m_ET_RESTORE; - PushButton m_PB_RESTORE; - - FixedLine m_FL_DBSETTINGS; - FixedText m_FT_SYSDEVSPACE; - FixedText m_FT_TRANSACTIONLOG; - FixedText m_FT_DATADEVSPACE; - Edit m_ET_SYSDEVSPACE; - PushButton m_PB_SYSDEVSPACE; - Edit m_ET_TRANSACTIONLOG; - PushButton m_PB_TRANSACTIONLOG; - Edit m_ET_DATADEVSPACE; - PushButton m_PB_DATADEVSPACE; - - FixedText m_FT_TRANSACTIONLOG_SIZE; - NumericField m_NF_TRANSACTIONLOG_SIZE; - FixedText m_FT_DATADEVSPACE_SIZE; - NumericField m_NF_DATADEVSPACE_SIZE; - FixedText m_FT_CACHE_SIZE; - NumericField m_NF_CACHE_SIZE; - - FixedLine m_FL_END; - - OKButton m_PB_OK; - CancelButton m_PB_CANCEL; - - rtl::OUString m_SYSDEV_File; - rtl::OUString m_TRANSDEV_File; - rtl::OUString m_DATADEV_File; - String m_Backup_File; - String m_ConPwd; - String m_SysPwd; - String m_DomainPwd; - String m_DBName; - String m_sDbWork; - String m_sDbConfig; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XCreateCatalog> m_xCreateCatalog; - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xORB; - sal_Bool m_bRestore; - sal_Int8 m_nSetBitmap; - - ::std::auto_ptr<WaitObject> m_aCreatorWait; - ::std::auto_ptr<ODatabaseCreator> m_aCreatorThread; - - DECL_LINK( LoadButtonClickHdl, Button * ); - DECL_LINK( ButtonClickHdl, Button * ); - DECL_LINK( PwdClickHdl, Button * ); - DECL_LINK( ImplOKHdl, OKButton * ); - DECL_LINK( LoseFocusHdl, Edit * ); - DECL_LINK( TerminateHdl, void * ); - - void CheckBitmaps(); - - DECL_LINK(OnError, void*); - DECL_LINK(OnNoDefaultPath, void*); - DECL_LINK(OnNoAccessRights, void*); - - sal_Bool fillEnvironmentVariable(const ::rtl::OUString& _sVariableName,String& _rsValue); - public: - OAdabasNewDbDlg(Window* pParent, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbcx::XCreateCatalog>& _rxCreateCatalog, - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& _rxORB, - sal_Bool _bRestore=sal_False); - virtual ~OAdabasNewDbDlg(); - - ::rtl::OUString GetDatabaseName() const { return m_ET_DATABASENAME.GetText(); } - ::rtl::OUString GetControlUser() const { return m_ET_CONUSR.GetText(); } - ::rtl::OUString GetControlPassword() const { return m_ConPwd; } - ::rtl::OUString GetUser() const { return m_ET_SYSUSR.GetText(); } - ::rtl::OUString GetUserPassword() const { return m_SysPwd; } - sal_Int32 GetCacheSize() const { return static_cast<sal_Int32>(m_NF_CACHE_SIZE.GetValue()); } - }; -} -#endif // adabasui_ADABAS_CREATEDB_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/AdabasNewDb.src b/dbaccess/source/ext/adabas/AdabasNewDb.src deleted file mode 100644 index efe5879cef80..000000000000 --- a/dbaccess/source/ext/adabas/AdabasNewDb.src +++ /dev/null @@ -1,475 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef ADABASUI_ADABASNEWDB_HRC -#include "AdabasNewDb.hrc" -#endif -#include "dbaccess_helpid.hrc" -#include "adabasui_resource.hrc" -//================================================================== -// NEWDB Admin -//================================================================== -#define WIN_X 268 -#define WIN_Y 210 -#define MOVE_Y 21 -#define ADJUST_X 45 -ModalDialog DLG_ADABAS_NEWDB -{ - Moveable = TRUE ; - Closeable = TRUE ; - OutputSize = TRUE ; - SVLook = TRUE; - HelpID = HID_DLG_ADABAS_NEWDB ; - Size = MAP_APPFONT ( WIN_X , WIN_Y + MOVE_Y) ; - - FixedText FT_DATABASENAME - { - Pos = MAP_APPFONT ( 12 , 6) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ; - Text[ en-US ] = "Database ~name"; - }; - - Edit ET_DATABASENAME - { - Border = TRUE ; - Pos = MAP_APPFONT ( 77 + ADJUST_X, 5) ; - Size = MAP_APPFONT ( 161 - ADJUST_X, 12 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_DBNAME ; - }; - - FixedLine FL_USER - { - Pos = MAP_APPFONT ( 6 , 3 + MOVE_Y) ; - Size = MAP_APPFONT ( WIN_X - 12 , 8 ) ; - Text[ en-US ] = "User settings"; - }; - - FixedText FT_CONUSR - { - Pos = MAP_APPFONT ( 12 , 31 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ; - Text[ en-US ] = "~Control user"; - }; - - FixedText FT_SYSUSR - { - Pos = MAP_APPFONT ( 12 , 14 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ; - Text[ en-US ] = "~Administrator"; - }; - - FixedText FT_DOMAIN_USR - { - Pos = MAP_APPFONT ( 12 , 48 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ; - Text[ en-US ] = "~Domain user"; - }; - - Edit ET_SYSUSR - { - Border = TRUE ; - Pos = MAP_APPFONT ( 77 + ADJUST_X, 13 + MOVE_Y) ; - Size = MAP_APPFONT ( 105 - ADJUST_X, 12 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_SYSUSR ; - }; - - PushButton PB_SYSPWD - { - Pos = MAP_APPFONT ( 188 , 13 + MOVE_Y) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_SYSPWD ; - Text[ en-US ] = "P~assword..."; - }; - - Edit ET_CONUSR - { - Border = TRUE ; - Pos = MAP_APPFONT ( 77 + ADJUST_X, 30 + MOVE_Y) ; - Size = MAP_APPFONT ( 105 - ADJUST_X, 12 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_CONUSR ; - }; - - PushButton PB_CONPWD - { - Pos = MAP_APPFONT ( 188 , 30 + MOVE_Y) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_CONPWD ; - Text[ en-US ] = "~Password..."; - }; - - Edit ET_DOMAIN_USR - { - Pos = MAP_APPFONT ( 77 + ADJUST_X, 47 + MOVE_Y) ; - Size = MAP_APPFONT ( 105 - ADJUST_X, 12 ) ; - Border = TRUE ; - TabStop = TRUE ; - ReadOnly= TRUE; - HelpID = HID_DLG_ADABAS_USR ; - Text = "adabas"; - }; - - PushButton PB_DOMAINPWD - { - Pos = MAP_APPFONT ( 188 , 47 + MOVE_Y) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_DOMAINPWD ; - Text[ en-US ] = "Passwo~rd..."; - }; - - FixedImage BMP_CON - { - Pos = MAP_APPFONT ( 240 , 27 + MOVE_Y) ; - Size = MAP_APPFONT ( 20 , 20 ) ; - HelpID = HID_DLG_ADABAS_CON_PWD ; - }; - - FixedImage BMP_SYS - { - Pos = MAP_APPFONT ( 240 , 11 + MOVE_Y) ; - Size = MAP_APPFONT ( 20 , 20 ) ; - HelpID = HID_DLG_ADABAS_SYS_PWD ; - }; - - FixedImage BMP_DOMAIN - { - Pos = MAP_APPFONT ( 240 , 44 + MOVE_Y) ; - Size = MAP_APPFONT ( 20 , 20 ) ; - HelpID = HID_DLG_ADABAS_DOMAIN_PWD ; - }; - - FixedText FT_RESTORE - { - Pos = MAP_APPFONT ( 12 , 13 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 10 ) ; - Text[ en-US ] = "~Backup file"; - }; - - Edit ET_RESTORE - { - Border = TRUE ; - Pos = MAP_APPFONT ( 77 + ADJUST_X, 13 + MOVE_Y) ; - Size = MAP_APPFONT ( 105 - ADJUST_X, 12 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_RESTORE ; - }; - - PushButton PB_RESTORE - { - Pos = MAP_APPFONT ( 188 , 13 + MOVE_Y) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_PBRESTORE ; - Text[ en-US ] = "..."; - }; - - /* DEVSPACE positions */ - FixedLine FL_DBSETTINGS - { - Pos = MAP_APPFONT ( 6 , 70 + MOVE_Y) ; - Size = MAP_APPFONT ( WIN_X - 12 , 8 ) ; - Text[ en-US ] = "Database settings"; - }; - - FixedText FT_SYSDEVSPACE - { - Pos = MAP_APPFONT ( 12 , 83 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ; - Text[ en-US ] = "S~YSDEVSPACE"; - }; - - FixedText FT_TRANSACTIONLOG - { - Pos = MAP_APPFONT ( 12 , 99 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ; - Text[ en-US ] = "TRANSACTI~ONLOG"; - }; - - FixedText FT_DATADEVSPACE - { - Pos = MAP_APPFONT ( 12 , 116 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ; - Text[ en-US ] = "DATAD~EVSPACE"; - }; - - Edit ET_SYSDEVSPACE - { - Border = TRUE ; - Pos = MAP_APPFONT ( 77 + ADJUST_X, 81 + MOVE_Y) ; - Size = MAP_APPFONT ( 161 - ADJUST_X, 12 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_SYSDEVSPACE ; - }; - - PushButton PB_SYSDEVSPACE - { - Pos = MAP_APPFONT ( WIN_X - 24, 81 + MOVE_Y) ; - Size = MAP_APPFONT ( 12 , 12 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_PBSYSDEVSPACE ; - Text[ en-US ] = "..."; - }; - - Edit ET_TRANSACTIONLOG - { - Border = TRUE ; - Pos = MAP_APPFONT ( 77 + ADJUST_X, 97 + MOVE_Y) ; - Size = MAP_APPFONT ( 161 - ADJUST_X, 12 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_TRANSACTIONLOG ; - }; - - PushButton PB_TRANSACTIONLOG - { - Pos = MAP_APPFONT ( WIN_X - 24, 97+ MOVE_Y) ; - Size = MAP_APPFONT ( 12 , 12 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_PBTRANSACTIONLOG ; - Text[ en-US ] = "..."; - }; - - Edit ET_DATADEVSPACE - { - Pos = MAP_APPFONT ( 77 + ADJUST_X, 114 + MOVE_Y) ; - Size = MAP_APPFONT ( 161 - ADJUST_X, 12) ; - Border = TRUE ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_DATADEVSPACE ; - }; - - PushButton PB_DATADEVSPACE - { - Pos = MAP_APPFONT ( WIN_X - 24, 114 + MOVE_Y) ; - Size = MAP_APPFONT ( 12 , 12 ) ; - TabStop = TRUE ; - HelpID = HID_DLG_ADABAS_PBDATADEVSPACE ; - Text[ en-US ] = "..."; - }; - - /* DEVSPACE sizes */ - FixedText FT_TRANSACTIONLOG_SIZE - { - Pos = MAP_APPFONT ( 12 , 133 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ; - Text[ en-US ] = "Transaction ~file (MB)"; - }; - - NumericField NF_TRANSACTIONLOG_SIZE - { - Pos = MAP_APPFONT ( 77 + ADJUST_X, 131 + MOVE_Y) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - Border = TRUE ; - TabStop = TRUE ; - Spin = TRUE ; - StrictFormat = TRUE; - HelpID = HID_DLG_ADABAS_TRANSACTIONLOG_SIZE ; - }; - - FixedText FT_DATADEVSPACE_SIZE - { - Pos = MAP_APPFONT ( 12 , 150 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ; - Text[ en-US ] = "Data~base size (MB)"; - }; - - NumericField NF_DATADEVSPACE_SIZE - { - Pos = MAP_APPFONT ( 77 + ADJUST_X, 148 + MOVE_Y) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - Border = TRUE ; - TabStop = TRUE ; - Spin = TRUE ; - StrictFormat = TRUE; - HelpID = HID_DLG_ADABAS_DATADEVSPACE_SIZE ; - }; - - FixedText FT_CACHE_SIZE - { - Pos = MAP_APPFONT ( 12 , 167 + MOVE_Y) ; - Size = MAP_APPFONT ( 64 + ADJUST_X, 8 ) ; - Text[ en-US ] = "Data ~buffer size (MB)"; - }; - - NumericField NF_CACHE_SIZE - { - Pos = MAP_APPFONT ( 77 + ADJUST_X, 165 + MOVE_Y) ; - Size = MAP_APPFONT ( 40 , 12 ) ; - Border = TRUE ; - TabStop = TRUE ; - Spin = TRUE ; - StrictFormat = TRUE; - HelpID = HID_DLG_ADABAS_CACHE_SIZE ; - }; - - FixedLine FL_END - { - Pos = MAP_APPFONT ( 0 , WIN_Y - 24 + MOVE_Y) ; - Size = MAP_APPFONT ( WIN_X , 1 ) ; - }; - - OKButton PB_OK - { - Pos = MAP_APPFONT ( WIN_X - 112, WIN_Y - 20 + MOVE_Y) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - - CancelButton PB_CANCEL - { - Pos = MAP_APPFONT ( WIN_X - 56 , WIN_Y - 20+ MOVE_Y) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - - String STR_BACKUPFILE_LOAD - { - Text[ en-US ] = "Backup file information"; - }; - - Text[ en-US ] = "Create New Adabas D Database"; -}; - -Image CHECK_GREEN -{ - ImageBitmap = Bitmap { File = "nu07.png"; }; - MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; -}; - -Image UNCHECK_RED -{ - ImageBitmap = Bitmap { File = "nu08.png"; }; - MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; -}; - -Image DEFAULT_BLUE -{ - ImageBitmap = Bitmap { File = "nu09.png"; }; - MaskColor = Color { Red = 0xFFFF; Green = 0x0; Blue = 0xFFFF; }; -}; - -/* Fehlermeldungen beim Erstellen einer Adabas DB */ - -String STR_ADABAS_NO_PARAM_SET -{ - Text[ en-US ] = "No entry could be written in the configuration file."; -}; - -String STR_ADABAS_NO_DB_CREATED -{ - Text[ en-US ] = "An error occurred as the DB files were being created."; -}; - -String STR_ADABAS_NO_SYSTEM_TABLES -{ - Text[ en-US ] = "An error occurred as the system tables were being created."; -}; - -String STR_ADABAS_NO_BACKUP_FILE -{ - Text[ en-US ] = "The backup file entered does not exist."; -}; - -InfoBox INFO_STR_MAX_FILE_LENGTH -{ - Message[ en-US ] = "The fully qualified file cannot be longer than \'#\' characters."; -}; - -String STR_NO_SAME_USER -{ - Text[ en-US ] = "The administrator and the control user cannot have the same name!"; -}; - -String STR_DEVSPACE_NO_FILE -{ - Text[ en-US ] = "No name has been entered for the $name$ file!"; -}; - -String STR_NO_PERMISSION -{ - Text[ en-US ] = "You have to have administrator rights to create a new database!"; -}; - -String STR_FILE_OR_DIR_UNKNOWN -{ - Text[ en-US ] = "The specified file name or directory does not exist."; -}; - -String STR_ERROR_IN_ADABAS_INSTALLATION -{ - Text [ en-US ] = "No new database can be created.\nPlease check your Adabas D installation, especially the variables \"DBROOT\" and \"DBWORK\"."; -}; - -String STR_STAT_WARNING -{ - Text [ en-US ] = "Warning!" ; -}; - -String STR_ADABAS_CREATEFILES -{ - Text [ en-US ] = "Creating database files." ; -}; - -String STR_ADABAS_CREATEPARAM_FILE -{ - Text [ en-US ] = "Creating database configuration file." ; -}; - -String STR_ADABAS_START_DATABASE -{ - Text [ en-US ] = "Starting database for the first time." ; -}; - -String STR_ADABAS_DB_EXISTS -{ - Text[ en-US ] = "The name entered already exists."; -}; - -String STR_ADABAS_NO_DEFAULTNAME -{ - Text[ en-US ] = "No default names could be set for the database files. The total length is more than 40 characters."; -}; - -String STR_ADABAS_NO_ACCESSRIGHTS -{ - Text[ en-US ] = "No default names could be set for the database files. There is no write access."; -}; - -String STR_ADABAS_CANNOT_CONVERT -{ - Text[ en-US ] = "The current database need to be converted. Please insert control user and password."; -}; - -String STR_ADABAS_PASSWORD_ILLEGAL -{ - Text[ en-US ] = "Spaces are not permitted in the password. Please enter a new password."; -}; diff --git a/dbaccess/source/ext/adabas/Aservices.cxx b/dbaccess/source/ext/adabas/Aservices.cxx deleted file mode 100644 index dbe21ca8c9f4..000000000000 --- a/dbaccess/source/ext/adabas/Aservices.cxx +++ /dev/null @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> -#include "Acomponentmodule.hxx" - - -/********************************************************************************************/ - -using namespace ::rtl; -using namespace ::adabasui; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::registry; - -//*************************************************************************************** -// -// registry functions -extern "C" void SAL_CALL createRegistryInfo_OAdabasCreateDialog(); - -//*************************************************************************************** -extern "C" void SAL_CALL createRegistryInfo_adabasui() -{ - static sal_Bool bInit = sal_False; - if (!bInit) - { - createRegistryInfo_OAdabasCreateDialog(); - ::adabasui::OModule::setResourceFilePrefix("adabasui"); - bInit = sal_True; - } -} - -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL adabasui_component_getFactory( - const sal_Char* pImplementationName, - void* pServiceManager, - void* /*pRegistryKey*/) -{ - createRegistryInfo_adabasui(); - - Reference< XInterface > xRet; - if (pServiceManager && pImplementationName) - { - xRet = OModule::getComponentFactory( - ::rtl::OUString::createFromAscii(pImplementationName), - static_cast< XMultiServiceFactory* >(pServiceManager)); - } - - if (xRet.is()) - xRet->acquire(); - return xRet.get(); -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/Astringconstants.cxx b/dbaccess/source/ext/adabas/Astringconstants.cxx deleted file mode 100644 index 6fe34c212a00..000000000000 --- a/dbaccess/source/ext/adabas/Astringconstants.cxx +++ /dev/null @@ -1,62 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -//============================================================ -//= property names -//============================================================ - -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CREATECATALOG, "CreateCatalog"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_DATABASENAME, "DatabaseName"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CONTROL_USER, "ControlUser"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CONTROL_PASSWORD, "ControlPassword"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_USER, "User"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_PASSWORD, "Password"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_SYSDEVSPACE, "SYSDEVSPACE"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_DATADEVSPACE, "DataDevSpace"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_TRANSACTION_LOG, "TRANSACTION_LOG"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_BACKUPNAME, "Backup"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CACHESIZE, "CacheSize"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_CACHESIZE_INCREMENT, "DataCacheSizeIncrement"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_RESTOREDATABASE, "RestoreDatabase"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_DOMAINPASSWORD, "DomainPassword"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_LOGDEVSIZE, "LogDevSize"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_DATADEVSIZE, "DataDevSize"); -IMPLEMENT_CONSTASCII_USTRING(PROPERTY_SHUTDOWN, "ShutdownDatabase"); -//============================================================ -//= service names -//============================================================ -//============================================================ -//= SQLSTATE -//============================================================ -IMPLEMENT_CONSTASCII_USTRING(SQLSTATE_GENERAL, "01000"); - - - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/Astringconstants.hrc b/dbaccess/source/ext/adabas/Astringconstants.hrc deleted file mode 100644 index 49697f556024..000000000000 --- a/dbaccess/source/ext/adabas/Astringconstants.hrc +++ /dev/null @@ -1,103 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef ADABASUI_STRINGCONSTANTS_HRC_ -#define ADABASUI_STRINGCONSTANTS_HRC_ - -#ifndef STRINGCONSTANTS_INCLUDED_INDIRECT -#error "don't include this file directly! use adabasuistrings.hrc instead!" -#endif - -#ifndef _SAL_TYPES_H_ -#include <sal/types.h> -#endif -#ifndef _RTL_USTRING_HXX_ -#include <rtl/ustring.hxx> -#endif - -//============================================================ -//= a helper for static ascii pseudo-unicode strings -//============================================================ -// string constants -struct _ConstAsciiString_ -{ - sal_Int32 length; - sal_Char const* str; - - operator ::rtl::OUString () const { return ::rtl::OUString(str, length, RTL_TEXTENCODING_ASCII_US); } - operator const sal_Char* () const { return str; } -}; - -#define DECLARE_CONSTASCII_USTRING( name ) \ - extern _ConstAsciiString_ const name - -#define IMPLEMENT_CONSTASCII_USTRING( name, string ) \ - _ConstAsciiString_ const name = { sizeof(string)-1, string } - -//============================================================ -//= property ids -//============================================================ - -#define PROPERTY_ID_CREATECATALOG 3 -#define PROPERTY_ID_DATABASENAME 4 -#define PROPERTY_ID_CONTROL_USER 5 -#define PROPERTY_ID_CONTROL_PASSWORD 6 -#define PROPERTY_ID_USER 7 -#define PROPERTY_ID_PASSWORD 8 -#define PROPERTY_ID_CACHESIZE 9 - -//============================================================ -//= property names -//============================================================ - -DECLARE_CONSTASCII_USTRING(PROPERTY_CREATECATALOG); -DECLARE_CONSTASCII_USTRING(PROPERTY_DATABASENAME); -DECLARE_CONSTASCII_USTRING(PROPERTY_USER); -DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_USER); -DECLARE_CONSTASCII_USTRING(PROPERTY_CONTROL_PASSWORD); -DECLARE_CONSTASCII_USTRING(PROPERTY_SYSDEVSPACE); -DECLARE_CONSTASCII_USTRING(PROPERTY_TRANSACTION_LOG); -DECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSPACE); -DECLARE_CONSTASCII_USTRING(PROPERTY_BACKUPNAME); -DECLARE_CONSTASCII_USTRING(PROPERTY_PASSWORD); -DECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE); -DECLARE_CONSTASCII_USTRING(PROPERTY_CACHESIZE_INCREMENT); -DECLARE_CONSTASCII_USTRING(PROPERTY_RESTOREDATABASE); -DECLARE_CONSTASCII_USTRING(PROPERTY_DOMAINPASSWORD); -DECLARE_CONSTASCII_USTRING(PROPERTY_LOGDEVSIZE); -DECLARE_CONSTASCII_USTRING(PROPERTY_DATADEVSIZE); -DECLARE_CONSTASCII_USTRING(PROPERTY_SHUTDOWN); - -//============================================================ -//= SQLSTATE -//============================================================ -DECLARE_CONSTASCII_USTRING(SQLSTATE_GENERAL); - - -#endif // ADABASUI_STRINGCONSTANTS_HRC_ - - diff --git a/dbaccess/source/ext/adabas/adabasui.component b/dbaccess/source/ext/adabas/adabasui.component deleted file mode 100644 index e9a79b1d59c1..000000000000 --- a/dbaccess/source/ext/adabas/adabasui.component +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!--********************************************************************** -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* Copyright 2000, 2010 Oracle and/or its affiliates. -* -* OpenOffice.org - a multi-platform office productivity suite -* -* This file is part of OpenOffice.org. -* -* OpenOffice.org is free software: you can redistribute it and/or modify -* it under the terms of the GNU Lesser General Public License version 3 -* only, as published by the Free Software Foundation. -* -* OpenOffice.org 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 version 3 for more details -* (a copy is included in the LICENSE file that accompanied this code). -* -* You should have received a copy of the GNU Lesser General Public License -* version 3 along with OpenOffice.org. If not, see -* <http://www.openoffice.org/license.html> -* for a copy of the LGPLv3 License. -* -**********************************************************************--> - -<component loader="com.sun.star.loader.SharedLibrary" prefix="adabasui" - xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="org.openoffice.comp.adabasui.AdabasCreateDialog"> - <service name="com.sun.star.sdb.AdabasCreationDialog"/> - </implementation> -</component> diff --git a/dbaccess/source/ext/adabas/adabasui_resource.hrc b/dbaccess/source/ext/adabas/adabasui_resource.hrc deleted file mode 100644 index b0b0e63e91c7..000000000000 --- a/dbaccess/source/ext/adabas/adabasui_resource.hrc +++ /dev/null @@ -1,92 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _ADABASUI_RESOURCE_HRC_ -#define _ADABASUI_RESOURCE_HRC_ - -#ifndef _SOLAR_HRC -#include <svl/solar.hrc> -#endif - -#define RID_DIALOG_START RID_DB_EXTENSIONS_START -#define RID_PAGE_START RID_DB_EXTENSIONS_START -#define RID_ERRORBOX_START RID_DB_EXTENSIONS_START -#define RID_QUERYBOX_START RID_DB_EXTENSIONS_START -#define RID_TOOLBOX_START RID_DB_EXTENSIONS_START -#define RID_BITMAP_START RID_DB_EXTENSIONS_START -#define RID_IMAGE_START RID_DB_EXTENSIONS_START -#define RID_IMAGELIST_START RID_DB_EXTENSIONS_START -#define RID_MENU_START RID_DB_EXTENSIONS_START -#define RID_STRING_START RID_DB_EXTENSIONS_START -#define RID_UNTYPED_START RID_DB_EXTENSIONS_START -#define RID_WARN_START RID_DB_EXTENSIONS_START - -//======================================================================== -// dialog ids - -#define DLG_ADABAS_NEWDB RID_DIALOG_START + 0 -//======================================================================== -// images - -#define CHECK_GREEN RID_IMAGE_START + 0 -#define UNCHECK_RED RID_IMAGE_START + 1 -#define DEFAULT_BLUE RID_IMAGE_START + 2 - -//======================================================================== -// warning boxes - -#define INFO_STR_MAX_FILE_LENGTH RID_WARN_START + 0 - -//======================================================================== -// strings - -#define STR_ADABAS_NO_BACKUP_FILE RID_STRING_START + 0 -// -#define STR_NO_SAME_USER RID_STRING_START + 2 -#define STR_DEVSPACE_NO_FILE RID_STRING_START + 3 -#define STR_NO_PERMISSION RID_STRING_START + 4 -#define STR_FILE_OR_DIR_UNKNOWN RID_STRING_START + 5 -#define STR_STAT_WARNING RID_STRING_START + 6 -// -#define STR_ADABAS_NO_PARAM_SET RID_STRING_START + 8 -// -// -#define STR_ADABAS_NO_DB_CREATED RID_STRING_START + 11 -#define STR_ADABAS_NO_SYSTEM_TABLES RID_STRING_START + 12 -#define STR_ERROR_IN_ADABAS_INSTALLATION RID_STRING_START + 13 -#define STR_ADABAS_CREATEFILES RID_STRING_START + 14 -#define STR_ADABAS_CREATEPARAM_FILE RID_STRING_START + 15 -#define STR_ADABAS_START_DATABASE RID_STRING_START + 16 -#define STR_ADABAS_DB_EXISTS RID_STRING_START + 17 -#define STR_ADABAS_NO_DEFAULTNAME RID_STRING_START + 18 -#define STR_ADABAS_NO_ACCESSRIGHTS RID_STRING_START + 19 -#define STR_ADABAS_CANNOT_CONVERT RID_STRING_START + 20 -#define STR_ADABAS_PASSWORD_ILLEGAL RID_STRING_START + 21 - - -#endif // _ADABASUI_RESOURCE_HRC_ - diff --git a/dbaccess/source/ext/adabas/adabasuistrings.cxx b/dbaccess/source/ext/adabas/adabasuistrings.cxx deleted file mode 100644 index cf1edccedc07..000000000000 --- a/dbaccess/source/ext/adabas/adabasuistrings.cxx +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "adabasuistrings.hrc" - -namespace adabasui -{ -#include "Astringconstants.cxx" -} - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/adabas/adabasuistrings.hrc b/dbaccess/source/ext/adabas/adabasuistrings.hrc deleted file mode 100644 index 7ee5fd19275c..000000000000 --- a/dbaccess/source/ext/adabas/adabasuistrings.hrc +++ /dev/null @@ -1,42 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef ADABASUI_SHARED_DBUSTRINGS_HRC -#define ADABASUI_SHARED_DBUSTRINGS_HRC - -#ifndef _RTL_USTRING_HXX_ -#include <rtl/ustring.hxx> -#endif - -namespace adabasui -{ -#define STRINGCONSTANTS_INCLUDED_INDIRECT -#include "Astringconstants.hrc" -#undef STRINGCONSTANTS_INCLUDED_INDIRECT -} - -#endif // adabasui_SHARED_DBUSTRINGS_HRC diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx index 45b09601364c..5f2fcbd62783 100644 --- a/dbaccess/source/inc/dsntypes.hxx +++ b/dbaccess/source/inc/dsntypes.hxx @@ -51,7 +51,7 @@ enum DATASOURCE_TYPE DST_MYSQL_ODBC = 2, DST_MYSQL_JDBC = 3, DST_ORACLE_JDBC = 4, - DST_ADABAS = 5, + //5 was DST_ADABAS DST_CALC = 6, DST_DBASE = 7, DST_FLAT = 8, @@ -93,7 +93,7 @@ enum DATASOURCE_TYPE #define PAGE_DBSETUPWIZARD_TEXT 2 #define PAGE_DBSETUPWIZARD_MSACCESS 3 #define PAGE_DBSETUPWIZARD_LDAP 4 -#define PAGE_DBSETUPWIZARD_ADABAS 5 +//5 was PAGE_DBSETUPWIZARD_ADABAS #define PAGE_DBSETUPWIZARD_MYSQL_INTRO 6 #define PAGE_DBSETUPWIZARD_MYSQL_JDBC 7 #define PAGE_DBSETUPWIZARD_MYSQL_ODBC 8 diff --git a/dbaccess/source/inc/stringconstants.hrc b/dbaccess/source/inc/stringconstants.hrc index 48fb8312839c..617741eadaff 100644 --- a/dbaccess/source/inc/stringconstants.hrc +++ b/dbaccess/source/inc/stringconstants.hrc @@ -383,10 +383,8 @@ DECLARE_CONSTASCII_USTRING(SERVICE_SDBC_DRIVERMANAGER); DECLARE_CONSTASCII_USTRING(SERVICE_SDBC_CONNECTIONPOOL); DECLARE_CONSTASCII_USTRING(SERVICE_TASK_INTERACTION_HANDLER); DECLARE_CONSTASCII_USTRING(SERVICE_FRAME_DESKTOP); -DECLARE_CONSTASCII_USTRING(SERVICE_SDB_ADABASCREATIONDIALOG); DECLARE_CONSTASCII_USTRING(SERVICE_UI_FOLDERPICKER); DECLARE_CONSTASCII_USTRING(SERVICE_I18N_COLLATOR); -DECLARE_CONSTASCII_USTRING(SERVICE_EXTENDED_ADABAS_DRIVER); DECLARE_CONSTASCII_USTRING(SERVICE_SDB_TABLEDEFINITION); DECLARE_CONSTASCII_USTRING(SERVICE_SDB_COMMAND_DEFINITION); DECLARE_CONSTASCII_USTRING(SERVICE_NAME_FORM); diff --git a/dbaccess/source/inc/stringconstants.inc b/dbaccess/source/inc/stringconstants.inc index 0c90d128fcee..a158fe39243f 100644 --- a/dbaccess/source/inc/stringconstants.inc +++ b/dbaccess/source/inc/stringconstants.inc @@ -222,10 +222,8 @@ IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBCX_INDEXCOLUMN, "com.sun.star.sdbcx.Inde IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDBCX_KEYCOLUMN, "com.sun.star.sdbcx.KeyColumn"); IMPLEMENT_CONSTASCII_USTRING(SERVICE_TASK_INTERACTION_HANDLER, "com.sun.star.task.InteractionHandler"); IMPLEMENT_CONSTASCII_USTRING(SERVICE_FRAME_DESKTOP, "com.sun.star.frame.Desktop"); -IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDB_ADABASCREATIONDIALOG, "com.sun.star.sdb.AdabasCreationDialog"); IMPLEMENT_CONSTASCII_USTRING(SERVICE_UI_FOLDERPICKER, "com.sun.star.ui.dialogs.FolderPicker"); IMPLEMENT_CONSTASCII_USTRING(SERVICE_I18N_COLLATOR, "com.sun.star.i18n.Collator"); -IMPLEMENT_CONSTASCII_USTRING(SERVICE_EXTENDED_ADABAS_DRIVER, "com.sun.star.comp.sdbcx.adabas.ODriver"); IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDB_TABLEDEFINITION, "com.sun.star.sdb.TableDefinition"); IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDB_COMMAND_DEFINITION, "com.sun.star.sdb.CommandDefinition"); IMPLEMENT_CONSTASCII_USTRING(SERVICE_SDB_DOCUMENTDEFINITION, "com.sun.star.sdb.DocumentDefinition"); diff --git a/dbaccess/source/ui/dlg/AdabasPage.hrc b/dbaccess/source/ui/dlg/AdabasPage.hrc deleted file mode 100644 index a36dbb25da27..000000000000 --- a/dbaccess/source/ui/dlg/AdabasPage.hrc +++ /dev/null @@ -1,50 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef DBAUI_ADABASPAGE_HRC -#define DBAUI_ADABASPAGE_HRC - -#define FT_CACHE_SIZE 1 -#define FT_DATA_INCREMENT 2 -#define FT_CTRLPASSWORD 3 -#define FT_CTRLUSERNAME 4 - - -#define NF_DATA_INCREMENT 1 -#define NF_CACHE_SIZE 2 - -#define CB_SHUTDB 1 - -#define FL_1 1 - -#define PB_STAT 1 - -#define ET_CTRLPASSWORD 1 -#define ET_CTRLUSERNAME 2 - -#endif // DBAUI_ADABASPAGE_HRC - - diff --git a/dbaccess/source/ui/dlg/AdabasStat.cxx b/dbaccess/source/ui/dlg/AdabasStat.cxx deleted file mode 100644 index 919112b9d490..000000000000 --- a/dbaccess/source/ui/dlg/AdabasStat.cxx +++ /dev/null @@ -1,303 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include <cppuhelper/exc_hlp.hxx> -#include <tools/diagnose_ex.h> -#include <osl/diagnose.h> -#include "AdabasStat.hxx" -#include <comphelper/types.hxx> -#include <com/sun/star/sdbc/XStatement.hpp> -#include <com/sun/star/sdbc/XRow.hpp> -#include <com/sun/star/sdbc/XResultSet.hpp> -#include <com/sun/star/beans/XPropertySet.hpp> -#include "AdabasStat.hrc" -#include "dbu_dlg.hrc" -#include "dbustrings.hrc" -#include "UITools.hxx" -#include <connectivity/dbtools.hxx> -#include "sqlmessage.hxx" - -using namespace dbaui; -DBG_NAME(OAdabasStatistics) -namespace dbaui -{ - using namespace dbtools; - using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::beans; - using namespace ::com::sun::star::sdbc; - using namespace ::com::sun::star::lang; - - - -OAdabasStatistics::OAdabasStatistics( Window* pParent, - const ::rtl::OUString& _rUser, - const Reference< ::com::sun::star::sdbc::XConnection >& _xCurrentConnection, - const Reference< XMultiServiceFactory >& _xFactory) - : ModalDialog( pParent, ModuleRes(DLG_ADABASSTAT) ) - ,m_FL_FILES( this , ModuleRes(FL_FILES)) - ,m_FT_SYSDEVSPACE( this , ModuleRes(FT_SYSDEVSPACE)) - ,m_ET_SYSDEVSPACE( this , STR_ADABAS_HELP_SYSDEVSPACE,ModuleRes(ET_SYSDEVSPACE)) - ,m_FT_TRANSACTIONLOG( this , ModuleRes(FT_TRANSACTIONLOG)) - ,m_ET_TRANSACTIONLOG( this , STR_ADABAS_HELP_TRANSACT,ModuleRes(ET_TRANSACTIONLOG)) - ,m_FT_DATADEVSPACE( this , ModuleRes(FT_DATADEVSPACE)) - ,m_LB_DATADEVS( this , STR_ADABAS_HELP_DATADEVSPACES,ModuleRes(LB_DATADEVS)) - ,m_FL_SIZES( this , ModuleRes(FL_SIZES)) - ,m_FT_SIZE( this , ModuleRes(FT_SIZE)) - ,m_ET_SIZE( this , STR_ADABAS_HELP_SIZE,ModuleRes(ET_SIZE)) - ,m_FT_FREESIZE( this , ModuleRes(FT_FREESIZE)) - ,m_ET_FREESIZE( this , STR_ADABAS_HELP_FREESIZE,ModuleRes(ET_FREESIZE)) - ,m_FT_MEMORYUSING( this , ModuleRes(FT_MEMORYUSING)) - ,m_ET_MEMORYUSING( this , STR_ADABAS_HELP_MEMORYUSING,ModuleRes(ET_MEMORYUSING)) - ,m_PB_OK( this , ModuleRes(PB_OK)) - ,m_xConnection(_xCurrentConnection) - ,m_bErrorShown(sal_False) -{ - DBG_CTOR(OAdabasStatistics,NULL); - - FreeResource(); - - OSL_ENSURE(m_xConnection.is(),"No connection"); - if(m_xConnection.is()) - { - Reference<XStatement> xStmt; - Reference<XResultSet> xRes; - - sal_Bool bCanSelect = sal_False; - ::rtl::OUString aStmt; - ::rtl::OUString sSchema = _rUser.toAsciiUpperCase(); - - Reference<XDatabaseMetaData> xMetaData; - // first read the sizes - try - { - xMetaData = m_xConnection->getMetaData(); - bCanSelect = checkSystemTable(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SERVERDBSTATISTICS")), sSchema); - - if(bCanSelect) - { - aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT SERVERDBSIZE, UNUSEDPAGES FROM ")); - - aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation); - aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".\"SERVERDBSTATISTICS\"")); - - xStmt = m_xConnection->createStatement(); - xRes = xStmt->executeQuery(aStmt); - - - Reference<XRow> xRow(xRes,UNO_QUERY); - // first the db sizes - if(xRes.is() && xRes->next()) - { - double nUsedPages = xRow->getInt(1) / 256; - double nFreePages = xRow->getInt(2) / 256; - - m_ET_SIZE.SetText(::rtl::OUString::valueOf((sal_Int32)nUsedPages)); - m_ET_FREESIZE.SetText(::rtl::OUString::valueOf((sal_Int32)nFreePages)); - m_ET_MEMORYUSING.SetValue(static_cast<sal_Int32>(((nUsedPages-nFreePages)/nUsedPages)*100)); - } - else - showError(); - - xRow = NULL; - } - else - showError(); - } - catch(const SQLException& ) - { - ::dbaui::showError( SQLExceptionInfo( ::cppu::getCaughtException() ), pParent, _xFactory ); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - try - { - ::comphelper::disposeComponent(xStmt); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - - // now fill the datadev spaces - if(bCanSelect) - { - try - { - bCanSelect = checkSystemTable(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATADEVSPACES")), sSchema); - - if(bCanSelect) - { - // then the db files - aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT DEVSPACENAME FROM ")); - aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation); - aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".\"DATADEVSPACES\"")); - xStmt = m_xConnection->createStatement(); - xRes = xStmt->executeQuery(aStmt); - - Reference<XRow> xRow(xRes,UNO_QUERY); - while(xRes.is() && xRes->next()) - { - m_LB_DATADEVS.InsertEntry(xRow->getString(1)); - } - if(!m_LB_DATADEVS.GetEntryCount()) - showError(); - } - else - showError(); - } - catch(const SQLException& e) - { - ::dbaui::showError(SQLExceptionInfo(e),pParent,_xFactory); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - try - { - ::comphelper::disposeComponent(xStmt); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - - // now fill the sysdatadev spaces - if(bCanSelect) - { - try - { - bCanSelect = checkSystemTable(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CONFIGURATION")), sSchema); - - if(bCanSelect) - { - aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * FROM ")); - aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation); - aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".CONFIGURATION WHERE DESCRIPTION LIKE 'SYS%DEVSPACE%NAME'")); - xStmt = m_xConnection->createStatement(); - xRes = xStmt->executeQuery(aStmt); - if(xRes.is() && xRes->next()) - { - Reference<XRow> xRow(xRes,UNO_QUERY); - m_ET_SYSDEVSPACE.SetText(xRow->getString(2)); - } - else - showError(); - - aStmt = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SELECT * FROM ")); - aStmt += ::dbtools::quoteTableName(xMetaData,sSchema,::dbtools::eInDataManipulation); - aStmt += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".CONFIGURATION WHERE DESCRIPTION = 'TRANSACTION LOG NAME'")); - xRes = xStmt->executeQuery(aStmt); - if(xRes.is() && xRes->next()) - { - Reference<XRow> xRow(xRes,UNO_QUERY); - m_ET_TRANSACTIONLOG.SetText(xRow->getString(2)); - } - else - showError(); - } - else - showError(); - } - catch(const SQLException& e) - { - ::dbaui::showError(SQLExceptionInfo(e),pParent,_xFactory); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - try - { - ::comphelper::disposeComponent(xStmt); - } - catch( const Exception& ) - { - DBG_UNHANDLED_EXCEPTION(); - } - } - } - } - - m_ET_SYSDEVSPACE.SetSpecialReadOnly(sal_True); - m_ET_TRANSACTIONLOG.SetSpecialReadOnly(sal_True); - m_LB_DATADEVS.SetSpecialReadOnly(sal_True); - m_ET_SIZE.SetSpecialReadOnly(sal_True); - m_ET_FREESIZE.SetSpecialReadOnly(sal_True); - m_ET_MEMORYUSING.SetSpecialReadOnly(sal_True); -} -//------------------------------------------------------------------------ -OAdabasStatistics::~OAdabasStatistics() -{ - DBG_DTOR(OAdabasStatistics,NULL); -} -// ----------------------------------------------------------------------------- -sal_Bool OAdabasStatistics::checkSystemTable(const ::rtl::OUString& _rsSystemTable, ::rtl::OUString& _rsSchemaName ) -{ - sal_Bool bCanSelect = sal_False; - Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData(); - if ( xMeta.is() ) - { - Reference<XResultSet> xRes = xMeta->getTablePrivileges(Any(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%")), _rsSystemTable); - if(xRes.is()) - { - Reference<XRow> xRow(xRes,UNO_QUERY); - static const ::rtl::OUString sSelect(RTL_CONSTASCII_USTRINGPARAM("SELECT")); - // first the db sizes - while( xRow.is() && xRes->next() ) - { - _rsSchemaName = xRow->getString(2); - if(sSelect == xRow->getString(6) && !xRow->wasNull()) - { - bCanSelect = sal_True; - break; - } - } - ::comphelper::disposeComponent(xRes); - } - } - - return bCanSelect; -} -// ----------------------------------------------------------------------------- -void OAdabasStatistics::showError() -{ - if(!m_bErrorShown) - { - OSQLMessageBox aMsg(GetParent(),GetText(),String(ModuleRes(STR_ADABAS_ERROR_SYSTEMTABLES))); - aMsg.Execute(); - m_bErrorShown = sal_True; - } -} -// ----------------------------------------------------------------------------- -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/AdabasStat.hrc b/dbaccess/source/ui/dlg/AdabasStat.hrc deleted file mode 100644 index 32734ea9075a..000000000000 --- a/dbaccess/source/ui/dlg/AdabasStat.hrc +++ /dev/null @@ -1,52 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef DBAUI_ADABASSTAT_HRC -#define DBAUI_ADABASSTAT_HRC - - -#define FT_SYSDEVSPACE 1 -#define FT_TRANSACTIONLOG 2 -#define FT_DATADEVSPACE 3 -#define FT_SIZE 4 -#define FT_FREESIZE 5 -#define FT_MEMORYUSING 6 - -#define ET_SYSDEVSPACE 1 -#define ET_TRANSACTIONLOG 2 -#define ET_MEMORYUSING 3 -#define ET_SIZE 4 -#define ET_FREESIZE 5 - -#define LB_DATADEVS 1 - -#define PB_OK 1 - -#define FL_FILES 1 -#define FL_SIZES 2 - - -#endif // DBAUI_ADABASSTAT_HRC diff --git a/dbaccess/source/ui/dlg/AdabasStat.hxx b/dbaccess/source/ui/dlg/AdabasStat.hxx deleted file mode 100644 index 7bba19f59724..000000000000 --- a/dbaccess/source/ui/dlg/AdabasStat.hxx +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _DBAUI_ADASTAT_HXX_ -#define _DBAUI_ADASTAT_HXX_ - -#include <vcl/fixed.hxx> -#include <vcl/button.hxx> -#include <vcl/dialog.hxx> -#include "FieldControls.hxx" -#include <svtools/prgsbar.hxx> -#include <com/sun/star/sdbc/XConnection.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> - - -namespace dbaui -{ - //======================================================================== - // shows some statistics - //======================================================================== - class OAdabasStatistics : public ModalDialog - { - protected: - - FixedLine m_FL_FILES; - FixedText m_FT_SYSDEVSPACE; - OPropEditCtrl m_ET_SYSDEVSPACE; - FixedText m_FT_TRANSACTIONLOG; - OPropEditCtrl m_ET_TRANSACTIONLOG; - FixedText m_FT_DATADEVSPACE; - OPropListBoxCtrl m_LB_DATADEVS; - FixedLine m_FL_SIZES; - FixedText m_FT_SIZE; - OPropEditCtrl m_ET_SIZE; - FixedText m_FT_FREESIZE; - OPropEditCtrl m_ET_FREESIZE; - FixedText m_FT_MEMORYUSING; - OPropNumericEditCtrl m_ET_MEMORYUSING; - - OKButton m_PB_OK; - - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > - m_xConnection; /// valid as long as the page is active - sal_Bool m_bErrorShown; // true when we shown already the error - - // check if the given table is accessable by the connected user - sal_Bool checkSystemTable(const ::rtl::OUString& _rsSystemTable, ::rtl::OUString& _rsSchemaName ); - void showError(); - - public: - OAdabasStatistics( Window* pParent, - const ::rtl::OUString& _rUser, - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xCurrentConnection, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xFactory); - ~OAdabasStatistics(); - - }; -} -#endif //_DBAUI_ADASTAT_HXX_ - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/AdabasStat.src b/dbaccess/source/ui/dlg/AdabasStat.src deleted file mode 100644 index 476750f7b531..000000000000 --- a/dbaccess/source/ui/dlg/AdabasStat.src +++ /dev/null @@ -1,208 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef DBAUI_ADABASSTAT_HRC -#include "AdabasStat.hrc" -#endif -#ifndef _DBU_DLG_HRC_ -#include "dbu_dlg.hrc" -#endif - -#define WINDOW_SIZE_X 260 -#define WINDOW_SIZE_Y 190 - -ModalDialog DLG_ADABASSTAT -{ - HelpID = "dbaccess:ModalDialog:DLG_ADABASSTAT"; - OutputSize = TRUE ; - Moveable = TRUE ; - Closeable = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( WINDOW_SIZE_X , WINDOW_SIZE_Y ) ; - - FixedLine FL_FILES - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 12, 8 ) ; - Text [ en-US ] = "Database files"; - }; - - FixedText FT_SYSDEVSPACE - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 102 , 10 ) ; - Text [ en-US ] = "S~YSDEVSPACE:"; - }; - - Edit ET_SYSDEVSPACE - { - HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_SYSDEVSPACE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 14 ) ; - Size = MAP_APPFONT ( 128 , 12 ) ; - TabStop = TRUE ; - ReadOnly = TRUE; - }; - - FixedText FT_TRANSACTIONLOG - { - Pos = MAP_APPFONT ( 12 , 32 ) ; - Size = MAP_APPFONT ( 102 , 10 ) ; - Text [ en-US ] = "~TRANSACTIONLOG:"; - }; - - Edit ET_TRANSACTIONLOG - { - HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_TRANSACTIONLOG"; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 31 ) ; - Size = MAP_APPFONT ( 128 , 12 ) ; - TabStop = TRUE ; - ReadOnly = TRUE; - }; - - FixedText FT_DATADEVSPACE - { - Pos = MAP_APPFONT ( 12 , 49 ) ; - Size = MAP_APPFONT ( 102 , 10 ) ; - Text [ en-US ] = "DATAD~EVSPACE:"; - }; - - ListBox LB_DATADEVS - { - HelpID = "dbaccess:ListBox:DLG_ADABASSTAT:LB_DATADEVS"; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 48 ) ; - Size = MAP_APPFONT ( 128 , 42 ) ; - TabStop = TRUE; - AutoHScroll = TRUE; - VScroll = TRUE; - HScroll = TRUE; - }; - FixedLine FL_SIZES - { - Pos = MAP_APPFONT ( 6 , 99 ) ; - Size = MAP_APPFONT ( WINDOW_SIZE_X - 12 , 8 ) ; - Text [ en-US ] = "Database sizes"; - }; - - FixedText FT_SIZE - { - Pos = MAP_APPFONT ( 12 , 110 ) ; - Size = MAP_APPFONT ( 102 , 10 ) ; - Text [ en-US ] = "S~ize (MB):"; - }; - - Edit ET_SIZE - { - HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_SIZE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 109 ) ; - Size = MAP_APPFONT ( 60 , 12 ) ; - TabStop = TRUE ; - ReadOnly = TRUE; - }; - - FixedText FT_FREESIZE - { - Pos = MAP_APPFONT ( 12 , 127 ) ; - Size = MAP_APPFONT ( 102 , 10 ) ; - Text [ en-US ] = "~Free memory space (MB):"; - }; - - Edit ET_FREESIZE - { - HelpID = "dbaccess:Edit:DLG_ADABASSTAT:ET_FREESIZE"; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 126 ) ; - Size = MAP_APPFONT ( 60 , 12 ) ; - TabStop = TRUE ; - ReadOnly = TRUE; - }; - - FixedText FT_MEMORYUSING - { - Pos = MAP_APPFONT ( 12 , 144 ) ; - Size = MAP_APPFONT ( 102 , 10 ) ; - Text [ en-US ] = "~Memory utilization (in %):"; - }; - - NumericField ET_MEMORYUSING - { - HelpID = "dbaccess:NumericField:DLG_ADABASSTAT:ET_MEMORYUSING"; - Border = TRUE ; - Pos = MAP_APPFONT ( 120 , 144 ) ; - Size = MAP_APPFONT ( 60 , 12 ) ; - TabStop = TRUE ; - ReadOnly = TRUE; - }; - - OKButton PB_OK - { - Pos = MAP_APPFONT ( WINDOW_SIZE_X - 56,WINDOW_SIZE_Y - 20 ) ; - Size = MAP_APPFONT ( 50, 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - - Text [ en-US ] = "Database Statistics"; -}; - -String STR_ADABAS_HELP_SYSDEVSPACE -{ - Text [ en-US ] = "Contains the system tables"; -}; - -String STR_ADABAS_HELP_TRANSACT -{ - Text [ en-US ] = "Contains information about transaction"; -}; - -String STR_ADABAS_HELP_DATADEVSPACES -{ - Text [ en-US ] = "Contains all data files"; -}; - -String STR_ADABAS_HELP_SIZE -{ - Text [ en-US ] = "Total size of the database files"; -}; - -String STR_ADABAS_HELP_FREESIZE -{ - Text [ en-US ] = "Currently available space before a new datadev file is created."; -}; - -String STR_ADABAS_HELP_MEMORYUSING -{ - Text [ en-US ] = "Currently used memory"; -}; - -String STR_ADABAS_ERROR_SYSTEMTABLES -{ - Text [ en-US ] = "No information could be displayed because no access rights exist for the required system tables."; -}; diff --git a/dbaccess/source/ui/dlg/AutoControls.src b/dbaccess/source/ui/dlg/AutoControls.src index e43e2a13a7fb..1b1e31e1a741 100644 --- a/dbaccess/source/ui/dlg/AutoControls.src +++ b/dbaccess/source/ui/dlg/AutoControls.src @@ -59,11 +59,6 @@ String STR_ORACLE_DATABASE_NAME Text[ en-US ] = "Name of the Oracle database"; }; -String STR_ADABAS_DATABASE_NAME -{ - Text[ en-US ] = "Name of the Adabas D database"; -}; - String STR_MSACCESS_MDB_FILE { Text[ en-US ] = "Microsoft Access database file"; diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 24e044cde839..cdc5f97e4349 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -263,86 +263,6 @@ DBG_NAME(OConnectionHelper) askForFileName(aFileDlg); } break; - case ::dbaccess::DST_ADABAS: - { - // collect all names from the config dir - // and all dir's of the DBWORK/wrk or DBROOT/wrk dir - // compare the names - - // collect the names of the installed databases - StringBag aInstalledDBs; - ::rtl::OUString sAdabasConfigDir,sAdabasWorkDir,sRootDir; - ::rtl::OUString sEnvVarName(RTL_CONSTASCII_USTRINGPARAM("DBWORK")); - rtl_uString* pDbVar = NULL; - if(osl_getEnvironment(sEnvVarName.pData,&pDbVar) == osl_Process_E_None && pDbVar) - { - sAdabasWorkDir = pDbVar; - rtl::OUString sURL; - utl::LocalFileHelper::ConvertPhysicalNameToURL(sAdabasWorkDir,sURL); - sAdabasWorkDir = sURL; - rtl_uString_release(pDbVar); - pDbVar = NULL; - } - - sEnvVarName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DBCONFIG")); - if(osl_getEnvironment(sEnvVarName.pData,&pDbVar) == osl_Process_E_None && pDbVar) - { - sAdabasConfigDir = pDbVar; - rtl::OUString sURL; - utl::LocalFileHelper::ConvertPhysicalNameToURL(sAdabasConfigDir,sURL); - sAdabasConfigDir = sURL; - rtl_uString_release(pDbVar); - pDbVar = NULL; - } - - sEnvVarName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DBROOT")); - if(osl_getEnvironment(sEnvVarName.pData,&pDbVar) == osl_Process_E_None && pDbVar) - { - sRootDir = pDbVar; - rtl::OUString sURL; - utl::LocalFileHelper::ConvertPhysicalNameToURL(sRootDir,sURL); - sRootDir = sURL; - rtl_uString_release(pDbVar); - pDbVar = NULL; - } - - sal_Bool bOldFashion = !(sAdabasConfigDir.isEmpty() || sAdabasWorkDir.isEmpty()); - - if(!bOldFashion) // we have a normal adabas installation - { // so we check the local database names in $DBROOT/config - sAdabasConfigDir = sRootDir; - sAdabasWorkDir = sRootDir; - } - - if(!(sAdabasConfigDir.isEmpty() || sAdabasWorkDir.isEmpty() || sRootDir.isEmpty())) - { - - aInstalledDBs = getInstalledAdabasDBs(sAdabasConfigDir,sAdabasWorkDir); - - if(!aInstalledDBs.size() && bOldFashion) - { - sAdabasConfigDir = sRootDir; - sAdabasWorkDir = sRootDir; - aInstalledDBs = getInstalledAdabasDBs(sAdabasConfigDir,sAdabasWorkDir); - } - - ODatasourceSelectDialog aSelector(GetParent(), aInstalledDBs, true,m_pItemSetHelper->getWriteOutputSet()); - if (RET_OK == aSelector.Execute()) - { - setURLNoPrefix(aSelector.GetSelected()); - SetRoadmapStateValue(sal_True); - callModifiedHdl(); - } - } - else - { - LocalResourceAccess aLocRes( PAGE_CONNECTION, RSC_TABPAGE ); - String sError = String(ModuleRes(STR_NO_ADABASE_DATASOURCES)); - ErrorBox aBox(this, WB_OK, sError); - aBox.Execute(); - } - } - break; case ::dbaccess::DST_MYSQL_ODBC: case ::dbaccess::DST_ODBC: { @@ -408,7 +328,7 @@ DBG_NAME(OConnectionHelper) // execute the select dialog - ODatasourceSelectDialog aSelector(GetParent(), aProfiles, eType); + ODatasourceSelectDialog aSelector(GetParent(), aProfiles); ::rtl::OUString sOldProfile=getURLNoPrefix(); if (!sOldProfile.isEmpty()) @@ -605,98 +525,6 @@ DBG_NAME(OConnectionHelper) return RET_OK; } - - //------------------------------------------------------------------------- - StringBag OConnectionHelper::getInstalledAdabasDBDirs(const String& _rPath,const ::ucbhelper::ResultSetInclude& _reResultSetInclude) - { - INetURLObject aNormalizer; - aNormalizer.SetSmartProtocol(INET_PROT_FILE); - aNormalizer.SetSmartURL(_rPath); - String sAdabasConfigDir = aNormalizer.GetMainURL(INetURLObject::NO_DECODE); - - ::ucbhelper::Content aAdabasConfigDir; - try - { - aAdabasConfigDir = ::ucbhelper::Content(sAdabasConfigDir, Reference< ::com::sun::star::ucb::XCommandEnvironment >()); - } - catch(::com::sun::star::ucb::ContentCreationException&) - { - return StringBag(); - } - - StringBag aInstalledDBs; - sal_Bool bIsFolder = sal_False; - try - { - bIsFolder = aAdabasConfigDir.isFolder(); - } - catch(Exception&) // the exception is thrown when the path doesn't exists - { - } - if (bIsFolder && aAdabasConfigDir.get().is()) - { // we have a content for the directory, loop through all entries - Sequence< ::rtl::OUString > aProperties(1); - aProperties[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); - - try - { - Reference< XResultSet > xFiles = aAdabasConfigDir.createCursor(aProperties, _reResultSetInclude); - Reference< XRow > xRow(xFiles, UNO_QUERY); - xFiles->beforeFirst(); - while (xFiles->next()) - { -#ifdef DBG_UTIL - ::rtl::OUString sName = xRow->getString(1); -#endif - aInstalledDBs.insert(xRow->getString(1)); - } - } - catch(Exception&) - { - OSL_FAIL("OConnectionHelper::getInstalledAdabasDBDirs: could not enumerate the adabas config files!"); - } - } - - - return aInstalledDBs; - } - // ----------------------------------------------------------------------------- - StringBag OConnectionHelper::getInstalledAdabasDBs(const String &_rConfigDir,const String &_rWorkDir) - { - String sAdabasConfigDir(_rConfigDir),sAdabasWorkDir(_rWorkDir); - - if (sAdabasConfigDir.Len() && ('/' == sAdabasConfigDir.GetBuffer()[sAdabasConfigDir.Len() - 1])) - sAdabasConfigDir.AppendAscii("config"); - else - sAdabasConfigDir.AppendAscii("/config"); - - if (sAdabasWorkDir.Len() && ('/' == sAdabasWorkDir.GetBuffer()[sAdabasWorkDir.Len() - 1])) - sAdabasWorkDir.AppendAscii("wrk"); - else - sAdabasWorkDir.AppendAscii("/wrk"); - // collect the names of the installed databases - StringBag aInstalledDBs; - // collect the names of the installed databases - StringBag aConfigDBs,aWrkDBs; - aConfigDBs = getInstalledAdabasDBDirs(sAdabasConfigDir,::ucbhelper::INCLUDE_DOCUMENTS_ONLY); - aWrkDBs = getInstalledAdabasDBDirs(sAdabasWorkDir,::ucbhelper::INCLUDE_FOLDERS_ONLY); - ConstStringBagIterator aOuter = aConfigDBs.begin(); - ConstStringBagIterator aOuterEnd = aConfigDBs.end(); - for(;aOuter != aOuterEnd;++aOuter) - { - ConstStringBagIterator aInner = aWrkDBs.begin(); - ConstStringBagIterator aInnerEnd = aWrkDBs.end(); - for (;aInner != aInnerEnd; ++aInner) - { - if (aInner->equalsIgnoreAsciiCase(*aOuter)) - { - aInstalledDBs.insert(*aInner); - break; - } - } - } - return aInstalledDBs; - } // ----------------------------------------------------------------------------- IS_PATH_EXIST OConnectionHelper::pathExists(const ::rtl::OUString& _rURL, sal_Bool bIsFile) const { diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx index cd1e491dfb6b..5598bd6bb85a 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx @@ -118,8 +118,6 @@ namespace dbaui private: DECL_LINK(OnBrowseConnections, PushButton*); - StringBag getInstalledAdabasDBDirs(const String &_rPath,const ::ucbhelper::ResultSetInclude& _reResultSetInclude); - StringBag getInstalledAdabasDBs(const String &_rConfigDir,const String &_rWorkDir); String impl_getURL( sal_Bool _bPrefix ) const; void impl_setURL( const String& _rURL, sal_Bool _bPrefix ); void implUpdateURLDependentStates() const; diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 84fd1161b80a..2e323ff821e2 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -161,10 +161,6 @@ namespace dbaui m_aFT_Connection.SetText(String(ModuleRes(STR_CALC_PATH_OR_FILE))); m_aConnectionURL.SetHelpId(HID_DSADMIN_CALC_PATH); break; - case ::dbaccess::DST_ADABAS: - m_aFT_Connection.SetText(String(ModuleRes(STR_ADABAS_DATABASE_NAME))); - m_aConnectionURL.SetHelpId(HID_DSADMIN_ADABAS_DATABASE); - break; case ::dbaccess::DST_ADO: m_aFT_Connection.SetText(String(ModuleRes(STR_COMMONURL))); break; diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hrc b/dbaccess/source/ui/dlg/ConnectionPage.hrc index 347b0f0bac28..be8b20f9ca49 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hrc +++ b/dbaccess/source/ui/dlg/ConnectionPage.hrc @@ -39,7 +39,7 @@ #define FT_MSACCESS_MDB_FILE 6 #define FT_FLAT_PATH_OR_FILE 7 #define FT_CALC_PATH_OR_FILE 8 -#define FT_ADABAS_DATABASE_NAME 9 + // FREE #define FT_NO_ADDITIONAL_SETTINGS 10 #define FT_HOSTNAME 11 #define FT_ORACLE_DATABASE_NAME 12 diff --git a/dbaccess/source/ui/dlg/ConnectionPage.src b/dbaccess/source/ui/dlg/ConnectionPage.src index 63c400b0a77a..9d864a5754ad 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.src +++ b/dbaccess/source/ui/dlg/ConnectionPage.src @@ -149,11 +149,6 @@ TabPage PAGE_CONNECTION }; -String STR_NO_ADABASE_DATASOURCES -{ - Text [ en-US ] = "No Adabas D data sources were found on your system."; -}; - String STR_CONNECTION_TEST { Text [ en-US ] = "Connection Test"; diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index e392b87a2048..2a1dcd57db53 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -96,13 +96,6 @@ namespace dbaui return oDBWizardPage; } - OGenericAdministrationPage* OConnectionTabPageSetup::CreateAdabasTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) - { - OConnectionTabPageSetup* oDBWizardPage = new OConnectionTabPageSetup( pParent, PAGE_DBWIZARD_ADABAS, _rAttrSet, STR_ADABAS_HELPTEXT, STR_ADABAS_HEADERTEXT, STR_ADABAS_DATABASE_NAME); - oDBWizardPage->FreeResource(); - return oDBWizardPage; - } - OGenericAdministrationPage* OConnectionTabPageSetup::CreateADOTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { OConnectionTabPageSetup* oDBWizardPage = new OConnectionTabPageSetup( pParent, PAGE_DBWIZARD_ADO, _rAttrSet, STR_ADO_HELPTEXT, STR_ADO_HEADERTEXT, STR_COMMONURL); diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index 0fd31cf58101..4825eeef9d32 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -63,7 +63,6 @@ namespace dbaui public: static OGenericAdministrationPage* CreateDbaseTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); static OGenericAdministrationPage* CreateMSAccessTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); - static OGenericAdministrationPage* CreateAdabasTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); static OGenericAdministrationPage* CreateADOTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); static OGenericAdministrationPage* CreateODBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); static OGenericAdministrationPage* CreateUserDefinedTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index a7cbcf4722ad..ffce144460d4 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -209,13 +209,6 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_RESPECTRESULTSETTYPE, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RespectDriverResultSetType" ) ) ) ); m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_MAX_ROW_SCAN, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MaxRowScan" ) ) ) ); - // special settings for adabas - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_SHUTSERVICE, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ShutdownDatabase")))); - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_DATAINC, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataCacheSizeIncrement")))); - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CACHESIZE, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DataCacheSize")))); - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLUSER, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlUser")))); - m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_CONN_CTRLPWD, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ControlPassword")))); - // extra settings for odbc m_aIndirectPropTranslator.insert(MapInt2String::value_type(DSID_USECATALOG, INFO_USECATALOG)); // extra settings for a ldap address book @@ -520,17 +513,6 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const case ::dbaccess::DST_FLAT: case ::dbaccess::DST_CALC: break; - case ::dbaccess::DST_ADABAS: - { - SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pHostName, SfxStringItem, DSID_CONN_HOSTNAME, sal_True); - sNewUrl = lcl_createHostWithPort(pHostName,NULL); - String sUrl = pCollection->cutPrefix(pUrlItem->GetValue()); - if ( comphelper::string::getTokenCount(sUrl, ':') == 1 ) - sNewUrl += String::CreateFromAscii(":"); - - sNewUrl += sUrl; - } - break; case ::dbaccess::DST_MSACCESS: case ::dbaccess::DST_MSACCESS_2007: { diff --git a/dbaccess/source/ui/dlg/DriverSettings.hxx b/dbaccess/source/ui/dlg/DriverSettings.hxx index 13b4b50e5943..e81508790cde 100644 --- a/dbaccess/source/ui/dlg/DriverSettings.hxx +++ b/dbaccess/source/ui/dlg/DriverSettings.hxx @@ -87,10 +87,6 @@ namespace dbaui */ static SfxTabPage* CreateOracleJDBC( Window* pParent, const SfxItemSet& _rAttrSet ); - /** Creates the detail page for Adabas - */ - static SfxTabPage* CreateAdabas( Window* _pParent, const SfxItemSet& _rAttrSet ); - /** Creates the detail page for LDAP */ static SfxTabPage* CreateLDAP( Window* _pParent, const SfxItemSet& _rAttrSet ); diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index d8ce26f8d3ef..5a074c9fc2e2 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -46,7 +46,6 @@ #include <vcl/mnemonic.hxx> #include <svl/cjkoptions.hxx> #include <jvmaccess/virtualmachine.hxx> -#include "AdabasStat.hxx" #include <connectivity/CommonTools.hxx> #include "DriverSettings.hxx" #include "dbadmin.hxx" diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 90d347099f34..c1c4cd2b8491 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -165,7 +165,7 @@ namespace dbaui { aEnumeration.getDatasourceNames(aOdbcDatasources); // execute the select dialog - ODatasourceSelectDialog aSelector(GetParent(), aOdbcDatasources, false); + ODatasourceSelectDialog aSelector(GetParent(), aOdbcDatasources); if (!_sCurr.isEmpty()) aSelector.Select(_sCurr); if ( RET_OK == aSelector.Execute() ) diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index a323f75f109f..bef0ddcd54d9 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -173,14 +173,6 @@ void ODbAdminDialog::impl_selectDataSource(const ::com::sun::star::uno::Any& _aD addDetailPage(PAGE_ORACLE_JDBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateOracleJDBC); break; - case ::dbaccess::DST_ADABAS: - // for adabas we have more than one page - // CAUTION: the order of inserting pages matters. - // the major detail page should be inserted last always (thus, it becomes the first page after - // the general page) - addDetailPage(PAGE_ADABAS, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateAdabas); - break; - case ::dbaccess::DST_LDAP: addDetailPage(PAGE_LDAP,STR_PAGETITLE_ADVANCED,ODriversSettings::CreateLDAP); break; diff --git a/dbaccess/source/ui/dlg/dbadmin.src b/dbaccess/source/ui/dlg/dbadmin.src index 8bacdec5e006..be0b7ec72905 100644 --- a/dbaccess/source/ui/dlg/dbadmin.src +++ b/dbaccess/source/ui/dlg/dbadmin.src @@ -40,9 +40,6 @@ #ifndef DBACCESS_UI_BROWSER_ID_HXX #include "browserids.hxx" #endif -#ifndef DBAUI_ADABASPAGE_HRC -#include "AdabasPage.hrc" -#endif #include "admincontrols.hrc" //------------------------------------------------------------------------- @@ -396,127 +393,6 @@ TabPage PAGE_ODBC AUTO_USECATALOG( 3*UNRELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT + 2*RELATED_CONTROLS ) }; -TabPage PAGE_ADABAS -{ - SVLook = TRUE ; - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( PAGE_X , PAGE_Y ) ; - Hide = TRUE; - HelpId = HID_DSADMIN_PAGE_ADABAS; - - FixedLine FL_SEPARATOR1 - { - Pos = MAP_APPFONT ( 4 , UNRELATED_CONTROLS ) ; - Size = MAP_APPFONT ( PAGE_X - 8 , FIXEDTEXT_HEIGHT ) ; - Text[ en-US ] = "Connection Settings"; - }; - - FixedText FT_HOSTNAME - { - Pos = MAP_APPFONT ( 6 , UNRELATED_CONTROLS + RELATED_CONTROLS + FIXEDTEXT_HEIGHT) ; - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; - Text[ en-US ] = "~Host name"; - }; - Edit ET_HOSTNAME - { - HelpID = "dbaccess:Edit:PAGE_ADABAS:ET_HOSTNAME"; - TabStop = TRUE ; - Border = TRUE ; - - Pos = MAP_APPFONT ( EDIT_X , UNRELATED_CONTROLS + RELATED_CONTROLS + FIXEDTEXT_HEIGHT-1 ) ; - Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; - }; - - FixedText FT_CACHE_SIZE - { - Pos = MAP_APPFONT ( 6 , 2*UNRELATED_CONTROLS + RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT ) ; - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; - Text[ en-US ] = "Data ~buffer size (MB)"; - }; - NumericField NF_CACHE_SIZE - { - HelpID = "dbaccess:NumericField:PAGE_ADABAS:NF_CACHE_SIZE"; - Pos = MAP_APPFONT ( EDIT_X , 2*UNRELATED_CONTROLS + RELATED_CONTROLS + 2*FIXEDTEXT_HEIGHT -1 ) ; - Size = MAP_APPFONT ( 40 , EDIT_HEIGHT ) ; - Border = TRUE ; - TabStop = TRUE ; - Spin = TRUE ; - SpinSize = 1; - StrictFormat = TRUE; - }; - - FixedText FT_DATA_INCREMENT - { - Pos = MAP_APPFONT ( 6 , 3*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT ) ; - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; - Text[ en-US ] = "~Data increment (MB)"; - }; - NumericField NF_DATA_INCREMENT - { - HelpID = "dbaccess:NumericField:PAGE_ADABAS:NF_DATA_INCREMENT"; - Pos = MAP_APPFONT ( EDIT_X , 3*UNRELATED_CONTROLS + RELATED_CONTROLS + 3*FIXEDTEXT_HEIGHT -1 ) ; - Size = MAP_APPFONT ( 40 , EDIT_HEIGHT ) ; - Border = TRUE ; - TabStop = TRUE ; - Spin = TRUE ; - SpinSize = 1; - StrictFormat = TRUE; - }; - FixedLine FL_SEPARATOR2 - { - Pos = MAP_APPFONT ( 6 , 4*UNRELATED_CONTROLS + RELATED_CONTROLS + 4*FIXEDTEXT_HEIGHT ) ; - Size = MAP_APPFONT ( 248 , FIXEDTEXT_HEIGHT ) ; - Text [ en-US ] = "Administration" ; - }; - FixedText FT_CTRLUSERNAME - { - Pos = MAP_APPFONT ( 6 , 4*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT ) ; - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; - Text [ en-US ] = "Control ~user name" ; - }; - Edit ET_CTRLUSERNAME - { - HelpID = "dbaccess:Edit:PAGE_ADABAS:ET_CTRLUSERNAME"; - Border = TRUE ; - Pos = MAP_APPFONT ( EDIT_X , 4*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 5*FIXEDTEXT_HEIGHT-1 ) ; - Size = MAP_APPFONT ( 105 , EDIT_HEIGHT ) ; - TabStop = TRUE ; - }; - FixedText FT_CTRLPASSWORD - { - Pos = MAP_APPFONT ( 6 , 5*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 6*FIXEDTEXT_HEIGHT ) ; - Size = MAP_APPFONT ( EDIT_X - 7 , FIXEDTEXT_HEIGHT ) ; - Text [ en-US ] = "Control ~password" ; - }; - Edit ET_CTRLPASSWORD - { - HelpID = "dbaccess:Edit:PAGE_ADABAS:ET_CTRLPASSWORD"; - Border = TRUE ; - Pos = MAP_APPFONT ( EDIT_X , 5*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 6*FIXEDTEXT_HEIGHT-1 ) ; - Size = MAP_APPFONT ( 105 , EDIT_HEIGHT) ; - TabStop = TRUE ; - PassWord = TRUE ; - }; - - CheckBox CB_SHUTDB - { - HelpID = "dbaccess:CheckBox:PAGE_ADABAS:CB_SHUTDB"; - Pos = MAP_APPFONT ( 6 , 6*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 7*FIXEDTEXT_HEIGHT ) ; - Size = MAP_APPFONT ( 248 , CHECKBOX_HEIGHT ) ; - Text[ en-US ] = "~Shut down service when closing %PRODUCTNAME"; - }; - - PushButton PB_STAT - { - HelpID = "dbaccess:PushButton:PAGE_ADABAS:PB_STAT"; - Pos = MAP_APPFONT ( PAGE_X - BUTTON_WIDTH - UNRELATED_CONTROLS, PAGE_Y - BUTTON_HEIGHT - UNRELATED_CONTROLS ) ; - Size = MAP_APPFONT ( BUTTON_WIDTH , BUTTON_HEIGHT ) ; - Text[ en-US ] = "E~xtended..."; - }; - - AUTO_CHARSET( 7*UNRELATED_CONTROLS + 2*RELATED_CONTROLS + 7*FIXEDTEXT_HEIGHT + CHECKBOX_HEIGHT, PAGE_X ) -}; - //......................................................................... #define MYSQL_YDIST 53 #define MYSQL_FL_Y 8 diff --git a/dbaccess/source/ui/dlg/dbadminsetup.hrc b/dbaccess/source/ui/dlg/dbadminsetup.hrc index 7d6757951089..4aaa4c32d31c 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.hrc +++ b/dbaccess/source/ui/dlg/dbadminsetup.hrc @@ -51,7 +51,7 @@ #define STR_SPREADSHEET_HELPTEXT 36 // FREE #define STR_FINAL_HELPTEXT 38 -#define STR_ADABAS_HELPTEXT 39 + // FREE #define STR_ORACLE_HELPTEXT 40 #define STR_DBASE_HEADERTEXT 41 #define STR_MSACCESS_HEADERTEXT 42 @@ -64,14 +64,14 @@ // FREE #define STR_SPREADSHEET_HEADERTEXT 50 #define STR_FINAL_HEADERTEXT 52 -#define STR_ADABAS_HEADERTEXT 53 + // FREE #define STR_ORACLE_HEADERTEXT 54 #define STR_GENERAL_HEADERTEXT 55 #define STR_DBWIZARDTITLE 56 #define STR_DEFAULTLDAPPORTNUMBER 60 -#define STR_ADABASNAME 61 + // FREE #define STR_ODBCDATASOURCENAME 63 #define STR_SPREADSHEETPATH 64 #define STR_DBLOCATIONLABEL 65 @@ -83,7 +83,7 @@ #define STR_PAGETITLE_TEXT 71 #define STR_PAGETITLE_MSACCESS 72 #define STR_PAGETITLE_LDAP 73 -#define STR_PAGETITLE_ADABAS 74 + // FREE #define STR_PAGETITLE_ADO 75 #define STR_PAGETITLE_JDBC 76 #define STR_PAGETITLE_ORACLE 77 diff --git a/dbaccess/source/ui/dlg/dbadminsetup.src b/dbaccess/source/ui/dlg/dbadminsetup.src index a5b8d73062a7..9ef973589f19 100644 --- a/dbaccess/source/ui/dlg/dbadminsetup.src +++ b/dbaccess/source/ui/dlg/dbadminsetup.src @@ -90,11 +90,6 @@ ModalDialog DLG_DATABASE_WIZARD Text[ en-US ] = "Set up LDAP connection" ; }; - String STR_PAGETITLE_ADABAS - { - Text[ en-US ] = "Set up Adabas D connection" ; - }; - String STR_PAGETITLE_ADO { Text[ en-US ] = "Set up ADO connection" ; @@ -497,26 +492,6 @@ TabPage PAGE_DBWIZARD_LDAP }; }; -TabPage PAGE_DBWIZARD_ADABAS -{ - HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADABAS"; - SVLook = TRUE ; - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( WIZARD_PAGE_X , WIZARD_PAGE_Y ) ; - Hide = TRUE ; - - String STR_ADABAS_HEADERTEXT - { - Text[ en-US ] = "Set up a connection to an Adabas D database" ; - }; - - String STR_ADABAS_HELPTEXT{ - Text[ en-US ] = "Enter the name of the Adabas D database you want to connect to.\nClick 'Browse...' to select an Adabas D database that is already registered in %PRODUCTNAME." ; - }; - - AUTO_HELP_BROWSECONTROLGROUP(4, HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME, HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME) -}; - TabPage PAGE_DBWIZARD_ADO { HelpID = "dbaccess:TabPage:PAGE_DBWIZARD_ADO"; diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 85cbc2c2018b..950e3a567d42 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -65,7 +65,7 @@ using namespace com::sun::star::container; #define ADDITIONAL_PAGE_DBASE 2 #define ADDITIONAL_PAGE_FLAT 3 #define ADDITIONAL_PAGE_LDAP 4 -#define ADDITIONAL_PAGE_ADABAS 5 +//5 was ADDITIONAL_PAGE_ADABAS #define ADDITIONAL_PAGE_MYSQL_JDBC 6 #define ADDITIONAL_PAGE_MYSQL_ODBC 7 #define ADDITIONAL_PAGE_ORACLE_JDBC 8 @@ -189,9 +189,6 @@ WizardTypes::WizardState ODbTypeWizDialog::determineNextState( WizardState _nCur case ::dbaccess::DST_LDAP: nNextState = ADDITIONAL_PAGE_LDAP; break; - case ::dbaccess::DST_ADABAS: - nNextState = ADDITIONAL_PAGE_ADABAS; - break; case ::dbaccess::DST_MYSQL_JDBC: nNextState = ADDITIONAL_PAGE_MYSQL_JDBC; break; @@ -283,9 +280,6 @@ TabPage* ODbTypeWizDialog::createPage(WizardState _nState) 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; diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 31ef7beac712..b318d3586e2f 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -147,7 +147,6 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent , m_sRM_TextText(ModuleRes(STR_PAGETITLE_TEXT)) , m_sRM_MSAccessText(ModuleRes(STR_PAGETITLE_MSACCESS)) , m_sRM_LDAPText(ModuleRes(STR_PAGETITLE_LDAP)) - , m_sRM_ADABASText(ModuleRes(STR_PAGETITLE_ADABAS)) , m_sRM_ADOText(ModuleRes(STR_PAGETITLE_ADO)) , m_sRM_JDBCText(ModuleRes(STR_PAGETITLE_JDBC)) , m_sRM_MySQLNativePageTitle(ModuleRes(STR_PAGETITLE_MYSQL_NATIVE)) @@ -257,9 +256,6 @@ String ODbTypeWizDialogSetup::getStateDisplayName( WizardState _nState ) const case PAGE_DBSETUPWIZARD_LDAP: sRoadmapItem = m_sRM_LDAPText; break; - case PAGE_DBSETUPWIZARD_ADABAS: - sRoadmapItem = m_sRM_ADABASText; - break; case PAGE_DBSETUPWIZARD_JDBC: sRoadmapItem = m_sRM_JDBCText; break; @@ -570,11 +566,7 @@ TabPage* ODbTypeWizDialogSetup::createPage(WizardState _nState) pPage = OGeneralSpecialJDBCConnectionPageSetup::CreateOracleJDBCTabPage( this, *m_pOutSet); break; - case PAGE_DBSETUPWIZARD_ADABAS: - pPage = OConnectionTabPageSetup::CreateAdabasTabPage( this, *m_pOutSet); - break; - - case PAGE_DBSETUPWIZARD_LDAP : + case PAGE_DBSETUPWIZARD_LDAP: pPage = OLDAPConnectionPageSetup::CreateLDAPTabPage(this,*m_pOutSet); break; diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 684156a256eb..140344030785 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -49,8 +49,6 @@ #include <vcl/mnemonic.hxx> #include <svl/cjkoptions.hxx> #include <jvmaccess/virtualmachine.hxx> -#include "AdabasPage.hrc" -#include "AdabasStat.hxx" #include <connectivity/CommonTools.hxx> #include "DriverSettings.hxx" #include "dbadmin.hxx" @@ -765,176 +763,6 @@ namespace dbaui return ( new OGeneralSpecialJDBCDetailsPage( pParent,PAGE_ORACLE_JDBC, _rAttrSet,DSID_ORACLE_PORTNUMBER) ); } - - //======================================================================== - //= OAdabasDetailsPage - //======================================================================== - OAdabasDetailsPage::OAdabasDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) - :OCommonBehaviourTabPage(pParent, PAGE_ADABAS, _rCoreAttrs, CBTP_USE_CHARSET ,false) - ,m_aFTHostname (this, ModuleRes(FT_HOSTNAME)) - ,m_aEDHostname (this, ModuleRes(ET_HOSTNAME)) - ,m_aFL_1 (this, ModuleRes( FL_SEPARATOR1) ) - ,m_FT_CACHE_SIZE( this, ModuleRes( FT_CACHE_SIZE ) ) - ,m_NF_CACHE_SIZE( this, ModuleRes( NF_CACHE_SIZE ) ) - ,m_FT_DATA_INCREMENT( this, ModuleRes( FT_DATA_INCREMENT ) ) - ,m_NF_DATA_INCREMENT( this, ModuleRes( NF_DATA_INCREMENT ) ) - ,m_aFL_2( this, ModuleRes( FL_SEPARATOR2 ) ) - ,m_FT_CTRLUSERNAME( this, ModuleRes( FT_CTRLUSERNAME ) ) - ,m_ET_CTRLUSERNAME( this, ModuleRes( ET_CTRLUSERNAME ) ) - ,m_FT_CTRLPASSWORD( this, ModuleRes( FT_CTRLPASSWORD ) ) - ,m_ET_CTRLPASSWORD( this, ModuleRes( ET_CTRLPASSWORD ) ) - ,m_CB_SHUTDB( this, ModuleRes( CB_SHUTDB ) ) - ,m_PB_STAT( this, ModuleRes( PB_STAT ) ) - { - m_aEDHostname.SetModifyHdl(getControlModifiedLink()); - - FreeResource(); - - m_PB_STAT.SetClickHdl( LINK(this,OAdabasDetailsPage,PBClickHdl)); - - m_CB_SHUTDB.SetClickHdl( LINK(this,OAdabasDetailsPage,AttributesChangedHdl)); - m_NF_CACHE_SIZE.SetModifyHdl( LINK(this,OAdabasDetailsPage,AttributesChangedHdl)); - m_NF_DATA_INCREMENT.SetModifyHdl( LINK(this,OAdabasDetailsPage,AttributesChangedHdl)); - m_ET_CTRLUSERNAME.SetModifyHdl( LINK(this,OAdabasDetailsPage,AttributesChangedHdl)); - m_ET_CTRLPASSWORD.SetModifyHdl( LINK(this,OAdabasDetailsPage,AttributesChangedHdl)); - - m_ET_CTRLUSERNAME.SetLoseFocusHdl( LINK(this,OAdabasDetailsPage,LoseFocusHdl)); - m_ET_CTRLPASSWORD.SetLoseFocusHdl( LINK(this,OAdabasDetailsPage,LoseFocusHdl)); - - m_NF_DATA_INCREMENT.SetMin(20); - m_NF_DATA_INCREMENT.SetMax(LONG_MAX); - m_NF_DATA_INCREMENT.SetValue(20); - m_NF_DATA_INCREMENT.SetDecimalDigits(0); - - m_NF_CACHE_SIZE.SetMin(4); - m_NF_CACHE_SIZE.SetMax(LONG_MAX); - m_NF_CACHE_SIZE.SetValue(4); - m_NF_CACHE_SIZE.SetDecimalDigits(0); - - Window* pWindows[] = { &m_aFTHostname,&m_aEDHostname - ,&m_FT_CACHE_SIZE,&m_NF_CACHE_SIZE - ,&m_FT_DATA_INCREMENT,&m_NF_DATA_INCREMENT - ,&m_FT_CTRLUSERNAME,&m_ET_CTRLUSERNAME - ,&m_FT_CTRLPASSWORD,&m_ET_CTRLPASSWORD - ,&m_CB_SHUTDB - ,m_pCharsetLabel, m_pCharset,&m_PB_STAT}; - - sal_Int32 nCount = SAL_N_ELEMENTS(pWindows); - for (sal_Int32 i=1; i < nCount; ++i) - pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); - } - - // ----------------------------------------------------------------------- - SfxTabPage* ODriversSettings::CreateAdabas( Window* pParent, const SfxItemSet& _rAttrSet ) - { - return ( new OAdabasDetailsPage( pParent, _rAttrSet ) ); - } - - // ----------------------------------------------------------------------- - void OAdabasDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) - { - OCommonBehaviourTabPage::fillControls(_rControlList); - _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aEDHostname)); - _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_NF_CACHE_SIZE)); - _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_NF_DATA_INCREMENT)); - _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_ET_CTRLUSERNAME)); - _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_ET_CTRLPASSWORD)); - _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_CB_SHUTDB)); - } - // ----------------------------------------------------------------------- - void OAdabasDetailsPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) - { - OCommonBehaviourTabPage::fillWindows(_rControlList); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHostname)); - _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL_1)); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_FT_CACHE_SIZE)); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_FT_DATA_INCREMENT)); - _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL_2)); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_FT_CTRLUSERNAME)); - _rControlList.push_back(new ODisableWrapper<FixedText>(&m_FT_CTRLPASSWORD)); - _rControlList.push_back(new ODisableWrapper<PushButton>(&m_PB_STAT)); - } - // ----------------------------------------------------------------------- - void OAdabasDetailsPage::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) - sal_Bool bValid, bReadonly; - getFlags(_rSet, bValid, bReadonly); - - SFX_ITEMSET_GET(_rSet, pHostName, SfxStringItem, DSID_CONN_HOSTNAME, sal_True); - SFX_ITEMSET_GET(_rSet, pCtrlUserItem, SfxStringItem, DSID_CONN_CTRLUSER, sal_True); - SFX_ITEMSET_GET(_rSet, pCtrlPwdItem, SfxStringItem, DSID_CONN_CTRLPWD, sal_True); - SFX_ITEMSET_GET(_rSet, pShutItem, SfxBoolItem, DSID_CONN_SHUTSERVICE, sal_True); - SFX_ITEMSET_GET(_rSet, pIncItem, SfxInt32Item, DSID_CONN_DATAINC, sal_True); - SFX_ITEMSET_GET(_rSet, pCacheItem, SfxInt32Item, DSID_CONN_CACHESIZE, sal_True); - if ( bValid ) - { - m_aEDHostname.SetText(pHostName->GetValue()); - m_aEDHostname.ClearModifyFlag(); - m_CB_SHUTDB.Check( pShutItem->GetValue() ); - m_NF_DATA_INCREMENT.SetValue( pIncItem->GetValue() ); - m_NF_CACHE_SIZE.SetValue( pCacheItem->GetValue() ); - m_ET_CTRLUSERNAME.SetText(pCtrlUserItem->GetValue()); - m_ET_CTRLPASSWORD.SetText(pCtrlPwdItem->GetValue()); - m_CB_SHUTDB.Enable(m_ET_CTRLUSERNAME.GetText().Len() && m_ET_CTRLPASSWORD.GetText().Len()); - } - - OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); - } - // ----------------------------------------------------------------------- - sal_Bool OAdabasDetailsPage::FillItemSet( SfxItemSet& _rSet ) - { - sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); - - fillString(_rSet,&m_aEDHostname,DSID_CONN_HOSTNAME,bChangedSomething); - fillBool(_rSet,&m_CB_SHUTDB,DSID_CONN_SHUTSERVICE,bChangedSomething); - fillInt32(_rSet,&m_NF_DATA_INCREMENT,DSID_CONN_DATAINC,bChangedSomething ); - fillInt32(_rSet,&m_NF_CACHE_SIZE,DSID_CONN_CACHESIZE,bChangedSomething ); - fillString(_rSet,&m_ET_CTRLUSERNAME,DSID_CONN_CTRLUSER,bChangedSomething ); - fillString(_rSet,&m_ET_CTRLPASSWORD,DSID_CONN_CTRLPWD,bChangedSomething ); - - return bChangedSomething; - } - //------------------------------------------------------------------------ - IMPL_LINK( OAdabasDetailsPage, AttributesChangedHdl, void *, EMPTYARG ) - { - m_CB_SHUTDB.Enable(m_ET_CTRLUSERNAME.GetText().Len() && m_ET_CTRLPASSWORD.GetText().Len()); - bAttrsChanged = sal_True; - callModifiedHdl(); - return 0; - } - //------------------------------------------------------------------------ - IMPL_LINK( OAdabasDetailsPage, LoseFocusHdl, Edit *, /*pEdit*/ ) - { - m_CB_SHUTDB.Enable(m_ET_CTRLUSERNAME.GetText().Len() && m_ET_CTRLPASSWORD.GetText().Len()); - return 0; - } - //------------------------------------------------------------------------ - IMPL_LINK( OAdabasDetailsPage, PBClickHdl, Button *, /*pButton*/ ) - { - OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); - if ( m_pAdminDialog ) - { - m_pAdminDialog->saveDatasource(); - try - { - Reference< XConnection > xConnection = m_pAdminDialog->createConnection().first; - if ( xConnection.is() ) - { - OAdabasStatistics aDlg(this,m_sUser,xConnection,m_pAdminDialog->getORB()); - aDlg.Execute(); - ::comphelper::disposeComponent(xConnection); - } - } - catch(Exception&) - { - } - } - - return 0; - } - - //======================================================================== //= OLDAPDetailsPage //======================================================================== diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index 6d48d2fd2711..bb0a6f388d93 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -257,47 +257,6 @@ namespace dbaui }; //======================================================================== - //= OAdabasDetailsPage - //======================================================================== - class OAdabasDetailsPage : public OCommonBehaviourTabPage - { - public: - virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs); - - OAdabasDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); - protected: - virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); - virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); - virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); - - private: - FixedText m_aFTHostname; - Edit m_aEDHostname; - FixedLine m_aFL_1; - FixedText m_FT_CACHE_SIZE; - NumericField m_NF_CACHE_SIZE; - - FixedText m_FT_DATA_INCREMENT; - NumericField m_NF_DATA_INCREMENT; - - FixedLine m_aFL_2; - FixedText m_FT_CTRLUSERNAME; - Edit m_ET_CTRLUSERNAME; - FixedText m_FT_CTRLPASSWORD; - Edit m_ET_CTRLPASSWORD; - - CheckBox m_CB_SHUTDB; - PushButton m_PB_STAT; - String m_sUser; - sal_Bool bAttrsChanged; - - DECL_LINK( AttributesChangedHdl, void * ); - DECL_LINK( UserSettingsHdl, void * ); - DECL_LINK( LoseFocusHdl, Edit * ); - DECL_LINK( PBClickHdl, Button *); - }; - - //======================================================================== //= OOdbcDetailsPage //======================================================================== class OLDAPDetailsPage : public OCommonBehaviourTabPage diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx index a314601a5e63..3e450c1f0f17 100644 --- a/dbaccess/source/ui/dlg/dsselect.cxx +++ b/dbaccess/source/ui/dlg/dsselect.cxx @@ -62,7 +62,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::ui::dialogs; using namespace ::comphelper; //================================================================== -ODatasourceSelectDialog::ODatasourceSelectDialog(Window* _pParent, const StringBag& _rDatasources, bool _bAdabas,SfxItemSet* _pOutputSet) +ODatasourceSelectDialog::ODatasourceSelectDialog(Window* _pParent, const StringBag& _rDatasources, SfxItemSet* _pOutputSet) :ModalDialog(_pParent, ModuleRes(DLG_DATASOURCE_SELECTION)) ,m_aDescription (this, ModuleRes(FT_DESCRIPTION)) ,m_aDatasource (this, ModuleRes(LB_DATASOURCE)) @@ -72,53 +72,14 @@ ODatasourceSelectDialog::ODatasourceSelectDialog(Window* _pParent, const StringB #ifdef HAVE_ODBC_ADMINISTRATION ,m_aManageDatasources (this, ModuleRes(PB_MANAGE)) #endif - ,m_aCreateAdabasDB (this, ModuleRes(PB_CREATE)) ,m_pOutputSet(_pOutputSet) { - if ( _bAdabas ) - { // set a new title (indicating that we're browsing local data sources only) - SetText(ModuleRes(STR_LOCAL_DATASOURCES)); - m_aDescription.SetText(ModuleRes(STR_DESCRIPTION2)); - - m_aCreateAdabasDB.Show(); - m_aCreateAdabasDB.SetClickHdl(LINK(this,ODatasourceSelectDialog,CreateDBClickHdl)); - - // resize the dialog a little bit, 'cause Adabas data source names are usually somewhat shorter - // than ODBC ones are - - // shrink the listbox - Size aOldSize = m_aDatasource.GetSizePixel(); - Size aNewSize(3 * aOldSize.Width() / 4, aOldSize.Height()); - m_aDatasource.SetSizePixel(aNewSize); - - sal_Int32 nLostPixels = aOldSize.Width() - aNewSize.Width(); - - // shrink the fixed text - aOldSize = m_aDescription.GetSizePixel(); - m_aDescription.SetSizePixel(Size(aOldSize.Width() - nLostPixels, aOldSize.Height())); - - // move the buttons - PushButton* pButtons[] = { &m_aOk, &m_aCancel, &m_aHelp ,&m_aCreateAdabasDB}; - for (size_t i=0; i < SAL_N_ELEMENTS(pButtons); ++i) - { - Point aOldPos = pButtons[i]->GetPosPixel(); - pButtons[i]->SetPosPixel(Point(aOldPos.X() - nLostPixels, aOldPos.Y())); - } - - // resize the dialog itself - aOldSize = GetSizePixel(); - SetSizePixel(Size(aOldSize.Width() - nLostPixels, aOldSize.Height())); - } - fillListBox(_rDatasources); #ifdef HAVE_ODBC_ADMINISTRATION // allow ODBC datasource managenment - if ( !_bAdabas ) - { - m_aManageDatasources.Show(); - m_aManageDatasources.Enable(); - m_aManageDatasources.SetClickHdl(LINK(this,ODatasourceSelectDialog,ManageClickHdl)); - } + m_aManageDatasources.Show(); + m_aManageDatasources.Enable(); + m_aManageDatasources.SetClickHdl(LINK(this,ODatasourceSelectDialog,ManageClickHdl)); #endif m_aDatasource.SetDoubleClickHdl(LINK(this,ODatasourceSelectDialog,ListDblClickHdl)); FreeResource(); @@ -136,63 +97,6 @@ IMPL_LINK( ODatasourceSelectDialog, ListDblClickHdl, ListBox *, pListBox ) EndDialog(RET_OK); return 0; } -// ----------------------------------------------------------------------- -IMPL_LINK( ODatasourceSelectDialog, CreateDBClickHdl, PushButton*, /*pButton*/ ) -{ - try - { - OSL_ENSURE(m_pOutputSet,"No itemset given!"); - Reference< ::com::sun::star::lang::XMultiServiceFactory > xORB = ::comphelper::getProcessServiceFactory(); - Reference<XCreateCatalog> xCatalog(xORB->createInstance(SERVICE_EXTENDED_ADABAS_DRIVER),UNO_QUERY); - if ( xCatalog.is() && m_pOutputSet ) - { - Sequence< Any > aArgs(2); - aArgs[0] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreateCatalog")), 0, makeAny(xCatalog), PropertyState_DIRECT_VALUE); - aArgs[1] <<= PropertyValue(PROPERTY_PARENTWINDOW, 0, makeAny(VCLUnoHelper::GetInterface(this)), PropertyState_DIRECT_VALUE); - - Reference< XExecutableDialog > xDialog( - xORB->createInstanceWithArguments(SERVICE_SDB_ADABASCREATIONDIALOG, aArgs), UNO_QUERY); - if (!xDialog.is()) - { - // ShowServiceNotAvailableError(this, String(SERVICE_SDB_ADABASCREATIONDIALOG), sal_True); - return 0L; - } - - if ( xDialog->execute() == RET_OK ) - { - Reference<XPropertySet> xProp(xDialog,UNO_QUERY); - if(xProp.is()) - { - Reference<XPropertySetInfo> xPropInfo(xProp->getPropertySetInfo()); - if(xPropInfo->hasPropertyByName(PROPERTY_DATABASENAME)) - { - String sDatabaseName; - sDatabaseName = String(::comphelper::getString(xProp->getPropertyValue(PROPERTY_DATABASENAME))); - m_aDatasource.SelectEntryPos(m_aDatasource.InsertEntry( sDatabaseName )); - - } - if ( xPropInfo->hasPropertyByName(PROPERTY_CONTROLUSER) ) - m_pOutputSet->Put(SfxStringItem(DSID_CONN_CTRLUSER, ::comphelper::getString(xProp->getPropertyValue(PROPERTY_CONTROLUSER)))); - if ( xPropInfo->hasPropertyByName(PROPERTY_CONTROLPASSWORD) ) - m_pOutputSet->Put(SfxStringItem(DSID_CONN_CTRLPWD, ::comphelper::getString(xProp->getPropertyValue(PROPERTY_CONTROLPASSWORD)))); - if ( xPropInfo->hasPropertyByName(PROPERTY_USER) ) - m_pOutputSet->Put(SfxStringItem(DSID_USER, ::comphelper::getString(xProp->getPropertyValue(PROPERTY_USER)))); - if ( xPropInfo->hasPropertyByName(PROPERTY_PASSWORD) ) - { - m_pOutputSet->Put(SfxStringItem(DSID_PASSWORD, ::comphelper::getString(xProp->getPropertyValue(PROPERTY_PASSWORD)))); - m_pOutputSet->Put(SfxBoolItem(DSID_PASSWORDREQUIRED, sal_True)); - } - if ( xPropInfo->hasPropertyByName(PROPERTY_CACHESIZE) ) - m_pOutputSet->Put(SfxInt32Item(DSID_CONN_CACHESIZE, ::comphelper::getINT32(xProp->getPropertyValue(PROPERTY_CACHESIZE)))); - } - } - } - } - catch(Exception&) - { - } - return 0L; -} // ----------------------------------------------------------------------- sal_Bool ODatasourceSelectDialog::Close() diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx index 34050aff9cb9..56566c023de4 100644 --- a/dbaccess/source/ui/dlg/dsselect.hxx +++ b/dbaccess/source/ui/dlg/dsselect.hxx @@ -62,7 +62,6 @@ protected: #ifdef HAVE_ODBC_ADMINISTRATION PushButton m_aManageDatasources; #endif - PushButton m_aCreateAdabasDB; SfxItemSet* m_pOutputSet; #ifdef HAVE_ODBC_ADMINISTRATION ::std::auto_ptr< OOdbcManagement > @@ -70,7 +69,7 @@ protected: #endif public: - ODatasourceSelectDialog( Window* _pParent, const StringBag& _rDatasources, bool _bAdabas,SfxItemSet* _pOutputSet = NULL ); + ODatasourceSelectDialog( Window* _pParent, const StringBag& _rDatasources, SfxItemSet* _pOutputSet = NULL ); ~ODatasourceSelectDialog(); inline String GetSelected() const { return m_aDatasource.GetSelectEntry();} @@ -84,7 +83,6 @@ protected: DECL_LINK( ManageClickHdl, PushButton * ); DECL_LINK( ManageProcessFinished, void* ); #endif - DECL_LINK( CreateDBClickHdl, PushButton * ); void fillListBox(const StringBag& _rDatasources); }; diff --git a/dbaccess/source/ui/inc/dbu_dlg.hrc b/dbaccess/source/ui/inc/dbu_dlg.hrc index b107a0014dbb..95d6f4aada75 100644 --- a/dbaccess/source/ui/inc/dbu_dlg.hrc +++ b/dbaccess/source/ui/inc/dbu_dlg.hrc @@ -55,13 +55,13 @@ #define INDENT_BELOW_CHECK 10 -#define STR_ADABAS_HELP_SYSDEVSPACE RID_STR_DLG_START -#define STR_ADABAS_HELP_TRANSACT RID_STR_DLG_START + 1 -#define STR_ADABAS_HELP_DATADEVSPACES RID_STR_DLG_START + 2 -#define STR_ADABAS_HELP_SIZE RID_STR_DLG_START + 3 -#define STR_ADABAS_HELP_FREESIZE RID_STR_DLG_START + 4 -#define STR_ADABAS_HELP_MEMORYUSING RID_STR_DLG_START + 5 -#define STR_ADABAS_ERROR_SYSTEMTABLES RID_STR_DLG_START + 6 + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE + // FREE #define STR_ERROR_PASSWORDS_NOT_IDENTICAL RID_STR_DLG_START + 7 #define STR_INDEXDESIGN_DOUBLE_COLUMN_NAME RID_STR_DLG_START + 8 // FREE @@ -103,11 +103,11 @@ #define STR_NAME_OF_ODBC_DATASOURCE RID_STR_DLG_START + 48 #define STR_MYSQL_DATABASE_NAME RID_STR_DLG_START + 49 #define STR_ORACLE_DATABASE_NAME RID_STR_DLG_START + 50 -#define STR_ADABAS_DATABASE_NAME RID_STR_DLG_START + 51 + // FREE #define STR_MSACCESS_MDB_FILE RID_STR_DLG_START + 52 #define STR_COMMONURL RID_STR_DLG_START + 53 #define STR_DATABASEDEFAULTNAME RID_STR_DLG_START + 54 -#define STR_NO_ADABASE_DATASOURCES RID_STR_DLG_START + 55 + // FREE #define STR_NO_ADDITIONAL_SETTINGS RID_STR_DLG_START + 56 #define STR_HOSTNAME RID_STR_DLG_START + 57 // FREE diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc index e2cb7fcf14d1..4e2673f7ab9d 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -104,9 +104,9 @@ #define DLG_QRY_JOIN RID_DIALOG_START + 15 #define WIZ_RTFCOPYTABLE RID_DIALOG_START + 16 #define DLG_REL_PROPERTIES RID_DIALOG_START + 17 -#define DLG_ADABASSTAT RID_DIALOG_START + 18 + // FREE #define DLG_INDEXDESIGN RID_DIALOG_START + 19 -#define DLG_DATABASE_ADABASADMIN RID_DIALOG_START + 20 + // FREE #define DLG_DATABASE_USERADMIN RID_DIALOG_START + 21 #define DLG_DIRECTSQL RID_DIALOG_START + 22 #define DLG_PASSWORD RID_DIALOG_START + 23 @@ -126,7 +126,7 @@ #define PAGE_DBASE RID_PAGE_START + 1 #define PAGE_ODBC RID_PAGE_START + 3 #define PAGE_TEXT RID_PAGE_START + 4 -#define PAGE_ADABAS RID_PAGE_START + 5 + // FREE #define PAGE_CONNECTION RID_PAGE_START + 6 #define PAGE_ADO RID_PAGE_START + 7 #define PAGE_QUERYADMINISTRATION RID_PAGE_START + 8 @@ -134,7 +134,7 @@ #define TAB_WIZ_TYPE_SELECT RID_PAGE_START + 10 #define TAB_WIZ_NAME_MATCHING RID_PAGE_START + 11 #define TAB_WIZ_COPYTABLE RID_PAGE_START + 12 -#define TAB_PAG_ADABAS_SETTINGS RID_PAGE_START + 13 + // FREE // free #define PAGE_LDAP RID_PAGE_START + 15 #define TAB_PAGE_USERADMIN RID_PAGE_START + 16 @@ -161,7 +161,7 @@ #define PAGE_DBWIZARD_TEXT RID_PAGE_START + 42 #define PAGE_DBWIZARD_MSACCESS RID_PAGE_START + 43 #define PAGE_DBWIZARD_LDAP RID_PAGE_START + 44 -#define PAGE_DBWIZARD_ADABAS RID_PAGE_START + 45 + // FREE #define PAGE_DBWIZARD_MYSQL_INTRO RID_PAGE_START + 46 #define PAGE_DBWIZARD_MYSQL_ODBC RID_PAGE_START + 47 #define PAGE_DBWIZARD_ORACLE RID_PAGE_START + 48 diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx index 921152162b1c..e1c339360c3c 100644 --- a/dbaccess/source/ui/inc/dbwizsetup.hxx +++ b/dbaccess/source/ui/inc/dbwizsetup.hxx @@ -85,7 +85,6 @@ private: String m_sRM_TextText; String m_sRM_MSAccessText; String m_sRM_LDAPText; - String m_sRM_ADABASText; String m_sRM_ADOText; String m_sRM_JDBCText; String m_sRM_MySQLNativePageTitle; diff --git a/dbaccess/source/ui/misc/dbumiscres.hrc b/dbaccess/source/ui/misc/dbumiscres.hrc index 81b72e5dda87..3f09360c94ee 100644 --- a/dbaccess/source/ui/misc/dbumiscres.hrc +++ b/dbaccess/source/ui/misc/dbumiscres.hrc @@ -33,7 +33,7 @@ #define STR_MYSQL_ODBC 1 #define STR_MYSQL_JDBC 2 -#define STR_ADABAS 3 +//3 was STR_ADABAS #define STR_ORACLE_JDBC 4 #define STR_JDBC 5 #define STR_ODBC 6 diff --git a/dbaccess/source/ui/uno/AdabasSettingsDlg.cxx b/dbaccess/source/ui/uno/AdabasSettingsDlg.cxx deleted file mode 100644 index d5087eb33259..000000000000 --- a/dbaccess/source/ui/uno/AdabasSettingsDlg.cxx +++ /dev/null @@ -1,127 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - - -#include "dbu_reghelper.hxx" -#include "AdabasSettingsDlg.hxx" -#include "AdabasStatDlg.hxx" - - -using namespace dbaui; - -extern "C" void SAL_CALL createRegistryInfo_OAdabasSettingsDialog() -{ - static OMultiInstanceAutoRegistration< OAdabasSettingsDialog > aAutoRegistration; -} - -//......................................................................... -namespace dbaui -{ -//......................................................................... - - using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::lang; - using namespace ::com::sun::star::beans; - -//========================================================================= -//------------------------------------------------------------------------- -OAdabasSettingsDialog::OAdabasSettingsDialog(const Reference< XMultiServiceFactory >& _rxORB) - :ODatabaseAdministrationDialog(_rxORB) -{ -} -//------------------------------------------------------------------------- -Sequence<sal_Int8> SAL_CALL OAdabasSettingsDialog::getImplementationId( ) throw(RuntimeException) -{ - static ::cppu::OImplementationId aId; - return aId.getImplementationId(); -} - -//------------------------------------------------------------------------- -Reference< XInterface > SAL_CALL OAdabasSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) -{ - return *(new OAdabasSettingsDialog(_rxFactory)); -} - -//------------------------------------------------------------------------- -::rtl::OUString SAL_CALL OAdabasSettingsDialog::getImplementationName() throw(RuntimeException) -{ - return getImplementationName_Static(); -} - -//------------------------------------------------------------------------- -::rtl::OUString OAdabasSettingsDialog::getImplementationName_Static() throw(RuntimeException) -{ - return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.dbu.OAdabasSettingsDialog")); -} - -//------------------------------------------------------------------------- -::comphelper::StringSequence SAL_CALL OAdabasSettingsDialog::getSupportedServiceNames() throw(RuntimeException) -{ - return getSupportedServiceNames_Static(); -} - -//------------------------------------------------------------------------- -::comphelper::StringSequence OAdabasSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException) -{ - ::comphelper::StringSequence aSupported(1); - aSupported.getArray()[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.AdabasAdministrationDialog")); - return aSupported; -} - -//------------------------------------------------------------------------- -Reference<XPropertySetInfo> SAL_CALL OAdabasSettingsDialog::getPropertySetInfo() throw(RuntimeException) -{ - Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); - return xInfo; -} - -//------------------------------------------------------------------------- -::cppu::IPropertyArrayHelper& OAdabasSettingsDialog::getInfoHelper() -{ - return *const_cast<OAdabasSettingsDialog*>(this)->getArrayHelper(); -} - -//------------------------------------------------------------------------------ -::cppu::IPropertyArrayHelper* OAdabasSettingsDialog::createArrayHelper( ) const -{ - Sequence< Property > aProps; - describeProperties(aProps); - return new ::cppu::OPropertyArrayHelper(aProps); -} -//------------------------------------------------------------------------------ -Dialog* OAdabasSettingsDialog::createDialog(Window* _pParent) -{ - OAdabasStatPageDlg* pDlg = new OAdabasStatPageDlg(_pParent, m_pDatasourceItems, m_aContext.getLegacyServiceFactory(),m_aInitialSelection); - return pDlg; -} - -//......................................................................... -} // namespace dbaui -//......................................................................... - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/AdabasSettingsDlg.hxx b/dbaccess/source/ui/uno/AdabasSettingsDlg.hxx deleted file mode 100644 index f102ba02c39d..000000000000 --- a/dbaccess/source/ui/uno/AdabasSettingsDlg.hxx +++ /dev/null @@ -1,82 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _DBAUI_ADABASSETTINGSDLG_HXX -#define _DBAUI_ADABASSETTINGSDLG_HXX - -#ifndef _DBAUI_UNOADMIN_ -#include "unoadmin.hxx" -#endif - -//......................................................................... -namespace dbaui -{ -//......................................................................... -//========================================================================= -//= OAdabasSettingsDialog -//========================================================================= -class OAdabasSettingsDialog - :public ODatabaseAdministrationDialog - ,public ::comphelper::OPropertyArrayUsageHelper< OAdabasSettingsDialog > -{ - -protected: - OAdabasSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); - -public: - // XTypeProvider - virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException); - virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); - - // XServiceInfo - static methods - static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException ); - static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException ); - static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > - SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&); - - // XPropertySet - virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); - virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - - // OPropertyArrayUsageHelper - virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; -protected: -// OGenericUnoDialog overridables - virtual Dialog* createDialog(Window* _pParent); -}; - -//......................................................................... -} // namespace dbaui -//......................................................................... - -#endif // _DBAUI_ADABASSETTINGSDLG_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/util/hidother.src b/dbaccess/util/hidother.src index 094b4fbfecd0..f652d1f286e0 100644 --- a/dbaccess/util/hidother.src +++ b/dbaccess/util/hidother.src @@ -44,7 +44,6 @@ hidspecial HID_DSADMIN_PAGE_GENERAL { HelpId = HID_DSADMIN_P hidspecial HID_DSADMIN_PAGE_DBASE { HelpId = HID_DSADMIN_PAGE_DBASE; }; hidspecial HID_DSADMIN_PAGE_JDBC { HelpId = HID_DSADMIN_PAGE_JDBC; }; hidspecial HID_DSADMIN_PAGE_ODBC { HelpId = HID_DSADMIN_PAGE_ODBC; }; -hidspecial HID_DSADMIN_PAGE_ADABAS { HelpId = HID_DSADMIN_PAGE_ADABAS; }; hidspecial HID_DSADMIN_PAGE_TEXT { HelpId = HID_DSADMIN_PAGE_TEXT; }; hidspecial HID_DSADMIN_TABLE_SUBSCRIPTION { HelpId = HID_DSADMIN_TABLE_SUBSCRIPTION; }; hidspecial HID_DSADMIN_DSACTIONS_NEWDS { HelpId = HID_DSADMIN_DSACTIONS_NEWDS; }; @@ -282,7 +281,6 @@ hidspecial HID_DSADMIN_DBASE_PATH { HelpId = HID_DSADMIN_D hidspecial HID_DSADMIN_MYSQL_DATABASE { HelpId = HID_DSADMIN_MYSQL_DATABASE ; }; hidspecial HID_DSADMIN_MYSQL_ODBC_DATASOURCE { HelpId = HID_DSADMIN_MYSQL_ODBC_DATASOURCE ; }; hidspecial HID_DSADMIN_ODBC_DATASOURCE { HelpId = HID_DSADMIN_ODBC_DATASOURCE ; }; -hidspecial HID_DSADMIN_ADABAS_DATABASE { HelpId = HID_DSADMIN_ADABAS_DATABASE ; }; hidspecial HID_DSADMIN_MSACCESS_MDB_FILE { HelpId = HID_DSADMIN_MSACCESS_MDB_FILE ; }; hidspecial HID_DSADMIN_PAGE_MSACCESS { HelpId = HID_DSADMIN_PAGE_MSACCESS ; }; hidspecial HID_DSADMIN_FLAT_PATH { HelpId = HID_DSADMIN_FLAT_PATH ; }; @@ -329,7 +327,6 @@ hidspecial HID_APP_VIEW_PREVIEW_3 { HelpId = HID_APP_VIEW_ hidspecial HID_DSADMIN_TYPE_DIALOG { HelpId = HID_DSADMIN_TYPE_DIALOG ; }; hidspecial HID_DSADMIN_ENABLEOUTERJOIN { HelpId = HID_DSADMIN_ENABLEOUTERJOIN ; }; -hidspecial HID_DSADMIN_ADABASADMIN { HelpId = HID_DSADMIN_ADABASADMIN ; }; hidspecial HID_DSADMIN_USERADMIN { HelpId = HID_DSADMIN_USERADMIN ; }; hidspecial HID_DBWIZ_PREVIOUS { HelpId = HID_DBWIZ_PREVIOUS ; }; @@ -432,8 +429,6 @@ hidspecial HID_PAGE_DBWIZARD_LDAP_ET_BASEDN { HelpId = HID_P hidspecial HID_PAGE_DBWIZARD_LDAP_ET_PORTNUMBER { HelpId = HID_PAGE_DBWIZARD_LDAP_ET_PORTNUMBER ; }; hidspecial HID_PAGE_DBWIZARD_LDAP_CB_USESSL { HelpId = HID_PAGE_DBWIZARD_LDAP_CB_USESSL ; }; hidspecial HID_PAGE_DBWIZARD_LDAP_PB_TESTLDAPCONNECTION { HelpId = HID_PAGE_DBWIZARD_LDAP_PB_TESTLDAPCONNECTION ; }; -hidspecial HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME { HelpId = HID_PAGE_DBWIZARD_ADABAS_ET_ADABASNAME ; }; -hidspecial HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME { HelpId = HID_PAGE_DBWIZARD_ADABAS_PB_ADABASNAME ; }; hidspecial HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAODBC { HelpId = HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAODBC ; }; hidspecial HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAJDBC { HelpId = HID_PAGE_DBWIZARD_MYSQL_RB_CONNECTVIAJDBC ; }; hidspecial HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME { HelpId = HID_PAGE_DBWIZARD_ORACLE_ET_ORACLEDBNAME ; }; @@ -480,24 +475,5 @@ hidspecial HID_BROWSER_ADMINISTRATE { He hidspecial HID_DSADMIN_IGNORECURRENCY { HelpId = HID_DSADMIN_IGNORECURRENCY ; }; hidspecial HID_DLG_QRY_JOIN_CONTROL { HelpId = HID_DLG_QRY_JOIN_CONTROL ; }; hidspecial HID_EXTENSION_NOT_PRESENT_DLG { HelpId = HID_EXTENSION_NOT_PRESENT_DLG ; }; -hidspecial HID_DLG_ADABAS_NEWDB { HelpId = HID_DLG_ADABAS_NEWDB; }; -hidspecial HID_DLG_ADABAS_DBNAME { HelpId = HID_DLG_ADABAS_DBNAME ; }; -hidspecial HID_DLG_ADABAS_SYSUSR { HelpId = HID_DLG_ADABAS_SYSUSR ; }; -hidspecial HID_DLG_ADABAS_SYSPWD { HelpId = HID_DLG_ADABAS_SYSPWD ; }; -hidspecial HID_DLG_ADABAS_CONUSR { HelpId = HID_DLG_ADABAS_CONUSR ; }; -hidspecial HID_DLG_ADABAS_CONPWD { HelpId = HID_DLG_ADABAS_CONPWD ; }; -hidspecial HID_DLG_ADABAS_DATADEVSPACE_SIZE { HelpId = HID_DLG_ADABAS_DATADEVSPACE_SIZE ; }; -hidspecial HID_DLG_ADABAS_CACHE_SIZE { HelpId = HID_DLG_ADABAS_CACHE_SIZE ; }; -hidspecial HID_DLG_ADABAS_USR { HelpId = HID_DLG_ADABAS_USR ; }; -hidspecial HID_DLG_ADABAS_DOMAINPWD { HelpId = HID_DLG_ADABAS_DOMAINPWD ; }; -hidspecial HID_DLG_ADABAS_RESTORE { HelpId = HID_DLG_ADABAS_RESTORE ; }; -hidspecial HID_DLG_ADABAS_PBRESTORE { HelpId = HID_DLG_ADABAS_PBRESTORE ; }; -hidspecial HID_DLG_ADABAS_SYSDEVSPACE { HelpId = HID_DLG_ADABAS_SYSDEVSPACE ; }; -hidspecial HID_DLG_ADABAS_PBSYSDEVSPACE { HelpId = HID_DLG_ADABAS_PBSYSDEVSPACE ; }; -hidspecial HID_DLG_ADABAS_TRANSACTIONLOG { HelpId = HID_DLG_ADABAS_TRANSACTIONLOG ; }; -hidspecial HID_DLG_ADABAS_PBTRANSACTIONLOG { HelpId = HID_DLG_ADABAS_PBTRANSACTIONLOG ; }; -hidspecial HID_DLG_ADABAS_DATADEVSPACE { HelpId = HID_DLG_ADABAS_DATADEVSPACE ; }; -hidspecial HID_DLG_ADABAS_PBDATADEVSPACE { HelpId = HID_DLG_ADABAS_PBDATADEVSPACE ; }; -hidspecial HID_DLG_ADABAS_TRANSACTIONLOG_SIZE { HelpId = HID_DLG_ADABAS_TRANSACTIONLOG_SIZE; }; hidspecial HID_MACRO_MIGRATION_BACKUP_LOCATION { HelpId = HID_MACRO_MIGRATION_BACKUP_LOCATION; }; |