diff options
Diffstat (limited to 'connectivity/source/drivers')
458 files changed, 1354 insertions, 1359 deletions
diff --git a/connectivity/source/drivers/adabas/BCatalog.cxx b/connectivity/source/drivers/adabas/BCatalog.cxx index bae14af719..bae14af719 100644..100755 --- a/connectivity/source/drivers/adabas/BCatalog.cxx +++ b/connectivity/source/drivers/adabas/BCatalog.cxx diff --git a/connectivity/source/drivers/adabas/BColumns.cxx b/connectivity/source/drivers/adabas/BColumns.cxx index aa62a6a4d8..aa62a6a4d8 100644..100755 --- a/connectivity/source/drivers/adabas/BColumns.cxx +++ b/connectivity/source/drivers/adabas/BColumns.cxx diff --git a/connectivity/source/drivers/adabas/BConnection.cxx b/connectivity/source/drivers/adabas/BConnection.cxx index 9aae67312c..9aae67312c 100644..100755 --- a/connectivity/source/drivers/adabas/BConnection.cxx +++ b/connectivity/source/drivers/adabas/BConnection.cxx diff --git a/connectivity/source/drivers/adabas/BDatabaseMetaData.cxx b/connectivity/source/drivers/adabas/BDatabaseMetaData.cxx index d1a9b96e98..d1a9b96e98 100644..100755 --- a/connectivity/source/drivers/adabas/BDatabaseMetaData.cxx +++ b/connectivity/source/drivers/adabas/BDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/adabas/BDriver.cxx b/connectivity/source/drivers/adabas/BDriver.cxx index 8c35b177f7..0586d8f034 100644..100755 --- a/connectivity/source/drivers/adabas/BDriver.cxx +++ b/connectivity/source/drivers/adabas/BDriver.cxx @@ -66,9 +66,7 @@ #include <memory> #include <sys/stat.h> -#if defined(MAC) -const char sNewLine = '\015'; -#elif defined(UNX) +#if defined(UNX) const char sNewLine = '\012'; #else const char sNewLine[] = "\015\012"; // \015\012 and not \n @@ -873,7 +871,7 @@ void ODriver::createNeededDirs(const ::rtl::OUString& sDBName) if(UCBContentHelper::Exists(sTemp)) UCBContentHelper::Kill(sTemp); -#if !(defined(WIN) || defined(WNT)) +#if !(defined(WNT)) sTemp = sDBConfig; sTemp += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("diag")); if(!UCBContentHelper::IsFolder(sTemp)) @@ -895,7 +893,7 @@ void ODriver::createNeededDirs(const ::rtl::OUString& sDBName) void ODriver::clearDatabase(const ::rtl::OUString& sDBName) { // stop the database ::rtl::OUString sCommand; -#if defined(WIN) || defined(WNT) +#if defined(WNT) ::rtl::OUString sStop = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("stop")); const sal_uInt32 nArgsCount = 2; rtl_uString *pArgs[nArgsCount] = { sDBName.pData, sStop.pData }; @@ -944,7 +942,7 @@ void ODriver::createDb( const TDatabaseStruct& _aInfo) PutParam(_aInfo.sDBName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KERNELTRACESIZE")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("100"))); PutParam(_aInfo.sDBName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LOG_QUEUE_PAGES")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("10"))); -#if !(defined(WIN) || defined(WNT)) +#if !defined(WNT) PutParam(_aInfo.sDBName,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OPMSG1")),::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/dev/null"))); #endif @@ -1012,7 +1010,7 @@ int ODriver::X_PARAM(const ::rtl::OUString& _DBNAME, ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); (*pFileStream) << "x_param" -#if defined(WIN) || defined(WNT) +#if defined(WNT) << ".exe" #endif << " -d " @@ -1023,7 +1021,7 @@ int ODriver::X_PARAM(const ::rtl::OUString& _DBNAME, << ::rtl::OString(_PWD,_PWD.getLength(),gsl_getSystemTextEncoding()) << " " << ::rtl::OString(_CMD,_CMD.getLength(),gsl_getSystemTextEncoding()) -#if (defined(WIN) || defined(WNT)) +#if defined(WNT) #if (OSL_DEBUG_LEVEL > 1) || defined(DBG_UTIL) << " >> %DBWORK%\\create.log 2>&1" #endif @@ -1079,7 +1077,7 @@ void ODriver::PutParam(const ::rtl::OUString& sDBName, rtl_uString* pArgs[nArgsCount] = { sDBName.pData, rWhat.pData, rHow.pData }; ::rtl::OUString sCommand = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("putparam")); -#if defined(WIN) || defined(WNT) +#if defined(WNT) sCommand += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".exe")); #endif @@ -1146,7 +1144,7 @@ OSL_TRACE("CreateFile %d",_nSize); int ODriver::X_START(const ::rtl::OUString& sDBName) { ::rtl::OUString sCommand; -#if defined(WIN) || defined(WNT) +#if defined(WNT) ::rtl::OUString sArg1 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-d")); ::rtl::OUString sArg3 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-NoDBService")); @@ -1191,7 +1189,7 @@ int ODriver::X_START(const ::rtl::OUString& sDBName) int ODriver::X_STOP(const ::rtl::OUString& sDBName) { ::rtl::OUString sCommand; -#if defined(WIN) || defined(WNT) +#if defined(WNT) ::rtl::OUString sArg1 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-d")); ::rtl::OUString sArg2 = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-NoDBService")); @@ -1243,7 +1241,7 @@ void ODriver::XUTIL(const ::rtl::OUString& _rParam, ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); (*pFileStream) << -#if defined(WIN) || defined(WNT) +#if defined(WNT) "xutil.exe" #else "utility" @@ -1301,7 +1299,7 @@ void ODriver::LoadBatch(const ::rtl::OUString& sDBName, ::std::auto_ptr<SvStream> pFileStream( UcbStreamHelper::CreateStream(sCommandFile,STREAM_STD_READWRITE)); pFileStream->Seek(STREAM_SEEK_TO_END); (*pFileStream) << "xload" -#if defined(WIN) || defined(WNT) +#if defined(WNT) << ".exe" #endif << " -d " @@ -1375,7 +1373,7 @@ void ODriver::fillEnvironmentVariables() ::rtl::OUString ODriver::generateInitFile() const { String sExt; -#if !(defined(WIN) || defined(WNT)) +#if !defined(WNT) sExt = String::CreateFromAscii(".sh"); #else sExt = String::CreateFromAscii(".bat"); @@ -1383,13 +1381,13 @@ void ODriver::fillEnvironmentVariables() String sWorkUrl(m_sDbWorkURL); ::utl::TempFile aCmdFile(String::CreateFromAscii("Init"),&sExt,&sWorkUrl); -#if !(defined(WIN) || defined(WNT)) +#if !defined(WNT) String sPhysicalPath; LocalFileHelper::ConvertURLToPhysicalName(aCmdFile.GetURL(),sPhysicalPath); chmod(ByteString(sPhysicalPath,gsl_getSystemTextEncoding()).GetBuffer(),S_IRUSR|S_IWUSR|S_IXUSR); #endif -#if !(defined(WIN) || defined(WNT)) +#if !defined(WNT) SvStream* pFileStream = aCmdFile.GetStream(STREAM_WRITE); (*pFileStream) << "#!/bin/sh" << sNewLine @@ -1499,7 +1497,7 @@ void ODriver::X_CONS(const ::rtl::OUString& sDBName,const ::rtl::OString& _ACTIO pFileStream->Seek(STREAM_SEEK_TO_END); (*pFileStream) << "x_cons" -#if defined(WIN) || defined(WNT) +#if defined(WNT) << ".exe" #endif << " " @@ -1586,7 +1584,7 @@ sal_Bool ODriver::isVersion(const ::rtl::OUString& sDBName, const char* _pVersio pFileStream->Seek(STREAM_SEEK_TO_END); (*pFileStream) << "getparam" -#if defined(WIN) || defined(WNT) +#if defined(WNT) << ".exe" #endif << " " @@ -1640,7 +1638,7 @@ void ODriver::checkAndInsertNewDevSpace(const ::rtl::OUString& sDBName, pFileStream->Seek(STREAM_SEEK_TO_END); (*pFileStream) << "getparam" -#if defined(WIN) || defined(WNT) +#if defined(WNT) << ".exe" #endif << " " @@ -1726,7 +1724,7 @@ sal_Bool ODriver::isKernelVersion(const char* _pVersion) // ----------------------------------------------------------------------------- void ODriver::installSystemTables( const TDatabaseStruct& _aInfo) { -#if defined(WIN) || defined(WNT) +#if defined(WNT) // xutil -d %_DBNAME% -u %_CONTROL_USER%,%_CONTROL_PWD% -b %m_sDbRoot%\env\TERMCHAR.ind ::rtl::OUString aBatch = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("-b ")); ::rtl::OUString sTemp2 = m_sDbRootURL + m_sDelimit diff --git a/connectivity/source/drivers/adabas/BFunctions.cxx b/connectivity/source/drivers/adabas/BFunctions.cxx index 351c47bf22..ab64f99c31 100644..100755 --- a/connectivity/source/drivers/adabas/BFunctions.cxx +++ b/connectivity/source/drivers/adabas/BFunctions.cxx @@ -130,7 +130,7 @@ sal_Bool LoadLibrary_ADABAS(::rtl::OUString &_rPath) } const sal_Char* pLibraryAsciiName = NULL; -#if defined(WIN) || defined(WNT) +#if defined(WNT) pLibraryAsciiName = "SQLOD32.DLL"; #elif ( defined(SOLARIS) && defined(SPARC)) || defined(LINUX) pLibraryAsciiName = "odbclib.so"; diff --git a/connectivity/source/drivers/adabas/BGroup.cxx b/connectivity/source/drivers/adabas/BGroup.cxx index 1421771056..1421771056 100644..100755 --- a/connectivity/source/drivers/adabas/BGroup.cxx +++ b/connectivity/source/drivers/adabas/BGroup.cxx diff --git a/connectivity/source/drivers/adabas/BGroups.cxx b/connectivity/source/drivers/adabas/BGroups.cxx index 46256b20d5..46256b20d5 100644..100755 --- a/connectivity/source/drivers/adabas/BGroups.cxx +++ b/connectivity/source/drivers/adabas/BGroups.cxx diff --git a/connectivity/source/drivers/adabas/BIndex.cxx b/connectivity/source/drivers/adabas/BIndex.cxx index 00d61dd1c0..00d61dd1c0 100644..100755 --- a/connectivity/source/drivers/adabas/BIndex.cxx +++ b/connectivity/source/drivers/adabas/BIndex.cxx diff --git a/connectivity/source/drivers/adabas/BIndexColumns.cxx b/connectivity/source/drivers/adabas/BIndexColumns.cxx index 059ba4fe47..059ba4fe47 100644..100755 --- a/connectivity/source/drivers/adabas/BIndexColumns.cxx +++ b/connectivity/source/drivers/adabas/BIndexColumns.cxx diff --git a/connectivity/source/drivers/adabas/BIndexes.cxx b/connectivity/source/drivers/adabas/BIndexes.cxx index 62563cbd2b..62563cbd2b 100644..100755 --- a/connectivity/source/drivers/adabas/BIndexes.cxx +++ b/connectivity/source/drivers/adabas/BIndexes.cxx diff --git a/connectivity/source/drivers/adabas/BKeys.cxx b/connectivity/source/drivers/adabas/BKeys.cxx index d6a6586f10..d6a6586f10 100644..100755 --- a/connectivity/source/drivers/adabas/BKeys.cxx +++ b/connectivity/source/drivers/adabas/BKeys.cxx diff --git a/connectivity/source/drivers/adabas/BPreparedStatement.cxx b/connectivity/source/drivers/adabas/BPreparedStatement.cxx index a25b760c3e..a25b760c3e 100644..100755 --- a/connectivity/source/drivers/adabas/BPreparedStatement.cxx +++ b/connectivity/source/drivers/adabas/BPreparedStatement.cxx diff --git a/connectivity/source/drivers/adabas/BResultSet.cxx b/connectivity/source/drivers/adabas/BResultSet.cxx index 96212030c9..96212030c9 100644..100755 --- a/connectivity/source/drivers/adabas/BResultSet.cxx +++ b/connectivity/source/drivers/adabas/BResultSet.cxx diff --git a/connectivity/source/drivers/adabas/BResultSetMetaData.cxx b/connectivity/source/drivers/adabas/BResultSetMetaData.cxx index fe1eba559a..fe1eba559a 100644..100755 --- a/connectivity/source/drivers/adabas/BResultSetMetaData.cxx +++ b/connectivity/source/drivers/adabas/BResultSetMetaData.cxx diff --git a/connectivity/source/drivers/adabas/BStatement.cxx b/connectivity/source/drivers/adabas/BStatement.cxx index f4e399cc3c..f4e399cc3c 100644..100755 --- a/connectivity/source/drivers/adabas/BStatement.cxx +++ b/connectivity/source/drivers/adabas/BStatement.cxx diff --git a/connectivity/source/drivers/adabas/BTable.cxx b/connectivity/source/drivers/adabas/BTable.cxx index 3f9ad2edde..3f9ad2edde 100644..100755 --- a/connectivity/source/drivers/adabas/BTable.cxx +++ b/connectivity/source/drivers/adabas/BTable.cxx diff --git a/connectivity/source/drivers/adabas/BTables.cxx b/connectivity/source/drivers/adabas/BTables.cxx index 302e9b4e8f..302e9b4e8f 100644..100755 --- a/connectivity/source/drivers/adabas/BTables.cxx +++ b/connectivity/source/drivers/adabas/BTables.cxx diff --git a/connectivity/source/drivers/adabas/BUser.cxx b/connectivity/source/drivers/adabas/BUser.cxx index 98d61e4f43..98d61e4f43 100644..100755 --- a/connectivity/source/drivers/adabas/BUser.cxx +++ b/connectivity/source/drivers/adabas/BUser.cxx diff --git a/connectivity/source/drivers/adabas/BUsers.cxx b/connectivity/source/drivers/adabas/BUsers.cxx index 995a4f8739..995a4f8739 100644..100755 --- a/connectivity/source/drivers/adabas/BUsers.cxx +++ b/connectivity/source/drivers/adabas/BUsers.cxx diff --git a/connectivity/source/drivers/adabas/BViews.cxx b/connectivity/source/drivers/adabas/BViews.cxx index f15ff861be..f15ff861be 100644..100755 --- a/connectivity/source/drivers/adabas/BViews.cxx +++ b/connectivity/source/drivers/adabas/BViews.cxx diff --git a/connectivity/source/drivers/adabas/Bservices.cxx b/connectivity/source/drivers/adabas/Bservices.cxx index 2c7cf7f609..5b4e3be456 100644..100755 --- a/connectivity/source/drivers/adabas/Bservices.cxx +++ b/connectivity/source/drivers/adabas/Bservices.cxx @@ -30,13 +30,11 @@ #include "precompiled_connectivity.hxx" #include "adabas/BDriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::adabas; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -49,27 +47,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// The prescribed C-Api must be met! -// It consists of three functions, which must be exported by the module. -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "ADABAS::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -119,31 +96,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - ODriver::getImplementationName_Static(), - ODriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "ODBC::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/adabas/adabas.component b/connectivity/source/drivers/adabas/adabas.component new file mode 100755 index 0000000000..3c359c3d02 --- /dev/null +++ b/connectivity/source/drivers/adabas/adabas.component @@ -0,0 +1,35 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbcx.adabas.ODriver"> + <service name="com.sun.star.sdbc.Driver"/> + <service name="com.sun.star.sdbcx.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/adabas/adabas.mxp.map b/connectivity/source/drivers/adabas/adabas.mxp.map index 2ce9f11141..f64c44c13f 100644..100755 --- a/connectivity/source/drivers/adabas/adabas.mxp.map +++ b/connectivity/source/drivers/adabas/adabas.mxp.map @@ -1,5 +1,4 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory __mh_dylib_header ___builtin_delete diff --git a/connectivity/source/drivers/adabas/adabas.xml b/connectivity/source/drivers/adabas/adabas.xml index a4736d0dfd..a4736d0dfd 100644..100755 --- a/connectivity/source/drivers/adabas/adabas.xml +++ b/connectivity/source/drivers/adabas/adabas.xml diff --git a/connectivity/source/drivers/adabas/exports.dxp b/connectivity/source/drivers/adabas/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/adabas/exports.dxp +++ b/connectivity/source/drivers/adabas/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/adabas/makefile.mk b/connectivity/source/drivers/adabas/makefile.mk index b5d9903f27..bfc6a3dcfa 100644..100755 --- a/connectivity/source/drivers/adabas/makefile.mk +++ b/connectivity/source/drivers/adabas/makefile.mk @@ -104,3 +104,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/adabas.component + +$(MISC)/adabas.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + adabas.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt adabas.component diff --git a/connectivity/source/drivers/ado/ACallableStatement.cxx b/connectivity/source/drivers/ado/ACallableStatement.cxx index feb29ec8d9..feb29ec8d9 100644..100755 --- a/connectivity/source/drivers/ado/ACallableStatement.cxx +++ b/connectivity/source/drivers/ado/ACallableStatement.cxx diff --git a/connectivity/source/drivers/ado/ACatalog.cxx b/connectivity/source/drivers/ado/ACatalog.cxx index f6390431b6..0f3e70c0f1 100644..100755 --- a/connectivity/source/drivers/ado/ACatalog.cxx +++ b/connectivity/source/drivers/ado/ACatalog.cxx @@ -80,7 +80,7 @@ void OCatalog::refreshTables() if(m_pTables) m_pTables->reFill(aVector); else - m_pTables = new OTables(this,m_aMutex,aVector,aTables,m_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers()); + m_pTables = new OTables(this,m_aMutex,aVector,aTables,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } // ------------------------------------------------------------------------- void OCatalog::refreshViews() @@ -93,7 +93,7 @@ void OCatalog::refreshViews() if(m_pViews) m_pViews->reFill(aVector); else - m_pViews = new OViews(this,m_aMutex,aVector,aViews,m_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers()); + m_pViews = new OViews(this,m_aMutex,aVector,aViews,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } // ------------------------------------------------------------------------- void OCatalog::refreshGroups() @@ -106,7 +106,7 @@ void OCatalog::refreshGroups() if(m_pGroups) m_pGroups->reFill(aVector); else - m_pGroups = new OGroups(this,m_aMutex,aVector,aGroups,m_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers()); + m_pGroups = new OGroups(this,m_aMutex,aVector,aGroups,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } // ------------------------------------------------------------------------- void OCatalog::refreshUsers() @@ -119,7 +119,7 @@ void OCatalog::refreshUsers() if(m_pUsers) m_pUsers->reFill(aVector); else - m_pUsers = new OUsers(this,m_aMutex,aVector,aUsers,m_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers()); + m_pUsers = new OUsers(this,m_aMutex,aVector,aUsers,m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/ado/AColumn.cxx b/connectivity/source/drivers/ado/AColumn.cxx index d2b7b1dfee..d2b7b1dfee 100644..100755 --- a/connectivity/source/drivers/ado/AColumn.cxx +++ b/connectivity/source/drivers/ado/AColumn.cxx diff --git a/connectivity/source/drivers/ado/AColumns.cxx b/connectivity/source/drivers/ado/AColumns.cxx index b835184b36..c3187fd196 100644..100755 --- a/connectivity/source/drivers/ado/AColumns.cxx +++ b/connectivity/source/drivers/ado/AColumns.cxx @@ -73,8 +73,14 @@ Reference< XPropertySet > OColumns::createDescriptor() sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString&, const Reference< XPropertySet >& descriptor ) { OAdoColumn* pColumn = NULL; + Reference< XPropertySet > xColumn; if ( !getImplementation( pColumn, descriptor ) || pColumn == NULL ) - m_pConnection->throwGenericSQLException( STR_INVALID_COLUMN_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); + { + // m_pConnection->throwGenericSQLException( STR_INVALID_COLUMN_DESCRIPTOR_ERROR,static_cast<XTypeProvider*>(this) ); + pColumn = new OAdoColumn(isCaseSensitive(),m_pConnection); + xColumn = pColumn; + ::comphelper::copyProperties(descriptor,xColumn); + } WpADOColumn aColumn = pColumn->getColumnImpl(); diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index 02bcf20d66..02bcf20d66 100644..100755 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx diff --git a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx index c714660c97..c714660c97 100644..100755 --- a/connectivity/source/drivers/ado/ADatabaseMetaData.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaData.cxx diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx index 19fd82b111..19fd82b111 100644..100755 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataImpl.cxx diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx index 6b67bfa6b8..6b67bfa6b8 100644..100755 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx index e39ea65ead..e39ea65ead 100644..100755 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSetMetaData.cxx diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx index 8562195c49..83a2bcdee1 100644..100755 --- a/connectivity/source/drivers/ado/ADriver.cxx +++ b/connectivity/source/drivers/ado/ADriver.cxx @@ -166,6 +166,37 @@ void ODriver::impl_checkURL_throw(const ::rtl::OUString& _sUrl) Sequence< DriverPropertyInfo > SAL_CALL ODriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw(SQLException, RuntimeException) { impl_checkURL_throw(url); + if ( acceptsURL(url) ) + { + ::std::vector< DriverPropertyInfo > aDriverInfo; + + Sequence< ::rtl::OUString > aBooleanValues(2); + aBooleanValues[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ); + aBooleanValues[1] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ); + + aDriverInfo.push_back(DriverPropertyInfo( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IgnoreDriverPrivileges")) + ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Ignore the privileges from the database driver.")) + ,sal_False + ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "false" ) ) + ,aBooleanValues) + ); + aDriverInfo.push_back(DriverPropertyInfo( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EscapeDateTime")) + ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Escape date time format.")) + ,sal_False + ,::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "true" ) ) + ,aBooleanValues) + ); + aDriverInfo.push_back(DriverPropertyInfo( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TypeInfoSettings")) + ,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Defines how the type info of the database metadata should be manipulated.")) + ,sal_False + ,::rtl::OUString( ) + ,Sequence< ::rtl::OUString > ()) + ); + return Sequence< DriverPropertyInfo >(&aDriverInfo[0],aDriverInfo.size()); + } return Sequence< DriverPropertyInfo >(); } // -------------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/ado/AGroup.cxx b/connectivity/source/drivers/ado/AGroup.cxx index d02204b1ec..d02204b1ec 100644..100755 --- a/connectivity/source/drivers/ado/AGroup.cxx +++ b/connectivity/source/drivers/ado/AGroup.cxx diff --git a/connectivity/source/drivers/ado/AGroups.cxx b/connectivity/source/drivers/ado/AGroups.cxx index 269a315daa..269a315daa 100644..100755 --- a/connectivity/source/drivers/ado/AGroups.cxx +++ b/connectivity/source/drivers/ado/AGroups.cxx diff --git a/connectivity/source/drivers/ado/AIndex.cxx b/connectivity/source/drivers/ado/AIndex.cxx index 906d03fb23..906d03fb23 100644..100755 --- a/connectivity/source/drivers/ado/AIndex.cxx +++ b/connectivity/source/drivers/ado/AIndex.cxx diff --git a/connectivity/source/drivers/ado/AIndexes.cxx b/connectivity/source/drivers/ado/AIndexes.cxx index 7b645e6223..7b645e6223 100644..100755 --- a/connectivity/source/drivers/ado/AIndexes.cxx +++ b/connectivity/source/drivers/ado/AIndexes.cxx diff --git a/connectivity/source/drivers/ado/AKey.cxx b/connectivity/source/drivers/ado/AKey.cxx index 6407881fd4..6407881fd4 100644..100755 --- a/connectivity/source/drivers/ado/AKey.cxx +++ b/connectivity/source/drivers/ado/AKey.cxx diff --git a/connectivity/source/drivers/ado/AKeyColumn.cxx b/connectivity/source/drivers/ado/AKeyColumn.cxx index ff0bb3cafd..ff0bb3cafd 100644..100755 --- a/connectivity/source/drivers/ado/AKeyColumn.cxx +++ b/connectivity/source/drivers/ado/AKeyColumn.cxx diff --git a/connectivity/source/drivers/ado/AKeyColumns.cxx b/connectivity/source/drivers/ado/AKeyColumns.cxx index f7449bf1a3..f7449bf1a3 100644..100755 --- a/connectivity/source/drivers/ado/AKeyColumns.cxx +++ b/connectivity/source/drivers/ado/AKeyColumns.cxx diff --git a/connectivity/source/drivers/ado/AKeys.cxx b/connectivity/source/drivers/ado/AKeys.cxx index cfdd4a82d8..cfdd4a82d8 100644..100755 --- a/connectivity/source/drivers/ado/AKeys.cxx +++ b/connectivity/source/drivers/ado/AKeys.cxx diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index 5b7056c584..5b7056c584 100644..100755 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx index 366ac23c4a..366ac23c4a 100644..100755 --- a/connectivity/source/drivers/ado/AResultSet.cxx +++ b/connectivity/source/drivers/ado/AResultSet.cxx diff --git a/connectivity/source/drivers/ado/AResultSetMetaData.cxx b/connectivity/source/drivers/ado/AResultSetMetaData.cxx index 66def0a9cb..66def0a9cb 100644..100755 --- a/connectivity/source/drivers/ado/AResultSetMetaData.cxx +++ b/connectivity/source/drivers/ado/AResultSetMetaData.cxx diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx index 2708607e8e..2708607e8e 100644..100755 --- a/connectivity/source/drivers/ado/AStatement.cxx +++ b/connectivity/source/drivers/ado/AStatement.cxx diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx index a4fadaa02b..a4fadaa02b 100644..100755 --- a/connectivity/source/drivers/ado/ATable.cxx +++ b/connectivity/source/drivers/ado/ATable.cxx diff --git a/connectivity/source/drivers/ado/ATables.cxx b/connectivity/source/drivers/ado/ATables.cxx index c9872c4bc7..c9872c4bc7 100644..100755 --- a/connectivity/source/drivers/ado/ATables.cxx +++ b/connectivity/source/drivers/ado/ATables.cxx diff --git a/connectivity/source/drivers/ado/AUser.cxx b/connectivity/source/drivers/ado/AUser.cxx index 350f0362ab..350f0362ab 100644..100755 --- a/connectivity/source/drivers/ado/AUser.cxx +++ b/connectivity/source/drivers/ado/AUser.cxx diff --git a/connectivity/source/drivers/ado/AUsers.cxx b/connectivity/source/drivers/ado/AUsers.cxx index e1abe6f2c9..e1abe6f2c9 100644..100755 --- a/connectivity/source/drivers/ado/AUsers.cxx +++ b/connectivity/source/drivers/ado/AUsers.cxx diff --git a/connectivity/source/drivers/ado/AView.cxx b/connectivity/source/drivers/ado/AView.cxx index a5bc0d5491..a5bc0d5491 100644..100755 --- a/connectivity/source/drivers/ado/AView.cxx +++ b/connectivity/source/drivers/ado/AView.cxx diff --git a/connectivity/source/drivers/ado/AViews.cxx b/connectivity/source/drivers/ado/AViews.cxx index bf99464dfa..bf99464dfa 100644..100755 --- a/connectivity/source/drivers/ado/AViews.cxx +++ b/connectivity/source/drivers/ado/AViews.cxx diff --git a/connectivity/source/drivers/ado/Aolevariant.cxx b/connectivity/source/drivers/ado/Aolevariant.cxx index c22e7e2c90..c22e7e2c90 100644..100755 --- a/connectivity/source/drivers/ado/Aolevariant.cxx +++ b/connectivity/source/drivers/ado/Aolevariant.cxx diff --git a/connectivity/source/drivers/ado/Aservices.cxx b/connectivity/source/drivers/ado/Aservices.cxx index 206c9c2aa4..68600ba2d7 100644..100755 --- a/connectivity/source/drivers/ado/Aservices.cxx +++ b/connectivity/source/drivers/ado/Aservices.cxx @@ -30,13 +30,11 @@ #include "precompiled_connectivity.hxx" #include "ado/ADriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::ado; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -49,26 +47,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// The prescribed C-Api must be met! -// It consists of three functions, that must be exported by the module. -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "ADO::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -117,31 +95,6 @@ extern "C" void SAL_CALL component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - ODriver::getImplementationName_Static(), - ODriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "ADO::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/ado/Awrapado.cxx b/connectivity/source/drivers/ado/Awrapado.cxx index 47886990a6..47886990a6 100644..100755 --- a/connectivity/source/drivers/ado/Awrapado.cxx +++ b/connectivity/source/drivers/ado/Awrapado.cxx diff --git a/connectivity/source/drivers/ado/ado.component b/connectivity/source/drivers/ado/ado.component new file mode 100755 index 0000000000..1962a6b710 --- /dev/null +++ b/connectivity/source/drivers/ado/ado.component @@ -0,0 +1,35 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbc.ado.ODriver"> + <service name="com.sun.star.sdbc.Driver"/> + <service name="com.sun.star.sdbcx.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/ado/ado.xcu b/connectivity/source/drivers/ado/ado.xcu index 3f822de5f7..d7ea2c4d78 100755 --- a/connectivity/source/drivers/ado/ado.xcu +++ b/connectivity/source/drivers/ado/ado.xcu @@ -164,6 +164,11 @@ <value>false</value> </prop> </node> + <node oor:name="TypeInfoSettings" oor:op="replace"> + <prop oor:name="Value" oor:type="oor:string-list"> + <value oor:separator=",">Column(2) = 16,Column(3) = 1</value> + </prop> + </node> </node> <node oor:name="Features"> <node oor:name="UseSQL92NamingConstraints" oor:op="replace"> diff --git a/connectivity/source/drivers/ado/ado.xml b/connectivity/source/drivers/ado/ado.xml index 2be460df8f..2be460df8f 100644..100755 --- a/connectivity/source/drivers/ado/ado.xml +++ b/connectivity/source/drivers/ado/ado.xml diff --git a/connectivity/source/drivers/ado/ado_post_sys_include.h b/connectivity/source/drivers/ado/ado_post_sys_include.h index 459fa29489..459fa29489 100644..100755 --- a/connectivity/source/drivers/ado/ado_post_sys_include.h +++ b/connectivity/source/drivers/ado/ado_post_sys_include.h diff --git a/connectivity/source/drivers/ado/ado_pre_sys_include.h b/connectivity/source/drivers/ado/ado_pre_sys_include.h index b1ac0e3e51..b1ac0e3e51 100644..100755 --- a/connectivity/source/drivers/ado/ado_pre_sys_include.h +++ b/connectivity/source/drivers/ado/ado_pre_sys_include.h diff --git a/connectivity/source/drivers/ado/adoimp.cxx b/connectivity/source/drivers/ado/adoimp.cxx index ad6c2e915e..0cd39004a7 100644..100755 --- a/connectivity/source/drivers/ado/adoimp.cxx +++ b/connectivity/source/drivers/ado/adoimp.cxx @@ -106,7 +106,7 @@ sal_Int32 ADOS::MapADOType2Jdbc(DataTypeEnum eType) case adDBTime: nType = DataType::TIME; break; case adDate: case adDBTimeStamp: nType = DataType::TIMESTAMP; break; - case adBoolean: nType = DataType::BIT; break; + case adBoolean: nType = DataType::BOOLEAN; break; // case adArray: nType = DataType::ARRAY; break; case adBinary: nType = DataType::BINARY; break; case adGUID: nType = DataType::OBJECT; break; @@ -152,6 +152,7 @@ DataTypeEnum ADOS::MapJdbc2ADOType(sal_Int32 _nType,sal_Int32 _nJetEngine) case DataType::DATE: return isJetEngine(_nJetEngine) ? adDate : adDBDate; break; case DataType::TIME: return adDBTime; break; case DataType::TIMESTAMP: return isJetEngine(_nJetEngine) ? adDate : adDBTimeStamp; break; + case DataType::BOOLEAN: case DataType::BIT: return adBoolean; break; case DataType::BINARY: return adBinary; break; case DataType::VARCHAR: return adVarWChar; break; diff --git a/connectivity/source/drivers/ado/exports.dxp b/connectivity/source/drivers/ado/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/ado/exports.dxp +++ b/connectivity/source/drivers/ado/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/ado/makefile.mk b/connectivity/source/drivers/ado/makefile.mk index 77a3147d54..02b72a7e7a 100644..100755 --- a/connectivity/source/drivers/ado/makefile.mk +++ b/connectivity/source/drivers/ado/makefile.mk @@ -110,3 +110,11 @@ dummy: # --- Targets ---------------------------------- .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/ado.component + +$(MISC)/ado.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + ado.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt ado.component diff --git a/connectivity/source/drivers/calc/CCatalog.cxx b/connectivity/source/drivers/calc/CCatalog.cxx index 985a3b21df..985a3b21df 100644..100755 --- a/connectivity/source/drivers/calc/CCatalog.cxx +++ b/connectivity/source/drivers/calc/CCatalog.cxx diff --git a/connectivity/source/drivers/calc/CColumns.cxx b/connectivity/source/drivers/calc/CColumns.cxx index e3d7bcaa44..e3d7bcaa44 100644..100755 --- a/connectivity/source/drivers/calc/CColumns.cxx +++ b/connectivity/source/drivers/calc/CColumns.cxx diff --git a/connectivity/source/drivers/calc/CConnection.cxx b/connectivity/source/drivers/calc/CConnection.cxx index 44f6f89928..44f6f89928 100644..100755 --- a/connectivity/source/drivers/calc/CConnection.cxx +++ b/connectivity/source/drivers/calc/CConnection.cxx diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx index c25d533d57..c25d533d57 100644..100755 --- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx +++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/calc/CDriver.cxx b/connectivity/source/drivers/calc/CDriver.cxx index 4317829cf9..4317829cf9 100644..100755 --- a/connectivity/source/drivers/calc/CDriver.cxx +++ b/connectivity/source/drivers/calc/CDriver.cxx diff --git a/connectivity/source/drivers/calc/CPreparedStatement.cxx b/connectivity/source/drivers/calc/CPreparedStatement.cxx index 13487b5067..13487b5067 100644..100755 --- a/connectivity/source/drivers/calc/CPreparedStatement.cxx +++ b/connectivity/source/drivers/calc/CPreparedStatement.cxx diff --git a/connectivity/source/drivers/calc/CResultSet.cxx b/connectivity/source/drivers/calc/CResultSet.cxx index 4429ec9950..4429ec9950 100644..100755 --- a/connectivity/source/drivers/calc/CResultSet.cxx +++ b/connectivity/source/drivers/calc/CResultSet.cxx diff --git a/connectivity/source/drivers/calc/CStatement.cxx b/connectivity/source/drivers/calc/CStatement.cxx index 9bdc780c82..9bdc780c82 100644..100755 --- a/connectivity/source/drivers/calc/CStatement.cxx +++ b/connectivity/source/drivers/calc/CStatement.cxx diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 12f2cc36c9..64efd5f09e 100644..100755 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -467,8 +467,8 @@ void OCalcTable::fillColumns() String aStrFieldName; aStrFieldName.AssignAscii("Column"); ::rtl::OUString aTypeName; - ::comphelper::UStringMixEqual aCase(m_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers()); - const sal_Bool bStoresMixedCaseQuotedIdentifiers = getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(); + ::comphelper::UStringMixEqual aCase(m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()); + const sal_Bool bStoresMixedCaseQuotedIdentifiers = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); for (sal_Int32 i = 0; i < m_nDataCols; i++) { @@ -826,12 +826,12 @@ sal_Bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols, RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTable::fetchRow" ); // read the bookmark - BOOL bIsCurRecordDeleted = sal_False; + sal_Bool bIsCurRecordDeleted = sal_False; _rRow->setDeleted(bIsCurRecordDeleted); *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return TRUE; + return sal_True; // fields diff --git a/connectivity/source/drivers/calc/CTables.cxx b/connectivity/source/drivers/calc/CTables.cxx index 2cee66ace7..2cee66ace7 100644..100755 --- a/connectivity/source/drivers/calc/CTables.cxx +++ b/connectivity/source/drivers/calc/CTables.cxx diff --git a/connectivity/source/drivers/calc/CalcDriver.xml b/connectivity/source/drivers/calc/CalcDriver.xml index 31a73e8bdd..31a73e8bdd 100644..100755 --- a/connectivity/source/drivers/calc/CalcDriver.xml +++ b/connectivity/source/drivers/calc/CalcDriver.xml diff --git a/connectivity/source/drivers/calc/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx index 6fe2f9b873..25a285d5bd 100644..100755 --- a/connectivity/source/drivers/calc/Cservices.cxx +++ b/connectivity/source/drivers/calc/Cservices.cxx @@ -30,13 +30,11 @@ #include "precompiled_connectivity.hxx" #include "calc/CDriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::calc; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -49,27 +47,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// The prescribed C-Api must be met! -// It consists of three functions, which must be exported by the module. -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -119,31 +96,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - ODriver::getImplementationName_Static(), - ODriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "FILE::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/calc/calc.component b/connectivity/source/drivers/calc/calc.component new file mode 100755 index 0000000000..be949f70de --- /dev/null +++ b/connectivity/source/drivers/calc/calc.component @@ -0,0 +1,35 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbc.calc.ODriver"> + <service name="com.sun.star.sdbc.Driver"/> + <service name="com.sun.star.sdbcx.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/calc/exports.dxp b/connectivity/source/drivers/calc/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/calc/exports.dxp +++ b/connectivity/source/drivers/calc/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/calc/makefile.mk b/connectivity/source/drivers/calc/makefile.mk index 8b5958f307..d36438a277 100644..100755 --- a/connectivity/source/drivers/calc/makefile.mk +++ b/connectivity/source/drivers/calc/makefile.mk @@ -87,3 +87,13 @@ DEF1EXPORTFILE= exports.dxp # --- Targets ---------------------------------- .INCLUDE : $(PRJ)$/target.pmk + + + +ALLTAR : $(MISC)/calc.component + +$(MISC)/calc.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + calc.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt calc.component diff --git a/connectivity/source/drivers/dbase/DCatalog.cxx b/connectivity/source/drivers/dbase/DCatalog.cxx index 3e5f2b8bde..3e5f2b8bde 100644..100755 --- a/connectivity/source/drivers/dbase/DCatalog.cxx +++ b/connectivity/source/drivers/dbase/DCatalog.cxx diff --git a/connectivity/source/drivers/dbase/DCode.cxx b/connectivity/source/drivers/dbase/DCode.cxx index 5ac5414163..9a21d955ae 100644..100755 --- a/connectivity/source/drivers/dbase/DCode.cxx +++ b/connectivity/source/drivers/dbase/DCode.cxx @@ -115,7 +115,7 @@ OEvaluateSet* OFILEOperandAttr::preProcess(OBoolOperator* pOp, OOperand* pRight) if (pIter) { pEvaluateSet = new OEvaluateSet(); - ULONG nRec = pIter->First(); + sal_uIntPtr nRec = pIter->First(); while (nRec != NODE_NOTFOUND) { (*pEvaluateSet)[nRec] = nRec; diff --git a/connectivity/source/drivers/dbase/DColumns.cxx b/connectivity/source/drivers/dbase/DColumns.cxx index 6f2fb95d5b..6f2fb95d5b 100644..100755 --- a/connectivity/source/drivers/dbase/DColumns.cxx +++ b/connectivity/source/drivers/dbase/DColumns.cxx diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx index e2dc2e30b8..e2dc2e30b8 100644..100755 --- a/connectivity/source/drivers/dbase/DConnection.cxx +++ b/connectivity/source/drivers/dbase/DConnection.cxx diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 004875c606..004875c606 100644..100755 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/dbase/DDriver.cxx b/connectivity/source/drivers/dbase/DDriver.cxx index 27b802c53f..27b802c53f 100644..100755 --- a/connectivity/source/drivers/dbase/DDriver.cxx +++ b/connectivity/source/drivers/dbase/DDriver.cxx diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index 14d7f22d45..600a712b01 100644..100755 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -68,7 +68,7 @@ using namespace com::sun::star::lang; IMPLEMENT_SERVICE_INFO(ODbaseIndex,"com.sun.star.sdbcx.driver.dbase.Index","com.sun.star.sdbcx.Index"); // ------------------------------------------------------------------------- -ODbaseIndex::ODbaseIndex(ODbaseTable* _pTable) : OIndex(sal_True/*_pTable->getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers()*/) +ODbaseIndex::ODbaseIndex(ODbaseTable* _pTable) : OIndex(sal_True/*_pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()*/) ,m_pFileStream(NULL) ,m_nCurNode(NODE_NOTFOUND) ,m_pTable(_pTable) @@ -144,7 +144,7 @@ ONDXPagePtr ODbaseIndex::getRoot() { m_nRootPage = m_aHeader.db_rootpage; m_nPageCount = m_aHeader.db_pagecount; - m_aRoot = CreatePage(m_nRootPage,NULL,TRUE); + m_aRoot = CreatePage(m_nRootPage,NULL,sal_True); } return m_aRoot; } @@ -186,7 +186,7 @@ OIndexIterator* ODbaseIndex::createIterator(OBoolOperator* pOp, return new OIndexIterator(this, pOp, pOperand); } //------------------------------------------------------------------ -BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue) +sal_Bool ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValue& rValue) { OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); // Search a specific value in Index @@ -208,13 +208,13 @@ BOOL ODbaseIndex::ConvertToKey(ONDXKey* rKey, sal_uInt32 nRec, const ORowSetValu catch (Exception&) { OSL_ASSERT(0); - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } //------------------------------------------------------------------ -BOOL ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) +sal_Bool ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -225,7 +225,7 @@ BOOL ODbaseIndex::Find(sal_uInt32 nRec, const ORowSetValue& rValue) } //------------------------------------------------------------------ -BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) +sal_Bool ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -234,35 +234,35 @@ BOOL ODbaseIndex::Insert(sal_uInt32 nRec, const ORowSetValue& rValue) // Does the value already exist // Use Find() always to determine the actual leaf if (!ConvertToKey(&aKey, nRec, rValue) || (getRoot()->Find(aKey) && isUnique())) - return FALSE; + return sal_False; ONDXNode aNewNode(aKey); // insert in the current leaf if (!m_aCurLeaf.Is()) - return FALSE; + return sal_False; - BOOL bResult = m_aCurLeaf->Insert(aNewNode); + sal_Bool bResult = m_aCurLeaf->Insert(aNewNode); Release(bResult); return bResult; } //------------------------------------------------------------------ -BOOL ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue, +sal_Bool ODbaseIndex::Update(sal_uInt32 nRec, const ORowSetValue& rOldValue, const ORowSetValue& rNewValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); ONDXKey aKey; if (!ConvertToKey(&aKey, nRec, rNewValue) || (isUnique() && getRoot()->Find(aKey))) - return FALSE; + return sal_False; else return Delete(nRec, rOldValue) && Insert(nRec,rNewValue); } //------------------------------------------------------------------ -BOOL ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) +sal_Bool ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) { openIndexFile(); OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -270,13 +270,13 @@ BOOL ODbaseIndex::Delete(sal_uInt32 nRec, const ORowSetValue& rValue) // Always use Find() to determine the actual leaf ONDXKey aKey; if (!ConvertToKey(&aKey, nRec, rValue) || !getRoot()->Find(aKey)) - return FALSE; + return sal_False; ONDXNode aNewNode(aKey); // insert in the current leaf if (!m_aCurLeaf.Is()) - return FALSE; + return sal_False; #if OSL_DEBUG_LEVEL > 1 m_aRoot->PrintPage(); #endif @@ -290,10 +290,10 @@ void ODbaseIndex::Collect(ONDXPage* pPage) m_aCollector.push_back(pPage); } //------------------------------------------------------------------ -void ODbaseIndex::Release(BOOL bSave) +void ODbaseIndex::Release(sal_Bool bSave) { // Release the Index-recources - m_bUseCollector = FALSE; + m_bUseCollector = sal_False; if (m_aCurLeaf.Is()) { @@ -308,7 +308,7 @@ void ODbaseIndex::Release(BOOL bSave) m_aRoot.Clear(); } // Release all references, before the FileStream will be closed - for (ULONG i = 0; i < m_aCollector.size(); i++) + for (sal_uIntPtr i = 0; i < m_aCollector.size(); i++) m_aCollector[i]->QueryDelete(); m_aCollector.clear(); @@ -336,7 +336,7 @@ void ODbaseIndex::closeImpl() } } //------------------------------------------------------------------ -ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, BOOL bLoad) +ONDXPage* ODbaseIndex::CreatePage(sal_uInt32 nPagePos, ONDXPage* pParent, sal_Bool bLoad) { OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); @@ -401,14 +401,14 @@ void ODbaseIndex::createINFEntry() Config aInfFile(sPhysicalPath); aInfFile.SetGroup(dBASE_III_GROUP); - USHORT nSuffix = aInfFile.GetKeyCount(); + sal_uInt16 nSuffix = aInfFile.GetKeyCount(); ByteString aNewEntry,aKeyName; - BOOL bCase = isCaseSensitive(); + sal_Bool bCase = isCaseSensitive(); while (!aNewEntry.Len()) { aNewEntry = "NDX"; aNewEntry += ByteString::CreateFromInt32(++nSuffix); - for (USHORT i = 0; i < aInfFile.GetKeyCount(); i++) + for (sal_uInt16 i = 0; i < aInfFile.GetKeyCount(); i++) { aKeyName = aInfFile.GetKeyName(i); if (bCase ? aKeyName == aNewEntry : aKeyName.EqualsIgnoreCaseAscii(aNewEntry)) @@ -421,7 +421,7 @@ void ODbaseIndex::createINFEntry() aInfFile.WriteKey(aNewEntry,ByteString(sEntry,m_pTable->getConnection()->getTextEncoding())); } // ------------------------------------------------------------------------- -BOOL ODbaseIndex::DropImpl() +sal_Bool ODbaseIndex::DropImpl() { closeImpl(); @@ -444,13 +444,13 @@ BOOL ODbaseIndex::DropImpl() Config aInfFile(sPhysicalPath); aInfFile.SetGroup(dBASE_III_GROUP); - USHORT nKeyCnt = aInfFile.GetKeyCount(); + sal_uInt16 nKeyCnt = aInfFile.GetKeyCount(); ByteString aKeyName; String sEntry = m_Name; sEntry += String::CreateFromAscii(".ndx"); // delete entries from the inf file - for (USHORT nKey = 0; nKey < nKeyCnt; nKey++) + for (sal_uInt16 nKey = 0; nKey < nKeyCnt; nKey++) { // References the Key to an Index-file? aKeyName = aInfFile.GetKeyName( nKey ); @@ -463,7 +463,7 @@ BOOL ODbaseIndex::DropImpl() } } } - return TRUE; + return sal_True; } // ------------------------------------------------------------------------- void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const ::rtl::OUString& _sFile) @@ -474,7 +474,7 @@ void ODbaseIndex::impl_killFileAndthrowError_throw(sal_uInt16 _nErrorId,const :: m_pTable->getConnection()->throwGenericSQLException(_nErrorId,*this); } //------------------------------------------------------------------ -BOOL ODbaseIndex::CreateImpl() +sal_Bool ODbaseIndex::CreateImpl() { // Create the Index const ::rtl::OUString sFile = getCompletePath(); @@ -556,7 +556,7 @@ BOOL ODbaseIndex::CreateImpl() xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType; m_aHeader.db_keytype = (nType == DataType::VARCHAR || nType == DataType::CHAR) ? 0 : 1; - m_aHeader.db_keylen = (m_aHeader.db_keytype) ? 8 : (USHORT)getINT32(xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))); + m_aHeader.db_keylen = (m_aHeader.db_keytype) ? 8 : (sal_uInt16)getINT32(xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION))); m_aHeader.db_keylen = (( m_aHeader.db_keylen - 1) / 4 + 1) * 4; m_aHeader.db_maxkeys = (PAGE_SIZE - 4) / (8 + m_aHeader.db_keylen); if ( m_aHeader.db_maxkeys < 3 ) @@ -567,7 +567,7 @@ BOOL ODbaseIndex::CreateImpl() m_pFileStream->SetStreamSize(PAGE_SIZE); ByteString aCol(aName,m_pTable->getConnection()->getTextEncoding()); - strncpy(m_aHeader.db_name,aCol.GetBuffer(),std::min((USHORT)sizeof(m_aHeader.db_name), aCol.Len())); + strncpy(m_aHeader.db_name,aCol.GetBuffer(),std::min((sal_uInt16)sizeof(m_aHeader.db_name), aCol.Len())); m_aHeader.db_unique = m_IsUnique ? 1: 0; m_aHeader.db_keyrec = m_aHeader.db_keylen + 8; @@ -577,9 +577,9 @@ BOOL ODbaseIndex::CreateImpl() m_nPageCount = 2; m_aCurLeaf = m_aRoot = CreatePage(m_nRootPage); - m_aRoot->SetModified(TRUE); + m_aRoot->SetModified(sal_True); - m_bUseCollector = TRUE; + m_bUseCollector = sal_True; sal_Int32 nRowsLeft = 0; Reference<XRow> xRow(xSet,UNO_QUERY); diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx b/connectivity/source/drivers/dbase/DIndexColumns.cxx index b10780bfc6..b2f22c7e96 100644..100755 --- a/connectivity/source/drivers/dbase/DIndexColumns.cxx +++ b/connectivity/source/drivers/dbase/DIndexColumns.cxx @@ -70,7 +70,7 @@ sdbcx::ObjectType ODbaseIndexColumns::createObject(const ::rtl::OUString& _rName ,sal_False ,sal_False ,sal_False - ,pTable->getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers()); + ,pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()); return xRet; } @@ -83,7 +83,7 @@ void ODbaseIndexColumns::impl_refresh() throw(RuntimeException) // ------------------------------------------------------------------------- Reference< XPropertySet > ODbaseIndexColumns::createDescriptor() { - return new sdbcx::OIndexColumn(m_pIndex->getTable()->getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers()); + return new sdbcx::OIndexColumn(m_pIndex->getTable()->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()); } // ------------------------------------------------------------------------- sdbcx::ObjectType ODbaseIndexColumns::appendObject( const ::rtl::OUString& /*_rForName*/, const Reference< XPropertySet >& descriptor ) diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx index e6ec2edba4..ed3020ba12 100644..100755 --- a/connectivity/source/drivers/dbase/DIndexIter.cxx +++ b/connectivity/source/drivers/dbase/DIndexIter.cxx @@ -46,20 +46,20 @@ OIndexIterator::~OIndexIterator() } //------------------------------------------------------------------ -ULONG OIndexIterator::First() +sal_uIntPtr OIndexIterator::First() { - return Find(TRUE); + return Find(sal_True); } //------------------------------------------------------------------ -ULONG OIndexIterator::Next() +sal_uIntPtr OIndexIterator::Next() { - return Find(FALSE); + return Find(sal_False); } //------------------------------------------------------------------ -ULONG OIndexIterator::Find(BOOL bFirst) +sal_uIntPtr OIndexIterator::Find(sal_Bool bFirst) { - ULONG nRes = STRING_NOTFOUND; + sal_uIntPtr nRes = STRING_NOTFOUND; if (bFirst) { @@ -103,7 +103,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey) // '<='-condition are saved. this is considered for inserts. // ONDXIndex* m_pIndex = GetNDXIndex(); OOp_COMPARE aTempOp(SQLFilterOperator::GREATER); - USHORT i = 0; + sal_uInt16 i = 0; if (pPage->IsLeaf()) { @@ -141,7 +141,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey) } //------------------------------------------------------------------ -ULONG OIndexIterator::GetCompare(BOOL bFirst) +sal_uIntPtr OIndexIterator::GetCompare(sal_Bool bFirst) { ONDXKey* pKey = NULL; sal_Int32 ePredicateType = PTR_CAST(file::OOp_COMPARE,m_pOperator)->getPredicateType(); @@ -211,7 +211,7 @@ ULONG OIndexIterator::GetCompare(BOOL bFirst) } //------------------------------------------------------------------ -ULONG OIndexIterator::GetLike(BOOL bFirst) +sal_uIntPtr OIndexIterator::GetLike(sal_Bool bFirst) { if (bFirst) { @@ -231,7 +231,7 @@ ULONG OIndexIterator::GetLike(BOOL bFirst) } //------------------------------------------------------------------ -ULONG OIndexIterator::GetNull(BOOL bFirst) +sal_uIntPtr OIndexIterator::GetNull(sal_Bool bFirst) { if (bFirst) { @@ -253,15 +253,15 @@ ULONG OIndexIterator::GetNull(BOOL bFirst) } //------------------------------------------------------------------ -ULONG OIndexIterator::GetNotNull(BOOL bFirst) +sal_uIntPtr OIndexIterator::GetNotNull(sal_Bool bFirst) { ONDXKey* pKey; if (bFirst) { // erst alle NULL werte abklappern - for (ULONG nRec = GetNull(bFirst); + for (sal_uIntPtr nRec = GetNull(bFirst); nRec != STRING_NOTFOUND; - nRec = GetNull(FALSE)) + nRec = GetNull(sal_False)) ; pKey = m_aCurLeaf.Is() ? &(*m_aCurLeaf)[m_nCurNode].GetKey() : NULL; } @@ -283,7 +283,7 @@ ONDXKey* OIndexIterator::GetNextKey() ONDXPage* pParentPage = pPage->GetParent(); if (pParentPage) { - USHORT nPos = pParentPage->Search(pPage); + sal_uInt16 nPos = pParentPage->Search(pPage); if (nPos != pParentPage->Count() - 1) { // page found pPage = (*pParentPage)[nPos+1].GetChild(m_pIndex,pParentPage); diff --git a/connectivity/source/drivers/dbase/DIndexes.cxx b/connectivity/source/drivers/dbase/DIndexes.cxx index b5be60ff22..b5be60ff22 100644..100755 --- a/connectivity/source/drivers/dbase/DIndexes.cxx +++ b/connectivity/source/drivers/dbase/DIndexes.cxx diff --git a/connectivity/source/drivers/dbase/DNoException.cxx b/connectivity/source/drivers/dbase/DNoException.cxx index 95bc3f756b..242627d1ee 100644..100755 --- a/connectivity/source/drivers/dbase/DNoException.cxx +++ b/connectivity/source/drivers/dbase/DNoException.cxx @@ -91,7 +91,7 @@ sal_Bool ODbaseTable::seekRow(IResultSetHelper::Movement eCursorPosition, sal_In OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position"); sal_Int32 nPos = m_aHeader.db_kopf + (sal_Int32)(m_nFilePos-1) * nEntryLen; - ULONG nLen = m_pFileStream->Seek(nPos); + sal_uIntPtr nLen = m_pFileStream->Seek(nPos); if (m_pFileStream->GetError() != ERRCODE_NONE) goto Error; @@ -127,10 +127,10 @@ End: return sal_True; } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) +sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemo" ); - BOOL bIsText = TRUE; + bool bIsText = true; m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size); switch (m_aMemoHeader.db_typ) @@ -141,13 +141,13 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) ByteString aBStr; static char aBuf[514]; aBuf[512] = 0; // to prevent a random value - BOOL bReady = sal_False; + bool bReady = false; do { m_pMemoStream->Read(&aBuf,512); - USHORT i = 0; + sal_uInt16 i = 0; while (aBuf[i] != cEOF && ++i < 512) ; bReady = aBuf[i] == cEOF; @@ -169,14 +169,14 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) // Foxpro stores text and binary data if (m_aMemoHeader.db_typ == MemoFoxPro) { - if (((BYTE)sHeader[0]) != 0 || ((BYTE)sHeader[1]) != 0 || ((BYTE)sHeader[2]) != 0) + if (((sal_uInt8)sHeader[0]) != 0 || ((sal_uInt8)sHeader[1]) != 0 || ((sal_uInt8)sHeader[2]) != 0) { return sal_False; } bIsText = sHeader[3] != 0; } - else if (((BYTE)sHeader[0]) != 0xFF || ((BYTE)sHeader[1]) != 0xFF || ((BYTE)sHeader[2]) != 0x08) + else if (((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08) { return sal_False; } @@ -215,7 +215,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) void ODbaseTable::AllocBuffer() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::AllocBuffer" ); - UINT16 nSize = m_aHeader.db_slng; + sal_uInt16 nSize = m_aHeader.db_slng; OSL_ENSURE(nSize > 0, "Size too small"); if (m_nBufferSize != nSize) @@ -228,11 +228,11 @@ void ODbaseTable::AllocBuffer() if (m_pBuffer == NULL && nSize) { m_nBufferSize = nSize; - m_pBuffer = new BYTE[m_nBufferSize+1]; + m_pBuffer = new sal_uInt8[m_nBufferSize+1]; } } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::WriteBuffer() +sal_Bool ODbaseTable::WriteBuffer() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::WriteBuffer" ); OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position"); @@ -268,7 +268,7 @@ void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex) else { ByteString aBuf; - USHORT nLen = rIndex.getHeader().db_keylen; + sal_uInt16 nLen = rIndex.getHeader().db_keylen; char* pStr = aBuf.AllocBuffer(nLen+1); rStream.Read(pStr,nLen); @@ -301,7 +301,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const if (aKey.getValue().isNull()) { memset(aNodeData.aData,0,rIndex.getHeader().db_keylen); - rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen); + rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen); } else rStream << (double) aKey.getValue(); @@ -315,7 +315,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const ByteString aText(sValue.getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()); strncpy(aNodeData.aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, aText.Len())); } - rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen); + rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen); } rStream << aChild; } @@ -336,7 +336,7 @@ ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent) // ONDXKey //================================================================== //------------------------------------------------------------------ -BOOL ONDXKey::IsText(sal_Int32 eType) +sal_Bool ONDXKey::IsText(sal_Int32 eType) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXKey::IsText" ); return eType == DataType::VARCHAR || eType == DataType::CHAR; @@ -364,7 +364,7 @@ StringCompare ONDXKey::Compare(const ONDXKey& rKey) const } else if (IsText(getDBType())) { - INT32 nRes = getValue().getString().compareTo(rKey.getValue()); + sal_Int32 nRes = getValue().getString().compareTo(rKey.getValue()); eResult = (nRes > 0) ? COMPARE_GREATER : (nRes == 0) ? COMPARE_EQUAL : COMPARE_LESS; } else @@ -441,15 +441,15 @@ ONDXPagePtr& ONDXPagePtr::operator= (ONDXPage* pRef) return *this; } // ----------------------------------------------------------------------------- -static UINT32 nValue; +static sal_uInt32 nValue; //------------------------------------------------------------------ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) { rStream.Seek(rPage.GetPagePos() * 512); rStream >> nValue >> rPage.aChild; - rPage.nCount = USHORT(nValue); + rPage.nCount = sal_uInt16(nValue); - for (USHORT i = 0; i < rPage.nCount; i++) + for (sal_uInt16 i = 0; i < rPage.nCount; i++) rPage[i].Read(rStream, rPage.GetIndex()); return rStream; } @@ -458,7 +458,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& rPage) { // Page does not yet exist - ULONG nSize = (rPage.GetPagePos() + 1) * 512; + sal_uIntPtr nSize = (rPage.GetPagePos() + 1) * 512; if (nSize > rStream.Seek(STREAM_SEEK_TO_END)) { rStream.SetStreamSize(nSize); @@ -466,27 +466,27 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r char aEmptyData[512]; memset(aEmptyData,0x00,512); - rStream.Write((BYTE*)aEmptyData,512); + rStream.Write((sal_uInt8*)aEmptyData,512); } - ULONG nCurrentPos = rStream.Seek(rPage.GetPagePos() * 512); + sal_uIntPtr nCurrentPos = rStream.Seek(rPage.GetPagePos() * 512); OSL_UNUSED( nCurrentPos ); nValue = rPage.nCount; rStream << nValue << rPage.aChild; - USHORT i = 0; + sal_uInt16 i = 0; for (; i < rPage.nCount; i++) rPage[i].Write(rStream, rPage); // check if we have to fill the stream with '\0' if(i < rPage.rIndex.getHeader().db_maxkeys) { - ULONG nTell = rStream.Tell() % 512; - USHORT nBufferSize = rStream.GetBufferSize(); - ULONG nSize = nBufferSize - nTell; + sal_uIntPtr nTell = rStream.Tell() % 512; + sal_uInt16 nBufferSize = rStream.GetBufferSize(); + sal_uIntPtr nSize = nBufferSize - nTell; char* pEmptyData = new char[nSize]; memset(pEmptyData,0x00,nSize); - rStream.Write((BYTE*)pEmptyData,nSize); + rStream.Write((sal_uInt8*)pEmptyData,nSize); rStream.Seek(nTell); delete [] pEmptyData; } @@ -501,7 +501,7 @@ void ONDXPage::PrintPage() DBG_TRACE4("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----", nPagePos, HasParent() ? aParent->GetPagePos() : 0 ,nCount, aChild.GetPagePos()); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { ONDXNode rNode = (*this)[i]; ONDXKey& rKey = rNode.GetKey(); @@ -526,7 +526,7 @@ void ONDXPage::PrintPage() { #if OSL_DEBUG_LEVEL > 1 GetChild(&rIndex)->PrintPage(); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { ONDXNode rNode = (*this)[i]; rNode.GetChild(&rIndex,this)->PrintPage(); @@ -537,18 +537,18 @@ void ONDXPage::PrintPage() } #endif // ----------------------------------------------------------------------------- -BOOL ONDXPage::IsFull() const +sal_Bool ONDXPage::IsFull() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::IsFull" ); return Count() == rIndex.getHeader().db_maxkeys; } // ----------------------------------------------------------------------------- //------------------------------------------------------------------ -USHORT ONDXPage::Search(const ONDXKey& rSearch) +sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::Search" ); // binary search afterwards - USHORT i = 0xFFFF; + sal_uInt16 i = 0xFFFF; while (++i < Count()) if ((*this)[i].GetKey() == rSearch) break; @@ -557,10 +557,10 @@ USHORT ONDXPage::Search(const ONDXKey& rSearch) } //------------------------------------------------------------------ -USHORT ONDXPage::Search(const ONDXPage* pPage) +sal_uInt16 ONDXPage::Search(const ONDXPage* pPage) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::Search" ); - USHORT i = 0xFFFF; + sal_uInt16 i = 0xFFFF; while (++i < Count()) if (((*this)[i]).GetChild() == pPage) break; @@ -577,7 +577,7 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, OSL_ENSURE(rSearch != rReplace,"Invalid here:rSearch == rReplace"); if (rSearch != rReplace) { - USHORT nPos = NODE_NOTFOUND; + sal_uInt16 nPos = NODE_NOTFOUND; ONDXPage* pPage = this; while (pPage && (nPos = pPage->Search(rSearch)) == NODE_NOTFOUND) @@ -586,34 +586,34 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, if (pPage) { (*pPage)[nPos].GetKey() = rReplace; - pPage->SetModified(TRUE); + pPage->SetModified(sal_True); } } } // ----------------------------------------------------------------------------- -ONDXNode& ONDXPage::operator[] (USHORT nPos) +ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } //------------------------------------------------------------------ -const ONDXNode& ONDXPage::operator[] (USHORT nPos) const +const ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) const { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } // ----------------------------------------------------------------------------- -void ONDXPage::Remove(USHORT nPos) +void ONDXPage::Remove(sal_uInt16 nPos) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ONDXPage::Remove" ); DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); - for (USHORT i = nPos; i < (nCount-1); i++) + for (sal_uInt16 i = nPos; i < (nCount-1); i++) (*this)[i] = (*this)[i+1]; nCount--; - bModified = TRUE; + bModified = sal_True; } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/dbase/DPreparedStatement.cxx b/connectivity/source/drivers/dbase/DPreparedStatement.cxx index 67f7c36941..67f7c36941 100644..100755 --- a/connectivity/source/drivers/dbase/DPreparedStatement.cxx +++ b/connectivity/source/drivers/dbase/DPreparedStatement.cxx diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx index d055bdb6b3..d055bdb6b3 100644..100755 --- a/connectivity/source/drivers/dbase/DResultSet.cxx +++ b/connectivity/source/drivers/dbase/DResultSet.cxx diff --git a/connectivity/source/drivers/dbase/DStatement.cxx b/connectivity/source/drivers/dbase/DStatement.cxx index 9e0e5ddfc8..9e0e5ddfc8 100644..100755 --- a/connectivity/source/drivers/dbase/DStatement.cxx +++ b/connectivity/source/drivers/dbase/DStatement.cxx diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index aa94c520d4..23dd195304 100644..100755 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -208,12 +208,12 @@ void ODbaseTable::readHeader() m_pFileStream->RefreshBuffer(); // Make sure, that the header information actually is read again m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN); - BYTE nType=0; + sal_uInt8 nType=0; (*m_pFileStream) >> nType; if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); - m_pFileStream->Read((char*)(&m_aHeader.db_aedat), 3*sizeof(BYTE)); + m_pFileStream->Read((char*)(&m_aHeader.db_aedat), 3*sizeof(sal_uInt8)); if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); (*m_pFileStream) >> m_aHeader.db_anz; @@ -225,7 +225,7 @@ void ODbaseTable::readHeader() (*m_pFileStream) >> m_aHeader.db_slng; if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); - m_pFileStream->Read((char*)(&m_aHeader.db_frei), 20*sizeof(BYTE)); + m_pFileStream->Read((char*)(&m_aHeader.db_frei), 20*sizeof(sal_uInt8)); if(ERRCODE_NONE != m_pFileStream->GetErrorCode()) throwInvalidDbaseFormat(); @@ -319,7 +319,7 @@ void ODbaseTable::fillColumns() aStrFieldName.AssignAscii("Column"); ::rtl::OUString aTypeName; static const ::rtl::OUString sVARCHAR(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); - const sal_Bool bCase = getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(); + const sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); const bool bFoxPro = m_aHeader.db_typ == VisualFoxPro || m_aHeader.db_typ == VisualFoxProAuto || m_aHeader.db_typ == FoxProMemo; sal_Int32 i = 0; @@ -528,7 +528,7 @@ void ODbaseTable::construct() } fillColumns(); - UINT32 nFileSize = lcl_getFileSize(*m_pFileStream); + sal_uInt32 nFileSize = lcl_getFileSize(*m_pFileStream); m_pFileStream->Seek(STREAM_SEEK_TO_BEGIN); if ( m_aHeader.db_anz == 0 && ((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng) > 0) // seems to be empty or someone wrote bullshit into the dbase file m_aHeader.db_anz = ((nFileSize-m_aHeader.db_kopf)/m_aHeader.db_slng); @@ -556,7 +556,7 @@ void ODbaseTable::construct() } } //------------------------------------------------------------------ -BOOL ODbaseTable::ReadMemoHeader() +sal_Bool ODbaseTable::ReadMemoHeader() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemoHeader" ); m_pMemoStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); @@ -580,7 +580,7 @@ BOOL ODbaseTable::ReadMemoHeader() m_pMemoStream->Seek(m_aMemoHeader.db_size); m_pMemoStream->Read(sHeader,4); - if ((m_pMemoStream->GetErrorCode() != ERRCODE_NONE) || ((BYTE)sHeader[0]) != 0xFF || ((BYTE)sHeader[1]) != 0xFF || ((BYTE)sHeader[2]) != 0x08) + if ((m_pMemoStream->GetErrorCode() != ERRCODE_NONE) || ((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08) m_aMemoHeader.db_typ = MemodBaseIII; else m_aMemoHeader.db_typ = MemodBaseIV; @@ -603,7 +603,7 @@ BOOL ODbaseTable::ReadMemoHeader() OSL_ENSURE( false, "ODbaseTable::ReadMemoHeader: unsupported memo type!" ); break; } - return TRUE; + return sal_True; } // ------------------------------------------------------------------------- String ODbaseTable::getEntry(OConnection* _pConnection,const ::rtl::OUString& _sName ) @@ -679,11 +679,11 @@ void ODbaseTable::refreshIndexes() aURL.setExtension(String::CreateFromAscii("inf")); Config aInfFile(aURL.getFSysPath(INetURLObject::FSYS_DETECT)); aInfFile.SetGroup(dBASE_III_GROUP); - USHORT nKeyCnt = aInfFile.GetKeyCount(); + sal_uInt16 nKeyCnt = aInfFile.GetKeyCount(); ByteString aKeyName; ByteString aIndexName; - for (USHORT nKey = 0; nKey < nKeyCnt; nKey++) + for (sal_uInt16 nKey = 0; nKey < nKeyCnt; nKey++) { // Refences the key an index-file? aKeyName = aInfFile.GetKeyName( nKey ); @@ -786,7 +786,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::fetchRow" ); // Read the data - BOOL bIsCurRecordDeleted = ((char)m_pBuffer[0] == '*') ? TRUE : sal_False; + bool bIsCurRecordDeleted = (char)m_pBuffer[0] == '*'; // only read the bookmark @@ -795,7 +795,7 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return TRUE; + return sal_True; sal_Size nByteOffset = 1; // Fields: @@ -968,13 +968,13 @@ sal_Bool ODbaseTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols, s break; case DataType::BIT: { - BOOL b; + sal_Bool b; switch (* ((const char *)pData)) { case 'T': case 'Y': - case 'J': b = TRUE; break; - default: b = FALSE; break; + case 'J': b = sal_True; break; + default: b = sal_False; break; } *(_rRow->get())[i] = b; } @@ -1019,7 +1019,7 @@ void ODbaseTable::FileClose() ODbaseTable_BASE::FileClose(); } // ------------------------------------------------------------------------- -BOOL ODbaseTable::CreateImpl() +sal_Bool ODbaseTable::CreateImpl() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::CreateImpl" ); OSL_ENSURE(!m_pFileStream, "SequenceError"); @@ -1068,7 +1068,7 @@ BOOL ODbaseTable::CreateImpl() { } - BOOL bMemoFile = sal_False; + sal_Bool bMemoFile = sal_False; sal_Bool bOk = CreateFile(aURL, bMemoFile); @@ -1131,7 +1131,7 @@ BOOL ODbaseTable::CreateImpl() else m_aHeader.db_typ = dBaseIII; - return TRUE; + return sal_True; } // ----------------------------------------------------------------------------- void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const ::rtl::OUString& _sColumnName) @@ -1154,7 +1154,7 @@ void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const ::rtl: } //------------------------------------------------------------------ // creates in principle dBase IV file format -BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) +sal_Bool ODbaseTable::CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::CreateFile" ); bCreateMemo = sal_False; @@ -1165,7 +1165,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) if (!m_pFileStream) return sal_False; - BYTE nDbaseType = dBaseIII; + sal_uInt8 nDbaseType = dBaseIII; Reference<XIndexAccess> xColumns(getColumns(),UNO_QUERY); Reference<XPropertySet> xCol; const ::rtl::OUString sPropType = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE); @@ -1207,19 +1207,19 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) memset(aBuffer,0,sizeof(aBuffer)); m_pFileStream->Seek(0L); - (*m_pFileStream) << (BYTE) nDbaseType; // dBase format - (*m_pFileStream) << (BYTE) (aDate.GetYear() % 100); // current date + (*m_pFileStream) << (sal_uInt8) nDbaseType; // dBase format + (*m_pFileStream) << (sal_uInt8) (aDate.GetYear() % 100); // current date - (*m_pFileStream) << (BYTE) aDate.GetMonth(); - (*m_pFileStream) << (BYTE) aDate.GetDay(); + (*m_pFileStream) << (sal_uInt8) aDate.GetMonth(); + (*m_pFileStream) << (sal_uInt8) aDate.GetDay(); (*m_pFileStream) << 0L; // number of data records - (*m_pFileStream) << (USHORT)((m_pColumns->getCount()+1) * 32 + 1); // header information, + (*m_pFileStream) << (sal_uInt16)((m_pColumns->getCount()+1) * 32 + 1); // header information, // pColumns contains always an additional column - (*m_pFileStream) << (USHORT) 0; // record length will be determined later + (*m_pFileStream) << (sal_uInt16) 0; // record length will be determined later m_pFileStream->Write(aBuffer, 20); - USHORT nRecLength = 1; // Length 1 for deleted flag + sal_uInt16 nRecLength = 1; // Length 1 for deleted flag sal_Int32 nMaxFieldLength = m_pConnection->getMetaData()->getMaxColumnNameLength(); ::rtl::OUString aName; const ::rtl::OUString sPropName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME); @@ -1312,9 +1312,9 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) { throwInvalidColumnType(STR_INVALID_COLUMN_PRECISION, aName); } - (*m_pFileStream) << (BYTE) Min((unsigned)nPrecision, 255U); // field length - nRecLength = nRecLength + (USHORT)::std::min((USHORT)nPrecision, (USHORT)255UL); - (*m_pFileStream) << (BYTE)0; // decimals + (*m_pFileStream) << (sal_uInt8) Min((unsigned)nPrecision, 255U); // field length + nRecLength = nRecLength + (sal_uInt16)::std::min((sal_uInt16)nPrecision, (sal_uInt16)255UL); + (*m_pFileStream) << (sal_uInt8)0; // decimals break; case 'F': case 'N': @@ -1326,41 +1326,41 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) } if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency will be treated separately { - (*m_pFileStream) << (BYTE)10; // standard length - (*m_pFileStream) << (BYTE)4; + (*m_pFileStream) << (sal_uInt8)10; // standard length + (*m_pFileStream) << (sal_uInt8)4; nRecLength += 10; } else { sal_Int32 nPrec = SvDbaseConverter::ConvertPrecisionToDbase(nPrecision,nScale); - (*m_pFileStream) << (BYTE)( nPrec); - (*m_pFileStream) << (BYTE)nScale; - nRecLength += (USHORT)nPrec; + (*m_pFileStream) << (sal_uInt8)( nPrec); + (*m_pFileStream) << (sal_uInt8)nScale; + nRecLength += (sal_uInt16)nPrec; } break; case 'L': - (*m_pFileStream) << (BYTE)1; - (*m_pFileStream) << (BYTE)0; + (*m_pFileStream) << (sal_uInt8)1; + (*m_pFileStream) << (sal_uInt8)0; ++nRecLength; break; case 'I': - (*m_pFileStream) << (BYTE)4; - (*m_pFileStream) << (BYTE)0; + (*m_pFileStream) << (sal_uInt8)4; + (*m_pFileStream) << (sal_uInt8)0; nRecLength += 4; break; case 'Y': case 'B': case 'T': case 'D': - (*m_pFileStream) << (BYTE)8; - (*m_pFileStream) << (BYTE)0; + (*m_pFileStream) << (sal_uInt8)8; + (*m_pFileStream) << (sal_uInt8)0; nRecLength += 8; break; case 'M': - bCreateMemo = TRUE; - (*m_pFileStream) << (BYTE)10; - (*m_pFileStream) << (BYTE)0; + bCreateMemo = sal_True; + (*m_pFileStream) << (sal_uInt8)10; + (*m_pFileStream) << (sal_uInt8)0; nRecLength += 10; if ( bBinary ) aBuffer[0] = 0x06; @@ -1372,7 +1372,7 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) aBuffer[0] = 0x00; } - (*m_pFileStream) << (BYTE)FIELD_DESCRIPTOR_TERMINATOR; // end of header + (*m_pFileStream) << (sal_uInt8)FIELD_DESCRIPTOR_TERMINATOR; // end of header (*m_pFileStream) << (char)DBF_EOL; m_pFileStream->Seek(10L); (*m_pFileStream) << nRecLength; // set record length afterwards @@ -1381,9 +1381,9 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) { m_pFileStream->Seek(0L); if (nDbaseType == VisualFoxPro) - (*m_pFileStream) << (BYTE) FoxProMemo; + (*m_pFileStream) << (sal_uInt8) FoxProMemo; else - (*m_pFileStream) << (BYTE) dBaseIIIMemo; + (*m_pFileStream) << (sal_uInt8) dBaseIIIMemo; } // if (bCreateMemo) } catch ( const Exception& e ) @@ -1398,12 +1398,12 @@ BOOL ODbaseTable::CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo) catch(const Exception&) { } throw; } - return TRUE; + return sal_True; } //------------------------------------------------------------------ // creates in principle dBase III file format -BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile) +sal_Bool ODbaseTable::CreateMemoFile(const INetURLObject& aFile) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::CreateMemoFile" ); // filehandling macro for table creation @@ -1415,16 +1415,8 @@ BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile) char aBuffer[512]; // write buffer memset(aBuffer,0,sizeof(aBuffer)); -#ifdef WIN - m_pMemoStream->Seek(0L); - for (UINT16 i = 0; i < 512; i++) - { - (*m_pMemoStream) << BYTE(0); - } -#else m_pMemoStream->SetFiller('\0'); m_pMemoStream->SetStreamSize(512); -#endif m_pMemoStream->Seek(0L); (*m_pMemoStream) << long(1); // pointer to the first free block @@ -1432,16 +1424,16 @@ BOOL ODbaseTable::CreateMemoFile(const INetURLObject& aFile) m_pMemoStream->Flush(); delete m_pMemoStream; m_pMemoStream = NULL; - return TRUE; + return sal_True; } //------------------------------------------------------------------ -BOOL ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,OCollection* _pIndexes ) +sal_Bool ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFields,OCollection* _pIndexes ) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::Drop_Static" ); INetURLObject aURL; aURL.SetURL(_sUrl); - BOOL bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE)); + sal_Bool bDropped = ::utl::UCBContentHelper::Kill(aURL.GetMainURL(INetURLObject::NO_DECODE)); if(bDropped) { @@ -1484,7 +1476,7 @@ BOOL ODbaseTable::Drop_Static(const ::rtl::OUString& _sUrl,sal_Bool _bHasMemoFie return bDropped; } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::DropImpl() +sal_Bool ODbaseTable::DropImpl() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::DropImpl" ); FileClose(); @@ -1492,7 +1484,7 @@ BOOL ODbaseTable::DropImpl() if(!m_pIndexes) refreshIndexes(); // look for indexes which must be deleted as well - BOOL bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_pIndexes); + sal_Bool bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_pIndexes); if(!bDropped) {// we couldn't drop the table so we have to reopen it construct(); @@ -1503,7 +1495,7 @@ BOOL ODbaseTable::DropImpl() } //------------------------------------------------------------------ -BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<XIndexAccess>& _xCols) +sal_Bool ODbaseTable::InsertRow(OValueRefVector& rRow, sal_Bool bFlush,const Reference<XIndexAccess>& _xCols) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::InsertRow" ); // fill buffer with blanks @@ -1513,13 +1505,13 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X // Copy new row completely: // ... and add at the end as new Record: - UINT32 nTempPos = m_nFilePos; + sal_uInt32 nTempPos = m_nFilePos; - m_nFilePos = (ULONG)m_aHeader.db_anz + 1; - BOOL bInsertRow = UpdateBuffer( rRow, NULL, _xCols ); + m_nFilePos = (sal_uIntPtr)m_aHeader.db_anz + 1; + sal_Bool bInsertRow = UpdateBuffer( rRow, NULL, _xCols ); if ( bInsertRow ) { - UINT32 nFileSize = 0, nMemoFileSize = 0; + sal_uInt32 nFileSize = 0, nMemoFileSize = 0; nFileSize = lcl_getFileSize(*m_pFileStream); @@ -1561,7 +1553,7 @@ BOOL ODbaseTable::InsertRow(OValueRefVector& rRow, BOOL bFlush,const Reference<X } //------------------------------------------------------------------ -BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const Reference<XIndexAccess>& _xCols) +sal_Bool ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const Reference<XIndexAccess>& _xCols) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::UpdateRow" ); // fill buffer with blanks @@ -1572,7 +1564,7 @@ BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const R m_pFileStream->Seek(nPos); m_pFileStream->Read((char*)m_pBuffer, m_aHeader.db_slng); - UINT32 nMemoFileSize( 0 ); + sal_uInt32 nMemoFileSize( 0 ); if (HasMemoFields() && m_pMemoStream) { m_pMemoStream->Seek(STREAM_SEEK_TO_END); @@ -1591,7 +1583,7 @@ BOOL ODbaseTable::UpdateRow(OValueRefVector& rRow, OValueRefRow& pOrgRow,const R } //------------------------------------------------------------------ -BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols) +sal_Bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::DeleteRow" ); // Set the Delete-Flag (be it set or not): @@ -1601,13 +1593,13 @@ BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols) OValueRefRow aRow = new OValueRefVector(_rCols.get().size()); - if (!fetchRow(aRow,_rCols,TRUE,TRUE)) + if (!fetchRow(aRow,_rCols,sal_True,sal_True)) return sal_False; Reference<XPropertySet> xCol; ::rtl::OUString aColName; ::comphelper::UStringMixEqual aCase(isCaseSensitive()); - for (USHORT i = 0; i < m_pColumns->getCount(); i++) + for (sal_uInt16 i = 0; i < m_pColumns->getCount(); i++) { Reference<XPropertySet> xIndex = isUniqueByColumnName(i); if (xIndex.is()) @@ -1639,7 +1631,7 @@ BOOL ODbaseTable::DeleteRow(const OSQLColumns& _rCols) } m_pFileStream->Seek(nFilePos); - (*m_pFileStream) << (BYTE)'*'; // mark the row in the table as deleted + (*m_pFileStream) << (sal_uInt8)'*'; // mark the row in the table as deleted m_pFileStream->Flush(); return sal_True; } @@ -1679,18 +1671,18 @@ double toDouble(const ByteString& rString) } //------------------------------------------------------------------ -BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const Reference<XIndexAccess>& _xCols) +sal_Bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const Reference<XIndexAccess>& _xCols) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::UpdateBuffer" ); OSL_ENSURE(m_pBuffer,"Buffer is NULL!"); if ( !m_pBuffer ) - return FALSE; + return sal_False; sal_Int32 nByteOffset = 1; // Update fields: Reference<XPropertySet> xCol; Reference<XPropertySet> xIndex; - USHORT i; + sal_uInt16 i; ::rtl::OUString aColName; const sal_Int32 nColumnCount = m_pColumns->getCount(); ::std::vector< Reference<XPropertySet> > aIndexedCols(nColumnCount); @@ -1956,7 +1948,7 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const char cNext = pData[nLen]; // Mark's scratch and replaced by 0 pData[nLen] = '\0'; // This is because the buffer is always a sign of greater ... - ULONG nBlockNo = strtol((const char *)pData,NULL,10); // Block number read + sal_uIntPtr nBlockNo = strtol((const char *)pData,NULL,10); // Block number read // Next initial character restore again: pData[nLen] = cNext; @@ -2012,14 +2004,14 @@ BOOL ODbaseTable::UpdateBuffer(OValueRefVector& rRow, OValueRefRow pOrgRow,const } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) +sal_Bool ODbaseTable::WriteMemo(ORowSetValue& aVariable, sal_uIntPtr& rBlockNr) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::WriteMemo" ); // if the BlockNo 0 is given, the block will be appended at the end - ULONG nSize = 0; + sal_uIntPtr nSize = 0; ::rtl::OString aStr; ::com::sun::star::uno::Sequence<sal_Int8> aValue; - BYTE nHeader[4]; + sal_uInt8 nHeader[4]; const bool bBinary = aVariable.getTypeKind() == DataType::LONGVARBINARY && m_aMemoHeader.db_typ == MemoFoxPro; if ( bBinary ) { @@ -2032,7 +2024,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) } // append or overwrite - BOOL bAppend = rBlockNr == 0; + sal_Bool bAppend = rBlockNr == 0; if (!bAppend) { @@ -2049,7 +2041,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) m_pMemoStream->SeekRel(4L); m_pMemoStream->Read(sHeader,4); - ULONG nOldSize; + sal_uIntPtr nOldSize; if (m_aMemoHeader.db_typ == MemoFoxPro) nOldSize = ((((unsigned char)sHeader[0]) * 256 + (unsigned char)sHeader[1]) * 256 + @@ -2062,7 +2054,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) (unsigned char)sHeader[0] - 8; // fits the new length in the used blocks - ULONG nUsedBlocks = ((nSize + 8) / m_aMemoHeader.db_size) + (((nSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0), + sal_uIntPtr nUsedBlocks = ((nSize + 8) / m_aMemoHeader.db_size) + (((nSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0), nOldUsedBlocks = ((nOldSize + 8) / m_aMemoHeader.db_size) + (((nOldSize + 8) % m_aMemoHeader.db_size > 0) ? 1 : 0); bAppend = nUsedBlocks > nOldUsedBlocks; } @@ -2071,7 +2063,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) if (bAppend) { - ULONG nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END); + sal_uIntPtr nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END); // fill last block rBlockNr = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0); @@ -2096,30 +2088,30 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) case MemodBaseIV: // dBase IV-Memofeld with length { if ( MemodBaseIV == m_aMemoHeader.db_typ ) - (*m_pMemoStream) << (BYTE)0xFF - << (BYTE)0xFF - << (BYTE)0x08; + (*m_pMemoStream) << (sal_uInt8)0xFF + << (sal_uInt8)0xFF + << (sal_uInt8)0x08; else - (*m_pMemoStream) << (BYTE)0x00 - << (BYTE)0x00 - << (BYTE)0x00; + (*m_pMemoStream) << (sal_uInt8)0x00 + << (sal_uInt8)0x00 + << (sal_uInt8)0x00; - UINT32 nWriteSize = nSize; + sal_uInt32 nWriteSize = nSize; if (m_aMemoHeader.db_typ == MemoFoxPro) { if ( bBinary ) - (*m_pMemoStream) << (BYTE) 0x00; // Picture + (*m_pMemoStream) << (sal_uInt8) 0x00; // Picture else - (*m_pMemoStream) << (BYTE) 0x01; // Memo + (*m_pMemoStream) << (sal_uInt8) 0x01; // Memo for (int i = 4; i > 0; nWriteSize >>= 8) - nHeader[--i] = (BYTE) (nWriteSize % 256); + nHeader[--i] = (sal_uInt8) (nWriteSize % 256); } else { - (*m_pMemoStream) << (BYTE) 0x00; + (*m_pMemoStream) << (sal_uInt8) 0x00; nWriteSize += 8; for (int i = 0; i < 4; nWriteSize >>= 8) - nHeader[i++] = (BYTE) (nWriteSize % 256); + nHeader[i++] = (sal_uInt8) (nWriteSize % 256); } m_pMemoStream->Write(nHeader,4); @@ -2135,7 +2127,7 @@ BOOL ODbaseTable::WriteMemo(ORowSetValue& aVariable, ULONG& rBlockNr) // Write the new block number if (bAppend) { - ULONG nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END); + sal_uIntPtr nStreamSize = m_pMemoStream->Seek(STREAM_SEEK_TO_END); m_aMemoHeader.db_next = (nStreamSize / m_aMemoHeader.db_size) + ((nStreamSize % m_aMemoHeader.db_size) > 0 ? 1 : 0); // Write the new block number @@ -2192,7 +2184,7 @@ void ODbaseTable::alterColumn(sal_Int32 index, if(xOldColumn.is()) xCopyColumn = xOldColumn->createDataDescriptor(); else - xCopyColumn = new OColumn(getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers()); + xCopyColumn = new OColumn(getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()); ::comphelper::copyProperties(descriptor,xCopyColumn); @@ -2217,7 +2209,7 @@ void ODbaseTable::alterColumn(sal_Int32 index, if(xColumn.is()) xCpy = xColumn->createDataDescriptor(); else - xCpy = new OColumn(getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers()); + xCpy = new OColumn(getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()); ::comphelper::copyProperties(xProp,xCpy); xAppend->appendByDescriptor(xCpy); } @@ -2233,7 +2225,7 @@ void ODbaseTable::alterColumn(sal_Int32 index, if(xColumn.is()) xCpy = xColumn->createDataDescriptor(); else - xCpy = new OColumn(getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers()); + xCpy = new OColumn(getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()); ::comphelper::copyProperties(xProp,xCpy); xAppend->appendByDescriptor(xCpy); } @@ -2374,7 +2366,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) pNewTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(::rtl::OUString(sTempName))); { Reference<XAppend> xAppend(pNewTable->getColumns(),UNO_QUERY); - sal_Bool bCase = getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(); + sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); // copy the structure for(sal_Int32 i=0;i < m_pColumns->getCount();++i) { @@ -2407,7 +2399,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) ::dbtools::throwGenericSQLException( sError, *this ); } - BOOL bAlreadyDroped = FALSE; + sal_Bool bAlreadyDroped = sal_False; try { pNewTable->construct(); @@ -2416,7 +2408,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) // drop the old table if(DropImpl()) { - bAlreadyDroped = TRUE; + bAlreadyDroped = sal_True; pNewTable->renameImpl(m_Name); // release the temp file } @@ -2447,7 +2439,7 @@ void ODbaseTable::dropColumn(sal_Int32 _nPos) pNewTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(::rtl::OUString(sTempName))); { Reference<XAppend> xAppend(pNewTable->getColumns(),UNO_QUERY); - sal_Bool bCase = getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(); + sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); // copy the structure for(sal_Int32 i=0;i < m_pColumns->getCount();++i) { @@ -2680,10 +2672,10 @@ End: return sal_True; } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) +sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::ReadMemo" ); - BOOL bIsText = TRUE; + bool bIsText = true; m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size); switch (m_aMemoHeader.db_typ) @@ -2694,13 +2686,13 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) ByteString aBStr; static char aBuf[514]; aBuf[512] = 0; // avoid random value - BOOL bReady = sal_False; + sal_Bool bReady = sal_False; do { m_pMemoStream->Read(&aBuf,512); - USHORT i = 0; + sal_uInt16 i = 0; while (aBuf[i] != cEOF && ++i < 512) ; bReady = aBuf[i] == cEOF; @@ -2724,7 +2716,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) { bIsText = sHeader[3] != 0; } - else if (((BYTE)sHeader[0]) != 0xFF || ((BYTE)sHeader[1]) != 0xFF || ((BYTE)sHeader[2]) != 0x08) + else if (((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08) { return sal_False; } @@ -2773,7 +2765,7 @@ BOOL ODbaseTable::ReadMemo(ULONG nBlockNo, ORowSetValue& aVariable) void ODbaseTable::AllocBuffer() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::AllocBuffer" ); - UINT16 nSize = m_aHeader.db_slng; + sal_uInt16 nSize = m_aHeader.db_slng; OSL_ENSURE(nSize > 0, "Size too small"); if (m_nBufferSize != nSize) @@ -2786,11 +2778,11 @@ void ODbaseTable::AllocBuffer() if (m_pBuffer == NULL && nSize) { m_nBufferSize = nSize; - m_pBuffer = new BYTE[m_nBufferSize+1]; + m_pBuffer = new sal_uInt8[m_nBufferSize+1]; } } // ----------------------------------------------------------------------------- -BOOL ODbaseTable::WriteBuffer() +sal_Bool ODbaseTable::WriteBuffer() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen@sun.com", "ODbaseTable::WriteBuffer" ); OSL_ENSURE(m_nFilePos >= 1,"SdbDBFCursor::FileFetchRow: ungueltige Record-Position"); diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx index 7c4b452e87..7c4b452e87 100644..100755 --- a/connectivity/source/drivers/dbase/DTables.cxx +++ b/connectivity/source/drivers/dbase/DTables.cxx diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx index 827bf4f13d..fc2076b14e 100644..100755 --- a/connectivity/source/drivers/dbase/Dservices.cxx +++ b/connectivity/source/drivers/dbase/Dservices.cxx @@ -30,13 +30,11 @@ #include "precompiled_connectivity.hxx" #include "dbase/DDriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::dbase; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -49,27 +47,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// The prescribed C-Api must be met! -// It consists of three functions, which must be exported by the module. -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -119,31 +96,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - ODriver::getImplementationName_Static(), - ODriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "FILE::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/dbase/dbase.component b/connectivity/source/drivers/dbase/dbase.component new file mode 100755 index 0000000000..7f913f0836 --- /dev/null +++ b/connectivity/source/drivers/dbase/dbase.component @@ -0,0 +1,35 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbc.dbase.ODriver"> + <service name="com.sun.star.sdbc.Driver"/> + <service name="com.sun.star.sdbcx.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/dbase/dbase.mxp.map b/connectivity/source/drivers/dbase/dbase.mxp.map index c5b4377b04..87eccc45b6 100644..100755 --- a/connectivity/source/drivers/dbase/dbase.mxp.map +++ b/connectivity/source/drivers/dbase/dbase.mxp.map @@ -1,5 +1,4 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory __mh_dylib_header ___builtin_delete diff --git a/connectivity/source/drivers/dbase/dbase.xml b/connectivity/source/drivers/dbase/dbase.xml index e378fcd5fd..e378fcd5fd 100644..100755 --- a/connectivity/source/drivers/dbase/dbase.xml +++ b/connectivity/source/drivers/dbase/dbase.xml diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index 66c248540b..118e072781 100644..100755 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -43,19 +43,19 @@ using namespace connectivity::dbase; using namespace connectivity::file; using namespace com::sun::star::sdbc; // ----------------------------------------------------------------------------- -ONDXKey::ONDXKey(UINT32 nRec) +ONDXKey::ONDXKey(sal_uInt32 nRec) :nRecord(nRec) { } // ----------------------------------------------------------------------------- -ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, UINT32 nRec) +ONDXKey::ONDXKey(const ORowSetValue& rVal, sal_Int32 eType, sal_uInt32 nRec) : ONDXKey_BASE(eType) , nRecord(nRec) , xValue(rVal) { } // ----------------------------------------------------------------------------- -ONDXKey::ONDXKey(const rtl::OUString& aStr, UINT32 nRec) +ONDXKey::ONDXKey(const rtl::OUString& aStr, sal_uInt32 nRec) : ONDXKey_BASE(::com::sun::star::sdbc::DataType::VARCHAR) ,nRecord(nRec) { @@ -66,7 +66,8 @@ ONDXKey::ONDXKey(const rtl::OUString& aStr, UINT32 nRec) } } // ----------------------------------------------------------------------------- -ONDXKey::ONDXKey(double aVal, UINT32 nRec) + +ONDXKey::ONDXKey(double aVal, sal_uInt32 nRec) : ONDXKey_BASE(::com::sun::star::sdbc::DataType::DOUBLE) ,nRecord(nRec) ,xValue(aVal) @@ -79,7 +80,7 @@ ONDXKey::ONDXKey(double aVal, UINT32 nRec) //================================================================== ONDXPage::ONDXPage(ODbaseIndex& rInd, sal_uInt32 nPos, ONDXPage* pParent) :nPagePos(nPos) - ,bModified(FALSE) + ,bModified(sal_False) ,nCount(0) ,aParent(pParent) ,rIndex(rInd) @@ -101,16 +102,16 @@ void ONDXPage::QueryDelete() if (IsModified() && rIndex.m_pFileStream) (*rIndex.m_pFileStream) << *this; - bModified = FALSE; + bModified = sal_False; if (rIndex.UseCollector()) { if (aChild.Is()) - aChild->Release(FALSE); + aChild->Release(sal_False); - for (USHORT i = 0; i < rIndex.getHeader().db_maxkeys;i++) + for (sal_uInt16 i = 0; i < rIndex.getHeader().db_maxkeys;i++) { if (ppNodes[i].GetChild().Is()) - ppNodes[i].GetChild()->Release(FALSE); + ppNodes[i].GetChild()->Release(sal_False); ppNodes[i] = ONDXNode(); } @@ -134,10 +135,10 @@ ONDXPagePtr& ONDXPage::GetChild(ODbaseIndex* pIndex) } //------------------------------------------------------------------ -USHORT ONDXPage::FindPos(const ONDXKey& rKey) const +sal_uInt16 ONDXPage::FindPos(const ONDXKey& rKey) const { // searches the position for the given key in a page - USHORT i = 0; + sal_uInt16 i = 0; while (i < nCount && rKey > ((*this)[i]).GetKey()) i++; @@ -145,17 +146,17 @@ USHORT ONDXPage::FindPos(const ONDXKey& rKey) const } //------------------------------------------------------------------ -BOOL ONDXPage::Find(const ONDXKey& rKey) +sal_Bool ONDXPage::Find(const ONDXKey& rKey) { // searches the given key // Speciality: At the end of the method // the actual page and the position of the node, fulfilling the '<=' condition, are saved // This is considered at insert. - USHORT i = 0; + sal_uInt16 i = 0; while (i < nCount && rKey > ((*this)[i]).GetKey()) i++; - BOOL bResult = FALSE; + sal_Bool bResult = sal_False; if (!IsLeaf()) { @@ -167,7 +168,7 @@ BOOL ONDXPage::Find(const ONDXKey& rKey) { rIndex.m_aCurLeaf = this; rIndex.m_nCurNode = i - 1; - bResult = FALSE; + bResult = sal_False; } else { @@ -179,14 +180,14 @@ BOOL ONDXPage::Find(const ONDXKey& rKey) } //------------------------------------------------------------------ -BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) +sal_Bool ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) { // When creating an index there can be multiple nodes added, // these are sorted ascending - BOOL bAppend = nRowsLeft > 0; + sal_Bool bAppend = nRowsLeft > 0; if (IsFull()) { - BOOL bResult = TRUE; + sal_Bool bResult = sal_True; ONDXNode aSplitNode; if (bAppend) aSplitNode = rNode; @@ -206,7 +207,7 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) } else // Position unbekannt { - USHORT nPos = NODE_NOTFOUND; + sal_uInt16 nPos = NODE_NOTFOUND; while (++nPos < nCount && rNode.GetKey() > ((*this)[nPos]).GetKey()) ; --nCount; // (otherwise we might get Assertions and GPFs - 60593) @@ -289,7 +290,7 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) } else { - USHORT nNodePos = FindPos(rNode.GetKey()); + sal_uInt16 nNodePos = FindPos(rNode.GetKey()); if (IsLeaf()) rIndex.m_nCurNode = nNodePos; @@ -299,17 +300,17 @@ BOOL ONDXPage::Insert(ONDXNode& rNode, sal_uInt32 nRowsLeft) } //------------------------------------------------------------------ -BOOL ONDXPage::Insert(USHORT nPos, ONDXNode& rNode) +sal_Bool ONDXPage::Insert(sal_uInt16 nPos, ONDXNode& rNode) { - USHORT nMaxCount = rIndex.getHeader().db_maxkeys; + sal_uInt16 nMaxCount = rIndex.getHeader().db_maxkeys; if (nPos >= nMaxCount) - return FALSE; + return sal_False; if (nCount) { ++nCount; // shift right - for (USHORT i = std::min((USHORT)(nMaxCount-1), (USHORT)(nCount-1)); nPos < i; --i) + for (sal_uInt16 i = std::min((sal_uInt16)(nMaxCount-1), (sal_uInt16)(nCount-1)); nPos < i; --i) (*this)[i] = (*this)[i-1]; } else @@ -325,19 +326,19 @@ BOOL ONDXPage::Insert(USHORT nPos, ONDXNode& rNode) rNode.GetChild()->SetParent(this); } - bModified = TRUE; + bModified = sal_True; - return TRUE; + return sal_True; } //------------------------------------------------------------------ -BOOL ONDXPage::Append(ONDXNode& rNode) +sal_Bool ONDXPage::Append(ONDXNode& rNode) { DBG_ASSERT(!IsFull(), "kein Append moeglich"); return Insert(nCount, rNode); } //------------------------------------------------------------------ -void ONDXPage::Release(BOOL bSave) +void ONDXPage::Release(sal_Bool bSave) { // free pages if (aChild.Is()) @@ -346,7 +347,7 @@ void ONDXPage::Release(BOOL bSave) // free pointer aChild.Clear(); - for (USHORT i = 0; i < rIndex.getHeader().db_maxkeys;i++) + for (sal_uInt16 i = 0; i < rIndex.getHeader().db_maxkeys;i++) { if (ppNodes[i].GetChild()) ppNodes[i].GetChild()->Release(bSave); @@ -356,7 +357,7 @@ void ONDXPage::Release(BOOL bSave) aParent = NULL; } //------------------------------------------------------------------ -void ONDXPage::ReleaseFull(BOOL bSave) +void ONDXPage::ReleaseFull(sal_Bool bSave) { ONDXPagePtr aTempParent = aParent; Release(bSave); @@ -365,7 +366,7 @@ void ONDXPage::ReleaseFull(BOOL bSave) { // Free pages not needed, there will be no reference anymore to the pages // afterwards 'this' can't be valid anymore!!! - USHORT nParentPos = aTempParent->Search(this); + sal_uInt16 nParentPos = aTempParent->Search(this); if (nParentPos != NODE_NOTFOUND) (*aTempParent)[nParentPos].GetChild().Clear(); else @@ -373,7 +374,7 @@ void ONDXPage::ReleaseFull(BOOL bSave) } } //------------------------------------------------------------------ -BOOL ONDXPage::Delete(USHORT nNodePos) +sal_Bool ONDXPage::Delete(sal_uInt16 nNodePos) { if (IsLeaf()) { @@ -396,7 +397,7 @@ BOOL ONDXPage::Delete(USHORT nNodePos) if (HasParent() && nCount < (rIndex.GetMaxNodes() / 2)) { // determine, which node points to the page - USHORT nParentNodePos = aParent->Search(this); + sal_uInt16 nParentNodePos = aParent->Search(this); // last element on parent-page -> merge with secondlast page if (nParentNodePos == (aParent->Count() - 1)) { @@ -419,7 +420,7 @@ BOOL ONDXPage::Delete(USHORT nNodePos) else if (IsRoot()) // make sure that the position of the root is kept rIndex.SetRootPos(nPagePos); - return TRUE; + return sal_True; } @@ -440,7 +441,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage) ONDXNode aResultNode; if (IsLeaf()) { - for (USHORT i = (nCount - (nCount / 2)), j = 0 ; i < nCount; i++) + for (sal_uInt16 i = (nCount - (nCount / 2)), j = 0 ; i < nCount; i++) rPage.Insert(j++,(*this)[i]); // this node contains a key that already exists in the tree and must be replaced @@ -454,7 +455,7 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage) } else { - for (USHORT i = (nCount + 1) / 2 + 1, j = 0 ; i < nCount; i++) + for (sal_uInt16 i = (nCount + 1) / 2 + 1, j = 0 ; i < nCount; i++) rPage.Insert(j++,(*this)[i]); aResultNode = (*this)[(nCount + 1) / 2]; @@ -469,31 +470,31 @@ ONDXNode ONDXPage::Split(ONDXPage& rPage) // inner nodes have no record number if (rIndex.isUnique()) aResultNode.GetKey().ResetRecord(); - bModified = TRUE; + bModified = sal_True; return aResultNode; } //------------------------------------------------------------------ -void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) +void ONDXPage::Merge(sal_uInt16 nParentNodePos, ONDXPagePtr xPage) { DBG_ASSERT(HasParent(), "kein Vater vorhanden"); DBG_ASSERT(nParentNodePos != NODE_NOTFOUND, "Falscher Indexaufbau"); /* Merge 2 pages */ ONDXNode aResultNode; - USHORT nMaxNodes = rIndex.GetMaxNodes(), + sal_uInt16 nMaxNodes = rIndex.GetMaxNodes(), nMaxNodes_2 = nMaxNodes / 2; // Determine if page is right or left neighbour - BOOL bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // TRUE, if xPage is the right page - USHORT nNewCount = (*xPage).Count() + Count(); + sal_Bool bRight = ((*xPage)[0].GetKey() > (*this)[0].GetKey()); // sal_True, wenn xPage die rechte Seite ist + sal_uInt16 nNewCount = (*xPage).Count() + Count(); if (IsLeaf()) { // Condition for merge if (nNewCount < (nMaxNodes_2 * 2)) { - USHORT nLastNode = bRight ? Count() - 1 : xPage->Count() - 1; + sal_uInt16 nLastNode = bRight ? Count() - 1 : xPage->Count() - 1; if (bRight) { DBG_ASSERT(&xPage != this,"xPage und THIS duerfen nicht gleich sein: Endlosschleife"); @@ -518,7 +519,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) (*aParent)[nParentNodePos-1].SetChild(this,aParent); else // or set as right node aParent->SetChild(this); - aParent->SetModified(TRUE); + aParent->SetModified(sal_True); } @@ -532,12 +533,12 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) aParent = NULL; rIndex.SetRootPos(nPagePos); rIndex.m_aRoot = this; - SetModified(TRUE); + SetModified(sal_True); } else aParent->SearchAndReplace((*this)[nLastNode].GetKey(),(*this)[nCount-1].GetKey()); - xPage->SetModified(FALSE); + xPage->SetModified(sal_False); xPage->ReleaseFull(); // is not needed anymore } // balance the elements nNewCount >= (nMaxNodes_2 * 2) @@ -580,7 +581,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) // Parent node will be integrated; is initialized with Child from xPage (*aParent)[nParentNodePos].SetChild(xPage->GetChild(),aParent); Append((*aParent)[nParentNodePos]); - for (USHORT i = 0 ; i < xPage->Count(); i++) + for (sal_uInt16 i = 0 ; i < xPage->Count(); i++) Append((*xPage)[i]); } else @@ -604,7 +605,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) // afterwards parent node will be reset (*aParent)[nParentNodePos].SetChild(); - aParent->SetModified(TRUE); + aParent->SetModified(sal_True); if(aParent->IsRoot() && aParent->Count() == 1) { @@ -613,7 +614,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) aParent = NULL; rIndex.SetRootPos(nPagePos); rIndex.m_aRoot = this; - SetModified(TRUE); + SetModified(sal_True); } else if(nParentNodePos) // replace the node value @@ -621,7 +622,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) // thats why the node must be updated here aParent->SearchAndReplace((*aParent)[nParentNodePos-1].GetKey(),(*aParent)[nParentNodePos].GetKey()); - xPage->SetModified(FALSE); + xPage->SetModified(sal_False); xPage->ReleaseFull(); } // balance the elements @@ -652,7 +653,7 @@ void ONDXPage::Merge(USHORT nParentNodePos, ONDXPagePtr xPage) (*aParent)[nParentNodePos].SetChild(this,aParent); } - aParent->SetModified(TRUE); + aParent->SetModified(sal_True); } } } @@ -674,7 +675,7 @@ void ONDXNode::Read(SvStream &rStream, ODbaseIndex& rIndex) else { ByteString aBuf; - USHORT nLen = rIndex.getHeader().db_keylen; + sal_uInt16 nLen = rIndex.getHeader().db_keylen; char* pStr = aBuf.AllocBuffer(nLen+1); rStream.Read(pStr,nLen); @@ -706,7 +707,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const if (aKey.getValue().isNull()) { memset(aNodeData.aData,0,rIndex.getHeader().db_keylen); - rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen); + rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen); } else rStream << (double) aKey.getValue(); @@ -720,7 +721,7 @@ void ONDXNode::Write(SvStream &rStream, const ONDXPage& rPage) const ByteString aText(sValue.getStr(), rIndex.m_pTable->getConnection()->getTextEncoding()); strncpy(aNodeData.aData,aText.GetBuffer(),std::min(rIndex.getHeader().db_keylen, aText.Len())); } - rStream.Write((BYTE*)aNodeData.aData,rIndex.getHeader().db_keylen); + rStream.Write((sal_uInt8*)aNodeData.aData,rIndex.getHeader().db_keylen); } rStream << aChild; } @@ -740,7 +741,7 @@ ONDXPagePtr& ONDXNode::GetChild(ODbaseIndex* pIndex, ONDXPage* pParent) // ONDXKey //================================================================== //------------------------------------------------------------------ -BOOL ONDXKey::IsText(sal_Int32 eType) +sal_Bool ONDXKey::IsText(sal_Int32 eType) { return eType == DataType::VARCHAR || eType == DataType::CHAR; } @@ -766,7 +767,7 @@ StringCompare ONDXKey::Compare(const ONDXKey& rKey) const } else if (IsText(getDBType())) { - INT32 nRes = getValue().getString().compareTo(rKey.getValue()); + sal_Int32 nRes = getValue().getString().compareTo(rKey.getValue()); eResult = (nRes > 0) ? COMPARE_GREATER : (nRes == 0) ? COMPARE_EQUAL : COMPARE_LESS; } else @@ -839,15 +840,15 @@ ONDXPagePtr& ONDXPagePtr::operator= (ONDXPage* pRef) return *this; } // ----------------------------------------------------------------------------- -static UINT32 nValue; +static sal_uInt32 nValue; //------------------------------------------------------------------ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) { rStream.Seek(rPage.GetPagePos() * PAGE_SIZE); rStream >> nValue >> rPage.aChild; - rPage.nCount = USHORT(nValue); + rPage.nCount = sal_uInt16(nValue); - for (USHORT i = 0; i < rPage.nCount; i++) + for (sal_uInt16 i = 0; i < rPage.nCount; i++) rPage[i].Read(rStream, rPage.GetIndex()); return rStream; } @@ -856,7 +857,7 @@ SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& rPage) { // Page doesn't exist yet - ULONG nSize = (rPage.GetPagePos() + 1) * PAGE_SIZE; + sal_uIntPtr nSize = (rPage.GetPagePos() + 1) * PAGE_SIZE; if (nSize > rStream.Seek(STREAM_SEEK_TO_END)) { rStream.SetStreamSize(nSize); @@ -864,27 +865,27 @@ SvStream& connectivity::dbase::operator << (SvStream &rStream, const ONDXPage& r char aEmptyData[PAGE_SIZE]; memset(aEmptyData,0x00,PAGE_SIZE); - rStream.Write((BYTE*)aEmptyData,PAGE_SIZE); + rStream.Write((sal_uInt8*)aEmptyData,PAGE_SIZE); } - ULONG nCurrentPos = rStream.Seek(rPage.GetPagePos() * PAGE_SIZE); + sal_uIntPtr nCurrentPos = rStream.Seek(rPage.GetPagePos() * PAGE_SIZE); OSL_UNUSED( nCurrentPos ); nValue = rPage.nCount; rStream << nValue << rPage.aChild; - USHORT i = 0; + sal_uInt16 i = 0; for (; i < rPage.nCount; i++) rPage[i].Write(rStream, rPage); // check if we have to fill the stream with '\0' if(i < rPage.rIndex.getHeader().db_maxkeys) { - ULONG nTell = rStream.Tell() % PAGE_SIZE; - USHORT nBufferSize = rStream.GetBufferSize(); - ULONG nRemainSize = nBufferSize - nTell; + sal_uIntPtr nTell = rStream.Tell() % PAGE_SIZE; + sal_uInt16 nBufferSize = rStream.GetBufferSize(); + sal_uIntPtr nRemainSize = nBufferSize - nTell; char* pEmptyData = new char[nRemainSize]; memset(pEmptyData,0x00,nRemainSize); - rStream.Write((BYTE*)pEmptyData,nRemainSize); + rStream.Write((sal_uInt8*)pEmptyData,nRemainSize); rStream.Seek(nTell); delete [] pEmptyData; } @@ -898,7 +899,7 @@ void ONDXPage::PrintPage() DBG_TRACE4("\nSDB: -----------Page: %d Parent: %d Count: %d Child: %d-----", nPagePos, HasParent() ? aParent->GetPagePos() : 0 ,nCount, aChild.GetPagePos()); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { ONDXNode rNode = (*this)[i]; ONDXKey& rKey = rNode.GetKey(); @@ -923,7 +924,7 @@ void ONDXPage::PrintPage() { #if OSL_DEBUG_LEVEL > 1 GetChild(&rIndex)->PrintPage(); - for (USHORT i = 0; i < nCount; i++) + for (sal_uInt16 i = 0; i < nCount; i++) { ONDXNode rNode = (*this)[i]; rNode.GetChild(&rIndex,this)->PrintPage(); @@ -934,16 +935,16 @@ void ONDXPage::PrintPage() } #endif // ----------------------------------------------------------------------------- -BOOL ONDXPage::IsFull() const +sal_Bool ONDXPage::IsFull() const { return Count() == rIndex.getHeader().db_maxkeys; } // ----------------------------------------------------------------------------- //------------------------------------------------------------------ -USHORT ONDXPage::Search(const ONDXKey& rSearch) +sal_uInt16 ONDXPage::Search(const ONDXKey& rSearch) { // binary search later - USHORT i = NODE_NOTFOUND; + sal_uInt16 i = NODE_NOTFOUND; while (++i < Count()) if ((*this)[i].GetKey() == rSearch) break; @@ -952,9 +953,9 @@ USHORT ONDXPage::Search(const ONDXKey& rSearch) } //------------------------------------------------------------------ -USHORT ONDXPage::Search(const ONDXPage* pPage) +sal_uInt16 ONDXPage::Search(const ONDXPage* pPage) { - USHORT i = NODE_NOTFOUND; + sal_uInt16 i = NODE_NOTFOUND; while (++i < Count()) if (((*this)[i]).GetChild() == pPage) break; @@ -970,7 +971,7 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, OSL_ENSURE(rSearch != rReplace,"Invalid here:rSearch == rReplace"); if (rSearch != rReplace) { - USHORT nPos = NODE_NOTFOUND; + sal_uInt16 nPos = NODE_NOTFOUND; ONDXPage* pPage = this; while (pPage && (nPos = pPage->Search(rSearch)) == NODE_NOTFOUND) @@ -979,33 +980,33 @@ void ONDXPage::SearchAndReplace(const ONDXKey& rSearch, if (pPage) { (*pPage)[nPos].GetKey() = rReplace; - pPage->SetModified(TRUE); + pPage->SetModified(sal_True); } } } // ----------------------------------------------------------------------------- -ONDXNode& ONDXPage::operator[] (USHORT nPos) +ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } //------------------------------------------------------------------ -const ONDXNode& ONDXPage::operator[] (USHORT nPos) const +const ONDXNode& ONDXPage::operator[] (sal_uInt16 nPos) const { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); return ppNodes[nPos]; } // ----------------------------------------------------------------------------- -void ONDXPage::Remove(USHORT nPos) +void ONDXPage::Remove(sal_uInt16 nPos) { DBG_ASSERT(nCount > nPos, "falscher Indexzugriff"); - for (USHORT i = nPos; i < (nCount-1); i++) + for (sal_uInt16 i = nPos; i < (nCount-1); i++) (*this)[i] = (*this)[i+1]; nCount--; - bModified = TRUE; + bModified = sal_True; } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/dbase/exports.dxp b/connectivity/source/drivers/dbase/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/dbase/exports.dxp +++ b/connectivity/source/drivers/dbase/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/dbase/makefile.mk b/connectivity/source/drivers/dbase/makefile.mk index 1aac0b0b1e..5c3344b1da 100644..100755 --- a/connectivity/source/drivers/dbase/makefile.mk +++ b/connectivity/source/drivers/dbase/makefile.mk @@ -127,3 +127,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/dbase.component + +$(MISC)/dbase.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dbase.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dbase.component diff --git a/connectivity/source/drivers/evoab/LCatalog.cxx b/connectivity/source/drivers/evoab/LCatalog.cxx index 638b359a89..638b359a89 100644..100755 --- a/connectivity/source/drivers/evoab/LCatalog.cxx +++ b/connectivity/source/drivers/evoab/LCatalog.cxx diff --git a/connectivity/source/drivers/evoab/LCatalog.hxx b/connectivity/source/drivers/evoab/LCatalog.hxx index 589063d37e..589063d37e 100644..100755 --- a/connectivity/source/drivers/evoab/LCatalog.hxx +++ b/connectivity/source/drivers/evoab/LCatalog.hxx diff --git a/connectivity/source/drivers/evoab/LColumnAlias.cxx b/connectivity/source/drivers/evoab/LColumnAlias.cxx index fa627eab64..fa627eab64 100644..100755 --- a/connectivity/source/drivers/evoab/LColumnAlias.cxx +++ b/connectivity/source/drivers/evoab/LColumnAlias.cxx diff --git a/connectivity/source/drivers/evoab/LColumnAlias.hxx b/connectivity/source/drivers/evoab/LColumnAlias.hxx index 9e870b6627..9e870b6627 100644..100755 --- a/connectivity/source/drivers/evoab/LColumnAlias.hxx +++ b/connectivity/source/drivers/evoab/LColumnAlias.hxx diff --git a/connectivity/source/drivers/evoab/LColumns.cxx b/connectivity/source/drivers/evoab/LColumns.cxx index d7a103fd6d..d7a103fd6d 100644..100755 --- a/connectivity/source/drivers/evoab/LColumns.cxx +++ b/connectivity/source/drivers/evoab/LColumns.cxx diff --git a/connectivity/source/drivers/evoab/LColumns.hxx b/connectivity/source/drivers/evoab/LColumns.hxx index 3f146b2a96..3f146b2a96 100644..100755 --- a/connectivity/source/drivers/evoab/LColumns.hxx +++ b/connectivity/source/drivers/evoab/LColumns.hxx diff --git a/connectivity/source/drivers/evoab/LConfigAccess.cxx b/connectivity/source/drivers/evoab/LConfigAccess.cxx index 7777fb2570..7777fb2570 100644..100755 --- a/connectivity/source/drivers/evoab/LConfigAccess.cxx +++ b/connectivity/source/drivers/evoab/LConfigAccess.cxx diff --git a/connectivity/source/drivers/evoab/LConfigAccess.hxx b/connectivity/source/drivers/evoab/LConfigAccess.hxx index 3c82d3f5e3..3c82d3f5e3 100644..100755 --- a/connectivity/source/drivers/evoab/LConfigAccess.hxx +++ b/connectivity/source/drivers/evoab/LConfigAccess.hxx diff --git a/connectivity/source/drivers/evoab/LConnection.cxx b/connectivity/source/drivers/evoab/LConnection.cxx index cee8b601aa..cee8b601aa 100644..100755 --- a/connectivity/source/drivers/evoab/LConnection.cxx +++ b/connectivity/source/drivers/evoab/LConnection.cxx diff --git a/connectivity/source/drivers/evoab/LConnection.hxx b/connectivity/source/drivers/evoab/LConnection.hxx index 86bbd94b2c..86bbd94b2c 100644..100755 --- a/connectivity/source/drivers/evoab/LConnection.hxx +++ b/connectivity/source/drivers/evoab/LConnection.hxx diff --git a/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx b/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx index 0bcc612ad7..0bcc612ad7 100644..100755 --- a/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab/LDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx b/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx index a447a215c8..a447a215c8 100644..100755 --- a/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx +++ b/connectivity/source/drivers/evoab/LDatabaseMetaData.hxx diff --git a/connectivity/source/drivers/evoab/LDebug.cxx b/connectivity/source/drivers/evoab/LDebug.cxx index 042227947a..042227947a 100644..100755 --- a/connectivity/source/drivers/evoab/LDebug.cxx +++ b/connectivity/source/drivers/evoab/LDebug.cxx diff --git a/connectivity/source/drivers/evoab/LDebug.hxx b/connectivity/source/drivers/evoab/LDebug.hxx index 8b9e2b11ab..8b9e2b11ab 100644..100755 --- a/connectivity/source/drivers/evoab/LDebug.hxx +++ b/connectivity/source/drivers/evoab/LDebug.hxx diff --git a/connectivity/source/drivers/evoab/LDriver.cxx b/connectivity/source/drivers/evoab/LDriver.cxx index 88f07317ee..88f07317ee 100644..100755 --- a/connectivity/source/drivers/evoab/LDriver.cxx +++ b/connectivity/source/drivers/evoab/LDriver.cxx diff --git a/connectivity/source/drivers/evoab/LDriver.hxx b/connectivity/source/drivers/evoab/LDriver.hxx index aebacca7d2..aebacca7d2 100644..100755 --- a/connectivity/source/drivers/evoab/LDriver.hxx +++ b/connectivity/source/drivers/evoab/LDriver.hxx diff --git a/connectivity/source/drivers/evoab/LFolderList.cxx b/connectivity/source/drivers/evoab/LFolderList.cxx index d9f58f24ec..b8f88e9057 100644..100755 --- a/connectivity/source/drivers/evoab/LFolderList.cxx +++ b/connectivity/source/drivers/evoab/LFolderList.cxx @@ -73,7 +73,7 @@ using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) { - BOOL bRead = TRUE; + sal_Bool bRead = sal_True; QuotedTokenizedString aHeaderLine; OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection; @@ -106,7 +106,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal m_aPrecisions.reserve(nFieldCount); m_aScales.reserve(nFieldCount); - sal_Bool bCase = getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(); + sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); CharClass aCharClass(pConnection->getDriver()->getFactory(),_aLocale); // read description sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter(); @@ -124,11 +124,11 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal aColumnName += String::CreateFromInt32(i+1); sal_Int32 eType; - UINT16 nPrecision = 0; - UINT16 nScale = 0; + sal_uInt16 nPrecision = 0; + sal_uInt16 nScale = 0; - BOOL bNumeric = FALSE; - ULONG nIndex = 0; + sal_Bool bNumeric = sal_False; + sal_uIntPtr nIndex = 0; // first without fielddelimiter String aField; @@ -136,7 +136,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal if (aField.Len() == 0 || (pConnection->getStringDelimiter() && pConnection->getStringDelimiter() == aField.GetChar(0))) { - bNumeric = FALSE; + bNumeric = sal_False; } else { @@ -148,11 +148,11 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal if (aField2.Len() == 0) { - bNumeric = FALSE; + bNumeric = sal_False; } else { - bNumeric = TRUE; + bNumeric = sal_True; xub_StrLen nDot = 0; for (xub_StrLen j = 0; j < aField2.Len(); j++) { @@ -162,7 +162,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal (!cThousandDelimiter || c != cThousandDelimiter) && !aCharClass.isDigit(aField2,j)) { - bNumeric = FALSE; + bNumeric = sal_False; break; } if (cDecimalDelimiter && c == cDecimalDelimiter) @@ -174,7 +174,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal } if (nDot > 1) // if there is more than one dot it isn't a number - bNumeric = FALSE; + bNumeric = sal_False; if (bNumeric && cThousandDelimiter) { // Is the delimiter given correctly? @@ -187,7 +187,7 @@ void OEvoabFolderList::fillColumns(const ::com::sun::star::lang::Locale& _aLocal continue; else { - bNumeric = FALSE; + bNumeric = sal_False; break; } } diff --git a/connectivity/source/drivers/evoab/LFolderList.hxx b/connectivity/source/drivers/evoab/LFolderList.hxx index e91068c30d..73d952b638 100644..100755 --- a/connectivity/source/drivers/evoab/LFolderList.hxx +++ b/connectivity/source/drivers/evoab/LFolderList.hxx @@ -64,7 +64,7 @@ namespace connectivity private: void fillColumns(const ::com::sun::star::lang::Locale& _aLocale); - BOOL CreateFile(const INetURLObject& aFile, BOOL& bCreateMemo); + sal_Bool CreateFile(const INetURLObject& aFile, sal_Bool& bCreateMemo); sal_Bool fetchRow(OValueRow _rRow,const OSQLColumns& _rCols); sal_Bool seekRow(IResultSetHelper::Movement eCursorPosition); diff --git a/connectivity/source/drivers/evoab/LNoException.cxx b/connectivity/source/drivers/evoab/LNoException.cxx index 58f0e15af9..120d6bfd98 100644..100755 --- a/connectivity/source/drivers/evoab/LNoException.cxx +++ b/connectivity/source/drivers/evoab/LNoException.cxx @@ -41,20 +41,20 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) return 0; xub_StrLen nTokCount = 1; - BOOL bStart = TRUE; // Are we on the fist character of the token? - BOOL bInString = FALSE; // Are we within a (cStrDel delimited) string? + sal_Bool bStart = sal_True; // Are we on the fist character of the token? + sal_Bool bInString = sal_False; // Are we within a (cStrDel delimited) string? // Search for the first not-matching character (search ends at the end of string) for( xub_StrLen i = 0; i < Len(); i++ ) { if (bStart) { - bStart = FALSE; + bStart = sal_False; // First character a string delimiter? if ((*this).GetChar(i) == cStrDel) { - bInString = TRUE; // then we are within a string! - continue; // read next character! + bInString = sal_True; // then we are within a string! + continue; // read next character! } } @@ -70,7 +70,7 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) else { // end of String - bInString = FALSE; + bInString = sal_False; } } } else { @@ -78,7 +78,7 @@ xub_StrLen OEvoabString::GetTokenCount( sal_Unicode cTok, sal_Unicode cStrDel ) if ( (*this).GetChar(i) == cTok ) { nTokCount++; - bStart = TRUE; + bStart = sal_True; } } } @@ -94,7 +94,7 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni xub_StrLen nLen = Len(); if ( nLen ) { - BOOL bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // are we within a (cStrDel delimited) String? + sal_Bool bInString = (nStartPos < nLen) && ((*this).GetChar(nStartPos) == cStrDel); // are we within a (cStrDel delimited) String? // Is the first character a String-Delimiter? if (bInString ) @@ -116,7 +116,7 @@ void OEvoabString::GetTokenSpecial( String& _rStr,xub_StrLen& nStartPos, sal_Uni else { // end of String - bInString = FALSE; + bInString = sal_False; } } else @@ -151,7 +151,7 @@ sal_Bool OEvoabTable::checkHeaderLine() { if (m_nFilePos == 0 && ((OEvoabConnection*)m_pConnection)->isHeaderLine()) { - BOOL bRead2; + sal_Bool bRead2; do { bRead2 = m_pFileStream->ReadByteStringLine(m_aCurrentLine,m_pConnection->getTextEncoding()); diff --git a/connectivity/source/drivers/evoab/LPreparedStatement.cxx b/connectivity/source/drivers/evoab/LPreparedStatement.cxx index 3c04d4b38c..3c04d4b38c 100644..100755 --- a/connectivity/source/drivers/evoab/LPreparedStatement.cxx +++ b/connectivity/source/drivers/evoab/LPreparedStatement.cxx diff --git a/connectivity/source/drivers/evoab/LPreparedStatement.hxx b/connectivity/source/drivers/evoab/LPreparedStatement.hxx index 13671dee9c..13671dee9c 100644..100755 --- a/connectivity/source/drivers/evoab/LPreparedStatement.hxx +++ b/connectivity/source/drivers/evoab/LPreparedStatement.hxx diff --git a/connectivity/source/drivers/evoab/LResultSet.cxx b/connectivity/source/drivers/evoab/LResultSet.cxx index 3abd4a12c3..3abd4a12c3 100644..100755 --- a/connectivity/source/drivers/evoab/LResultSet.cxx +++ b/connectivity/source/drivers/evoab/LResultSet.cxx diff --git a/connectivity/source/drivers/evoab/LResultSet.hxx b/connectivity/source/drivers/evoab/LResultSet.hxx index 35d4dcd491..35d4dcd491 100644..100755 --- a/connectivity/source/drivers/evoab/LResultSet.hxx +++ b/connectivity/source/drivers/evoab/LResultSet.hxx diff --git a/connectivity/source/drivers/evoab/LServices.cxx b/connectivity/source/drivers/evoab/LServices.cxx index 45c10f7365..3ea2a455e1 100644..100755 --- a/connectivity/source/drivers/evoab/LServices.cxx +++ b/connectivity/source/drivers/evoab/LServices.cxx @@ -30,13 +30,11 @@ #include "precompiled_connectivity.hxx" #include "LDriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::evoab; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -49,27 +47,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// The prescribed C-Api must be met! -// It consists of three functions, which must be exported by the module. -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -119,31 +96,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - OEvoabDriver::getImplementationName_Static(), - OEvoabDriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "FILE::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/evoab/LStatement.cxx b/connectivity/source/drivers/evoab/LStatement.cxx index 0e29bcf1cb..0e29bcf1cb 100644..100755 --- a/connectivity/source/drivers/evoab/LStatement.cxx +++ b/connectivity/source/drivers/evoab/LStatement.cxx diff --git a/connectivity/source/drivers/evoab/LStatement.hxx b/connectivity/source/drivers/evoab/LStatement.hxx index e2454dc2a5..e2454dc2a5 100644..100755 --- a/connectivity/source/drivers/evoab/LStatement.hxx +++ b/connectivity/source/drivers/evoab/LStatement.hxx diff --git a/connectivity/source/drivers/evoab/LTable.cxx b/connectivity/source/drivers/evoab/LTable.cxx index 32fbf1170c..deab8caced 100644..100755 --- a/connectivity/source/drivers/evoab/LTable.cxx +++ b/connectivity/source/drivers/evoab/LTable.cxx @@ -72,7 +72,7 @@ using namespace ::com::sun::star::lang; // ------------------------------------------------------------------------- void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) { - BOOL bRead = TRUE; + sal_Bool bRead = sal_True; QuotedTokenizedString aHeaderLine; OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection; @@ -115,7 +115,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) m_aPrecisions.reserve(nFieldCount); m_aScales.reserve(nFieldCount); - sal_Bool bCase = getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(); + sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); CharClass aCharClass(pConnection->getDriver()->getFactory(),_aLocale); // read description sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter(); @@ -141,11 +141,11 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) //OSL_TRACE("OEvoabTable::aColumnName = %s\n", ((OUtoCStr(::rtl::OUString(aColumnName))) ? (OUtoCStr(::rtl::OUString(aColumnName))):("NULL")) ); sal_Int32 eType; - UINT16 nPrecision = 0; - UINT16 nScale = 0; + sal_uInt16 nPrecision = 0; + sal_uInt16 nScale = 0; - BOOL bNumeric = FALSE; - ULONG nIndex = 0; + sal_Bool bNumeric = sal_False; + sal_uIntPtr nIndex = 0; // first without fielddelimiter String aField; @@ -155,7 +155,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) if (aField.Len() == 0 || (pConnection->getStringDelimiter() && pConnection->getStringDelimiter() == aField.GetChar(0))) { - bNumeric = FALSE; + bNumeric = sal_False; } else { @@ -169,11 +169,11 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) if (aField2.Len() == 0) { - bNumeric = FALSE; + bNumeric = sal_False; } else { - bNumeric = TRUE; + bNumeric = sal_True; xub_StrLen nDot = 0; for (xub_StrLen j = 0; j < aField2.Len(); j++) { @@ -183,7 +183,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) (!cThousandDelimiter || c != cThousandDelimiter) && !aCharClass.isDigit(aField2,j)) { - bNumeric = FALSE; + bNumeric = sal_False; break; } if (cDecimalDelimiter && c == cDecimalDelimiter) @@ -195,7 +195,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) } if (nDot > 1) // if there is more than one dot it isn't a number - bNumeric = FALSE; + bNumeric = sal_False; if (bNumeric && cThousandDelimiter) { // is the delimiter given correctly @@ -208,7 +208,7 @@ void OEvoabTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) continue; else { - bNumeric = FALSE; + bNumeric = sal_False; break; } } @@ -510,7 +510,7 @@ sal_Bool OEvoabTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sa *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return TRUE; + return sal_True; OEvoabConnection* pConnection = (OEvoabConnection*)m_pConnection; // Fields: @@ -669,7 +669,7 @@ sal_Bool OEvoabTable::setColumnAliases() aColumnFinalName = aColumnReadName; sColumnFinalName = aColumnFinalName; - sal_Bool bCase = getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(); + sal_Bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); ::rtl::OUString aTypeName; aTypeName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); sdbcx::OColumn* pColumn = new sdbcx::OColumn(sColumnFinalName,aTypeName,::rtl::OUString(), @@ -695,7 +695,7 @@ sal_Bool OEvoabTable::checkHeaderLine() { if (m_nFilePos == 0 && ((OEvoabConnection*)m_pConnection)->isHeaderLine()) { - BOOL bRead2; + sal_Bool bRead2; do { bRead2 = m_pFileStream->ReadByteStringLine(m_aCurrentLine,m_pConnection->getTextEncoding()); diff --git a/connectivity/source/drivers/evoab/LTable.hxx b/connectivity/source/drivers/evoab/LTable.hxx index f9659a927c..f9659a927c 100644..100755 --- a/connectivity/source/drivers/evoab/LTable.hxx +++ b/connectivity/source/drivers/evoab/LTable.hxx diff --git a/connectivity/source/drivers/evoab/LTables.cxx b/connectivity/source/drivers/evoab/LTables.cxx index 41fbf8f7a0..41fbf8f7a0 100644..100755 --- a/connectivity/source/drivers/evoab/LTables.cxx +++ b/connectivity/source/drivers/evoab/LTables.cxx diff --git a/connectivity/source/drivers/evoab/LTables.hxx b/connectivity/source/drivers/evoab/LTables.hxx index c91957aa9b..c91957aa9b 100644..100755 --- a/connectivity/source/drivers/evoab/LTables.hxx +++ b/connectivity/source/drivers/evoab/LTables.hxx diff --git a/connectivity/source/drivers/evoab/evoab.xml b/connectivity/source/drivers/evoab/evoab.xml index 669eb109ad..669eb109ad 100644..100755 --- a/connectivity/source/drivers/evoab/evoab.xml +++ b/connectivity/source/drivers/evoab/evoab.xml diff --git a/connectivity/source/drivers/evoab/exports.dxp b/connectivity/source/drivers/evoab/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/evoab/exports.dxp +++ b/connectivity/source/drivers/evoab/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/evoab/makefile.mk b/connectivity/source/drivers/evoab/makefile.mk index 82e0ce4b70..82e0ce4b70 100644..100755 --- a/connectivity/source/drivers/evoab/makefile.mk +++ b/connectivity/source/drivers/evoab/makefile.mk diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx index 1767ec1bcf..1767ec1bcf 100644..100755 --- a/connectivity/source/drivers/evoab2/EApi.cxx +++ b/connectivity/source/drivers/evoab2/EApi.cxx diff --git a/connectivity/source/drivers/evoab2/EApi.h b/connectivity/source/drivers/evoab2/EApi.h index c089fda927..c089fda927 100644..100755 --- a/connectivity/source/drivers/evoab2/EApi.h +++ b/connectivity/source/drivers/evoab2/EApi.h diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx index d1cc91b842..d1cc91b842 100644..100755 --- a/connectivity/source/drivers/evoab2/NCatalog.cxx +++ b/connectivity/source/drivers/evoab2/NCatalog.cxx diff --git a/connectivity/source/drivers/evoab2/NCatalog.hxx b/connectivity/source/drivers/evoab2/NCatalog.hxx index b08b4e46a1..b08b4e46a1 100644..100755 --- a/connectivity/source/drivers/evoab2/NCatalog.hxx +++ b/connectivity/source/drivers/evoab2/NCatalog.hxx diff --git a/connectivity/source/drivers/evoab2/NColumns.cxx b/connectivity/source/drivers/evoab2/NColumns.cxx index 53818b7507..53818b7507 100644..100755 --- a/connectivity/source/drivers/evoab2/NColumns.cxx +++ b/connectivity/source/drivers/evoab2/NColumns.cxx diff --git a/connectivity/source/drivers/evoab2/NColumns.hxx b/connectivity/source/drivers/evoab2/NColumns.hxx index 34c01e911f..34c01e911f 100644..100755 --- a/connectivity/source/drivers/evoab2/NColumns.hxx +++ b/connectivity/source/drivers/evoab2/NColumns.hxx diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx index f056f61719..f056f61719 100644..100755 --- a/connectivity/source/drivers/evoab2/NConnection.cxx +++ b/connectivity/source/drivers/evoab2/NConnection.cxx diff --git a/connectivity/source/drivers/evoab2/NConnection.hxx b/connectivity/source/drivers/evoab2/NConnection.hxx index 2b25b76013..2b25b76013 100644..100755 --- a/connectivity/source/drivers/evoab2/NConnection.hxx +++ b/connectivity/source/drivers/evoab2/NConnection.hxx diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index 5fa7050c1e..5fa7050c1e 100644..100755 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx index a0fe1788e2..a0fe1788e2 100644..100755 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.hxx diff --git a/connectivity/source/drivers/evoab2/NDebug.cxx b/connectivity/source/drivers/evoab2/NDebug.cxx index 92e360425b..92e360425b 100644..100755 --- a/connectivity/source/drivers/evoab2/NDebug.cxx +++ b/connectivity/source/drivers/evoab2/NDebug.cxx diff --git a/connectivity/source/drivers/evoab2/NDebug.hxx b/connectivity/source/drivers/evoab2/NDebug.hxx index 77f7269c82..77f7269c82 100644..100755 --- a/connectivity/source/drivers/evoab2/NDebug.hxx +++ b/connectivity/source/drivers/evoab2/NDebug.hxx diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx index ae34a7e771..ae34a7e771 100644..100755 --- a/connectivity/source/drivers/evoab2/NDriver.cxx +++ b/connectivity/source/drivers/evoab2/NDriver.cxx diff --git a/connectivity/source/drivers/evoab2/NDriver.hxx b/connectivity/source/drivers/evoab2/NDriver.hxx index c8917bffa6..c8917bffa6 100644..100755 --- a/connectivity/source/drivers/evoab2/NDriver.hxx +++ b/connectivity/source/drivers/evoab2/NDriver.hxx diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx index 1aadfbf031..1aadfbf031 100644..100755 --- a/connectivity/source/drivers/evoab2/NPreparedStatement.cxx +++ b/connectivity/source/drivers/evoab2/NPreparedStatement.cxx diff --git a/connectivity/source/drivers/evoab2/NPreparedStatement.hxx b/connectivity/source/drivers/evoab2/NPreparedStatement.hxx index af0e56729f..af0e56729f 100644..100755 --- a/connectivity/source/drivers/evoab2/NPreparedStatement.hxx +++ b/connectivity/source/drivers/evoab2/NPreparedStatement.hxx diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index f59a420894..f59a420894 100644..100755 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx diff --git a/connectivity/source/drivers/evoab2/NResultSet.hxx b/connectivity/source/drivers/evoab2/NResultSet.hxx index 0ffe5a7e5b..0ffe5a7e5b 100644..100755 --- a/connectivity/source/drivers/evoab2/NResultSet.hxx +++ b/connectivity/source/drivers/evoab2/NResultSet.hxx diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx index 335b44418c..335b44418c 100644..100755 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx index 6906549dec..6906549dec 100644..100755 --- a/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx +++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.hxx diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx index 75b2beb1f9..25e947386d 100644..100755 --- a/connectivity/source/drivers/evoab2/NServices.cxx +++ b/connectivity/source/drivers/evoab2/NServices.cxx @@ -36,7 +36,6 @@ using namespace connectivity::evoab; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -49,27 +48,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// The prescribed C-Api must be met! -// It consists of three functions, which must be exported by the module. -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "EVOAB::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -119,31 +97,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - OEvoabDriver::getImplementationName_Static(), - OEvoabDriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "FILE::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index a73a241113..a73a241113 100644..100755 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx diff --git a/connectivity/source/drivers/evoab2/NStatement.hxx b/connectivity/source/drivers/evoab2/NStatement.hxx index b5adfeb0a7..b5adfeb0a7 100644..100755 --- a/connectivity/source/drivers/evoab2/NStatement.hxx +++ b/connectivity/source/drivers/evoab2/NStatement.hxx diff --git a/connectivity/source/drivers/evoab2/NTable.cxx b/connectivity/source/drivers/evoab2/NTable.cxx index 30807ab4f5..30807ab4f5 100644..100755 --- a/connectivity/source/drivers/evoab2/NTable.cxx +++ b/connectivity/source/drivers/evoab2/NTable.cxx diff --git a/connectivity/source/drivers/evoab2/NTable.hxx b/connectivity/source/drivers/evoab2/NTable.hxx index 169191d630..169191d630 100644..100755 --- a/connectivity/source/drivers/evoab2/NTable.hxx +++ b/connectivity/source/drivers/evoab2/NTable.hxx diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx index a883d823a8..a883d823a8 100644..100755 --- a/connectivity/source/drivers/evoab2/NTables.cxx +++ b/connectivity/source/drivers/evoab2/NTables.cxx diff --git a/connectivity/source/drivers/evoab2/NTables.hxx b/connectivity/source/drivers/evoab2/NTables.hxx index 001454a18d..001454a18d 100644..100755 --- a/connectivity/source/drivers/evoab2/NTables.hxx +++ b/connectivity/source/drivers/evoab2/NTables.hxx diff --git a/connectivity/source/drivers/evoab2/evoab.component b/connectivity/source/drivers/evoab2/evoab.component new file mode 100755 index 0000000000..a99719388d --- /dev/null +++ b/connectivity/source/drivers/evoab2/evoab.component @@ -0,0 +1,34 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbc.evoab.OEvoabDriver"> + <service name="com.sun.star.sdbc.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/evoab2/evoab.xml b/connectivity/source/drivers/evoab2/evoab.xml index fbf309cbf0..fbf309cbf0 100644..100755 --- a/connectivity/source/drivers/evoab2/evoab.xml +++ b/connectivity/source/drivers/evoab2/evoab.xml diff --git a/connectivity/source/drivers/evoab2/makefile.mk b/connectivity/source/drivers/evoab2/makefile.mk index 474e001e09..6f61762a0c 100644..100755 --- a/connectivity/source/drivers/evoab2/makefile.mk +++ b/connectivity/source/drivers/evoab2/makefile.mk @@ -111,3 +111,11 @@ DEF1NAME= $(SHL1TARGET) # --- Targets ---------------------------------- .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/evoab.component + +$(MISC)/evoab.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + evoab.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt evoab.component diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx index ad4430cb88..ad4430cb88 100644..100755 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx diff --git a/connectivity/source/drivers/file/FColumns.cxx b/connectivity/source/drivers/file/FColumns.cxx index fb25c29700..ae1d119011 100644..100755 --- a/connectivity/source/drivers/file/FColumns.cxx +++ b/connectivity/source/drivers/file/FColumns.cxx @@ -73,7 +73,7 @@ sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName) sal_False, sal_False, sal_False, - m_pTable->getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers()); + m_pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers()); xRet = pRet; break; } diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx index 6d7ee212fb..6d7ee212fb 100644..100755 --- a/connectivity/source/drivers/file/FConnection.cxx +++ b/connectivity/source/drivers/file/FConnection.cxx diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx index 778e7e0039..778e7e0039 100644..100755 --- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx +++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/file/FDateFunctions.cxx b/connectivity/source/drivers/file/FDateFunctions.cxx index a7a1bcc4d7..a7a1bcc4d7 100644..100755 --- a/connectivity/source/drivers/file/FDateFunctions.cxx +++ b/connectivity/source/drivers/file/FDateFunctions.cxx diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx index 363c29cef5..363c29cef5 100644..100755 --- a/connectivity/source/drivers/file/FDriver.cxx +++ b/connectivity/source/drivers/file/FDriver.cxx diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx index 34317087e2..93e7cb4b2a 100644..100755 --- a/connectivity/source/drivers/file/FNoException.cxx +++ b/connectivity/source/drivers/file/FNoException.cxx @@ -101,16 +101,16 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,::std::vector< } // Further descend in Parse Tree - for (UINT32 i = 0; i < pParseNode->count(); i++) + for (sal_uInt32 i = 0; i < pParseNode->count(); i++) scanParameter(pParseNode->getChild(i),_rParaNodes); } // ----------------------------------------------------------------------------- OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::GetOrderbyKeyValue" ); - UINT32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue()); + sal_uInt32 nBookmarkValue = Abs((sal_Int32)(_rRow->get())[0]->getValue()); - OKeyValue* pKeyValue = OKeyValue::createKeyValue((UINT32)nBookmarkValue); + OKeyValue* pKeyValue = OKeyValue::createKeyValue((sal_uInt32)nBookmarkValue); ::std::vector<sal_Int32>::iterator aIter = m_aOrderbyColumnNumber.begin(); for (;aIter != m_aOrderbyColumnNumber.end(); ++aIter) diff --git a/connectivity/source/drivers/file/FNumericFunctions.cxx b/connectivity/source/drivers/file/FNumericFunctions.cxx index 7800eb6b68..7800eb6b68 100644..100755 --- a/connectivity/source/drivers/file/FNumericFunctions.cxx +++ b/connectivity/source/drivers/file/FNumericFunctions.cxx diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index 1d507cdae6..9b797fb483 100644..100755 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -479,7 +479,7 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetVal *((m_aParameterRow->get())[parameterIndex]) = x; } // ----------------------------------------------------------------------------- -UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol) +sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Reference<XPropertySet>& _xCol) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OPreparedStatement::AddParameter" ); OSL_UNUSED( pParameter ); @@ -493,7 +493,7 @@ UINT32 OPreparedStatement::AddParameter(OSQLParseNode * pParameter, const Refere ::rtl::OUString sParameterName; // set up Parameter-Column: sal_Int32 eType = DataType::VARCHAR; - UINT32 nPrecision = 255; + sal_uInt32 nPrecision = 255; sal_Int32 nScale = 0; sal_Int32 nNullable = ColumnValue::NULLABLE; @@ -577,13 +577,13 @@ void OPreparedStatement::initializeResultSet(OResultSet* _pResult) if (!m_xParamColumns->get().empty()) { // begin with AssignValues - USHORT nParaCount=0; // gives the current number of previously set Parameters + sal_uInt16 nParaCount=0; // gives the current number of previously set Parameters // search for parameters to be substituted: size_t nCount = m_aAssignValues.is() ? m_aAssignValues->get().size() : 1; // 1 is important for the Criteria for (size_t j = 1; j < nCount; j++) { - UINT32 nParameter = (*m_aAssignValues).getParameterIndex(j); + sal_uInt32 nParameter = (*m_aAssignValues).getParameterIndex(j); if (nParameter == SQL_NO_PARAMETER) continue; // this AssignValue is no Parameter @@ -627,7 +627,7 @@ void OPreparedStatement::parseParamterElem(const String& _sColumnName,OSQLParseN if(nParameter == -1) nParameter = AddParameter(pRow_Value_Constructor_Elem,xCol); // Save number of parameter in the variable: - SetAssignValue(_sColumnName, String(), TRUE, nParameter); + SetAssignValue(_sColumnName, String(), sal_True, nParameter); } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 0eec6676b7..59bfc070bf 100644..100755 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -76,11 +76,7 @@ using namespace com::sun::star::sdbcx; using namespace com::sun::star::container; // Maximal number of Rows, that can be processed being sorted with ORDER BY: -#if defined (WIN) -#define MAX_KEYSET_SIZE 0x3ff0 // Somewhat less than a Segment, so there is still room for Memory-Debug-Information -#else #define MAX_KEYSET_SIZE 0x40000 // 256K -#endif namespace { @@ -143,7 +139,7 @@ OResultSet::OResultSet(OStatement_Base* pStmt,OSQLParseTreeIterator& _aSQLIterat m_nResultSetConcurrency = isCount() ? ResultSetConcurrency::READ_ONLY : ResultSetConcurrency::UPDATABLE; construct(); - m_aSkipDeletedSet.SetDeleted(m_bShowDeleted); + m_aSkipDeletedSet.SetDeletedVisible(m_bShowDeleted); osl_decrementInterlockedCount( &m_refCount ); } @@ -648,7 +644,7 @@ void SAL_CALL OResultSet::insertRow( ) throw(SQLException, RuntimeException) // we know that we append new rows at the end // so we have to know where the end is m_aSkipDeletedSet.skipDeleted(IResultSetHelper::LAST,1,sal_False); - m_bRowInserted = m_pTable->InsertRow(*m_aInsertRow, TRUE, m_xColsIdx); + m_bRowInserted = m_pTable->InsertRow(*m_aInsertRow, sal_True, m_xColsIdx); if(m_bRowInserted && m_pFileSet.is()) { sal_Int32 nPos = (m_aInsertRow->get())[0]->getValue(); @@ -904,20 +900,20 @@ IPropertyArrayHelper & OResultSet::getInfoHelper() } //------------------------------------------------------------------ -BOOL OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, - INT32 nFirstOffset, - BOOL bEvaluate, - BOOL bRetrieveData) +sal_Bool OResultSet::ExecuteRow(IResultSetHelper::Movement eFirstCursorPosition, + sal_Int32 nFirstOffset, + sal_Bool bEvaluate, + sal_Bool bRetrieveData) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::ExecuteRow" ); OSL_ENSURE(m_pSQLAnalyzer,"OResultSet::ExecuteRow: Analyzer isn't set!"); // For further Fetch-Operations this information may possibly be changed ... IResultSetHelper::Movement eCursorPosition = eFirstCursorPosition; - INT32 nOffset = nFirstOffset; + sal_Int32 nOffset = nFirstOffset; const OSQLColumns & rTableCols = *(m_pTable->getTableColumns()); - BOOL bHasRestriction = m_pSQLAnalyzer->hasRestriction(); + sal_Bool bHasRestriction = m_pSQLAnalyzer->hasRestriction(); again: // protect from reading over the end when someboby is inserting while we are reading @@ -940,8 +936,13 @@ again: { m_pTable->fetchRow(m_aEvaluateRow, rTableCols, sal_True,bRetrieveData || bHasRestriction); - if ((!m_bShowDeleted && m_aEvaluateRow->isDeleted()) - || (bHasRestriction && !m_pSQLAnalyzer->evaluateRestriction())) + if ( ( !m_bShowDeleted + && m_aEvaluateRow->isDeleted() + ) + || ( bHasRestriction + && !m_pSQLAnalyzer->evaluateRestriction() + ) + ) { // Evaluate the next record // delete current row in Keyset if (m_pEvaluationKeySet) @@ -988,12 +989,14 @@ again: // Evaluate may only be set, // if the Keyset will be constructed further - if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT && !isCount() && - (m_pFileSet.is() || m_pSortIndex) && bEvaluate) + if ( ( m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT ) + && !isCount() + && bEvaluate + ) { if (m_pSortIndex) { - OKeyValue* pKeyValue = GetOrderbyKeyValue(m_aEvaluateRow); + OKeyValue* pKeyValue = GetOrderbyKeyValue( m_aSelectRow ); m_pSortIndex->AddKeyValue(pKeyValue); } else if (m_pFileSet.is()) @@ -1008,7 +1011,7 @@ again: if (bEvaluate) { // read the actual result-row - bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,TRUE); + bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,sal_True); } if (bOK) @@ -1023,7 +1026,7 @@ again: sal_Bool bOK = sal_True; if (bEvaluate) { - bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,TRUE); + bOK = m_pTable->fetchRow(m_aEvaluateRow, *(m_pTable->getTableColumns()), sal_True,sal_True); } if (bOK) { @@ -1035,13 +1038,13 @@ again: } //------------------------------------------------------------------- -BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, BOOL bRetrieveData) +sal_Bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOffset, sal_Bool bRetrieveData) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::Move" ); //IgnoreDeletedRows: // - INT32 nTempPos = m_nRowPos; + sal_Int32 nTempPos = m_nRowPos; if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT && !isCount()) @@ -1049,7 +1052,7 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, if (!m_pFileSet.is()) //no Index available { // Normal FETCH - ExecuteRow(eCursorPosition,nOffset,FALSE,bRetrieveData); + ExecuteRow(eCursorPosition,nOffset,sal_False,bRetrieveData); // now set the bookmark for outside this is the logical pos and not the file pos *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); @@ -1086,16 +1089,16 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, // The FileCursor is outside of the valid range, if: // a.) m_nRowPos < 1 // b.) a KeySet exists and m_nRowPos > m_pFileSet->size() - if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (INT32)m_pFileSet->get().size() )) + if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= (sal_Int32)m_pFileSet->get().size() )) // && m_pFileSet->IsFrozen() { goto Error; } else { - if (m_nRowPos < (INT32)m_pFileSet->get().size()) + if (m_nRowPos < (sal_Int32)m_pFileSet->get().size()) { // Fetch via Index - ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],FALSE,bRetrieveData); + ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],sal_False,bRetrieveData); // now set the bookmark for outside *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1); @@ -1114,25 +1117,25 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, } sal_Bool bOK = sal_True; // Determine the number of further Fetches - while (bOK && m_nRowPos >= (INT32)m_pFileSet->get().size()) + while (bOK && m_nRowPos >= (sal_Int32)m_pFileSet->get().size()) { if (m_pEvaluationKeySet) { - if (m_nRowPos >= (INT32)m_pEvaluationKeySet->size()) + if (m_nRowPos >= (sal_Int32)m_pEvaluationKeySet->size()) return sal_False; else if (m_nRowPos == 0) { m_aEvaluateIter = m_pEvaluationKeySet->begin(); - bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,TRUE, bRetrieveData); + bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,sal_True, bRetrieveData); } else { ++m_aEvaluateIter; - bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,TRUE, bRetrieveData); + bOK = ExecuteRow(IResultSetHelper::BOOKMARK,*m_aEvaluateIter,sal_True, bRetrieveData); } } else - bOK = ExecuteRow(IResultSetHelper::NEXT,1,TRUE, FALSE);//bRetrieveData); + bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True, sal_False);//bRetrieveData); } if (bOK) @@ -1280,8 +1283,8 @@ void OResultSet::sortRows() ::std::vector<sal_Int32>::iterator aOrderByIter = m_aOrderbyColumnNumber.begin(); for (::std::vector<sal_Int16>::size_type i=0;aOrderByIter != m_aOrderbyColumnNumber.end(); ++aOrderByIter,++i) { - OSL_ENSURE((sal_Int32)m_aRow->get().size() > *aOrderByIter,"Invalid Index"); - switch ((*(m_aRow->get().begin()+*aOrderByIter))->getValue().getTypeKind()) + OSL_ENSURE((sal_Int32)m_aSelectRow->get().size() > *aOrderByIter,"Invalid Index"); + switch ((*(m_aSelectRow->get().begin()+*aOrderByIter))->getValue().getTypeKind()) { case DataType::CHAR: case DataType::VARCHAR: @@ -1310,7 +1313,7 @@ void OResultSet::sortRows() OSL_FAIL("OFILECursor::Execute: Datentyp nicht implementiert"); break; } - (m_aEvaluateRow->get())[*aOrderByIter]->setBound(sal_True); + (m_aSelectRow->get())[*aOrderByIter]->setBound(sal_True); } m_pSortIndex = new OSortIndex(eKeyType,m_aOrderbyAscending); @@ -1321,14 +1324,19 @@ void OResultSet::sortRows() while (m_aEvaluateIter != m_pEvaluationKeySet->end()) { - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE); + ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True); ++m_aEvaluateIter; } } else { - while (ExecuteRow(IResultSetHelper::NEXT,1,TRUE)) + while ( ExecuteRow( IResultSetHelper::NEXT, 1, sal_False, sal_True ) ) { + m_aSelectRow->get()[0]->setValue( m_aRow->get()[0]->getValue() ); + if ( m_pSQLAnalyzer->hasFunctions() ) + m_pSQLAnalyzer->setSelectionEvaluationResult( m_aSelectRow, m_aColMapping ); + const sal_Int32 nBookmark = (*m_aRow->get().begin())->getValue(); + ExecuteRow( IResultSetHelper::BOOKMARK, nBookmark, sal_True, sal_False ); } } @@ -1342,7 +1350,7 @@ void OResultSet::sortRows() // ------------------------------------------------------------------------- -BOOL OResultSet::OpenImpl() +sal_Bool OResultSet::OpenImpl() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::OpenImpl" ); OSL_ENSURE(m_pSQLAnalyzer,"No analyzer set with setSqlAnalyzer!"); @@ -1410,9 +1418,9 @@ BOOL OResultSet::OpenImpl() while (bOK) { if (m_pEvaluationKeySet) - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE); + ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True); else - bOK = ExecuteRow(IResultSetHelper::NEXT,1,TRUE); + bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True); if (bOK) { @@ -1432,8 +1440,8 @@ BOOL OResultSet::OpenImpl() } else { - BOOL bDistinct = FALSE; - BOOL bWasSorted = FALSE; + sal_Bool bDistinct = sal_False; + sal_Bool bWasSorted = sal_False; OSQLParseNode *pDistinct = m_pParseTree->getChild(1); ::std::vector<sal_Int32> aOrderbyColumnNumberSave; ::std::vector<TAscendingOrder> aOrderbyAscendingSave; @@ -1446,14 +1454,14 @@ BOOL OResultSet::OpenImpl() aOrderbyColumnNumberSave = m_aOrderbyColumnNumber; m_aOrderbyColumnNumber.clear(); aOrderbyAscendingSave.assign(m_aOrderbyAscending.begin(), m_aOrderbyAscending.end()); - bWasSorted = TRUE; + bWasSorted = sal_True; } // the first column is the bookmark column ::std::vector<sal_Int32>::iterator aColStart = (m_aColMapping.begin()+1); ::std::copy(aColStart, m_aColMapping.end(),::std::back_inserter(m_aOrderbyColumnNumber)); m_aOrderbyAscending.assign(m_aColMapping.size()-1, SQL_ASC); - bDistinct = TRUE; + bDistinct = sal_True; } if (IsSorted()) @@ -1490,15 +1498,15 @@ BOOL OResultSet::OpenImpl() if (nMaxRow) { #if OSL_DEBUG_LEVEL > 1 - INT32 nFound=0; + sal_Int32 nFound=0; #endif - INT32 nPos; - INT32 nKey; + sal_Int32 nPos; + sal_Int32 nKey; for( size_t j = nMaxRow-1; j > 0; --j) { nPos = (m_pFileSet->get())[j]; - ExecuteRow(IResultSetHelper::BOOKMARK,nPos,FALSE); + ExecuteRow(IResultSetHelper::BOOKMARK,nPos,sal_False); m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); { // copy row values OValueRefVector::Vector::iterator copyFrom = m_aSelectRow->get().begin(); @@ -1511,7 +1519,7 @@ BOOL OResultSet::OpenImpl() // compare with next row nKey = (m_pFileSet->get())[j-1]; - ExecuteRow(IResultSetHelper::BOOKMARK,nKey,FALSE); + ExecuteRow(IResultSetHelper::BOOKMARK,nKey,sal_False); m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping); OValueRefVector::Vector::iterator loopInRow = m_aSelectRow->get().begin(); OValueVector::Vector::iterator existentInSearchRow = aSearchRow->get().begin(); @@ -1574,9 +1582,9 @@ BOOL OResultSet::OpenImpl() while (bOK) { if (m_pEvaluationKeySet) - ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),TRUE); + ExecuteRow(IResultSetHelper::BOOKMARK,(*m_aEvaluateIter),sal_True); else - bOK = ExecuteRow(IResultSetHelper::NEXT,1,TRUE); + bOK = ExecuteRow(IResultSetHelper::NEXT,1,sal_True); if (bOK) { @@ -1598,7 +1606,7 @@ BOOL OResultSet::OpenImpl() m_nRowCountResult = 0; OSL_ENSURE(m_aAssignValues.is(),"No assign values set!"); - if(!m_pTable->InsertRow(*m_aAssignValues, TRUE,m_xColsIdx)) + if(!m_pTable->InsertRow(*m_aAssignValues, sal_True,m_xColsIdx)) { m_nFilePos = 0; return sal_False; @@ -1652,7 +1660,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow, ::std::vector<sal_Int32>& _rColMapping) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OResultSet::setBoundedColumns" ); - ::comphelper::UStringMixEqual aCase(_xMetaData->storesMixedCaseQuotedIdentifiers()); + ::comphelper::UStringMixEqual aCase(_xMetaData->supportsMixedCaseQuotedIdentifiers()); Reference<XPropertySet> xTableColumn; ::rtl::OUString sTableColumnName, sSelectColumnRealName; diff --git a/connectivity/source/drivers/file/FResultSetMetaData.cxx b/connectivity/source/drivers/file/FResultSetMetaData.cxx index fc45a15afb..fc45a15afb 100644..100755 --- a/connectivity/source/drivers/file/FResultSetMetaData.cxx +++ b/connectivity/source/drivers/file/FResultSetMetaData.cxx diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index 161e210c8a..78232769c2 100644..100755 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -442,19 +442,12 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef, return; // Everything tested and we have the name of the Column. // What number is the Column? - try - { - m_aOrderbyColumnNumber.push_back(xColLocate->findColumn(aColumnName)); - } - catch(Exception) - { - ::rtl::Reference<OSQLColumns> aSelectColumns = m_aSQLIterator.getSelectColumns(); - ::comphelper::UStringMixEqual aCase; - OSQLColumns::Vector::const_iterator aFind = ::connectivity::find(aSelectColumns->get().begin(),aSelectColumns->get().end(),aColumnName,aCase); - if ( aFind == aSelectColumns->get().end() ) - throw SQLException(); - m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->get().begin()) + 1); - } + ::rtl::Reference<OSQLColumns> aSelectColumns = m_aSQLIterator.getSelectColumns(); + ::comphelper::UStringMixEqual aCase; + OSQLColumns::Vector::const_iterator aFind = ::connectivity::find(aSelectColumns->get().begin(),aSelectColumns->get().end(),aColumnName,aCase); + if ( aFind == aSelectColumns->get().end() ) + throw SQLException(); + m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->get().begin()) + 1); // Ascending or Descending? m_aOrderbyAscending.push_back((SQL_ISTOKEN(pAscendingDescending,DESC)) ? SQL_DESC : SQL_ASC); @@ -740,7 +733,7 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< String>& aColumnNam else if (SQL_ISTOKEN(pRow_Value_Constructor_Elem,NULL)) { // set NULL - SetAssignValue(aColumnName, String(), TRUE); + SetAssignValue(aColumnName, String(), sal_True); } else if (SQL_ISRULE(pRow_Value_Constructor_Elem,parameter)) parseParamterElem(aColumnName,pRow_Value_Constructor_Elem); @@ -752,8 +745,8 @@ void OStatement_Base::ParseAssignValues(const ::std::vector< String>& aColumnNam //------------------------------------------------------------------ void OStatement_Base::SetAssignValue(const String& aColumnName, const String& aValue, - BOOL bSetNull, - UINT32 nParameter) + sal_Bool bSetNull, + sal_uInt32 nParameter) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OStatement_Base::SetAssignValue" ); Reference<XPropertySet> xCol; diff --git a/connectivity/source/drivers/file/FStringFunctions.cxx b/connectivity/source/drivers/file/FStringFunctions.cxx index 490d9c7bef..490d9c7bef 100644..100755 --- a/connectivity/source/drivers/file/FStringFunctions.cxx +++ b/connectivity/source/drivers/file/FStringFunctions.cxx diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index bf4bb889d8..f686ecab56 100644..100755 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -51,7 +51,7 @@ using namespace ::com::sun::star::container; DBG_NAME( file_OFileTable ) OFileTable::OFileTable(sdbcx::OCollection* _pTables,OConnection* _pConnection) -: OTable_TYPEDEF(_pTables,_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers()) +: OTable_TYPEDEF(_pTables,_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers()) ,m_pConnection(_pConnection) ,m_pFileStream(NULL) ,m_nFilePos(0) @@ -73,7 +73,7 @@ OFileTable::OFileTable( sdbcx::OCollection* _pTables,OConnection* _pConnection, const ::rtl::OUString& _Description , const ::rtl::OUString& _SchemaName, const ::rtl::OUString& _CatalogName - ) : OTable_TYPEDEF(_pTables,_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers(), + ) : OTable_TYPEDEF(_pTables,_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers(), _Name, _Type, _Description, @@ -205,19 +205,19 @@ void SAL_CALL OFileTable::release() throw() OTable_TYPEDEF::release(); } // ----------------------------------------------------------------------------- -BOOL OFileTable::InsertRow(OValueRefVector& /*rRow*/, BOOL /*bFlush*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) +sal_Bool OFileTable::InsertRow(OValueRefVector& /*rRow*/, sal_Bool /*bFlush*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::InsertRow" ); return sal_False; } // ----------------------------------------------------------------------------- -BOOL OFileTable::DeleteRow(const OSQLColumns& /*_rCols*/) +sal_Bool OFileTable::DeleteRow(const OSQLColumns& /*_rCols*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::DeleteRow" ); return sal_False; } // ----------------------------------------------------------------------------- -BOOL OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) +sal_Bool OFileTable::UpdateRow(OValueRefVector& /*rRow*/, OValueRefRow& /*pOrgRow*/,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess>& /*_xCols*/) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "file", "Ocke.Janssen@sun.com", "OFileTable::UpdateRow" ); return sal_False; diff --git a/connectivity/source/drivers/file/FTables.cxx b/connectivity/source/drivers/file/FTables.cxx index c56cf59a66..c56cf59a66 100644..100755 --- a/connectivity/source/drivers/file/FTables.cxx +++ b/connectivity/source/drivers/file/FTables.cxx diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index ef73134773..5a0102c38e 100644..100755 --- a/connectivity/source/drivers/file/fanalyzer.cxx +++ b/connectivity/source/drivers/file/fanalyzer.cxx @@ -104,7 +104,26 @@ void OSQLAnalyzer::start(OSQLParseNode* pSQLParseNode) m_pConnection->throwGenericSQLException(STR_QUERY_COMPLEX_COUNT,NULL); } else - m_aSelectionEvaluations.push_back( TPredicates() ); + { + if ( SQL_ISPUNCTUATION( pColumnRef, "*" ) + || ( SQL_ISRULE( pColumnRef, column_ref ) + && ( pColumnRef->count() == 3 ) + && ( pColumnRef->getChild(0)->getNodeType() == SQL_NODE_NAME ) + && SQL_ISPUNCTUATION( pColumnRef->getChild(1), "." ) + && SQL_ISRULE( pColumnRef->getChild(2), column_val ) + && SQL_ISPUNCTUATION( pColumnRef->getChild(2)->getChild(0), "*" ) + ) + ) + { + // push one element for each column of our table + const Reference< XNameAccess > xColumnNames( m_aCompiler->getOrigColumns() ); + const Sequence< ::rtl::OUString > aColumnNames( xColumnNames->getElementNames() ); + for ( sal_Int32 j=0; j<aColumnNames.getLength(); ++j ) + m_aSelectionEvaluations.push_back( TPredicates() ); + } + else + m_aSelectionEvaluations.push_back( TPredicates() ); + } } } } @@ -264,12 +283,12 @@ OOperandAttr* OSQLAnalyzer::createOperandAttr(sal_Int32 _nPos, return new OOperandAttr(static_cast<sal_uInt16>(_nPos),_xCol); } // ----------------------------------------------------------------------------- -BOOL OSQLAnalyzer::hasRestriction() const +sal_Bool OSQLAnalyzer::hasRestriction() const { return m_aCompiler->hasCode(); } // ----------------------------------------------------------------------------- -BOOL OSQLAnalyzer::hasFunctions() const +sal_Bool OSQLAnalyzer::hasFunctions() const { if ( m_bSelectionFirstTime ) { @@ -290,11 +309,12 @@ void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow& _pRow,const ::std: { if ( aIter->second.is() ) { - sal_Int32 map = nPos; // the first column (index 0) is for convenience only. The first real select column is no 1. - if ( (nPos > 0) && (nPos < static_cast<sal_Int32>(_rColumnMapping.size())) ) + sal_Int32 map = nPos; + if ( nPos < static_cast< sal_Int32 >( _rColumnMapping.size() ) ) map = _rColumnMapping[nPos]; - aIter->second->startSelection((_pRow->get())[map]); + if ( map > 0 ) + aIter->second->startSelection( (_pRow->get())[map] ); } } } diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx index db458015e2..ad8662c7d0 100644..100755 --- a/connectivity/source/drivers/file/fcode.cxx +++ b/connectivity/source/drivers/file/fcode.cxx @@ -349,7 +349,7 @@ sal_Bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) con case DataType::LONGVARCHAR: { rtl::OUString sLH = aLH, sRH = aRH; - INT32 nRes = rtl_ustr_compareIgnoreAsciiCase_WithLength + sal_Int32 nRes = rtl_ustr_compareIgnoreAsciiCase_WithLength ( sLH.pData->buffer, sLH.pData->length, diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 739804b961..f95fb343c0 100644..100755 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -60,7 +60,7 @@ DBG_NAME(OPredicateCompiler) OPredicateCompiler::OPredicateCompiler(OSQLAnalyzer* pAnalyzer)//,OCursor& rCurs) : m_pAnalyzer(pAnalyzer) , m_nParamCounter(0) - , m_bORCondition(FALSE) + , m_bORCondition(sal_False) { DBG_CTOR(OPredicateCompiler,NULL); } diff --git a/connectivity/source/drivers/file/file.xml b/connectivity/source/drivers/file/file.xml index b3b681c305..b3b681c305 100644..100755 --- a/connectivity/source/drivers/file/file.xml +++ b/connectivity/source/drivers/file/file.xml diff --git a/connectivity/source/drivers/file/makefile.mk b/connectivity/source/drivers/file/makefile.mk index 41f061de80..41f061de80 100644..100755 --- a/connectivity/source/drivers/file/makefile.mk +++ b/connectivity/source/drivers/file/makefile.mk diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx index 5306accc8a..c71afa3d41 100644..100755 --- a/connectivity/source/drivers/file/quotedstring.cxx +++ b/connectivity/source/drivers/file/quotedstring.cxx @@ -45,8 +45,8 @@ namespace connectivity return 0; xub_StrLen nTokCount = 1; - BOOL bStart = TRUE; // Are we on the first character in the Token? - BOOL bInString = FALSE; // Are we WITHIN a (cStrDel delimited) String? + sal_Bool bStart = sal_True; // Are we on the first character in the Token? + sal_Bool bInString = sal_False; // Are we WITHIN a (cStrDel delimited) String? // Search for String-end after the first not matching character for( xub_StrLen i = 0; i < nLen; ++i ) @@ -54,11 +54,11 @@ namespace connectivity const sal_Unicode cChar = m_sString.GetChar(i); if (bStart) { - bStart = FALSE; + bStart = sal_False; // First character a String-Delimiter? if ( cChar == cStrDel ) { - bInString = TRUE; // then we are now WITHIN the string! + bInString = sal_True; // then we are now WITHIN the string! continue; // skip this character! } } @@ -76,7 +76,7 @@ namespace connectivity else { // String-End - bInString = FALSE; + bInString = sal_False; } } } // if (bInString) @@ -86,7 +86,7 @@ namespace connectivity if ( cChar == cTok ) { ++nTokCount; - bStart = TRUE; + bStart = sal_True; } } } @@ -103,7 +103,7 @@ namespace connectivity const xub_StrLen nLen = m_sString.Len(); if ( nLen ) { - BOOL bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // are we WITHIN a (cStrDel delimited) String? + sal_Bool bInString = (nStartPos < nLen) && (m_sString.GetChar(nStartPos) == cStrDel); // are we WITHIN a (cStrDel delimited) String? // First character a String-Delimiter? if (bInString ) @@ -132,7 +132,7 @@ namespace connectivity else { //end of String - bInString = FALSE; + bInString = sal_False; *pData = 0; } } diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx index f82eb7de00..f82eb7de00 100644..100755 --- a/connectivity/source/drivers/flat/ECatalog.cxx +++ b/connectivity/source/drivers/flat/ECatalog.cxx diff --git a/connectivity/source/drivers/flat/EColumns.cxx b/connectivity/source/drivers/flat/EColumns.cxx index 7fdbeca25c..7fdbeca25c 100644..100755 --- a/connectivity/source/drivers/flat/EColumns.cxx +++ b/connectivity/source/drivers/flat/EColumns.cxx diff --git a/connectivity/source/drivers/flat/EConnection.cxx b/connectivity/source/drivers/flat/EConnection.cxx index 0097e075ef..fa1abf048a 100644..100755 --- a/connectivity/source/drivers/flat/EConnection.cxx +++ b/connectivity/source/drivers/flat/EConnection.cxx @@ -53,6 +53,7 @@ using namespace ::com::sun::star::lang; // -------------------------------------------------------------------------------- OFlatConnection::OFlatConnection(ODriver* _pDriver) : OConnection(_pDriver) + ,m_nMaxRowsToScan(50) ,m_bHeaderLine(sal_True) ,m_cFieldDelimiter(';') ,m_cStringDelimiter('"') @@ -105,10 +106,15 @@ void OFlatConnection::construct(const ::rtl::OUString& url,const Sequence< Prope OSL_VERIFY( pBegin->Value >>= aVal ); m_cThousandDelimiter = aVal.toChar(); } + else if ( !pBegin->Name.compareToAscii("MaxRowScan") ) + { + pBegin->Value >>= m_nMaxRowsToScan; + } } osl_decrementInterlockedCount( &m_refCount ); OConnection::construct(url,info); + m_bShowDeleted = sal_True; // we do not supported rows for this type } // -------------------------------------------------------------------------------- Reference< XDatabaseMetaData > SAL_CALL OFlatConnection::getMetaData( ) throw(SQLException, RuntimeException) diff --git a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx index 85d65153d4..85d65153d4 100644..100755 --- a/connectivity/source/drivers/flat/EDatabaseMetaData.cxx +++ b/connectivity/source/drivers/flat/EDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx index 48560bfb46..48560bfb46 100644..100755 --- a/connectivity/source/drivers/flat/EDriver.cxx +++ b/connectivity/source/drivers/flat/EDriver.cxx diff --git a/connectivity/source/drivers/flat/EPreparedStatement.cxx b/connectivity/source/drivers/flat/EPreparedStatement.cxx index 601aadbb7b..601aadbb7b 100644..100755 --- a/connectivity/source/drivers/flat/EPreparedStatement.cxx +++ b/connectivity/source/drivers/flat/EPreparedStatement.cxx diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx index 94d47c3002..94d47c3002 100644..100755 --- a/connectivity/source/drivers/flat/EResultSet.cxx +++ b/connectivity/source/drivers/flat/EResultSet.cxx diff --git a/connectivity/source/drivers/flat/EStatement.cxx b/connectivity/source/drivers/flat/EStatement.cxx index 6dd16a00b6..6dd16a00b6 100644..100755 --- a/connectivity/source/drivers/flat/EStatement.cxx +++ b/connectivity/source/drivers/flat/EStatement.cxx diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 36e4e29edf..14bf8ee5fe 100644..100755 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -73,7 +73,7 @@ using namespace ::com::sun::star::lang; void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "flat", "Ocke.Janssen@sun.com", "OFlatTable::fillColumns" ); - BOOL bRead = TRUE; + sal_Bool bRead = sal_True; QuotedTokenizedString aHeaderLine; OFlatConnection* pConnection = (OFlatConnection*)m_pConnection; @@ -114,11 +114,11 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) m_aScales.clear(); // reserve some space m_aColumns->get().reserve(nFieldCount+1); - m_aTypes.reserve(nFieldCount+1); - m_aPrecisions.reserve(nFieldCount+1); - m_aScales.reserve(nFieldCount+1); + m_aTypes.assign(nFieldCount+1,DataType::SQLNULL); + m_aPrecisions.assign(nFieldCount+1,-1); + m_aScales.assign(nFieldCount+1,-1); - const sal_Bool bCase = m_pConnection->getMetaData()->storesMixedCaseQuotedIdentifiers(); + const sal_Bool bCase = m_pConnection->getMetaData()->supportsMixedCaseQuotedIdentifiers(); CharClass aCharClass(pConnection->getDriver()->getFactory(),_aLocale); // read description const sal_Unicode cDecimalDelimiter = pConnection->getDecimalDelimiter(); @@ -126,106 +126,186 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) String aColumnName; ::rtl::OUString aTypeName; ::comphelper::UStringMixEqual aCase(bCase); - xub_StrLen nStartPosHeaderLine = 0; // use for eficient way to get the tokens - xub_StrLen nStartPosFirstLine = 0; // use for eficient way to get the tokens - xub_StrLen nStartPosFirstLine2 = 0; - for (xub_StrLen i = 0; i < nFieldCount; i++) + ::std::vector<String> aColumnNames,m_aTypeNames; + m_aTypeNames.resize(nFieldCount); + const sal_Int32 nMaxRowsToScan = pConnection->getMaxRowsToScan(); + sal_Int32 nRowCount = 0; + do { - if ( bHasHeaderLine ) + xub_StrLen nStartPosHeaderLine = 0; // use for eficient way to get the tokens + xub_StrLen nStartPosFirstLine = 0; // use for eficient way to get the tokens + xub_StrLen nStartPosFirstLine2 = 0; + for (xub_StrLen i = 0; i < nFieldCount; i++) { - aHeaderLine.GetTokenSpecial(aColumnName,nStartPosHeaderLine,m_cFieldDelimiter,m_cStringDelimiter); - if ( !aColumnName.Len() ) + if ( nRowCount == 0) { - aColumnName = 'C'; - aColumnName += String::CreateFromInt32(i+1); + if ( bHasHeaderLine ) + { + aHeaderLine.GetTokenSpecial(aColumnName,nStartPosHeaderLine,m_cFieldDelimiter,m_cStringDelimiter); + if ( !aColumnName.Len() ) + { + aColumnName = 'C'; + aColumnName += String::CreateFromInt32(i+1); + } + } + else + { + // no column name so ... + aColumnName = 'C'; + aColumnName += String::CreateFromInt32(i+1); + } + aColumnNames.push_back(aColumnName); } + impl_fillColumnInfo_nothrow(aFirstLine,nStartPosFirstLine,nStartPosFirstLine2,m_aTypes[i],m_aPrecisions[i],m_aScales[i],m_aTypeNames[i],cDecimalDelimiter,cThousandDelimiter,aCharClass); } - else + ++nRowCount; + } + while(nRowCount < nMaxRowsToScan && m_pFileStream->ReadByteStringLine(aFirstLine,nEncoding)); + + for (xub_StrLen i = 0; i < nFieldCount; i++) + { + // check if the columname already exists + String aAlias(aColumnNames[i]); + OSQLColumns::Vector::const_iterator aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase); + sal_Int32 nExprCnt = 0; + while(aFind != m_aColumns->get().end()) { - // no column name so ... - aColumnName = 'C'; - aColumnName += String::CreateFromInt32(i+1); + (aAlias = aColumnNames[i]) += String::CreateFromInt32(++nExprCnt); + aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase); } - sal_Int32 eType; - UINT16 nPrecision = 0; - UINT16 nScale = 0; - BOOL bNumeric = FALSE; - ULONG nIndex = 0; + sdbcx::OColumn* pColumn = new sdbcx::OColumn(aAlias,m_aTypeNames[i],::rtl::OUString(),::rtl::OUString(), + ColumnValue::NULLABLE, + m_aPrecisions[i], + m_aScales[i], + m_aTypes[i], + sal_False, + sal_False, + sal_False, + bCase); + Reference< XPropertySet> xCol = pColumn; + m_aColumns->get().push_back(xCol); + } + m_pFileStream->Seek(m_nStartRowFilePos); +} +void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,xub_StrLen& nStartPosFirstLine,xub_StrLen& nStartPosFirstLine2 + ,sal_Int32& io_nType,sal_Int32& io_nPrecisions,sal_Int32& io_nScales,String& o_sTypeName + ,const sal_Unicode cDecimalDelimiter,const sal_Unicode cThousandDelimiter,const CharClass& aCharClass) +{ + if ( io_nType != DataType::VARCHAR ) + { + sal_Bool bNumeric = io_nType == DataType::SQLNULL || io_nType == DataType::DOUBLE || io_nType == DataType::DECIMAL || io_nType == DataType::INTEGER; + sal_uLong nIndex = 0; - // first without fielddelimiter - String aField; - aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine,m_cFieldDelimiter,'\0'); - if (aField.Len() == 0 || - (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0))) + if ( bNumeric ) { - bNumeric = FALSE; - if ( m_cStringDelimiter != '\0' ) - aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter); - else - nStartPosFirstLine2 = nStartPosFirstLine; - } - else - { - String aField2; - if ( m_cStringDelimiter != '\0' ) - aFirstLine.GetTokenSpecial(aField2,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter); - else - aField2 = aField; - - if (aField2.Len() == 0) + // first without fielddelimiter + String aField; + aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine,m_cFieldDelimiter,'\0'); + if (aField.Len() == 0 || + (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0))) { - bNumeric = FALSE; + bNumeric = sal_False; + if ( m_cStringDelimiter != '\0' ) + aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter); + else + nStartPosFirstLine2 = nStartPosFirstLine; } else { - bNumeric = TRUE; - xub_StrLen nDot = 0; - xub_StrLen nDecimalDelCount = 0; - for (xub_StrLen j = 0; j < aField2.Len(); j++) + String aField2; + if ( m_cStringDelimiter != '\0' ) + aFirstLine.GetTokenSpecial(aField2,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter); + else + aField2 = aField; + + if (aField2.Len() == 0) { - const sal_Unicode c = aField2.GetChar(j); - // just digits, decimal- and thousands-delimiter? - if ( ( !cDecimalDelimiter || c != cDecimalDelimiter ) && - ( !cThousandDelimiter || c != cThousandDelimiter ) && - !aCharClass.isDigit(aField2,j) && - ( j != 0 || (c != '+' && c != '-' ) ) ) - { - bNumeric = FALSE; - break; - } - if (cDecimalDelimiter && c == cDecimalDelimiter) - { - nPrecision = 15; // we have an decimal value - nScale = 2; - ++nDecimalDelCount; - } // if (cDecimalDelimiter && c == cDecimalDelimiter) - if ( c == '.' ) - ++nDot; + bNumeric = sal_False; } - - if (nDecimalDelCount > 1 || nDot > 1 ) // if there is more than one dot it isn't a number - bNumeric = FALSE; - if (bNumeric && cThousandDelimiter) + else { - // is the delimiter correctly given? - const String aValue = aField2.GetToken(0,cDecimalDelimiter); - for (sal_Int32 j = aValue.Len() - 4; j >= 0; j -= 4) + bNumeric = sal_True; + xub_StrLen nDot = 0; + xub_StrLen nDecimalDelCount = 0; + xub_StrLen nSpaceCount = 0; + for (xub_StrLen j = 0; j < aField2.Len(); j++) { - const sal_Unicode c = aValue.GetChar(static_cast<sal_uInt16>(j)); - // just digits, decimal- and thousands-delimiter? - if (c == cThousandDelimiter && j) + const sal_Unicode c = aField2.GetChar(j); + if ( j == nSpaceCount && m_cFieldDelimiter != 32 && c == 32 ) + { + ++nSpaceCount; continue; - else + } + // just digits, decimal- and thousands-delimiter? + if ( ( !cDecimalDelimiter || c != cDecimalDelimiter ) && + ( !cThousandDelimiter || c != cThousandDelimiter ) && + !aCharClass.isDigit(aField2,j) && + ( j != 0 || (c != '+' && c != '-' ) ) ) { - bNumeric = FALSE; + bNumeric = sal_False; break; } + if (cDecimalDelimiter && c == cDecimalDelimiter) + { + io_nPrecisions = 15; // we have an decimal value + io_nScales = 2; + ++nDecimalDelCount; + } // if (cDecimalDelimiter && c == cDecimalDelimiter) + if ( c == '.' ) + ++nDot; } - } - // now it still can be a Date-field - if (!bNumeric) + if (nDecimalDelCount > 1 || nDot > 1 ) // if there is more than one dot it isn't a number + bNumeric = sal_False; + if (bNumeric && cThousandDelimiter) + { + // Is the delimiter correct? + const String aValue = aField2.GetToken(0,cDecimalDelimiter); + for (sal_Int32 j = aValue.Len() - 4; j >= 0; j -= 4) + { + const sal_Unicode c = aValue.GetChar(static_cast<sal_uInt16>(j)); + // just digits, decimal- and thousands-delimiter? + if (c == cThousandDelimiter && j) + continue; + else + { + bNumeric = sal_False; + break; + } + } + } + + // now also check for a date field + if (!bNumeric) + { + try + { + nIndex = m_xNumberFormatter->detectNumberFormat(::com::sun::star::util::NumberFormat::ALL,aField2); + } + catch(Exception&) + { + } + } + } + } + } + else if ( io_nType == DataType::DATE || io_nType == DataType::TIMESTAMP || io_nType == DataType::TIME) + { + String aField; + aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine,m_cFieldDelimiter,'\0'); + if (aField.Len() == 0 || + (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0))) + { + } + else + { + String aField2; + if ( m_cStringDelimiter != '\0' ) + aFirstLine.GetTokenSpecial(aField2,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter); + else + aField2 = aField; + if (aField2.Len() ) { try { @@ -243,87 +323,83 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale) { if (cDecimalDelimiter) { - if(nPrecision) + if(io_nPrecisions) { - eType = DataType::DECIMAL; + io_nType = DataType::DECIMAL; static const ::rtl::OUString s_sDECIMAL(RTL_CONSTASCII_USTRINGPARAM("DECIMAL")); - aTypeName = s_sDECIMAL; + o_sTypeName = s_sDECIMAL; } else { - eType = DataType::DOUBLE; + io_nType = DataType::DOUBLE; static const ::rtl::OUString s_sDOUBLE(RTL_CONSTASCII_USTRINGPARAM("DOUBLE")); - aTypeName = s_sDOUBLE; + o_sTypeName = s_sDOUBLE; } } else - eType = DataType::INTEGER; + { + io_nType = DataType::INTEGER; + io_nPrecisions = 0; + io_nScales = 0; + } nFlags = ColumnSearch::BASIC; } else { - switch (comphelper::getNumberFormatType(m_xNumberFormatter,nIndex)) { case NUMBERFORMAT_DATE: - eType = DataType::DATE; + io_nType = DataType::DATE; { static const ::rtl::OUString s_sDATE(RTL_CONSTASCII_USTRINGPARAM("DATE")); - aTypeName = s_sDATE; + o_sTypeName = s_sDATE; } break; case NUMBERFORMAT_DATETIME: - eType = DataType::TIMESTAMP; + io_nType = DataType::TIMESTAMP; { static const ::rtl::OUString s_sTIMESTAMP(RTL_CONSTASCII_USTRINGPARAM("TIMESTAMP")); - aTypeName = s_sTIMESTAMP; + o_sTypeName = s_sTIMESTAMP; } break; case NUMBERFORMAT_TIME: - eType = DataType::TIME; + io_nType = DataType::TIME; { static const ::rtl::OUString s_sTIME(RTL_CONSTASCII_USTRINGPARAM("TIME")); - aTypeName = s_sTIME; + o_sTypeName = s_sTIME; } break; default: - eType = DataType::VARCHAR; - nPrecision = 0; // nyi: Data can be longer! - nScale = 0; + io_nType = DataType::VARCHAR; + io_nPrecisions = 0; // nyi: Data can be longer! + io_nScales = 0; { static const ::rtl::OUString s_sVARCHAR(RTL_CONSTASCII_USTRINGPARAM("VARCHAR")); - aTypeName = s_sVARCHAR; + o_sTypeName = s_sVARCHAR; } }; nFlags |= ColumnSearch::CHAR; } - - // check if the columname already exists - String aAlias(aColumnName); - OSQLColumns::Vector::const_iterator aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase); - sal_Int32 nExprCnt = 0; - while(aFind != m_aColumns->get().end()) + } + else + { + String aField; + aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine,m_cFieldDelimiter,'\0'); + if (aField.Len() == 0 || + (m_cStringDelimiter && m_cStringDelimiter == aField.GetChar(0))) { - (aAlias = aColumnName) += String::CreateFromInt32(++nExprCnt); - aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase); + if ( m_cStringDelimiter != '\0' ) + aFirstLine.GetTokenSpecial(aField,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter); + else + nStartPosFirstLine2 = nStartPosFirstLine; + } + else + { + String aField2; + if ( m_cStringDelimiter != '\0' ) + aFirstLine.GetTokenSpecial(aField2,nStartPosFirstLine2,m_cFieldDelimiter,m_cStringDelimiter); } - - sdbcx::OColumn* pColumn = new sdbcx::OColumn(aAlias,aTypeName,::rtl::OUString(),::rtl::OUString(), - ColumnValue::NULLABLE, - nPrecision, - nScale, - eType, - sal_False, - sal_False, - sal_False, - bCase); - Reference< XPropertySet> xCol = pColumn; - m_aColumns->get().push_back(xCol); - m_aTypes.push_back(eType); - m_aPrecisions.push_back(nPrecision); - m_aScales.push_back(nScale); } - m_pFileStream->Seek(m_nStartRowFilePos); } // ------------------------------------------------------------------------- OFlatTable::OFlatTable(sdbcx::OCollection* _pTables,OFlatConnection* _pConnection, @@ -531,7 +607,7 @@ sal_Bool OFlatTable::fetchRow(OValueRefRow& _rRow,const OSQLColumns & _rCols,sal *(_rRow->get())[0] = m_nFilePos; if (!bRetrieveData) - return TRUE; + return sal_True; if ( m_bNeedToReadLine ) { sal_Int32 nCurrentPos = 0; diff --git a/connectivity/source/drivers/flat/ETables.cxx b/connectivity/source/drivers/flat/ETables.cxx index e709141b52..e709141b52 100644..100755 --- a/connectivity/source/drivers/flat/ETables.cxx +++ b/connectivity/source/drivers/flat/ETables.cxx diff --git a/connectivity/source/drivers/flat/Eservices.cxx b/connectivity/source/drivers/flat/Eservices.cxx index add587953e..a8cddebadf 100644..100755 --- a/connectivity/source/drivers/flat/Eservices.cxx +++ b/connectivity/source/drivers/flat/Eservices.cxx @@ -30,13 +30,11 @@ #include "precompiled_connectivity.hxx" #include "flat/EDriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::flat; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -49,27 +47,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// The prescribed C-Api must be met! -// It consists of three functions, which must be exported by the Module. -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "FILE::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -119,31 +96,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - ODriver::getImplementationName_Static(), - ODriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "FILE::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/flat/exports.dxp b/connectivity/source/drivers/flat/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/flat/exports.dxp +++ b/connectivity/source/drivers/flat/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/flat/flat.component b/connectivity/source/drivers/flat/flat.component new file mode 100755 index 0000000000..fe8b79ee73 --- /dev/null +++ b/connectivity/source/drivers/flat/flat.component @@ -0,0 +1,35 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbc.flat.ODriver"> + <service name="com.sun.star.sdbc.Driver"/> + <service name="com.sun.star.sdbcx.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/flat/flat.mxp.map b/connectivity/source/drivers/flat/flat.mxp.map index 54a8532f78..2737c61b5a 100644..100755 --- a/connectivity/source/drivers/flat/flat.mxp.map +++ b/connectivity/source/drivers/flat/flat.mxp.map @@ -1,5 +1,4 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory __mh_dylib_header ___builtin_delete diff --git a/connectivity/source/drivers/flat/flat.xcu b/connectivity/source/drivers/flat/flat.xcu index ed29028ea9..ba43121844 100755 --- a/connectivity/source/drivers/flat/flat.xcu +++ b/connectivity/source/drivers/flat/flat.xcu @@ -75,8 +75,18 @@ <value>false</value> </prop> </node> + <node oor:name="MaxRowScan" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:int"> + <value>100</value> + </prop> + </node> </node> <node oor:name="Features"> + <node oor:name="MaxRowScan" oor:op="replace"> + <prop oor:name="Value" oor:type="xs:boolean"> + <value>true</value> + </prop> + </node> <node oor:name="UseSQL92NamingConstraints" oor:op="replace"> <prop oor:name="Value" oor:type="xs:boolean"> <value>true</value> diff --git a/connectivity/source/drivers/flat/flat.xml b/connectivity/source/drivers/flat/flat.xml index 77b45c48da..77b45c48da 100644..100755 --- a/connectivity/source/drivers/flat/flat.xml +++ b/connectivity/source/drivers/flat/flat.xml diff --git a/connectivity/source/drivers/flat/makefile.mk b/connectivity/source/drivers/flat/makefile.mk index da801c44a8..0fe857919d 100644..100755 --- a/connectivity/source/drivers/flat/makefile.mk +++ b/connectivity/source/drivers/flat/makefile.mk @@ -105,3 +105,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/flat.component + +$(MISC)/flat.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + flat.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt flat.component diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx index 7c7d66fc00..7c7d66fc00 100644..100755 --- a/connectivity/source/drivers/hsqldb/HCatalog.cxx +++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx index 8c7b58c33d..8c7b58c33d 100644..100755 --- a/connectivity/source/drivers/hsqldb/HColumns.cxx +++ b/connectivity/source/drivers/hsqldb/HColumns.cxx diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx index 34888d13d1..34888d13d1 100644..100755 --- a/connectivity/source/drivers/hsqldb/HConnection.cxx +++ b/connectivity/source/drivers/hsqldb/HConnection.cxx diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 753faa9e26..7b27d98042 100644..100755 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -276,22 +276,38 @@ namespace connectivity if ( pStream.get() ) { ByteString sLine; + ByteString sVersionString; while ( pStream->ReadLine(sLine) ) { - if ( sLine.Equals("version=",0,sizeof("version=")-1) ) + if ( sLine.Len() == 0 ) + continue; + const ByteString sIniKey = sLine.GetToken( 0, '=' ); + const ByteString sValue = sLine.GetToken( 1, '=' ); + if ( sIniKey.Equals( "hsqldb.compatible_version" ) ) { - sLine = sLine.GetToken(1,'='); - const sal_Int32 nMajor = sLine.GetToken(0,'.').ToInt32(); - const sal_Int32 nMinor = sLine.GetToken(1,'.').ToInt32(); - const sal_Int32 nMicro = sLine.GetToken(2,'.').ToInt32(); - if ( nMajor > 1 - || ( nMajor == 1 && nMinor > 8 ) - || ( nMajor == 1 && nMinor == 8 && nMicro > 0 ) ) + sVersionString = sValue; + } + else + { + if ( sIniKey.Equals( "version" ) + && ( sVersionString.Len() == 0 ) + ) { - ::connectivity::SharedResources aResources; - sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION); + sVersionString = sValue; } - break; + } + } + if ( sVersionString.Len() ) + { + const sal_Int32 nMajor = sVersionString.GetToken(0,'.').ToInt32(); + const sal_Int32 nMinor = sVersionString.GetToken(1,'.').ToInt32(); + const sal_Int32 nMicro = sVersionString.GetToken(2,'.').ToInt32(); + if ( nMajor > 1 + || ( nMajor == 1 && nMinor > 8 ) + || ( nMajor == 1 && nMinor == 8 && nMicro > 0 ) ) + { + ::connectivity::SharedResources aResources; + sMessage = aResources.getResourceString(STR_ERROR_NEW_VERSION); } } } diff --git a/connectivity/source/drivers/hsqldb/HStorage.hxx b/connectivity/source/drivers/hsqldb/HStorage.hxx index f13dc3be28..f13dc3be28 100644..100755 --- a/connectivity/source/drivers/hsqldb/HStorage.hxx +++ b/connectivity/source/drivers/hsqldb/HStorage.hxx diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx index b4a898275b..b4a898275b 100644..100755 --- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 01bbc8131e..3760477087 100644..100755 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -138,7 +138,7 @@ namespace connectivity ::rtl::OUString StorageContainer::removeOldURLPrefix(const ::rtl::OUString& _sURL) { ::rtl::OUString sRet = _sURL; -#if defined(WIN) || defined(WNT) +#if defined(WNT) sal_Int32 nIndex = sRet.lastIndexOf('\\'); #else sal_Int32 nIndex = sRet.lastIndexOf('/'); diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 732737eaf8..732737eaf8 100644..100755 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx index 0e0725af27..0e0725af27 100644..100755 --- a/connectivity/source/drivers/hsqldb/HTables.cxx +++ b/connectivity/source/drivers/hsqldb/HTables.cxx diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx index b2f23d8d51..b2f23d8d51 100644..100755 --- a/connectivity/source/drivers/hsqldb/HTerminateListener.cxx +++ b/connectivity/source/drivers/hsqldb/HTerminateListener.cxx diff --git a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx index 681985951e..681985951e 100644..100755 --- a/connectivity/source/drivers/hsqldb/HTerminateListener.hxx +++ b/connectivity/source/drivers/hsqldb/HTerminateListener.hxx diff --git a/connectivity/source/drivers/hsqldb/HTools.cxx b/connectivity/source/drivers/hsqldb/HTools.cxx index 8f35c9246a..8f35c9246a 100644..100755 --- a/connectivity/source/drivers/hsqldb/HTools.cxx +++ b/connectivity/source/drivers/hsqldb/HTools.cxx diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx index a968a0ca0d..a968a0ca0d 100644..100755 --- a/connectivity/source/drivers/hsqldb/HUser.cxx +++ b/connectivity/source/drivers/hsqldb/HUser.cxx diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx index 9816e56c4f..9816e56c4f 100644..100755 --- a/connectivity/source/drivers/hsqldb/HUsers.cxx +++ b/connectivity/source/drivers/hsqldb/HUsers.cxx diff --git a/connectivity/source/drivers/hsqldb/HView.cxx b/connectivity/source/drivers/hsqldb/HView.cxx index 1596ee7025..1596ee7025 100644..100755 --- a/connectivity/source/drivers/hsqldb/HView.cxx +++ b/connectivity/source/drivers/hsqldb/HView.cxx diff --git a/connectivity/source/drivers/hsqldb/HViews.cxx b/connectivity/source/drivers/hsqldb/HViews.cxx index 55b51f66fc..55b51f66fc 100644..100755 --- a/connectivity/source/drivers/hsqldb/HViews.cxx +++ b/connectivity/source/drivers/hsqldb/HViews.cxx diff --git a/connectivity/source/drivers/hsqldb/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx index 04c6b3bf8b..98eacbb5bb 100644..100755 --- a/connectivity/source/drivers/hsqldb/Hservices.cxx +++ b/connectivity/source/drivers/hsqldb/Hservices.cxx @@ -31,13 +31,11 @@ #include "hsqldb/HDriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::hsqldb; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -50,27 +48,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// The prescribed C-Api must be met! -// It consists of three functions, which must be exported by the Module. -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "ADABAS::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -120,31 +97,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - ODriverDelegator::getImplementationName_Static(), - ODriverDelegator::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "ODBC::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx index 532d7ca0de..532d7ca0de 100644..100755 --- a/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx +++ b/connectivity/source/drivers/hsqldb/StorageFileAccess.cxx diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx index be64f013d7..be64f013d7 100644..100755 --- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx index 36ec342e32..36ec342e32 100644..100755 --- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx +++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx diff --git a/connectivity/source/drivers/hsqldb/accesslog.cxx b/connectivity/source/drivers/hsqldb/accesslog.cxx index 111e1da186..111e1da186 100644..100755 --- a/connectivity/source/drivers/hsqldb/accesslog.cxx +++ b/connectivity/source/drivers/hsqldb/accesslog.cxx diff --git a/connectivity/source/drivers/hsqldb/accesslog.hxx b/connectivity/source/drivers/hsqldb/accesslog.hxx index f10ae77d4e..f10ae77d4e 100644..100755 --- a/connectivity/source/drivers/hsqldb/accesslog.hxx +++ b/connectivity/source/drivers/hsqldb/accesslog.hxx diff --git a/connectivity/source/drivers/hsqldb/exports.dxp b/connectivity/source/drivers/hsqldb/exports.dxp index 7ff56f4f99..3efc73741d 100644..100755 --- a/connectivity/source/drivers/hsqldb/exports.dxp +++ b/connectivity/source/drivers/hsqldb/exports.dxp @@ -1,5 +1,4 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_openStream Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_write__Ljava_lang_String_2Ljava_lang_String_2_3BII diff --git a/connectivity/source/drivers/hsqldb/hsqldb.component b/connectivity/source/drivers/hsqldb/hsqldb.component new file mode 100755 index 0000000000..eb8ae477e7 --- /dev/null +++ b/connectivity/source/drivers/hsqldb/hsqldb.component @@ -0,0 +1,35 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.sdbcx.comp.hsqldb.Driver"> + <service name="com.sun.star.sdbc.Driver"/> + <service name="com.sun.star.sdbcx.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/hsqldb/hsqldb.map b/connectivity/source/drivers/hsqldb/hsqldb.map index a13f907752..c1d8320d19 100644..100755 --- a/connectivity/source/drivers/hsqldb/hsqldb.map +++ b/connectivity/source/drivers/hsqldb/hsqldb.map @@ -1,7 +1,6 @@ UDK_3_0_0 { global: component_getImplementationEnvironment; - component_writeInfo; component_getFactory; Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_openStream; Java_com_sun_star_sdbcx_comp_hsqldb_StorageNativeOutputStream_write__Ljava_lang_String_2Ljava_lang_String_2_3BII; diff --git a/connectivity/source/drivers/hsqldb/hsqldb.xml b/connectivity/source/drivers/hsqldb/hsqldb.xml index f8e5c61af6..f8e5c61af6 100644..100755 --- a/connectivity/source/drivers/hsqldb/hsqldb.xml +++ b/connectivity/source/drivers/hsqldb/hsqldb.xml diff --git a/connectivity/source/drivers/hsqldb/hsqlui.hrc b/connectivity/source/drivers/hsqldb/hsqlui.hrc index e17ffb5e99..e17ffb5e99 100644..100755 --- a/connectivity/source/drivers/hsqldb/hsqlui.hrc +++ b/connectivity/source/drivers/hsqldb/hsqlui.hrc diff --git a/connectivity/source/drivers/hsqldb/hsqlui.src b/connectivity/source/drivers/hsqldb/hsqlui.src index 27166edf26..27166edf26 100644..100755 --- a/connectivity/source/drivers/hsqldb/hsqlui.src +++ b/connectivity/source/drivers/hsqldb/hsqlui.src diff --git a/connectivity/source/drivers/hsqldb/makefile.mk b/connectivity/source/drivers/hsqldb/makefile.mk index 21274e8d42..6e400696fa 100644..100755 --- a/connectivity/source/drivers/hsqldb/makefile.mk +++ b/connectivity/source/drivers/hsqldb/makefile.mk @@ -103,6 +103,7 @@ SHL1STDLIBS=\ SHL1DEPN= +SHL1CREATEJNILIB=TRUE SHL1IMPLIB= i$(HSQLDB_TARGET) SHL1DEF= $(MISC)$/$(SHL1TARGET).def @@ -115,3 +116,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/hsqldb.component + +$(MISC)/hsqldb.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + hsqldb.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt hsqldb.component diff --git a/connectivity/source/drivers/jdbc/Array.cxx b/connectivity/source/drivers/jdbc/Array.cxx index 77b2492b9f..77b2492b9f 100644..100755 --- a/connectivity/source/drivers/jdbc/Array.cxx +++ b/connectivity/source/drivers/jdbc/Array.cxx diff --git a/connectivity/source/drivers/jdbc/Blob.cxx b/connectivity/source/drivers/jdbc/Blob.cxx index a0d9fd73a8..a0d9fd73a8 100644..100755 --- a/connectivity/source/drivers/jdbc/Blob.cxx +++ b/connectivity/source/drivers/jdbc/Blob.cxx diff --git a/connectivity/source/drivers/jdbc/Boolean.cxx b/connectivity/source/drivers/jdbc/Boolean.cxx index cc41160b28..cc41160b28 100644..100755 --- a/connectivity/source/drivers/jdbc/Boolean.cxx +++ b/connectivity/source/drivers/jdbc/Boolean.cxx diff --git a/connectivity/source/drivers/jdbc/CallableStatement.cxx b/connectivity/source/drivers/jdbc/CallableStatement.cxx index 910b64347d..910b64347d 100644..100755 --- a/connectivity/source/drivers/jdbc/CallableStatement.cxx +++ b/connectivity/source/drivers/jdbc/CallableStatement.cxx diff --git a/connectivity/source/drivers/jdbc/Class.cxx b/connectivity/source/drivers/jdbc/Class.cxx index b122ad593d..b122ad593d 100644..100755 --- a/connectivity/source/drivers/jdbc/Class.cxx +++ b/connectivity/source/drivers/jdbc/Class.cxx diff --git a/connectivity/source/drivers/jdbc/Clob.cxx b/connectivity/source/drivers/jdbc/Clob.cxx index 6cc5a4573f..6cc5a4573f 100644..100755 --- a/connectivity/source/drivers/jdbc/Clob.cxx +++ b/connectivity/source/drivers/jdbc/Clob.cxx diff --git a/connectivity/source/drivers/jdbc/ConnectionLog.cxx b/connectivity/source/drivers/jdbc/ConnectionLog.cxx index c50d4bdc9e..c50d4bdc9e 100644..100755 --- a/connectivity/source/drivers/jdbc/ConnectionLog.cxx +++ b/connectivity/source/drivers/jdbc/ConnectionLog.cxx diff --git a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx index da1802f710..da1802f710 100644..100755 --- a/connectivity/source/drivers/jdbc/ContextClassLoader.cxx +++ b/connectivity/source/drivers/jdbc/ContextClassLoader.cxx diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx index 256c08fd36..256c08fd36 100644..100755 --- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx +++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx diff --git a/connectivity/source/drivers/jdbc/Date.cxx b/connectivity/source/drivers/jdbc/Date.cxx index a2c05a67bf..a2c05a67bf 100644..100755 --- a/connectivity/source/drivers/jdbc/Date.cxx +++ b/connectivity/source/drivers/jdbc/Date.cxx diff --git a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx index f64e9cc4f7..f64e9cc4f7 100644..100755 --- a/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx +++ b/connectivity/source/drivers/jdbc/DriverPropertyInfo.cxx diff --git a/connectivity/source/drivers/jdbc/Exception.cxx b/connectivity/source/drivers/jdbc/Exception.cxx index 09e0624d54..09e0624d54 100644..100755 --- a/connectivity/source/drivers/jdbc/Exception.cxx +++ b/connectivity/source/drivers/jdbc/Exception.cxx diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx index 33e8acc3a4..33e8acc3a4 100644..100755 --- a/connectivity/source/drivers/jdbc/InputStream.cxx +++ b/connectivity/source/drivers/jdbc/InputStream.cxx diff --git a/connectivity/source/drivers/jdbc/JBigDecimal.cxx b/connectivity/source/drivers/jdbc/JBigDecimal.cxx index a724a07de1..a724a07de1 100644..100755 --- a/connectivity/source/drivers/jdbc/JBigDecimal.cxx +++ b/connectivity/source/drivers/jdbc/JBigDecimal.cxx diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx index 9621b33410..9621b33410 100644..100755 --- a/connectivity/source/drivers/jdbc/JConnection.cxx +++ b/connectivity/source/drivers/jdbc/JConnection.cxx diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index 8decaa3751..8decaa3751 100644..100755 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index b5847ba21e..b5847ba21e 100644..100755 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx index a78d8fe3de..a78d8fe3de 100644..100755 --- a/connectivity/source/drivers/jdbc/Object.cxx +++ b/connectivity/source/drivers/jdbc/Object.cxx diff --git a/connectivity/source/drivers/jdbc/PreparedStatement.cxx b/connectivity/source/drivers/jdbc/PreparedStatement.cxx index 5c112dd70e..5c112dd70e 100644..100755 --- a/connectivity/source/drivers/jdbc/PreparedStatement.cxx +++ b/connectivity/source/drivers/jdbc/PreparedStatement.cxx diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx index 9998b6c87d..9998b6c87d 100644..100755 --- a/connectivity/source/drivers/jdbc/Reader.cxx +++ b/connectivity/source/drivers/jdbc/Reader.cxx diff --git a/connectivity/source/drivers/jdbc/Ref.cxx b/connectivity/source/drivers/jdbc/Ref.cxx index ad49a24f76..ad49a24f76 100644..100755 --- a/connectivity/source/drivers/jdbc/Ref.cxx +++ b/connectivity/source/drivers/jdbc/Ref.cxx diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index afb8647abf..afb8647abf 100644..100755 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx diff --git a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx index 15ce6fe408..15ce6fe408 100644..100755 --- a/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx +++ b/connectivity/source/drivers/jdbc/ResultSetMetaData.cxx diff --git a/connectivity/source/drivers/jdbc/SQLException.cxx b/connectivity/source/drivers/jdbc/SQLException.cxx index 26c94f5c2f..26c94f5c2f 100644..100755 --- a/connectivity/source/drivers/jdbc/SQLException.cxx +++ b/connectivity/source/drivers/jdbc/SQLException.cxx diff --git a/connectivity/source/drivers/jdbc/SQLWarning.cxx b/connectivity/source/drivers/jdbc/SQLWarning.cxx index ac01b0e2f3..ac01b0e2f3 100644..100755 --- a/connectivity/source/drivers/jdbc/SQLWarning.cxx +++ b/connectivity/source/drivers/jdbc/SQLWarning.cxx diff --git a/connectivity/source/drivers/jdbc/String.cxx b/connectivity/source/drivers/jdbc/String.cxx index a2155054f1..a2155054f1 100644..100755 --- a/connectivity/source/drivers/jdbc/String.cxx +++ b/connectivity/source/drivers/jdbc/String.cxx diff --git a/connectivity/source/drivers/jdbc/Throwable.cxx b/connectivity/source/drivers/jdbc/Throwable.cxx index 0ae5b66b6b..0ae5b66b6b 100644..100755 --- a/connectivity/source/drivers/jdbc/Throwable.cxx +++ b/connectivity/source/drivers/jdbc/Throwable.cxx diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx index 0eee1d5a5a..0eee1d5a5a 100644..100755 --- a/connectivity/source/drivers/jdbc/Timestamp.cxx +++ b/connectivity/source/drivers/jdbc/Timestamp.cxx diff --git a/connectivity/source/drivers/jdbc/exports.dxp b/connectivity/source/drivers/jdbc/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/jdbc/exports.dxp +++ b/connectivity/source/drivers/jdbc/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/jdbc/jdbc.component b/connectivity/source/drivers/jdbc/jdbc.component new file mode 100755 index 0000000000..5d7db4690b --- /dev/null +++ b/connectivity/source/drivers/jdbc/jdbc.component @@ -0,0 +1,34 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbc.JDBCDriver"> + <service name="com.sun.star.sdbc.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/jdbc/jdbc.mxp.map b/connectivity/source/drivers/jdbc/jdbc.mxp.map index a4457e2478..e02823e8c4 100644..100755 --- a/connectivity/source/drivers/jdbc/jdbc.mxp.map +++ b/connectivity/source/drivers/jdbc/jdbc.mxp.map @@ -1,5 +1,4 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory __mh_dylib_header ___builtin_delete diff --git a/connectivity/source/drivers/jdbc/jdbc.xml b/connectivity/source/drivers/jdbc/jdbc.xml index 8fe04eb8a5..8fe04eb8a5 100644..100755 --- a/connectivity/source/drivers/jdbc/jdbc.xml +++ b/connectivity/source/drivers/jdbc/jdbc.xml diff --git a/connectivity/source/drivers/jdbc/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx index 817c5d7e3b..aebe76b6fc 100644..100755 --- a/connectivity/source/drivers/jdbc/jservices.cxx +++ b/connectivity/source/drivers/jdbc/jservices.cxx @@ -35,7 +35,6 @@ using namespace connectivity; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -48,31 +47,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pModCount ); -//*************************************************************************************** -// -// Die vorgeschriebene C-Api muss erfuellt werden! -// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen. -// - -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "SBA::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -123,31 +97,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - java_sql_Driver::getImplementationName_Static(), - java_sql_Driver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "SBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/jdbc/makefile.mk b/connectivity/source/drivers/jdbc/makefile.mk index d676945f17..befdc73d7b 100644..100755 --- a/connectivity/source/drivers/jdbc/makefile.mk +++ b/connectivity/source/drivers/jdbc/makefile.mk @@ -110,3 +110,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/jdbc.component + +$(MISC)/jdbc.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + jdbc.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt jdbc.component diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx index 0de33802e1..0de33802e1 100644..100755 --- a/connectivity/source/drivers/jdbc/tools.cxx +++ b/connectivity/source/drivers/jdbc/tools.cxx diff --git a/connectivity/source/drivers/kab/KCatalog.cxx b/connectivity/source/drivers/kab/KCatalog.cxx index 44d95d1e85..44d95d1e85 100644..100755 --- a/connectivity/source/drivers/kab/KCatalog.cxx +++ b/connectivity/source/drivers/kab/KCatalog.cxx diff --git a/connectivity/source/drivers/kab/KCatalog.hxx b/connectivity/source/drivers/kab/KCatalog.hxx index b24a0a92db..b24a0a92db 100644..100755 --- a/connectivity/source/drivers/kab/KCatalog.hxx +++ b/connectivity/source/drivers/kab/KCatalog.hxx diff --git a/connectivity/source/drivers/kab/KColumns.cxx b/connectivity/source/drivers/kab/KColumns.cxx index 4fd9ca7cb9..4fd9ca7cb9 100644..100755 --- a/connectivity/source/drivers/kab/KColumns.cxx +++ b/connectivity/source/drivers/kab/KColumns.cxx diff --git a/connectivity/source/drivers/kab/KColumns.hxx b/connectivity/source/drivers/kab/KColumns.hxx index c31f0e1659..c31f0e1659 100644..100755 --- a/connectivity/source/drivers/kab/KColumns.hxx +++ b/connectivity/source/drivers/kab/KColumns.hxx diff --git a/connectivity/source/drivers/kab/KConnection.cxx b/connectivity/source/drivers/kab/KConnection.cxx index d612eed46a..d612eed46a 100644..100755 --- a/connectivity/source/drivers/kab/KConnection.cxx +++ b/connectivity/source/drivers/kab/KConnection.cxx diff --git a/connectivity/source/drivers/kab/KConnection.hxx b/connectivity/source/drivers/kab/KConnection.hxx index df49547820..df49547820 100644..100755 --- a/connectivity/source/drivers/kab/KConnection.hxx +++ b/connectivity/source/drivers/kab/KConnection.hxx diff --git a/connectivity/source/drivers/kab/KDEInit.cxx b/connectivity/source/drivers/kab/KDEInit.cxx index 7264f60862..7264f60862 100644..100755 --- a/connectivity/source/drivers/kab/KDEInit.cxx +++ b/connectivity/source/drivers/kab/KDEInit.cxx diff --git a/connectivity/source/drivers/kab/KDEInit.h b/connectivity/source/drivers/kab/KDEInit.h index c1f3963561..c1f3963561 100644..100755 --- a/connectivity/source/drivers/kab/KDEInit.h +++ b/connectivity/source/drivers/kab/KDEInit.h diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx index 8210ba211c..8210ba211c 100644..100755 --- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx +++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.hxx b/connectivity/source/drivers/kab/KDatabaseMetaData.hxx index 00b0bb6414..00b0bb6414 100644..100755 --- a/connectivity/source/drivers/kab/KDatabaseMetaData.hxx +++ b/connectivity/source/drivers/kab/KDatabaseMetaData.hxx diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx index e05cea5eaf..e05cea5eaf 100644..100755 --- a/connectivity/source/drivers/kab/KDriver.cxx +++ b/connectivity/source/drivers/kab/KDriver.cxx diff --git a/connectivity/source/drivers/kab/KDriver.hxx b/connectivity/source/drivers/kab/KDriver.hxx index aa2d1f252b..aa2d1f252b 100644..100755 --- a/connectivity/source/drivers/kab/KDriver.hxx +++ b/connectivity/source/drivers/kab/KDriver.hxx diff --git a/connectivity/source/drivers/kab/KPreparedStatement.cxx b/connectivity/source/drivers/kab/KPreparedStatement.cxx index d82ca654d7..d82ca654d7 100644..100755 --- a/connectivity/source/drivers/kab/KPreparedStatement.cxx +++ b/connectivity/source/drivers/kab/KPreparedStatement.cxx diff --git a/connectivity/source/drivers/kab/KPreparedStatement.hxx b/connectivity/source/drivers/kab/KPreparedStatement.hxx index 876afb1719..876afb1719 100644..100755 --- a/connectivity/source/drivers/kab/KPreparedStatement.hxx +++ b/connectivity/source/drivers/kab/KPreparedStatement.hxx diff --git a/connectivity/source/drivers/kab/KResultSet.cxx b/connectivity/source/drivers/kab/KResultSet.cxx index 1c1b8f35dc..1c1b8f35dc 100644..100755 --- a/connectivity/source/drivers/kab/KResultSet.cxx +++ b/connectivity/source/drivers/kab/KResultSet.cxx diff --git a/connectivity/source/drivers/kab/KResultSet.hxx b/connectivity/source/drivers/kab/KResultSet.hxx index 209f9a1d6c..209f9a1d6c 100644..100755 --- a/connectivity/source/drivers/kab/KResultSet.hxx +++ b/connectivity/source/drivers/kab/KResultSet.hxx diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.cxx b/connectivity/source/drivers/kab/KResultSetMetaData.cxx index 567f3fbaf5..567f3fbaf5 100644..100755 --- a/connectivity/source/drivers/kab/KResultSetMetaData.cxx +++ b/connectivity/source/drivers/kab/KResultSetMetaData.cxx diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.hxx b/connectivity/source/drivers/kab/KResultSetMetaData.hxx index 5bf1dd2495..5bf1dd2495 100644..100755 --- a/connectivity/source/drivers/kab/KResultSetMetaData.hxx +++ b/connectivity/source/drivers/kab/KResultSetMetaData.hxx diff --git a/connectivity/source/drivers/kab/KServices.cxx b/connectivity/source/drivers/kab/KServices.cxx index 1819f49785..b385ba7393 100644..100755 --- a/connectivity/source/drivers/kab/KServices.cxx +++ b/connectivity/source/drivers/kab/KServices.cxx @@ -31,13 +31,11 @@ #include "KDriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::kab; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -50,31 +48,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pTemp ); -//*************************************************************************************** -// -// The following C Api must be provided! -// It consists in three functions that must be exported by the module -// - -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "KAB::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -124,31 +97,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void*, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - KabDriver::getImplementationName_Static(), - KabDriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "KAB::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx index 655e8ae656..655e8ae656 100644..100755 --- a/connectivity/source/drivers/kab/KStatement.cxx +++ b/connectivity/source/drivers/kab/KStatement.cxx diff --git a/connectivity/source/drivers/kab/KStatement.hxx b/connectivity/source/drivers/kab/KStatement.hxx index 044c473ee1..044c473ee1 100644..100755 --- a/connectivity/source/drivers/kab/KStatement.hxx +++ b/connectivity/source/drivers/kab/KStatement.hxx diff --git a/connectivity/source/drivers/kab/KTable.cxx b/connectivity/source/drivers/kab/KTable.cxx index 20247273a5..20247273a5 100644..100755 --- a/connectivity/source/drivers/kab/KTable.cxx +++ b/connectivity/source/drivers/kab/KTable.cxx diff --git a/connectivity/source/drivers/kab/KTable.hxx b/connectivity/source/drivers/kab/KTable.hxx index 2b640e4cdb..2b640e4cdb 100644..100755 --- a/connectivity/source/drivers/kab/KTable.hxx +++ b/connectivity/source/drivers/kab/KTable.hxx diff --git a/connectivity/source/drivers/kab/KTables.cxx b/connectivity/source/drivers/kab/KTables.cxx index 31d66547bd..31d66547bd 100644..100755 --- a/connectivity/source/drivers/kab/KTables.cxx +++ b/connectivity/source/drivers/kab/KTables.cxx diff --git a/connectivity/source/drivers/kab/KTables.hxx b/connectivity/source/drivers/kab/KTables.hxx index 438458c8e3..438458c8e3 100644..100755 --- a/connectivity/source/drivers/kab/KTables.hxx +++ b/connectivity/source/drivers/kab/KTables.hxx diff --git a/connectivity/source/drivers/kab/exports.dxp b/connectivity/source/drivers/kab/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/kab/exports.dxp +++ b/connectivity/source/drivers/kab/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/kab/kab.xml b/connectivity/source/drivers/kab/kab.xml index 115b9f5522..115b9f5522 100644..100755 --- a/connectivity/source/drivers/kab/kab.xml +++ b/connectivity/source/drivers/kab/kab.xml diff --git a/connectivity/source/drivers/kab/kab1.component b/connectivity/source/drivers/kab/kab1.component new file mode 100755 index 0000000000..77227501d3 --- /dev/null +++ b/connectivity/source/drivers/kab/kab1.component @@ -0,0 +1,34 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbc.kab.Driver"> + <service name="com.sun.star.sdbc.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/kab/kabdrv.map b/connectivity/source/drivers/kab/kabdrv.map index 5de866f2e5..5de866f2e5 100644..100755 --- a/connectivity/source/drivers/kab/kabdrv.map +++ b/connectivity/source/drivers/kab/kabdrv.map diff --git a/connectivity/source/drivers/kab/kcondition.cxx b/connectivity/source/drivers/kab/kcondition.cxx index 2ecdead169..2ecdead169 100644..100755 --- a/connectivity/source/drivers/kab/kcondition.cxx +++ b/connectivity/source/drivers/kab/kcondition.cxx diff --git a/connectivity/source/drivers/kab/kcondition.hxx b/connectivity/source/drivers/kab/kcondition.hxx index 41873bd420..41873bd420 100644..100755 --- a/connectivity/source/drivers/kab/kcondition.hxx +++ b/connectivity/source/drivers/kab/kcondition.hxx diff --git a/connectivity/source/drivers/kab/kfields.cxx b/connectivity/source/drivers/kab/kfields.cxx index cf1632b3cd..cf1632b3cd 100644..100755 --- a/connectivity/source/drivers/kab/kfields.cxx +++ b/connectivity/source/drivers/kab/kfields.cxx diff --git a/connectivity/source/drivers/kab/kfields.hxx b/connectivity/source/drivers/kab/kfields.hxx index 2e628cd413..2e628cd413 100644..100755 --- a/connectivity/source/drivers/kab/kfields.hxx +++ b/connectivity/source/drivers/kab/kfields.hxx diff --git a/connectivity/source/drivers/kab/korder.cxx b/connectivity/source/drivers/kab/korder.cxx index e10d2cfeee..e10d2cfeee 100644..100755 --- a/connectivity/source/drivers/kab/korder.cxx +++ b/connectivity/source/drivers/kab/korder.cxx diff --git a/connectivity/source/drivers/kab/korder.hxx b/connectivity/source/drivers/kab/korder.hxx index d6df56d383..d6df56d383 100644..100755 --- a/connectivity/source/drivers/kab/korder.hxx +++ b/connectivity/source/drivers/kab/korder.hxx diff --git a/connectivity/source/drivers/kab/makefile.mk b/connectivity/source/drivers/kab/makefile.mk index 98bedf66ed..13d4857c91 100644..100755 --- a/connectivity/source/drivers/kab/makefile.mk +++ b/connectivity/source/drivers/kab/makefile.mk @@ -46,6 +46,9 @@ CFLAGS+=$(KDE_CFLAGS) .IF "$(KDE_ROOT)"!="" EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib +.IF "$(OS)$(CPU)" == "LINUXX" +EXTRALIBPATHS+=-L$(KDE_ROOT)$/lib64 +.ENDIF .ENDIF # === KAB base library ========================== @@ -136,3 +139,11 @@ dummy: .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/kab1.component + +$(MISC)/kab1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + kab1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt kab1.component diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx b/connectivity/source/drivers/macab/MacabAddressBook.cxx index 1f7d0a6b18..1f7d0a6b18 100644..100755 --- a/connectivity/source/drivers/macab/MacabAddressBook.cxx +++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx diff --git a/connectivity/source/drivers/macab/MacabAddressBook.hxx b/connectivity/source/drivers/macab/MacabAddressBook.hxx index 2aefbd8d9e..2aefbd8d9e 100644..100755 --- a/connectivity/source/drivers/macab/MacabAddressBook.hxx +++ b/connectivity/source/drivers/macab/MacabAddressBook.hxx diff --git a/connectivity/source/drivers/macab/MacabCatalog.cxx b/connectivity/source/drivers/macab/MacabCatalog.cxx index bd9342b4bd..bd9342b4bd 100644..100755 --- a/connectivity/source/drivers/macab/MacabCatalog.cxx +++ b/connectivity/source/drivers/macab/MacabCatalog.cxx diff --git a/connectivity/source/drivers/macab/MacabCatalog.hxx b/connectivity/source/drivers/macab/MacabCatalog.hxx index 52e4e7782f..52e4e7782f 100644..100755 --- a/connectivity/source/drivers/macab/MacabCatalog.hxx +++ b/connectivity/source/drivers/macab/MacabCatalog.hxx diff --git a/connectivity/source/drivers/macab/MacabColumns.cxx b/connectivity/source/drivers/macab/MacabColumns.cxx index 0d78b45969..0d78b45969 100644..100755 --- a/connectivity/source/drivers/macab/MacabColumns.cxx +++ b/connectivity/source/drivers/macab/MacabColumns.cxx diff --git a/connectivity/source/drivers/macab/MacabColumns.hxx b/connectivity/source/drivers/macab/MacabColumns.hxx index 1d75c8b585..1d75c8b585 100644..100755 --- a/connectivity/source/drivers/macab/MacabColumns.hxx +++ b/connectivity/source/drivers/macab/MacabColumns.hxx diff --git a/connectivity/source/drivers/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx index 4841430a07..4841430a07 100644..100755 --- a/connectivity/source/drivers/macab/MacabConnection.cxx +++ b/connectivity/source/drivers/macab/MacabConnection.cxx diff --git a/connectivity/source/drivers/macab/MacabConnection.hxx b/connectivity/source/drivers/macab/MacabConnection.hxx index 65ece28448..65ece28448 100644..100755 --- a/connectivity/source/drivers/macab/MacabConnection.hxx +++ b/connectivity/source/drivers/macab/MacabConnection.hxx diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx index 17b2758534..17b2758534 100644..100755 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.hxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.hxx index 852cd32c7d..852cd32c7d 100644..100755 --- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.hxx +++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.hxx diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx index 3e19b56514..3e19b56514 100644..100755 --- a/connectivity/source/drivers/macab/MacabDriver.cxx +++ b/connectivity/source/drivers/macab/MacabDriver.cxx diff --git a/connectivity/source/drivers/macab/MacabDriver.hxx b/connectivity/source/drivers/macab/MacabDriver.hxx index c21715ec09..c21715ec09 100644..100755 --- a/connectivity/source/drivers/macab/MacabDriver.hxx +++ b/connectivity/source/drivers/macab/MacabDriver.hxx diff --git a/connectivity/source/drivers/macab/MacabGroup.cxx b/connectivity/source/drivers/macab/MacabGroup.cxx index 6f0dabf45b..6f0dabf45b 100644..100755 --- a/connectivity/source/drivers/macab/MacabGroup.cxx +++ b/connectivity/source/drivers/macab/MacabGroup.cxx diff --git a/connectivity/source/drivers/macab/MacabGroup.hxx b/connectivity/source/drivers/macab/MacabGroup.hxx index 1f09ac0d09..1f09ac0d09 100644..100755 --- a/connectivity/source/drivers/macab/MacabGroup.hxx +++ b/connectivity/source/drivers/macab/MacabGroup.hxx diff --git a/connectivity/source/drivers/macab/MacabHeader.cxx b/connectivity/source/drivers/macab/MacabHeader.cxx index 39fb28c62c..39fb28c62c 100644..100755 --- a/connectivity/source/drivers/macab/MacabHeader.cxx +++ b/connectivity/source/drivers/macab/MacabHeader.cxx diff --git a/connectivity/source/drivers/macab/MacabHeader.hxx b/connectivity/source/drivers/macab/MacabHeader.hxx index f24b593a9b..f24b593a9b 100644..100755 --- a/connectivity/source/drivers/macab/MacabHeader.hxx +++ b/connectivity/source/drivers/macab/MacabHeader.hxx diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx index 19d9c5f9de..19d9c5f9de 100644..100755 --- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx +++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.hxx b/connectivity/source/drivers/macab/MacabPreparedStatement.hxx index 0fb1b6e92d..0fb1b6e92d 100644..100755 --- a/connectivity/source/drivers/macab/MacabPreparedStatement.hxx +++ b/connectivity/source/drivers/macab/MacabPreparedStatement.hxx diff --git a/connectivity/source/drivers/macab/MacabRecord.cxx b/connectivity/source/drivers/macab/MacabRecord.cxx index bb6eb60661..bb6eb60661 100644..100755 --- a/connectivity/source/drivers/macab/MacabRecord.cxx +++ b/connectivity/source/drivers/macab/MacabRecord.cxx diff --git a/connectivity/source/drivers/macab/MacabRecord.hxx b/connectivity/source/drivers/macab/MacabRecord.hxx index aa47f8377b..aa47f8377b 100644..100755 --- a/connectivity/source/drivers/macab/MacabRecord.hxx +++ b/connectivity/source/drivers/macab/MacabRecord.hxx diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx index ec82ba5594..ec82ba5594 100644..100755 --- a/connectivity/source/drivers/macab/MacabRecords.cxx +++ b/connectivity/source/drivers/macab/MacabRecords.cxx diff --git a/connectivity/source/drivers/macab/MacabRecords.hxx b/connectivity/source/drivers/macab/MacabRecords.hxx index 0ac946b5c0..0ac946b5c0 100644..100755 --- a/connectivity/source/drivers/macab/MacabRecords.hxx +++ b/connectivity/source/drivers/macab/MacabRecords.hxx diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx index 851052aa59..851052aa59 100644..100755 --- a/connectivity/source/drivers/macab/MacabResultSet.cxx +++ b/connectivity/source/drivers/macab/MacabResultSet.cxx diff --git a/connectivity/source/drivers/macab/MacabResultSet.hxx b/connectivity/source/drivers/macab/MacabResultSet.hxx index 029aa6c13a..029aa6c13a 100644..100755 --- a/connectivity/source/drivers/macab/MacabResultSet.hxx +++ b/connectivity/source/drivers/macab/MacabResultSet.hxx diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx index 064065213c..064065213c 100644..100755 --- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx +++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx index 2140a03b30..2140a03b30 100644..100755 --- a/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx +++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx diff --git a/connectivity/source/drivers/macab/MacabServices.cxx b/connectivity/source/drivers/macab/MacabServices.cxx index 3b4c93a9bd..144eb9ac5c 100644..100755 --- a/connectivity/source/drivers/macab/MacabServices.cxx +++ b/connectivity/source/drivers/macab/MacabServices.cxx @@ -31,13 +31,11 @@ #include "MacabDriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::macab; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -50,31 +48,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pTemp ); -//*************************************************************************************** -// -// The following C Api must be provided! -// It consists in three functions that must be exported by the module -// - -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "MACAB::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -124,31 +97,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void*, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - MacabDriver::getImplementationName_Static(), - MacabDriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "MACAB::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx index fa2654131f..fa2654131f 100644..100755 --- a/connectivity/source/drivers/macab/MacabStatement.cxx +++ b/connectivity/source/drivers/macab/MacabStatement.cxx diff --git a/connectivity/source/drivers/macab/MacabStatement.hxx b/connectivity/source/drivers/macab/MacabStatement.hxx index 0eda7b05f5..0eda7b05f5 100644..100755 --- a/connectivity/source/drivers/macab/MacabStatement.hxx +++ b/connectivity/source/drivers/macab/MacabStatement.hxx diff --git a/connectivity/source/drivers/macab/MacabTable.cxx b/connectivity/source/drivers/macab/MacabTable.cxx index ab4ff29d65..ab4ff29d65 100644..100755 --- a/connectivity/source/drivers/macab/MacabTable.cxx +++ b/connectivity/source/drivers/macab/MacabTable.cxx diff --git a/connectivity/source/drivers/macab/MacabTable.hxx b/connectivity/source/drivers/macab/MacabTable.hxx index 39f113368e..39f113368e 100644..100755 --- a/connectivity/source/drivers/macab/MacabTable.hxx +++ b/connectivity/source/drivers/macab/MacabTable.hxx diff --git a/connectivity/source/drivers/macab/MacabTables.cxx b/connectivity/source/drivers/macab/MacabTables.cxx index 1d839f40f9..1d839f40f9 100644..100755 --- a/connectivity/source/drivers/macab/MacabTables.cxx +++ b/connectivity/source/drivers/macab/MacabTables.cxx diff --git a/connectivity/source/drivers/macab/MacabTables.hxx b/connectivity/source/drivers/macab/MacabTables.hxx index 17422ce862..17422ce862 100644..100755 --- a/connectivity/source/drivers/macab/MacabTables.hxx +++ b/connectivity/source/drivers/macab/MacabTables.hxx diff --git a/connectivity/source/drivers/macab/exports.dxp b/connectivity/source/drivers/macab/exports.dxp index 9630d7e067..f0e1c69934 100755 --- a/connectivity/source/drivers/macab/exports.dxp +++ b/connectivity/source/drivers/macab/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/macab/macab1.component b/connectivity/source/drivers/macab/macab1.component new file mode 100755 index 0000000000..0a120c0418 --- /dev/null +++ b/connectivity/source/drivers/macab/macab1.component @@ -0,0 +1,34 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbc.macab.Driver"> + <service name="com.sun.star.sdbc.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/macab/macabcondition.cxx b/connectivity/source/drivers/macab/macabcondition.cxx index 3faf0aa261..3faf0aa261 100644..100755 --- a/connectivity/source/drivers/macab/macabcondition.cxx +++ b/connectivity/source/drivers/macab/macabcondition.cxx diff --git a/connectivity/source/drivers/macab/macabcondition.hxx b/connectivity/source/drivers/macab/macabcondition.hxx index 29f27bc52f..29f27bc52f 100644..100755 --- a/connectivity/source/drivers/macab/macabcondition.hxx +++ b/connectivity/source/drivers/macab/macabcondition.hxx diff --git a/connectivity/source/drivers/macab/macaborder.cxx b/connectivity/source/drivers/macab/macaborder.cxx index fa8ba7a1ab..fa8ba7a1ab 100644..100755 --- a/connectivity/source/drivers/macab/macaborder.cxx +++ b/connectivity/source/drivers/macab/macaborder.cxx diff --git a/connectivity/source/drivers/macab/macaborder.hxx b/connectivity/source/drivers/macab/macaborder.hxx index bad4bc8133..bad4bc8133 100644..100755 --- a/connectivity/source/drivers/macab/macaborder.hxx +++ b/connectivity/source/drivers/macab/macaborder.hxx diff --git a/connectivity/source/drivers/macab/macabutilities.hxx b/connectivity/source/drivers/macab/macabutilities.hxx index 237a7e4456..237a7e4456 100644..100755 --- a/connectivity/source/drivers/macab/macabutilities.hxx +++ b/connectivity/source/drivers/macab/macabutilities.hxx diff --git a/connectivity/source/drivers/macab/makefile.mk b/connectivity/source/drivers/macab/makefile.mk index 31ffede390..b2e8db65dc 100755 --- a/connectivity/source/drivers/macab/makefile.mk +++ b/connectivity/source/drivers/macab/makefile.mk @@ -128,3 +128,11 @@ dummy: .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/macab1.component + +$(MISC)/macab1.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + macab1.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt macab1.component diff --git a/connectivity/source/drivers/mozab/MCatalog.cxx b/connectivity/source/drivers/mozab/MCatalog.cxx index 4cf7492772..4cf7492772 100644..100755 --- a/connectivity/source/drivers/mozab/MCatalog.cxx +++ b/connectivity/source/drivers/mozab/MCatalog.cxx diff --git a/connectivity/source/drivers/mozab/MCatalog.hxx b/connectivity/source/drivers/mozab/MCatalog.hxx index cc57748fe1..cc57748fe1 100644..100755 --- a/connectivity/source/drivers/mozab/MCatalog.hxx +++ b/connectivity/source/drivers/mozab/MCatalog.hxx diff --git a/connectivity/source/drivers/mozab/MColumnAlias.cxx b/connectivity/source/drivers/mozab/MColumnAlias.cxx index 72a35ef63d..72a35ef63d 100644..100755 --- a/connectivity/source/drivers/mozab/MColumnAlias.cxx +++ b/connectivity/source/drivers/mozab/MColumnAlias.cxx diff --git a/connectivity/source/drivers/mozab/MColumnAlias.hxx b/connectivity/source/drivers/mozab/MColumnAlias.hxx index 4aa9c07d7f..4aa9c07d7f 100644..100755 --- a/connectivity/source/drivers/mozab/MColumnAlias.hxx +++ b/connectivity/source/drivers/mozab/MColumnAlias.hxx diff --git a/connectivity/source/drivers/mozab/MColumns.cxx b/connectivity/source/drivers/mozab/MColumns.cxx index 9e81cfdc0b..9e81cfdc0b 100644..100755 --- a/connectivity/source/drivers/mozab/MColumns.cxx +++ b/connectivity/source/drivers/mozab/MColumns.cxx diff --git a/connectivity/source/drivers/mozab/MColumns.hxx b/connectivity/source/drivers/mozab/MColumns.hxx index ffa11ed4af..ffa11ed4af 100644..100755 --- a/connectivity/source/drivers/mozab/MColumns.hxx +++ b/connectivity/source/drivers/mozab/MColumns.hxx diff --git a/connectivity/source/drivers/mozab/MConfigAccess.cxx b/connectivity/source/drivers/mozab/MConfigAccess.cxx index cc240d0be9..cc240d0be9 100644..100755 --- a/connectivity/source/drivers/mozab/MConfigAccess.cxx +++ b/connectivity/source/drivers/mozab/MConfigAccess.cxx diff --git a/connectivity/source/drivers/mozab/MConfigAccess.hxx b/connectivity/source/drivers/mozab/MConfigAccess.hxx index 7b66797a1f..7b66797a1f 100644..100755 --- a/connectivity/source/drivers/mozab/MConfigAccess.hxx +++ b/connectivity/source/drivers/mozab/MConfigAccess.hxx diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx index c91bb01d00..c91bb01d00 100644..100755 --- a/connectivity/source/drivers/mozab/MConnection.cxx +++ b/connectivity/source/drivers/mozab/MConnection.cxx diff --git a/connectivity/source/drivers/mozab/MConnection.hxx b/connectivity/source/drivers/mozab/MConnection.hxx index 4ec99a1294..4ec99a1294 100644..100755 --- a/connectivity/source/drivers/mozab/MConnection.hxx +++ b/connectivity/source/drivers/mozab/MConnection.hxx diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx index 161d0bced0..161d0bced0 100644..100755 --- a/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx +++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.cxx diff --git a/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx b/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx index 89f908367d..89f908367d 100644..100755 --- a/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx +++ b/connectivity/source/drivers/mozab/MDatabaseMetaData.hxx diff --git a/connectivity/source/drivers/mozab/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index 6ca30dadf8..4610625926 100644..100755 --- a/connectivity/source/drivers/mozab/MDriver.cxx +++ b/connectivity/source/drivers/mozab/MDriver.cxx @@ -251,7 +251,7 @@ EDriverType MozabDriver::impl_classifyURL( const ::rtl::OUString& url ) const sal_Char* pScheme; } aSchemeMap[] = { -#if defined(WNT) || defined(WIN) +#if defined(WNT) { Outlook, "outlook" }, { OutlookExpress, "outlookexp" }, #endif diff --git a/connectivity/source/drivers/mozab/MDriver.hxx b/connectivity/source/drivers/mozab/MDriver.hxx index 5684486b39..5684486b39 100644..100755 --- a/connectivity/source/drivers/mozab/MDriver.hxx +++ b/connectivity/source/drivers/mozab/MDriver.hxx diff --git a/connectivity/source/drivers/mozab/MExtConfigAccess.hxx b/connectivity/source/drivers/mozab/MExtConfigAccess.hxx index 94f15db36b..94f15db36b 100644..100755 --- a/connectivity/source/drivers/mozab/MExtConfigAccess.hxx +++ b/connectivity/source/drivers/mozab/MExtConfigAccess.hxx diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.cxx b/connectivity/source/drivers/mozab/MPreparedStatement.cxx index c221684cbb..c221684cbb 100644..100755 --- a/connectivity/source/drivers/mozab/MPreparedStatement.cxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.cxx diff --git a/connectivity/source/drivers/mozab/MPreparedStatement.hxx b/connectivity/source/drivers/mozab/MPreparedStatement.hxx index cf2dd1986e..cf2dd1986e 100644..100755 --- a/connectivity/source/drivers/mozab/MPreparedStatement.hxx +++ b/connectivity/source/drivers/mozab/MPreparedStatement.hxx diff --git a/connectivity/source/drivers/mozab/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index e6cd5f0474..accabc81ca 100644..100755 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -898,8 +898,8 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT OSQLParseNode *pOptEscape; const OSQLParseNode* pPart2 = parseTree->getChild(1); pColumn = parseTree->getChild(0); // Match Item - pAtom = pPart2->getChild(parseTree->count()-2); // Match String - pOptEscape = pPart2->getChild(parseTree->count()-1); // Opt Escape Rule + pAtom = pPart2->getChild(pPart2->count()-2); // Match String + pOptEscape = pPart2->getChild(pPart2->count()-1); // Opt Escape Rule (void)pOptEscape; const bool bNot = SQL_ISTOKEN(pPart2->getChild(0), NOT); @@ -1373,7 +1373,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow, const Reference<XDatabaseMetaData>& _xMetaData, ::std::vector<sal_Int32>& _rColMapping) { - ::comphelper::UStringMixEqual aCase(_xMetaData->storesMixedCaseQuotedIdentifiers()); + ::comphelper::UStringMixEqual aCase(_xMetaData->supportsMixedCaseQuotedIdentifiers()); Reference<XPropertySet> xTableColumn; ::rtl::OUString sTableColumnName, sSelectColumnRealName; diff --git a/connectivity/source/drivers/mozab/MResultSet.hxx b/connectivity/source/drivers/mozab/MResultSet.hxx index 7f0f93985d..7f0f93985d 100644..100755 --- a/connectivity/source/drivers/mozab/MResultSet.hxx +++ b/connectivity/source/drivers/mozab/MResultSet.hxx diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx index 170cf18e24..170cf18e24 100644..100755 --- a/connectivity/source/drivers/mozab/MResultSetMetaData.cxx +++ b/connectivity/source/drivers/mozab/MResultSetMetaData.cxx diff --git a/connectivity/source/drivers/mozab/MResultSetMetaData.hxx b/connectivity/source/drivers/mozab/MResultSetMetaData.hxx index 134089fb40..134089fb40 100644..100755 --- a/connectivity/source/drivers/mozab/MResultSetMetaData.hxx +++ b/connectivity/source/drivers/mozab/MResultSetMetaData.hxx diff --git a/connectivity/source/drivers/mozab/MServices.cxx b/connectivity/source/drivers/mozab/MServices.cxx index 41c9079914..b9867f2dbf 100644..100755 --- a/connectivity/source/drivers/mozab/MServices.cxx +++ b/connectivity/source/drivers/mozab/MServices.cxx @@ -40,7 +40,6 @@ using namespace connectivity::mozab; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::mozilla::XMozillaBootstrap; @@ -54,31 +53,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pTemp ); -//*************************************************************************************** -// -// Die vorgeschriebene C-Api muss erfuellt werden! -// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen. -// - -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString( RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "MOZAB::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -128,37 +102,6 @@ component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - - REGISTER_PROVIDER( - MozabDriver::getImplementationName_Static(), - MozabDriver::getSupportedServiceNames_Static(), xKey); - - Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.mozilla.MozillaBootstrap")); - REGISTER_PROVIDER( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.mozilla.MozillaBootstrap")), - aSNS, xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "Mozab::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} typedef void* (SAL_CALL * OMozillaBootstrap_CreateInstanceFunction)(const Reference< XMultiServiceFactory >& _rxFactory ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createMozillaBootstrap(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception ) { diff --git a/connectivity/source/drivers/mozab/MStatement.cxx b/connectivity/source/drivers/mozab/MStatement.cxx index e00ab8db2a..e00ab8db2a 100644..100755 --- a/connectivity/source/drivers/mozab/MStatement.cxx +++ b/connectivity/source/drivers/mozab/MStatement.cxx diff --git a/connectivity/source/drivers/mozab/MStatement.hxx b/connectivity/source/drivers/mozab/MStatement.hxx index de1a75d68f..de1a75d68f 100644..100755 --- a/connectivity/source/drivers/mozab/MStatement.hxx +++ b/connectivity/source/drivers/mozab/MStatement.hxx diff --git a/connectivity/source/drivers/mozab/MTable.cxx b/connectivity/source/drivers/mozab/MTable.cxx index d122794a64..d122794a64 100644..100755 --- a/connectivity/source/drivers/mozab/MTable.cxx +++ b/connectivity/source/drivers/mozab/MTable.cxx diff --git a/connectivity/source/drivers/mozab/MTable.hxx b/connectivity/source/drivers/mozab/MTable.hxx index 7f1826257f..7f1826257f 100644..100755 --- a/connectivity/source/drivers/mozab/MTable.hxx +++ b/connectivity/source/drivers/mozab/MTable.hxx diff --git a/connectivity/source/drivers/mozab/MTables.cxx b/connectivity/source/drivers/mozab/MTables.cxx index ebc913845e..ebc913845e 100644..100755 --- a/connectivity/source/drivers/mozab/MTables.cxx +++ b/connectivity/source/drivers/mozab/MTables.cxx diff --git a/connectivity/source/drivers/mozab/MTables.hxx b/connectivity/source/drivers/mozab/MTables.hxx index 437bbbe6c5..437bbbe6c5 100644..100755 --- a/connectivity/source/drivers/mozab/MTables.hxx +++ b/connectivity/source/drivers/mozab/MTables.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx index a5517ac9e8..384a7508cb 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx @@ -239,7 +239,6 @@ Sequence< ::rtl::OUString > SAL_CALL MozillaBootstrap::getSupportedServiceNames( #include <cppuhelper/factory.hxx> using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -252,50 +251,6 @@ component_getImplementationEnvironment( *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const ::rtl::OUString& aServiceImplName, - const Sequence< ::rtl::OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - ::rtl::OUString aMainKeyName; - aMainKeyName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "MOZAB::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - Sequence< ::rtl::OUString > aSNS( 1 ); - aSNS[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.mozilla.MozillaBootstrap")); - REGISTER_PROVIDER( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.mozilla.MozillaBootstrap")), - aSNS, xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "Mozab::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) { MozillaBootstrap * pBootstrap = reinterpret_cast<MozillaBootstrap*>(OMozillaBootstrap_CreateInstance(rServiceManager)); diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx index d605d4bb0a..d605d4bb0a 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx index e9589a0582..e9589a0582 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx index a3a52f68e8..a3a52f68e8 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx index b334bf6a85..b334bf6a85 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.cxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx index 6cab8e3193..6cab8e3193 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSINIParser.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx index 1cffe198ba..1cffe198ba 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSInit.cxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx index bfc141cc58..bfc141cc58 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSInit.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx index a711b42230..a711b42230 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.hxx index 37939c4acc..37939c4acc 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx index ef6a88917b..ef6a88917b 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.cxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx index 2efe916233..2efe916233 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDirServiceProvider.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index f689c285ac..2ae687fdc1 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx @@ -144,8 +144,8 @@ namespace connectivity sal_Int32 ProfileAccess::LoadProductsInfo() { - //load SeaMonkey 2 profiles to m_ProductProfileList - sal_Int32 count = LoadXPToolkitProfiles(MozillaProductType_Mozilla); + //load SeaMonkey 2 profiles to m_ProductProfileList + sal_Int32 count = LoadXPToolkitProfiles(MozillaProductType_Mozilla); //load thunderbird profiles to m_ProductProfileList count += LoadXPToolkitProfiles(MozillaProductType_Thunderbird); diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx index 5a9e61ebf8..5a9e61ebf8 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx index 2978c16fa1..2978c16fa1 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.cxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.hxx index 5cbc352684..5cbc352684 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileManager.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.cxx index 6461215532..6461215532 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.cxx diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.hxx b/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.hxx index 093e2d157c..093e2d157c 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.hxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSRunnable.hxx diff --git a/connectivity/source/drivers/mozab/bootstrap/makefile.mk b/connectivity/source/drivers/mozab/bootstrap/makefile.mk index 6a4172da20..b44436e488 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/makefile.mk +++ b/connectivity/source/drivers/mozab/bootstrap/makefile.mk @@ -78,6 +78,14 @@ SHL1STDLIBS=\ $(SALLIB) \ $(COMPHELPERLIB) +ALLTAR : $(MISC)/mozbootstrap.component + +$(MISC)/mozbootstrap.component .ERRREMOVE : \ + $(SOLARENV)/bin/createcomponent.xslt mozbootstrap.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt mozbootstrap.component + .ELSE SLOFILES += \ $(SLO)$/MNSInit.obj \ @@ -90,4 +98,3 @@ SLOFILES += \ # --- Targets ---------------------------------- .INCLUDE : target.mk - diff --git a/connectivity/source/drivers/mozab/bootstrap/mozbootstrap.component b/connectivity/source/drivers/mozab/bootstrap/mozbootstrap.component new file mode 100755 index 0000000000..5da158924a --- /dev/null +++ b/connectivity/source/drivers/mozab/bootstrap/mozbootstrap.component @@ -0,0 +1,34 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.mozilla.MozillaBootstrap"> + <service name="com.sun.star.mozilla.MozillaBootstrap"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsinit.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsinit.h index e34bc21913..e34bc21913 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsinit.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsinit.h diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofile.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofile.h index 4d65bc3cb5..4d65bc3cb5 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofile.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofile.h diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofiledirserviceprovider.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofiledirserviceprovider.h index 4bb836ed13..4bb836ed13 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofiledirserviceprovider.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_nsprofiledirserviceprovider.h diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_profile_discover.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_profile_discover.h index 03198dcab8..03198dcab8 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_profile_discover.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_profile_discover.h diff --git a/connectivity/source/drivers/mozab/bootstrap/mozilla_profilemanager.h b/connectivity/source/drivers/mozab/bootstrap/mozilla_profilemanager.h index 1579b16947..1579b16947 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/mozilla_profilemanager.h +++ b/connectivity/source/drivers/mozab/bootstrap/mozilla_profilemanager.h diff --git a/connectivity/source/drivers/mozab/bootstrap/post_include_windows.h b/connectivity/source/drivers/mozab/bootstrap/post_include_windows.h index a33bd622ac..a33bd622ac 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/post_include_windows.h +++ b/connectivity/source/drivers/mozab/bootstrap/post_include_windows.h diff --git a/connectivity/source/drivers/mozab/bootstrap/pre_include_windows.h b/connectivity/source/drivers/mozab/bootstrap/pre_include_windows.h index 792e8a34f4..792e8a34f4 100644..100755 --- a/connectivity/source/drivers/mozab/bootstrap/pre_include_windows.h +++ b/connectivity/source/drivers/mozab/bootstrap/pre_include_windows.h diff --git a/connectivity/source/drivers/mozab/exports.dxp b/connectivity/source/drivers/mozab/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/mozab/exports.dxp +++ b/connectivity/source/drivers/mozab/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/mozab/makefile.mk b/connectivity/source/drivers/mozab/makefile.mk index 5ebc146e8e..1928961b04 100644..100755 --- a/connectivity/source/drivers/mozab/makefile.mk +++ b/connectivity/source/drivers/mozab/makefile.mk @@ -184,3 +184,11 @@ $(MISC)$/$(SHL2TARGET).flt: makefile.mk @echo _TI >$@ @echo _real >>$@ + +ALLTAR : $(MISC)/mozab.component + +$(MISC)/mozab.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + mozab.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt mozab.component diff --git a/connectivity/source/drivers/mozab/makefile_mozab.mk b/connectivity/source/drivers/mozab/makefile_mozab.mk index c984f121a2..c984f121a2 100644..100755 --- a/connectivity/source/drivers/mozab/makefile_mozab.mk +++ b/connectivity/source/drivers/mozab/makefile_mozab.mk diff --git a/connectivity/source/drivers/mozab/mozab.component b/connectivity/source/drivers/mozab/mozab.component new file mode 100755 index 0000000000..70f5da3bfe --- /dev/null +++ b/connectivity/source/drivers/mozab/mozab.component @@ -0,0 +1,37 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.mozilla.MozillaBootstrap"> + <service name="com.sun.star.mozilla.MozillaBootstrap"/> + </implementation> + <implementation name="com.sun.star.comp.sdbc.MozabDriver"> + <service name="com.sun.star.sdbc.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/mozab/mozab.xml b/connectivity/source/drivers/mozab/mozab.xml index 33e9219a16..33e9219a16 100644..100755 --- a/connectivity/source/drivers/mozab/mozab.xml +++ b/connectivity/source/drivers/mozab/mozab.xml diff --git a/connectivity/source/drivers/mozab/mozabdrv.map b/connectivity/source/drivers/mozab/mozabdrv.map index a431a07377..a431a07377 100644..100755 --- a/connectivity/source/drivers/mozab/mozabdrv.map +++ b/connectivity/source/drivers/mozab/mozabdrv.map diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx index 2e08d7754b..2e08d7754b 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx index 103903ac36..103903ac36 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MErrorResource.hxx b/connectivity/source/drivers/mozab/mozillasrc/MErrorResource.hxx index d6bfe02b23..d6bfe02b23 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MErrorResource.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MErrorResource.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx index 772390abc2..772390abc2 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.cxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx index 54461bfc22..54461bfc22 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MLdapAttributeMap.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx index de53040895..de53040895 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSDeclares.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx index 4dd1c511f1..4dd1c511f1 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx index 02cdcea1fe..02cdcea1fe 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.cxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.hxx index 85d6337381..85d6337381 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSMozabProxy.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx index 6c2a2f5bc2..6c2a2f5bc2 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.cxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.hxx index 16a27c7702..16a27c7702 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNSTerminateListener.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx index 38310179d7..38310179d7 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.cxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.hxx b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.hxx index 46651383c4..46651383c4 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MNameMapper.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx index e3828a5d04..e3828a5d04 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.cxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx b/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx index 0495bf3cd6..0495bf3cd6 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQuery.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx index 4ea4daf8fa..4ea4daf8fa 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx index 3d81453f06..3d81453f06 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.hxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx index 42517f5515..42517f5515 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.cxx diff --git a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx index 55c1246d43..55c1246d43 100644..100755 --- a/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MTypeConverter.hxx diff --git a/connectivity/source/drivers/mozab/post_include_mozilla.h b/connectivity/source/drivers/mozab/post_include_mozilla.h index cf365e1008..cf365e1008 100644..100755 --- a/connectivity/source/drivers/mozab/post_include_mozilla.h +++ b/connectivity/source/drivers/mozab/post_include_mozilla.h diff --git a/connectivity/source/drivers/mozab/pre_include_mozilla.h b/connectivity/source/drivers/mozab/pre_include_mozilla.h index 4da60543cb..e518d820dc 100644..100755 --- a/connectivity/source/drivers/mozab/pre_include_mozilla.h +++ b/connectivity/source/drivers/mozab/pre_include_mozilla.h @@ -26,13 +26,6 @@ * ************************************************************************/ -#ifndef BOOL -# define MOZ_BOOL - -# define BOOL mozBOOL -# define Bool mozBooL -#endif - // Turn off DEBUG Assertions #ifdef _DEBUG #define _DEBUG_WAS_DEFINED _DEBUG diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx index 3aeff3344a..3aeff3344a 100644..100755 --- a/connectivity/source/drivers/mysql/YCatalog.cxx +++ b/connectivity/source/drivers/mysql/YCatalog.cxx diff --git a/connectivity/source/drivers/mysql/YColumns.cxx b/connectivity/source/drivers/mysql/YColumns.cxx index effe4d3653..effe4d3653 100644..100755 --- a/connectivity/source/drivers/mysql/YColumns.cxx +++ b/connectivity/source/drivers/mysql/YColumns.cxx diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx index 40b1e171a2..40b1e171a2 100644..100755 --- a/connectivity/source/drivers/mysql/YDriver.cxx +++ b/connectivity/source/drivers/mysql/YDriver.cxx diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index a9c97aaeea..a9c97aaeea 100644..100755 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx index aac4f5c3f3..aac4f5c3f3 100644..100755 --- a/connectivity/source/drivers/mysql/YTables.cxx +++ b/connectivity/source/drivers/mysql/YTables.cxx diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx index 50949d5cab..50949d5cab 100644..100755 --- a/connectivity/source/drivers/mysql/YUser.cxx +++ b/connectivity/source/drivers/mysql/YUser.cxx diff --git a/connectivity/source/drivers/mysql/YUsers.cxx b/connectivity/source/drivers/mysql/YUsers.cxx index 17b46179c9..17b46179c9 100644..100755 --- a/connectivity/source/drivers/mysql/YUsers.cxx +++ b/connectivity/source/drivers/mysql/YUsers.cxx diff --git a/connectivity/source/drivers/mysql/YViews.cxx b/connectivity/source/drivers/mysql/YViews.cxx index 8184a7af1d..8184a7af1d 100644..100755 --- a/connectivity/source/drivers/mysql/YViews.cxx +++ b/connectivity/source/drivers/mysql/YViews.cxx diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx index 508c4ed377..bb4bdf6a47 100644..100755 --- a/connectivity/source/drivers/mysql/Yservices.cxx +++ b/connectivity/source/drivers/mysql/Yservices.cxx @@ -30,13 +30,11 @@ #include "precompiled_connectivity.hxx" #include "mysql/YDriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::mysql; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -49,31 +47,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pT ); -//*************************************************************************************** -// -// Die vorgeschriebene C-Api muss erfuellt werden! -// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen. -// - -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "ADABAS::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -124,31 +97,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - ODriverDelegator::getImplementationName_Static(), - ODriverDelegator::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "ODBC::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/mysql/exports.dxp b/connectivity/source/drivers/mysql/exports.dxp index 9630d7e067..f0e1c69934 100644..100755 --- a/connectivity/source/drivers/mysql/exports.dxp +++ b/connectivity/source/drivers/mysql/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/drivers/mysql/makefile.mk b/connectivity/source/drivers/mysql/makefile.mk index fbb68321cb..453f4b652f 100644..100755 --- a/connectivity/source/drivers/mysql/makefile.mk +++ b/connectivity/source/drivers/mysql/makefile.mk @@ -82,3 +82,11 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/mysql.component + +$(MISC)/mysql.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + mysql.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt mysql.component diff --git a/connectivity/source/drivers/mysql/mysql.component b/connectivity/source/drivers/mysql/mysql.component new file mode 100755 index 0000000000..ced2297fa0 --- /dev/null +++ b/connectivity/source/drivers/mysql/mysql.component @@ -0,0 +1,35 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="org.openoffice.comp.drivers.MySQL.Driver"> + <service name="com.sun.star.sdbc.Driver"/> + <service name="com.sun.star.sdbcx.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/mysql/mysql.xml b/connectivity/source/drivers/mysql/mysql.xml index 93cb83d0ab..93cb83d0ab 100644..100755 --- a/connectivity/source/drivers/mysql/mysql.xml +++ b/connectivity/source/drivers/mysql/mysql.xml diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index 86f173a395..e81bdd906e 100644..100755 --- a/connectivity/source/drivers/odbc/OFunctions.cxx +++ b/connectivity/source/drivers/odbc/OFunctions.cxx @@ -110,10 +110,6 @@ sal_Bool LoadLibrary_ODBC3(::rtl::OUString &_rPath) if (bLoaded) return sal_True; -#ifdef WIN - _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODBC.DLL")); - -#endif #ifdef WNT _rPath = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ODBC32.DLL")); #endif diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx index 8dd9ab3bfd..8dd9ab3bfd 100644..100755 --- a/connectivity/source/drivers/odbc/ORealDriver.cxx +++ b/connectivity/source/drivers/odbc/ORealDriver.cxx diff --git a/connectivity/source/drivers/odbc/ORealDriver.hxx b/connectivity/source/drivers/odbc/ORealDriver.hxx index 9b1939335a..9b1939335a 100644..100755 --- a/connectivity/source/drivers/odbc/ORealDriver.hxx +++ b/connectivity/source/drivers/odbc/ORealDriver.hxx diff --git a/connectivity/source/drivers/odbc/makefile.mk b/connectivity/source/drivers/odbc/makefile.mk index a13837224b..6d701b87c5 100644..100755 --- a/connectivity/source/drivers/odbc/makefile.mk +++ b/connectivity/source/drivers/odbc/makefile.mk @@ -77,3 +77,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map # --- Targets ---------------------------------- .INCLUDE : $(PRJ)$/target.pmk + +ALLTAR : $(MISC)/odbc.component + +$(MISC)/odbc.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + odbc.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt odbc.component diff --git a/connectivity/source/drivers/odbc/odbc.component b/connectivity/source/drivers/odbc/odbc.component new file mode 100755 index 0000000000..d4e6bc127d --- /dev/null +++ b/connectivity/source/drivers/odbc/odbc.component @@ -0,0 +1,34 @@ +<?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" + xmlns="http://openoffice.org/2010/uno-components"> + <implementation name="com.sun.star.comp.sdbc.ODBCDriver"> + <service name="com.sun.star.sdbc.Driver"/> + </implementation> +</component> diff --git a/connectivity/source/drivers/odbc/odbc.xml b/connectivity/source/drivers/odbc/odbc.xml index eae2d3f3e1..eae2d3f3e1 100644..100755 --- a/connectivity/source/drivers/odbc/odbc.xml +++ b/connectivity/source/drivers/odbc/odbc.xml diff --git a/connectivity/source/drivers/odbc/oservices.cxx b/connectivity/source/drivers/odbc/oservices.cxx index 15d39337b3..93a1ccbce1 100644..100755 --- a/connectivity/source/drivers/odbc/oservices.cxx +++ b/connectivity/source/drivers/odbc/oservices.cxx @@ -31,13 +31,11 @@ #include "ORealDriver.hxx" #include "odbc/ODriver.hxx" #include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> using namespace connectivity::odbc; using ::rtl::OUString; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; -using ::com::sun::star::registry::XRegistryKey; using ::com::sun::star::lang::XSingleServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory; @@ -50,31 +48,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc) rtl_ModuleCount* _pTemp ); -//*************************************************************************************** -// -// Die vorgeschriebene C-Api muss erfuellt werden! -// Sie besteht aus drei Funktionen, die von dem Modul exportiert werden muessen. -// - -//--------------------------------------------------------------------------------------- -void REGISTER_PROVIDER( - const OUString& aServiceImplName, - const Sequence< OUString>& Services, - const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) -{ - OUString aMainKeyName; - aMainKeyName = OUString(RTL_CONSTASCII_USTRINGPARAM("/")); - aMainKeyName += aServiceImplName; - aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); - OSL_ENSURE(xNewKey.is(), "ODBC::component_writeInfo : could not create a registry key !"); - - for (sal_Int32 i=0; i<Services.getLength(); ++i) - xNewKey->createKey(Services[i]); -} - - //--------------------------------------------------------------------------------------- struct ProviderRequest { @@ -125,31 +98,6 @@ component_getImplementationEnvironment( } //--------------------------------------------------------------------------------------- -extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( - void* /*pServiceManager*/, - void* pRegistryKey - ) -{ - if (pRegistryKey) - try - { - Reference< ::com::sun::star::registry::XRegistryKey > xKey(reinterpret_cast< ::com::sun::star::registry::XRegistryKey*>(pRegistryKey)); - - REGISTER_PROVIDER( - ODBCDriver::getImplementationName_Static(), - ODBCDriver::getSupportedServiceNames_Static(), xKey); - - return sal_True; - } - catch (::com::sun::star::registry::InvalidRegistryException& ) - { - OSL_ENSURE(sal_False, "ODBC::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); - } - - return sal_False; -} - -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx b/connectivity/source/drivers/odbcbase/OConnection.cxx index 3a9a50dbb8..3a9a50dbb8 100644..100755 --- a/connectivity/source/drivers/odbcbase/OConnection.cxx +++ b/connectivity/source/drivers/odbcbase/OConnection.cxx diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx index c374447c6f..c374447c6f 100644..100755 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaData.cxx diff --git a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx index ae87bedb98..ae87bedb98 100644..100755 --- a/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/ODatabaseMetaDataResultSet.cxx diff --git a/connectivity/source/drivers/odbcbase/ODriver.cxx b/connectivity/source/drivers/odbcbase/ODriver.cxx index 7be1cf3bba..7be1cf3bba 100644..100755 --- a/connectivity/source/drivers/odbcbase/ODriver.cxx +++ b/connectivity/source/drivers/odbcbase/ODriver.cxx diff --git a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx index 233e95cca0..233e95cca0 100644..100755 --- a/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OPreparedStatement.cxx diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx index 8abf895edc..8abf895edc 100644..100755 --- a/connectivity/source/drivers/odbcbase/OResultSet.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx diff --git a/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx b/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx index af21829918..af21829918 100644..100755 --- a/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx +++ b/connectivity/source/drivers/odbcbase/OResultSetMetaData.cxx diff --git a/connectivity/source/drivers/odbcbase/OStatement.cxx b/connectivity/source/drivers/odbcbase/OStatement.cxx index 3bb74f80c3..3bb74f80c3 100644..100755 --- a/connectivity/source/drivers/odbcbase/OStatement.cxx +++ b/connectivity/source/drivers/odbcbase/OStatement.cxx diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx index a8dbb74d90..a8dbb74d90 100644..100755 --- a/connectivity/source/drivers/odbcbase/OTools.cxx +++ b/connectivity/source/drivers/odbcbase/OTools.cxx diff --git a/connectivity/source/drivers/odbcbase/makefile.mk b/connectivity/source/drivers/odbcbase/makefile.mk index 85e96ea857..85e96ea857 100644..100755 --- a/connectivity/source/drivers/odbcbase/makefile.mk +++ b/connectivity/source/drivers/odbcbase/makefile.mk |