diff options
Diffstat (limited to 'connectivity/source')
107 files changed, 1258 insertions, 1387 deletions
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index b308f85109..b7bc90485c 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -901,11 +901,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const } //--------------------------------------------------------------------------------------- -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* serviceManager, com::sun::star::registry::XRegistryKey* registryKey) -{ - return cppu::component_writeInfoHelper(serviceManager, registryKey, entries); -} -//--------------------------------------------------------------------------------------- SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* implName, ::com::sun::star::lang::XMultiServiceFactory* serviceManager, void* registryKey) { return cppu::component_getFactoryHelper(implName, serviceManager, registryKey, entries); diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index 45f171e081..f025a4ce9d 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -1754,7 +1754,7 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const } // ----------------------------------------------------------------------------- -::com::sun::star::util::Date ORowSetValue::getDate() const +::com::sun::star::util::Date ORowSetValue::getDate() const { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbtools", "Ocke.Janssen@sun.com", "ORowSetValue::getDate" ); ::com::sun::star::util::Date aValue; @@ -1769,8 +1769,6 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const break; case DataType::DECIMAL: case DataType::NUMERIC: - aValue = DBTypeConversion::toDate((double)*this); - break; case DataType::FLOAT: case DataType::DOUBLE: case DataType::REAL: @@ -1788,12 +1786,28 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const aValue.Year = pDateTime->Year; } break; + case DataType::BIT: + case DataType::BOOLEAN: + case DataType::TINYINT: + case DataType::SMALLINT: + case DataType::INTEGER: + case DataType::BIGINT: + aValue = DBTypeConversion::toDate( double( sal_Int64( *this ) ) ); + break; + + case DataType::BLOB: + case DataType::CLOB: + case DataType::OBJECT: default: - { - Any aAnyValue = getAny(); - aAnyValue >>= aValue; - break; - } + OSL_ENSURE( false, "ORowSetValue::getDate: cannot retrieve the data!" ); + // NO break! + + case DataType::BINARY: + case DataType::VARBINARY: + case DataType::LONGVARBINARY: + case DataType::TIME: + aValue = DBTypeConversion::toDate( (double)0 ); + break; } } return aValue; diff --git a/connectivity/source/commontools/filtermanager.cxx b/connectivity/source/commontools/filtermanager.cxx index 9a01ecf275..e3b71a19bb 100644 --- a/connectivity/source/commontools/filtermanager.cxx +++ b/connectivity/source/commontools/filtermanager.cxx @@ -36,6 +36,8 @@ #include "TConnection.hxx" #include <osl/diagnose.h> #include "connectivity/dbtools.hxx" +#include <tools/diagnose_ex.h> +#include <rtl/ustrbuf.hxx> //........................................................................ namespace dbtools @@ -93,7 +95,7 @@ namespace dbtools } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FilterManager::setFilterComponent: setting the filter failed!" ); + DBG_UNHANDLED_EXCEPTION(); } } @@ -114,44 +116,30 @@ namespace dbtools } catch( const Exception& ) { - OSL_ENSURE( sal_False, "FilterManager::setApplyPublicFilter: setting the filter failed!" ); + DBG_UNHANDLED_EXCEPTION(); } } //-------------------------------------------------------------------- - namespace + void FilterManager::appendFilterComponent( ::rtl::OUStringBuffer& io_appendTo, const ::rtl::OUString& i_component ) const { - void lcl_ensureBracketed( ::rtl::OUString& /* [inout] */ _rExpression ) + if ( io_appendTo.getLength() > 0 ) { - OSL_ENSURE( _rExpression.getLength(), "lcl_ensureBracketed: expression is empty!" ); - if ( _rExpression.getLength() ) - { - if ( ( _rExpression.getStr()[0] != '(' ) || ( _rExpression.getStr()[ _rExpression.getLength() - 1 ] != ')' ) ) - { - ::rtl::OUString sComposed( RTL_CONSTASCII_USTRINGPARAM( "(" ) ); - sComposed += _rExpression; - sComposed += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ")" ) ); - _rExpression = sComposed; - } - } + io_appendTo.insert( 0, sal_Unicode( '(' ) ); + io_appendTo.insert( 1, sal_Unicode( ' ' ) ); + io_appendTo.appendAscii( " ) AND " ); } - } - //-------------------------------------------------------------------- - void FilterManager::appendFilterComponent( ::rtl::OUString& /* [inout] */ _rAppendTo, const ::rtl::OUString& _rComponent ) const - { - if ( _rAppendTo.getLength() ) - _rAppendTo += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " AND " ) ); - ::rtl::OUString sComponent( _rComponent ); - lcl_ensureBracketed( sComponent ); - _rAppendTo += sComponent; + io_appendTo.appendAscii( "( " ); + io_appendTo.append( i_component ); + io_appendTo.appendAscii( " )" ); } //-------------------------------------------------------------------- - bool FilterManager::isThereAtMostOneComponent( ::rtl::OUString& _rOnlyComponent ) const + bool FilterManager::isThereAtMostOneComponent( ::rtl::OUStringBuffer& o_singleComponent ) const { sal_Int32 nOnlyNonEmpty = -1; - sal_Int32 i; + sal_Int32 i; for ( i = getFirstApplicableFilterIndex(); i < FC_COMPONENT_COUNT; ++i ) { if ( m_aFilterComponents[ i ].getLength() ) @@ -165,14 +153,14 @@ namespace dbtools } if ( nOnlyNonEmpty == -1 ) { - _rOnlyComponent = ::rtl::OUString(); + o_singleComponent.makeStringAndClear(); return true; } if ( i == FC_COMPONENT_COUNT ) { // we found only one non-empty filter component - _rOnlyComponent = m_aFilterComponents[ nOnlyNonEmpty ]; + o_singleComponent = m_aFilterComponents[ nOnlyNonEmpty ]; return true; } return false; @@ -181,17 +169,17 @@ namespace dbtools //-------------------------------------------------------------------- ::rtl::OUString FilterManager::getComposedFilter( ) const { - ::rtl::OUString sComposedFilter; + ::rtl::OUStringBuffer aComposedFilter; // if we have only one non-empty component, then there's no need to compose anything - if ( isThereAtMostOneComponent( sComposedFilter ) ) - return sComposedFilter; - - // append the single components - for ( sal_Int32 i = getFirstApplicableFilterIndex(); i < FC_COMPONENT_COUNT; ++i ) - appendFilterComponent( sComposedFilter, m_aFilterComponents[ i ] ); + if ( !isThereAtMostOneComponent( aComposedFilter ) ) + { + // append the single components + for ( sal_Int32 i = getFirstApplicableFilterIndex(); i < FC_COMPONENT_COUNT; ++i ) + appendFilterComponent( aComposedFilter, m_aFilterComponents[ i ] ); + } - return sComposedFilter; + return aComposedFilter.makeStringAndClear(); } //........................................................................ diff --git a/connectivity/source/commontools/makefile.mk b/connectivity/source/commontools/makefile.mk index cab2160922..5af42116f8 100644 --- a/connectivity/source/commontools/makefile.mk +++ b/connectivity/source/commontools/makefile.mk @@ -49,29 +49,29 @@ ENVCFLAGS += -DBOOST_SPIRIT_USE_OLD_NAMESPACE # --- Files -------------------------------------------------------- EXCEPTIONSFILES=\ - $(SLO)$/predicateinput.obj \ - $(SLO)$/ConnectionWrapper.obj \ - $(SLO)$/TConnection.obj \ - $(SLO)$/conncleanup.obj \ - $(SLO)$/dbtools.obj \ - $(SLO)$/dbtools2.obj \ - $(SLO)$/dbexception.obj \ - $(SLO)$/CommonTools.obj \ - $(SLO)$/TColumnsHelper.obj \ - $(SLO)$/TTableHelper.obj \ - $(SLO)$/TKeys.obj \ - $(SLO)$/TKey.obj \ - $(SLO)$/TKeyColumns.obj \ - $(SLO)$/TIndexes.obj \ - $(SLO)$/TIndex.obj \ - $(SLO)$/TIndexColumns.obj \ - $(SLO)$/DateConversion.obj \ - $(SLO)$/FDatabaseMetaDataResultSetMetaData.obj \ - $(SLO)$/FDatabaseMetaDataResultSet.obj \ - $(SLO)$/TDatabaseMetaDataBase.obj \ - $(SLO)$/TPrivilegesResultSet.obj \ - $(SLO)$/TSkipDeletedSet.obj \ - $(SLO)$/dbmetadata.obj \ + $(SLO)$/predicateinput.obj \ + $(SLO)$/ConnectionWrapper.obj \ + $(SLO)$/TConnection.obj \ + $(SLO)$/conncleanup.obj \ + $(SLO)$/dbtools.obj \ + $(SLO)$/dbtools2.obj \ + $(SLO)$/dbexception.obj \ + $(SLO)$/CommonTools.obj \ + $(SLO)$/TColumnsHelper.obj \ + $(SLO)$/TTableHelper.obj \ + $(SLO)$/TKeys.obj \ + $(SLO)$/TKey.obj \ + $(SLO)$/TKeyColumns.obj \ + $(SLO)$/TIndexes.obj \ + $(SLO)$/TIndex.obj \ + $(SLO)$/TIndexColumns.obj \ + $(SLO)$/DateConversion.obj \ + $(SLO)$/FDatabaseMetaDataResultSetMetaData.obj \ + $(SLO)$/FDatabaseMetaDataResultSet.obj \ + $(SLO)$/TDatabaseMetaDataBase.obj \ + $(SLO)$/TPrivilegesResultSet.obj \ + $(SLO)$/TSkipDeletedSet.obj \ + $(SLO)$/dbmetadata.obj \ $(SLO)$/TSortIndex.obj \ $(SLO)$/dbcharset.obj \ $(SLO)$/propertyids.obj \ @@ -89,9 +89,9 @@ EXCEPTIONSFILES=\ $(SLO)$/warningscontainer.obj SLOFILES=\ - $(EXCEPTIONSFILES) \ - $(SLO)$/AutoRetrievingBase.obj \ - $(SLO)$/dbconversion.obj + $(EXCEPTIONSFILES) \ + $(SLO)$/AutoRetrievingBase.obj \ + $(SLO)$/dbconversion.obj diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx index 6b514019ee..b8d8e2a04e 100644 --- a/connectivity/source/cpool/ZConnectionPool.cxx +++ b/connectivity/source/cpool/ZConnectionPool.cxx @@ -2,10 +2,10 @@ /************************************************************************* * * 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * diff --git a/connectivity/source/cpool/ZConnectionPool.hxx b/connectivity/source/cpool/ZConnectionPool.hxx index 0df96c3fbd..b8c0e8c534 100644 --- a/connectivity/source/cpool/ZConnectionPool.hxx +++ b/connectivity/source/cpool/ZConnectionPool.hxx @@ -2,11 +2,9 @@ /************************************************************************* * * 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 diff --git a/connectivity/source/cpool/Zregistration.cxx b/connectivity/source/cpool/Zregistration.cxx index 7b4c6a63fa..5465d23acd 100644 --- a/connectivity/source/cpool/Zregistration.cxx +++ b/connectivity/source/cpool/Zregistration.cxx @@ -51,35 +51,6 @@ extern "C" } //--------------------------------------------------------------------------------------- -sal_Bool SAL_CALL component_writeInfo(void* /*_pServiceManager*/, com::sun::star::registry::XRegistryKey* _pRegistryKey) -{ - ::rtl::OUString sMainKeyName( RTL_CONSTASCII_USTRINGPARAM( "/" )); - sMainKeyName += OPoolCollection::getImplementationName_Static(); - sMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - - try - { - Reference< XRegistryKey > xMainKey = _pRegistryKey->createKey(sMainKeyName); - if (!xMainKey.is()) - return sal_False; - - Sequence< ::rtl::OUString > sServices = OPoolCollection::getSupportedServiceNames_Static(); - const ::rtl::OUString* pServices = sServices.getConstArray(); - for (sal_Int32 i=0; i<sServices.getLength(); ++i, ++pServices) - xMainKey->createKey(*pServices); - } - catch(InvalidRegistryException&) - { - return sal_False; - } - catch(InvalidValueException&) - { - return sal_False; - } - return sal_True; -} - -//--------------------------------------------------------------------------------------- void* SAL_CALL component_getFactory(const sal_Char* _pImplName, ::com::sun::star::lang::XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/) { void* pRet = NULL; diff --git a/connectivity/source/cpool/dbpool2.component b/connectivity/source/cpool/dbpool2.component new file mode 100644 index 0000000000..2fa8a14495 --- /dev/null +++ b/connectivity/source/cpool/dbpool2.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.sdbc.OConnectionPool"> + <service name="com.sun.star.sdbc.ConnectionPool"/> + </implementation> +</component> diff --git a/connectivity/source/cpool/exports.dxp b/connectivity/source/cpool/exports.dxp index 9630d7e067..f0e1c69934 100644 --- a/connectivity/source/cpool/exports.dxp +++ b/connectivity/source/cpool/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/cpool/makefile.mk b/connectivity/source/cpool/makefile.mk index 393a797d2c..be2689805e 100644 --- a/connectivity/source/cpool/makefile.mk +++ b/connectivity/source/cpool/makefile.mk @@ -44,12 +44,12 @@ ENVCFLAGS+=/FR$(SLO)$/ # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/ZConnectionWrapper.obj \ - $(SLO)$/ZDriverWrapper.obj \ - $(SLO)$/ZPooledConnection.obj \ - $(SLO)$/ZConnectionPool.obj \ - $(SLO)$/ZPoolCollection.obj \ - $(SLO)$/Zregistration.obj + $(SLO)$/ZConnectionWrapper.obj \ + $(SLO)$/ZDriverWrapper.obj \ + $(SLO)$/ZPooledConnection.obj \ + $(SLO)$/ZConnectionPool.obj \ + $(SLO)$/ZPoolCollection.obj \ + $(SLO)$/Zregistration.obj # --- Library ----------------------------------- @@ -62,7 +62,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(CPPUHELPERLIB) \ $(DBTOOLSLIB) \ - $(SALLIB) \ + $(SALLIB) \ $(SALHELPERLIB) SHL1DEPN= @@ -78,4 +78,10 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : target.mk +ALLTAR : $(MISC)/dbpool2.component +$(MISC)/dbpool2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dbpool2.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dbpool2.component diff --git a/connectivity/source/dbtools/dbtools.component b/connectivity/source/dbtools/dbtools.component new file mode 100644 index 0000000000..08be953bb9 --- /dev/null +++ b/connectivity/source/dbtools/dbtools.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="org.openoffice.comp.helper.DatabaseMetaDataResultSet"> + <service name="com.sun.star.sdbc.ResultSet"/> + </implementation> + <implementation name="org.openoffice.comp.helper.ParameterSubstitution"> + <service name="com.sun.star.sdb.ParameterSubstitution"/> + </implementation> +</component> diff --git a/connectivity/source/dbtools/exports.dxp b/connectivity/source/dbtools/exports.dxp index 9630d7e067..f0e1c69934 100644 --- a/connectivity/source/dbtools/exports.dxp +++ b/connectivity/source/dbtools/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/dbtools/makefile.mk b/connectivity/source/dbtools/makefile.mk index 1fb9a71308..92e2ab06a9 100644 --- a/connectivity/source/dbtools/makefile.mk +++ b/connectivity/source/dbtools/makefile.mk @@ -45,11 +45,11 @@ LDUMP=ldump2.exe LIB1TARGET=$(SLB)$/$(TARGET).lib LIB1FILES=\ - $(SLB)$/sdbcx.lib \ - $(SLB)$/commontools.lib \ - $(SLB)$/sql.lib \ - $(SLB)$/simpledbt.lib \ - $(SLB)$/cnr.lib + $(SLB)$/sdbcx.lib \ + $(SLB)$/commontools.lib \ + $(SLB)$/sql.lib \ + $(SLB)$/simpledbt.lib \ + $(SLB)$/cnr.lib # --- dynamic library --------------------------- @@ -58,7 +58,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(CPPUHELPERLIB) \ $(SALLIB) \ - $(SALHELPERLIB) \ + $(SALHELPERLIB) \ $(JVMACCESSLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ @@ -79,8 +79,8 @@ SHL1LIBS= $(LIB1TARGET) SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ - $(LIB1TARGET) - + $(LIB1TARGET) + DEFLIB1NAME=$(TARGET) DEF1EXPORTFILE= exports.dxp @@ -91,7 +91,15 @@ DEF1EXPORTFILE= exports.dxp # --- filter file ------------------------------ $(MISC)$/$(SHL1TARGET).flt: makefile.mk - @echo ------------------------------ - @echo _TI >$@ - @echo _real >>$@ + @echo ------------------------------ + @echo _TI >$@ + @echo _real >>$@ + + +ALLTAR : $(MISC)/dbtools.component +$(MISC)/dbtools.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + dbtools.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt dbtools.component diff --git a/connectivity/source/drivers/adabas/BDriver.cxx b/connectivity/source/drivers/adabas/BDriver.cxx index 25f554f73a..28ef8af226 100644 --- 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 --- 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/Bservices.cxx b/connectivity/source/drivers/adabas/Bservices.cxx index 2857166bd3..768d6017d1 100644 --- 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,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( - 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 100644 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 --- 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/exports.dxp b/connectivity/source/drivers/adabas/exports.dxp index 9630d7e067..f0e1c69934 100644 --- 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..90e7d21126 100644 --- a/connectivity/source/drivers/adabas/makefile.mk +++ b/connectivity/source/drivers/adabas/makefile.mk @@ -48,27 +48,27 @@ CFLAGS+=-DSYSTEM_ODBC_HEADERS # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/BFunctions.obj \ - $(SLO)$/BConnection.obj \ - $(SLO)$/BDriver.obj \ - $(SLO)$/BCatalog.obj \ - $(SLO)$/BGroups.obj \ - $(SLO)$/BGroup.obj \ - $(SLO)$/BUser.obj \ - $(SLO)$/BUsers.obj \ - $(SLO)$/BKeys.obj \ - $(SLO)$/BColumns.obj \ - $(SLO)$/BIndex.obj \ - $(SLO)$/BIndexColumns.obj \ - $(SLO)$/BIndexes.obj \ - $(SLO)$/BTable.obj \ - $(SLO)$/BTables.obj \ - $(SLO)$/BViews.obj \ - $(SLO)$/Bservices.obj \ - $(SLO)$/BDatabaseMetaData.obj \ + $(SLO)$/BFunctions.obj \ + $(SLO)$/BConnection.obj \ + $(SLO)$/BDriver.obj \ + $(SLO)$/BCatalog.obj \ + $(SLO)$/BGroups.obj \ + $(SLO)$/BGroup.obj \ + $(SLO)$/BUser.obj \ + $(SLO)$/BUsers.obj \ + $(SLO)$/BKeys.obj \ + $(SLO)$/BColumns.obj \ + $(SLO)$/BIndex.obj \ + $(SLO)$/BIndexColumns.obj \ + $(SLO)$/BIndexes.obj \ + $(SLO)$/BTable.obj \ + $(SLO)$/BTables.obj \ + $(SLO)$/BViews.obj \ + $(SLO)$/Bservices.obj \ + $(SLO)$/BDatabaseMetaData.obj \ $(SLO)$/BPreparedStatement.obj \ $(SLO)$/BStatement.obj \ - $(SLO)$/BResultSetMetaData.obj \ + $(SLO)$/BResultSetMetaData.obj \ $(SLO)$/BResultSet.obj SHL1VERSIONMAP=$(SOLARENV)/src/component.map @@ -81,7 +81,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(CPPUHELPERLIB) \ $(SALLIB) \ - $(SALHELPERLIB) \ + $(SALHELPERLIB) \ $(DBTOOLSLIB) \ $(TOOLSLIB) \ $(ODBCBASELIB) \ @@ -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/Aservices.cxx b/connectivity/source/drivers/ado/Aservices.cxx index 5ae486bec8..136d3646e1 100644 --- 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,30 +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(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 { @@ -122,31 +96,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/ado.component b/connectivity/source/drivers/ado/ado.component new file mode 100644 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/exports.dxp b/connectivity/source/drivers/ado/exports.dxp index 9630d7e067..f0e1c69934 100644 --- 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 54bebe6a28..00e8d5abb0 100644 --- a/connectivity/source/drivers/ado/makefile.mk +++ b/connectivity/source/drivers/ado/makefile.mk @@ -43,41 +43,41 @@ ENVCFLAGS+=/FR$(SLO)$/ .IF "$(GUI)"=="WNT" # --- Files ------------------------------------- - + EXCEPTIONSFILES= \ - $(SLO)$/ADatabaseMetaDataImpl.obj \ - $(SLO)$/Aolevariant.obj \ - $(SLO)$/ADatabaseMetaData.obj \ - $(SLO)$/AColumn.obj \ - $(SLO)$/AColumns.obj \ - $(SLO)$/AIndex.obj \ - $(SLO)$/AIndexes.obj \ - $(SLO)$/AKey.obj \ - $(SLO)$/AKeys.obj \ - $(SLO)$/AUser.obj \ - $(SLO)$/AUsers.obj \ - $(SLO)$/AGroup.obj \ - $(SLO)$/AGroups.obj \ - $(SLO)$/ACatalog.obj \ - $(SLO)$/AView.obj \ - $(SLO)$/AViews.obj \ - $(SLO)$/ATable.obj \ - $(SLO)$/ATables.obj \ - $(SLO)$/ACallableStatement.obj \ - $(SLO)$/ADatabaseMetaDataResultSetMetaData.obj \ - $(SLO)$/ADatabaseMetaDataResultSet.obj \ - $(SLO)$/AResultSet.obj \ - $(SLO)$/AConnection.obj \ - $(SLO)$/AStatement.obj \ - $(SLO)$/APreparedStatement.obj \ - $(SLO)$/AResultSetMetaData.obj \ - $(SLO)$/ADriver.obj \ - $(SLO)$/Aservices.obj + $(SLO)$/ADatabaseMetaDataImpl.obj \ + $(SLO)$/Aolevariant.obj \ + $(SLO)$/ADatabaseMetaData.obj \ + $(SLO)$/AColumn.obj \ + $(SLO)$/AColumns.obj \ + $(SLO)$/AIndex.obj \ + $(SLO)$/AIndexes.obj \ + $(SLO)$/AKey.obj \ + $(SLO)$/AKeys.obj \ + $(SLO)$/AUser.obj \ + $(SLO)$/AUsers.obj \ + $(SLO)$/AGroup.obj \ + $(SLO)$/AGroups.obj \ + $(SLO)$/ACatalog.obj \ + $(SLO)$/AView.obj \ + $(SLO)$/AViews.obj \ + $(SLO)$/ATable.obj \ + $(SLO)$/ATables.obj \ + $(SLO)$/ACallableStatement.obj \ + $(SLO)$/ADatabaseMetaDataResultSetMetaData.obj \ + $(SLO)$/ADatabaseMetaDataResultSet.obj \ + $(SLO)$/AResultSet.obj \ + $(SLO)$/AConnection.obj \ + $(SLO)$/AStatement.obj \ + $(SLO)$/APreparedStatement.obj \ + $(SLO)$/AResultSetMetaData.obj \ + $(SLO)$/ADriver.obj \ + $(SLO)$/Aservices.obj SLOFILES=\ - $(EXCEPTIONSFILES) \ - $(SLO)$/Awrapado.obj \ - $(SLO)$/adoimp.obj + $(EXCEPTIONSFILES) \ + $(SLO)$/Awrapado.obj \ + $(SLO)$/adoimp.obj # --- Library ----------------------------------- SHL1TARGET= $(ADO_TARGET)$(DLLPOSTFIX) @@ -107,8 +107,16 @@ DEF1EXPORTFILE= exports.dxp .ELSE dummy: - @echo "Nothing to build for GUI $(GUI)" + @echo "Nothing to build for GUI $(GUI)" .ENDIF # "$(GUI)"=="WNT" # --- 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/Cservices.cxx b/connectivity/source/drivers/calc/Cservices.cxx index 482cd0d23c..24ad0dc4df 100644 --- 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,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(), "FILE::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( - 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 100644 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 --- 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 c42d52285f..69e8b6735c 100644 --- a/connectivity/source/drivers/calc/makefile.mk +++ b/connectivity/source/drivers/calc/makefile.mk @@ -68,14 +68,13 @@ SHL1STDLIBS=\ $(CPPUHELPERLIB) \ $(SVLLIB) \ $(TOOLSLIB) \ - $(UNOTOOLSLIB) \ + $(UNOTOOLSLIB) \ $(SALLIB) \ - $(SALHELPERLIB) \ + $(SALHELPERLIB) \ $(DBTOOLSLIB) \ $(DBFILELIB) \ $(COMPHELPERLIB) - #.IF "$(DBFILELIB)" == "" #SHL1STDLIBS+= ifile.lib #.ENDIF @@ -94,3 +93,11 @@ DEF1EXPORTFILE= exports.dxp .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/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index 901da8cc6a..e8fba589ef 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -1416,16 +1416,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); // Zeiger auf ersten freien Block diff --git a/connectivity/source/drivers/dbase/Dservices.cxx b/connectivity/source/drivers/dbase/Dservices.cxx index 27adb90676..aef7e84d64 100644 --- 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,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(), "FILE::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( - 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 100644 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 --- 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/exports.dxp b/connectivity/source/drivers/dbase/exports.dxp index 9630d7e067..f0e1c69934 100644 --- 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..9318e257bd 100644 --- a/connectivity/source/drivers/dbase/makefile.mk +++ b/connectivity/source/drivers/dbase/makefile.mk @@ -43,46 +43,46 @@ ENVCFLAGS+=/FR$(SLO)$/ # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/DCode.obj \ - $(SLO)$/DResultSet.obj \ - $(SLO)$/DStatement.obj \ - $(SLO)$/DPreparedStatement.obj \ - $(SLO)$/dindexnode.obj \ - $(SLO)$/DIndexIter.obj \ - $(SLO)$/DDatabaseMetaData.obj \ - $(SLO)$/DCatalog.obj \ - $(SLO)$/DColumns.obj \ - $(SLO)$/DIndexColumns.obj \ - $(SLO)$/DIndex.obj \ - $(SLO)$/DIndexes.obj \ - $(SLO)$/DTable.obj \ - $(SLO)$/DTables.obj \ - $(SLO)$/DConnection.obj \ - $(SLO)$/Dservices.obj \ - $(SLO)$/DDriver.obj + $(SLO)$/DCode.obj \ + $(SLO)$/DResultSet.obj \ + $(SLO)$/DStatement.obj \ + $(SLO)$/DPreparedStatement.obj \ + $(SLO)$/dindexnode.obj \ + $(SLO)$/DIndexIter.obj \ + $(SLO)$/DDatabaseMetaData.obj \ + $(SLO)$/DCatalog.obj \ + $(SLO)$/DColumns.obj \ + $(SLO)$/DIndexColumns.obj \ + $(SLO)$/DIndex.obj \ + $(SLO)$/DIndexes.obj \ + $(SLO)$/DTable.obj \ + $(SLO)$/DTables.obj \ + $(SLO)$/DConnection.obj \ + $(SLO)$/Dservices.obj \ + $(SLO)$/DDriver.obj EXCEPTIONSFILES=\ - $(SLO)$/DCode.obj \ - $(SLO)$/DResultSet.obj \ - $(SLO)$/DStatement.obj \ - $(SLO)$/DPreparedStatement.obj \ - $(SLO)$/dindexnode.obj \ - $(SLO)$/DIndexIter.obj \ - $(SLO)$/DDatabaseMetaData.obj \ - $(SLO)$/DCatalog.obj \ - $(SLO)$/DColumns.obj \ - $(SLO)$/DIndexColumns.obj \ - $(SLO)$/DIndex.obj \ - $(SLO)$/DIndexes.obj \ - $(SLO)$/DTables.obj \ - $(SLO)$/DConnection.obj \ - $(SLO)$/Dservices.obj \ - $(SLO)$/DDriver.obj + $(SLO)$/DCode.obj \ + $(SLO)$/DResultSet.obj \ + $(SLO)$/DStatement.obj \ + $(SLO)$/DPreparedStatement.obj \ + $(SLO)$/dindexnode.obj \ + $(SLO)$/DIndexIter.obj \ + $(SLO)$/DDatabaseMetaData.obj \ + $(SLO)$/DCatalog.obj \ + $(SLO)$/DColumns.obj \ + $(SLO)$/DIndexColumns.obj \ + $(SLO)$/DIndex.obj \ + $(SLO)$/DIndexes.obj \ + $(SLO)$/DTables.obj \ + $(SLO)$/DConnection.obj \ + $(SLO)$/Dservices.obj \ + $(SLO)$/DDriver.obj # [kh] ppc linux gcc compiler problem .IF "$(OS)$(COM)$(CPUNAME)"=="LINUXGCCPOWERPC" EXCEPTIONSNOOPTFILES= \ - $(SLO)$/DTable.obj + $(SLO)$/DTable.obj .ELSE EXCEPTIONSFILES +=\ $(SLO)$/DTable.obj @@ -102,7 +102,7 @@ SHL1STDLIBS=\ $(TOOLSLIB) \ $(UCBHELPERLIB) \ $(SALLIB) \ - $(SALHELPERLIB) \ + $(SALHELPERLIB) \ $(DBTOOLSLIB) \ $(DBFILELIB) \ $(UNOTOOLSLIB) \ @@ -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/LColumns.cxx b/connectivity/source/drivers/evoab/LColumns.cxx index 5d69f28290..58893ad014 100644 --- a/connectivity/source/drivers/evoab/LColumns.cxx +++ b/connectivity/source/drivers/evoab/LColumns.cxx @@ -2,10 +2,10 @@ /************************************************************************* * * 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * diff --git a/connectivity/source/drivers/evoab/LServices.cxx b/connectivity/source/drivers/evoab/LServices.cxx index c8207d5863..e04bfc6b98 100644 --- 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,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(), "FILE::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( - 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/exports.dxp b/connectivity/source/drivers/evoab/exports.dxp index 9630d7e067..f0e1c69934 100644 --- 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 363b08e409..60bc709d80 100644 --- a/connectivity/source/drivers/evoab/makefile.mk +++ b/connectivity/source/drivers/evoab/makefile.mk @@ -45,24 +45,24 @@ ENVCFLAGS+=/FR$(SLO)$/ # --- Files ------------------------------------- EXCEPTIONSFILES=\ - $(SLO)$/LResultSet.obj \ - $(SLO)$/LStatement.obj \ - $(SLO)$/LPreparedStatement.obj \ - $(SLO)$/LFolderList.obj \ - $(SLO)$/LConfigAccess.obj \ - $(SLO)$/LColumnAlias.obj \ - $(SLO)$/LTable.obj \ - $(SLO)$/LDatabaseMetaData.obj \ - $(SLO)$/LCatalog.obj \ - $(SLO)$/LColumns.obj \ - $(SLO)$/LTables.obj \ - $(SLO)$/LConnection.obj \ - $(SLO)$/LServices.obj \ - $(SLO)$/LDriver.obj + $(SLO)$/LResultSet.obj \ + $(SLO)$/LStatement.obj \ + $(SLO)$/LPreparedStatement.obj \ + $(SLO)$/LFolderList.obj \ + $(SLO)$/LConfigAccess.obj \ + $(SLO)$/LColumnAlias.obj \ + $(SLO)$/LTable.obj \ + $(SLO)$/LDatabaseMetaData.obj \ + $(SLO)$/LCatalog.obj \ + $(SLO)$/LColumns.obj \ + $(SLO)$/LTables.obj \ + $(SLO)$/LConnection.obj \ + $(SLO)$/LServices.obj \ + $(SLO)$/LDriver.obj SLOFILES=\ - $(EXCEPTIONSFILES) \ - $(SLO)$/LDebug.obj + $(EXCEPTIONSFILES) \ + $(SLO)$/LDebug.obj SHL1VERSIONMAP=$(SOLARENV)/src/component.map @@ -80,7 +80,7 @@ SHL1STDLIBS=\ $(UNOTOOLSLIB) \ $(UCBHELPERLIB) \ $(SALLIB) \ - $(SALHELPERLIB) \ + $(SALHELPERLIB) \ $(DBTOOLSLIB) \ $(DBFILELIB) \ $(COMPHELPERLIB) @@ -98,7 +98,7 @@ DEF1NAME= $(SHL1TARGET) .ELSE dummy: - @echo "Nothing to build for GUI $(GUI)" + @echo "Nothing to build for GUI $(GUI)" .ENDIF # --- Targets ---------------------------------- .INCLUDE : $(PRJ)$/target.pmk diff --git a/connectivity/source/drivers/evoab2/NServices.cxx b/connectivity/source/drivers/evoab2/NServices.cxx index 4af1c03919..6f0099c3ba 100644 --- 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,31 +48,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(), "EVOAB::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 +98,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/evoab.component b/connectivity/source/drivers/evoab2/evoab.component new file mode 100644 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/makefile.mk b/connectivity/source/drivers/evoab2/makefile.mk index 126af90763..63d1bb9a4c 100644 --- a/connectivity/source/drivers/evoab2/makefile.mk +++ b/connectivity/source/drivers/evoab2/makefile.mk @@ -34,7 +34,7 @@ VISIBILITY_HIDDEN=TRUE .IF "$(ENABLE_EVOAB2)"!="TRUE" dummy: - @echo "Evolution 2.x Addressbook build disabled" + @echo "Evolution 2.x Addressbook build disabled" .ELSE # --- Settings ---------------------------------- @@ -50,20 +50,20 @@ CFLAGS+=$(GOBJECT_CFLAGS) # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/NDriver.obj \ - $(SLO)$/NTable.obj \ - $(SLO)$/NColumns.obj \ - $(SLO)$/NTables.obj \ - $(SLO)$/NCatalog.obj \ - $(SLO)$/NConnection.obj \ - $(SLO)$/NDatabaseMetaData.obj \ - $(SLO)$/NStatement.obj \ - $(SLO)$/NPreparedStatement.obj \ - $(SLO)$/NServices.obj \ - $(SLO)$/NResultSet.obj \ - $(SLO)$/NResultSetMetaData.obj \ - $(SLO)$/EApi.obj \ - $(SLO)$/NDebug.obj + $(SLO)$/NDriver.obj \ + $(SLO)$/NTable.obj \ + $(SLO)$/NColumns.obj \ + $(SLO)$/NTables.obj \ + $(SLO)$/NCatalog.obj \ + $(SLO)$/NConnection.obj \ + $(SLO)$/NDatabaseMetaData.obj \ + $(SLO)$/NStatement.obj \ + $(SLO)$/NPreparedStatement.obj \ + $(SLO)$/NServices.obj \ + $(SLO)$/NResultSet.obj \ + $(SLO)$/NResultSetMetaData.obj \ + $(SLO)$/EApi.obj \ + $(SLO)$/NDebug.obj SHL1VERSIONMAP=$(SOLARENV)/src/component.map @@ -110,3 +110,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/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 72736cf0b8..295d351545 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -76,12 +76,7 @@ using namespace com::sun::star::sdbcx; using namespace com::sun::star::container; // Maximale Anzahl von Rows, die mit ORDER BY sortiert durchlaufen werden koennen: -#if defined (WIN) -#define MAX_KEYSET_SIZE 0x3ff0 // Etwas weniger als ein Segment, damit - // noch Platz fuer Memory Debug-Informationen -#else #define MAX_KEYSET_SIZE 0x40000 // 256K -#endif namespace { @@ -943,9 +938,13 @@ again: { m_pTable->fetchRow(m_aEvaluateRow, rTableCols, sal_True,bRetrieveData || bHasRestriction); - if ( (!m_bShowDeleted && m_aEvaluateRow->isDeleted()) - || (bHasRestriction && //!bShowDeleted && m_aEvaluateRow->isDeleted() ||// keine Anzeige von geloeschten Saetzen - !m_pSQLAnalyzer->evaluateRestriction())) // Auswerten der Bedingungen + if ( ( !m_bShowDeleted + && m_aEvaluateRow->isDeleted() + ) + || ( bHasRestriction + && !m_pSQLAnalyzer->evaluateRestriction() + ) + ) { // naechsten Satz auswerten // aktuelle Zeile loeschen im Keyset if (m_pEvaluationKeySet) @@ -994,12 +993,14 @@ again: // Evaluate darf nur gesetzt sein, // wenn der Keyset weiter aufgebaut werden soll - 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()) @@ -1049,7 +1050,6 @@ BOOL OResultSet::Move(IResultSetHelper::Movement eCursorPosition, INT32 nOffset, //IgnoreDeletedRows: // INT32 nTempPos = m_nRowPos; - if (m_aSQLIterator.getStatementType() == SQL_STATEMENT_SELECT && !isCount()) { @@ -1298,8 +1298,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: @@ -1328,7 +1328,7 @@ void OResultSet::sortRows() OSL_ASSERT("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); @@ -1345,8 +1345,13 @@ void OResultSet::sortRows() } else { - while (ExecuteRow(IResultSetHelper::NEXT,1,TRUE)) + while ( ExecuteRow( IResultSetHelper::NEXT, 1, FALSE, 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, TRUE, FALSE ); } } diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index 1ccb031bba..0ad0c8aaf9 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -452,19 +452,12 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode* pColumnRef, return; // Alles geprueft und wir haben den Namen der Column. // Die wievielte Column ist das? - 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); diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx index 773b24b277..62de2f1930 100644 --- 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() ); + } } } } @@ -292,11 +311,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/makefile.mk b/connectivity/source/drivers/file/makefile.mk index 41f061de80..3f9f9f1cba 100644 --- a/connectivity/source/drivers/file/makefile.mk +++ b/connectivity/source/drivers/file/makefile.mk @@ -79,7 +79,7 @@ SHL1STDLIBS=\ $(TOOLSLIB) \ $(UCBHELPERLIB) \ $(SALLIB) \ - $(SALHELPERLIB) \ + $(SALHELPERLIB) \ $(DBTOOLSLIB) \ $(UNOTOOLSLIB) \ $(COMPHELPERLIB) @@ -91,7 +91,7 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ - $(SLB)$/$(TARGET).lib + $(SLB)$/$(TARGET).lib DEFLIB1NAME=$(TARGET) # --- Targets ---------------------------------- @@ -102,7 +102,7 @@ DEFLIB1NAME=$(TARGET) # --- filter file ------------------------------ $(MISC)$/$(SHL1TARGET).flt: makefile.mk - @echo ------------------------------ - @echo _TI >$@ - @echo _real >>$@ + @echo ------------------------------ + @echo _TI >$@ + @echo _real >>$@ diff --git a/connectivity/source/drivers/flat/Eservices.cxx b/connectivity/source/drivers/flat/Eservices.cxx index ab34c9d76b..842ea2d4f6 100644 --- 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,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(), "FILE::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( - 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 --- 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 100644 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 --- 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/makefile.mk b/connectivity/source/drivers/flat/makefile.mk index da801c44a8..9b4781975d 100644 --- a/connectivity/source/drivers/flat/makefile.mk +++ b/connectivity/source/drivers/flat/makefile.mk @@ -44,30 +44,30 @@ ENVCFLAGS+=/FR$(SLO)$/ # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/EResultSet.obj \ - $(SLO)$/EStatement.obj \ - $(SLO)$/EPreparedStatement.obj \ - $(SLO)$/ETable.obj \ - $(SLO)$/EDatabaseMetaData.obj \ - $(SLO)$/ECatalog.obj \ - $(SLO)$/EColumns.obj \ - $(SLO)$/ETables.obj \ - $(SLO)$/EConnection.obj \ - $(SLO)$/Eservices.obj \ - $(SLO)$/EDriver.obj + $(SLO)$/EResultSet.obj \ + $(SLO)$/EStatement.obj \ + $(SLO)$/EPreparedStatement.obj \ + $(SLO)$/ETable.obj \ + $(SLO)$/EDatabaseMetaData.obj \ + $(SLO)$/ECatalog.obj \ + $(SLO)$/EColumns.obj \ + $(SLO)$/ETables.obj \ + $(SLO)$/EConnection.obj \ + $(SLO)$/Eservices.obj \ + $(SLO)$/EDriver.obj EXCEPTIONSFILES=\ - $(SLO)$/EResultSet.obj \ - $(SLO)$/EStatement.obj \ - $(SLO)$/EPreparedStatement.obj \ - $(SLO)$/ETable.obj \ - $(SLO)$/EDatabaseMetaData.obj \ - $(SLO)$/ECatalog.obj \ - $(SLO)$/EColumns.obj \ - $(SLO)$/ETables.obj \ - $(SLO)$/EConnection.obj \ - $(SLO)$/Eservices.obj \ - $(SLO)$/EDriver.obj + $(SLO)$/EResultSet.obj \ + $(SLO)$/EStatement.obj \ + $(SLO)$/EPreparedStatement.obj \ + $(SLO)$/ETable.obj \ + $(SLO)$/EDatabaseMetaData.obj \ + $(SLO)$/ECatalog.obj \ + $(SLO)$/EColumns.obj \ + $(SLO)$/ETables.obj \ + $(SLO)$/EConnection.obj \ + $(SLO)$/Eservices.obj \ + $(SLO)$/EDriver.obj SHL1VERSIONMAP=$(SOLARENV)/src/component.map @@ -79,10 +79,10 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(CPPUHELPERLIB) \ $(TOOLSLIB) \ - $(SVLLIB) \ + $(SVLLIB) \ $(UNOTOOLSLIB) \ $(SALLIB) \ - $(SALHELPERLIB) \ + $(SALHELPERLIB) \ $(DBTOOLSLIB) \ $(DBFILELIB) \ $(COMPHELPERLIB) @@ -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/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx index 735d94aecf..cc75ffda2b 100644 --- a/connectivity/source/drivers/hsqldb/HDriver.cxx +++ b/connectivity/source/drivers/hsqldb/HDriver.cxx @@ -274,22 +274,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/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx index 72722d5645..1db3276a1f 100644 --- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx +++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx @@ -136,7 +136,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/Hservices.cxx b/connectivity/source/drivers/hsqldb/Hservices.cxx index 70017ebfb2..3f2d205489 100644 --- 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,31 +48,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 { @@ -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( - 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/exports.dxp b/connectivity/source/drivers/hsqldb/exports.dxp index 7ff56f4f99..3efc73741d 100644 --- 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 100644 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 --- 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/makefile.mk b/connectivity/source/drivers/hsqldb/makefile.mk index 21274e8d42..ab71a4d4a8 100644 --- a/connectivity/source/drivers/hsqldb/makefile.mk +++ b/connectivity/source/drivers/hsqldb/makefile.mk @@ -40,7 +40,7 @@ USE_DEFFILE=TRUE .IF "$(SOLAR_JAVA)"=="" nojava: - @echo "Not building jurt because Java is disabled" + @echo "Not building jurt because Java is disabled" .ENDIF .IF "$(SYSTEM_HSQLDB)" == "YES" @@ -50,10 +50,10 @@ CDEFS+=-DSYSTEM_HSQLDB -DHSQLDB_JAR=\""file://$(HSQLDB_JAR)"\" SRS1NAME=$(TARGET) SRC1FILES = \ - hsqlui.src - + hsqlui.src + RES1FILELIST=\ - $(SRS)$/$(TARGET).srs + $(SRS)$/$(TARGET).srs RESLIB1NAME=$(TARGET) RESLIB1IMAGES=$(SOLARDEFIMG)$/database @@ -65,14 +65,14 @@ RESLIB1SRSFILES=$(RES1FILELIST) # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/HStorageMap.obj \ - $(SLO)$/HStorageAccess.obj \ - $(SLO)$/HDriver.obj \ - $(SLO)$/HConnection.obj \ - $(SLO)$/HTerminateListener.obj \ - $(SLO)$/StorageNativeOutputStream.obj \ - $(SLO)$/StorageNativeInputStream.obj \ - $(SLO)$/StorageFileAccess.obj \ + $(SLO)$/HStorageMap.obj \ + $(SLO)$/HStorageAccess.obj \ + $(SLO)$/HDriver.obj \ + $(SLO)$/HConnection.obj \ + $(SLO)$/HTerminateListener.obj \ + $(SLO)$/StorageNativeOutputStream.obj \ + $(SLO)$/StorageNativeInputStream.obj \ + $(SLO)$/StorageFileAccess.obj \ $(SLO)$/HTables.obj \ $(SLO)$/HTable.obj \ $(SLO)$/HView.obj \ @@ -81,9 +81,9 @@ SLOFILES=\ $(SLO)$/HColumns.obj \ $(SLO)$/HUser.obj \ $(SLO)$/HUsers.obj \ - $(SLO)$/Hservices.obj \ - $(SLO)$/HTools.obj \ - $(SLO)$/accesslog.obj + $(SLO)$/Hservices.obj \ + $(SLO)$/HTools.obj \ + $(SLO)$/accesslog.obj SHL1VERSIONMAP=$(HSQLDB_TARGET).map @@ -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/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx index 0eee1d5a5a..1cf124614d 100644 --- a/connectivity/source/drivers/jdbc/Timestamp.cxx +++ b/connectivity/source/drivers/jdbc/Timestamp.cxx @@ -147,7 +147,6 @@ jclass java_sql_Timestamp::getMyClass() const { return st_getMyClass(); } - jclass java_sql_Timestamp::st_getMyClass() { // die Klasse muss nur einmal geholt werden, daher statisch @@ -155,7 +154,6 @@ jclass java_sql_Timestamp::st_getMyClass() theClass = findMyClass("java/sql/Timestamp"); return theClass; } - java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _rOut) :java_util_Date( NULL, (jobject)NULL ) { diff --git a/connectivity/source/drivers/jdbc/exports.dxp b/connectivity/source/drivers/jdbc/exports.dxp index 9630d7e067..f0e1c69934 100644 --- 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 100644 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 --- 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/jservices.cxx b/connectivity/source/drivers/jdbc/jservices.cxx index 817c5d7e3b..aebe76b6fc 100644 --- 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..c45d414310 100644 --- a/connectivity/source/drivers/jdbc/makefile.mk +++ b/connectivity/source/drivers/jdbc/makefile.mk @@ -47,36 +47,36 @@ ENVCFLAGS+=/FR$(SLO)$/ # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/Array.obj \ - $(SLO)$/Blob.obj \ - $(SLO)$/Boolean.obj \ - $(SLO)$/CallableStatement.obj \ - $(SLO)$/Class.obj \ - $(SLO)$/Clob.obj \ - $(SLO)$/ConnectionLog.obj \ - $(SLO)$/DatabaseMetaData.obj \ - $(SLO)$/Date.obj \ - $(SLO)$/DriverPropertyInfo.obj \ - $(SLO)$/Exception.obj \ - $(SLO)$/InputStream.obj \ + $(SLO)$/Array.obj \ + $(SLO)$/Blob.obj \ + $(SLO)$/Boolean.obj \ + $(SLO)$/CallableStatement.obj \ + $(SLO)$/Class.obj \ + $(SLO)$/Clob.obj \ + $(SLO)$/ConnectionLog.obj \ + $(SLO)$/DatabaseMetaData.obj \ + $(SLO)$/Date.obj \ + $(SLO)$/DriverPropertyInfo.obj \ + $(SLO)$/Exception.obj \ + $(SLO)$/InputStream.obj \ $(SLO)$/JConnection.obj \ - $(SLO)$/JDriver.obj \ + $(SLO)$/JDriver.obj \ $(SLO)$/JStatement.obj \ - $(SLO)$/Object.obj \ - $(SLO)$/PreparedStatement.obj \ - $(SLO)$/Reader.obj \ - $(SLO)$/Ref.obj \ - $(SLO)$/ResultSet.obj \ - $(SLO)$/ResultSetMetaData.obj \ - $(SLO)$/SQLException.obj \ - $(SLO)$/SQLWarning.obj \ - $(SLO)$/String.obj \ - $(SLO)$/Throwable.obj \ - $(SLO)$/Timestamp.obj \ - $(SLO)$/jservices.obj \ - $(SLO)$/JBigDecimal.obj \ - $(SLO)$/tools.obj \ - $(SLO)$/ContextClassLoader.obj + $(SLO)$/Object.obj \ + $(SLO)$/PreparedStatement.obj \ + $(SLO)$/Reader.obj \ + $(SLO)$/Ref.obj \ + $(SLO)$/ResultSet.obj \ + $(SLO)$/ResultSetMetaData.obj \ + $(SLO)$/SQLException.obj \ + $(SLO)$/SQLWarning.obj \ + $(SLO)$/String.obj \ + $(SLO)$/Throwable.obj \ + $(SLO)$/Timestamp.obj \ + $(SLO)$/jservices.obj \ + $(SLO)$/JBigDecimal.obj \ + $(SLO)$/tools.obj \ + $(SLO)$/ContextClassLoader.obj SHL1VERSIONMAP=$(SOLARENV)/src/component.map @@ -88,7 +88,7 @@ SHL1STDLIBS=\ $(CPPULIB) \ $(CPPUHELPERLIB) \ $(SALLIB) \ - $(SALHELPERLIB) \ + $(SALHELPERLIB) \ $(JVMACCESSLIB) \ $(DBTOOLSLIB) \ $(UNOTOOLSLIB) \ @@ -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/kab/KServices.cxx b/connectivity/source/drivers/kab/KServices.cxx index 1819f49785..b385ba7393 100644 --- 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/exports.dxp b/connectivity/source/drivers/kab/exports.dxp index 9630d7e067..f0e1c69934 100644 --- 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/kab1.component b/connectivity/source/drivers/kab/kab1.component new file mode 100644 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/makefile.mk b/connectivity/source/drivers/kab/makefile.mk index 98bedf66ed..af3f583792 100644 --- 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 ========================== @@ -57,7 +60,7 @@ SLOFILES= \ $(SLO)$/KServices.obj DEPOBJFILES= \ - $(SLO2FILES) + $(SLO2FILES) # --- Library ----------------------------------- @@ -126,13 +129,21 @@ DEF2NAME= $(SHL2TARGET) # --- Targets ----------------------------------- .ELSE # "$(ENABLE_KAB)" == "TRUE" dummy: - @echo KDE Addressbook disabled - nothing to build + @echo KDE Addressbook disabled - nothing to build .ENDIF .ELSE # "$(GUI)" == "UNX" dummy: - @echo "Nothing to build for GUI $(GUI)" + @echo "Nothing to build for GUI $(GUI)" .ENDIF .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/MacabServices.cxx b/connectivity/source/drivers/macab/MacabServices.cxx index 3b4c93a9bd..144eb9ac5c 100644 --- 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/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 100644 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/makefile.mk b/connectivity/source/drivers/macab/makefile.mk index 31ffede390..8391d85569 100755 --- a/connectivity/source/drivers/macab/makefile.mk +++ b/connectivity/source/drivers/macab/makefile.mk @@ -50,7 +50,7 @@ SLOFILES= \ $(SLO)$/MacabServices.obj DEPOBJFILES= \ - $(SLO2FILES) + $(SLO2FILES) # --- Library ----------------------------------- @@ -87,11 +87,11 @@ SLO2FILES=\ $(SLO)$/MacabResultSetMetaData.obj \ $(SLO)$/macabcondition.obj \ $(SLO)$/macaborder.obj \ - $(SLO)$/MacabRecord.obj \ - $(SLO)$/MacabRecords.obj \ - $(SLO)$/MacabHeader.obj \ - $(SLO)$/MacabGroup.obj \ - $(SLO)$/MacabAddressBook.obj + $(SLO)$/MacabRecord.obj \ + $(SLO)$/MacabRecords.obj \ + $(SLO)$/MacabHeader.obj \ + $(SLO)$/MacabGroup.obj \ + $(SLO)$/MacabAddressBook.obj MACAB_LIB=-framework Carbon -framework AddressBook @@ -118,13 +118,21 @@ DEF2NAME= $(SHL2TARGET) # --- Targets ----------------------------------- .ELSE # "$(OS)" == "MACOSX" dummy: - @echo Not using Mac OS X - nothing to build + @echo Not using Mac OS X - nothing to build .ENDIF .ELSE # "$(GUI)" == "UNX" dummy: - @echo "Nothing to build for GUI $(GUI)" + @echo "Nothing to build for GUI $(GUI)" .ENDIF .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/MDriver.cxx b/connectivity/source/drivers/mozab/MDriver.cxx index 6ca30dadf8..4610625926 100644 --- 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/MResultSet.cxx b/connectivity/source/drivers/mozab/MResultSet.cxx index 685c1fe65a..5b4902f722 100644 --- a/connectivity/source/drivers/mozab/MResultSet.cxx +++ b/connectivity/source/drivers/mozab/MResultSet.cxx @@ -2,10 +2,10 @@ /************************************************************************* * * 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 + * Copyright 2000, 2010 Oracle and/or its affiliates. * * This file is part of OpenOffice.org. * @@ -896,7 +896,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT OSQLParseNode *pColumn; OSQLParseNode *pAtom; OSQLParseNode *pOptEscape; - const OSQLParseNode* pPart2 = parseTree->getChild(1); + 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 @@ -1024,7 +1024,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT else if (SQL_ISRULE(parseTree,test_for_null)) { OSL_ENSURE(parseTree->count() == 2,"Error in ParseTree"); - const OSQLParseNode* pPart2 = parseTree->getChild(1); + const OSQLParseNode* pPart2 = parseTree->getChild(1); OSL_ENSURE(SQL_ISTOKEN(pPart2->getChild(0),IS),"Error in ParseTree"); if (!SQL_ISRULE(parseTree->getChild(0),column_ref)) diff --git a/connectivity/source/drivers/mozab/MResultSet.hxx b/connectivity/source/drivers/mozab/MResultSet.hxx index a39cb0e7e0..ce82da23b6 100644 --- a/connectivity/source/drivers/mozab/MResultSet.hxx +++ b/connectivity/source/drivers/mozab/MResultSet.hxx @@ -2,11 +2,9 @@ /************************************************************************* * * 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 diff --git a/connectivity/source/drivers/mozab/MServices.cxx b/connectivity/source/drivers/mozab/MServices.cxx index 41c9079914..b9867f2dbf 100644 --- 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/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx index a5517ac9e8..384a7508cb 100644 --- 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/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx index 42d6a9c9c7..6f4be7e9da 100644 --- 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/makefile.mk b/connectivity/source/drivers/mozab/bootstrap/makefile.mk index 6a4172da20..0c46c7c5a1 100644 --- a/connectivity/source/drivers/mozab/bootstrap/makefile.mk +++ b/connectivity/source/drivers/mozab/bootstrap/makefile.mk @@ -33,7 +33,7 @@ TARGET=mozbootstrap .IF "$(OS)" == "OS2" all: - @echo " Not building under OS/2" + @echo " Not building under OS/2" .ENDIF # --- Settings ---------------------------------- @@ -58,10 +58,10 @@ INCPRE += -I../mozillasrc # --- Files ------------------------------------- SLOFILES += \ - $(SLO)$/MNSINIParser.obj \ - $(SLO)$/MNSProfileDiscover.obj \ - $(SLO)$/MMozillaBootstrap.obj \ - $(SLO)$/MNSFolders.obj + $(SLO)$/MNSINIParser.obj \ + $(SLO)$/MNSProfileDiscover.obj \ + $(SLO)$/MMozillaBootstrap.obj \ + $(SLO)$/MNSFolders.obj .IF ( "$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES" ) || ( "$(WITH_MOZILLA)" == "NO" ) || ( "$(OS)" == "MACOSX" ) CDEFS+=-DMINIMAL_PROFILEDISCOVER @@ -78,16 +78,23 @@ 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 \ - $(SLO)$/MNSProfileManager.obj \ - $(SLO)$/MNSRunnable.obj \ - $(SLO)$/MNSProfile.obj \ - $(SLO)$/MNSProfileDirServiceProvider.obj + $(SLO)$/MNSInit.obj \ + $(SLO)$/MNSProfileManager.obj \ + $(SLO)$/MNSRunnable.obj \ + $(SLO)$/MNSProfile.obj \ + $(SLO)$/MNSProfileDirServiceProvider.obj .ENDIF # --- 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 100644 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/exports.dxp b/connectivity/source/drivers/mozab/exports.dxp index 9630d7e067..f0e1c69934 100644 --- 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 0a06f00134..a736fbe484 100644 --- a/connectivity/source/drivers/mozab/makefile.mk +++ b/connectivity/source/drivers/mozab/makefile.mk @@ -33,10 +33,10 @@ VISIBILITY_HIDDEN=TRUE .IF ( "$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || ( "$(OS)" == "MACOSX" ) || ( "$(OS)" == "OS2" ) all: - @echo " Not building the mozilla address book driver" - @echo " dependency to Mozilla developer snapshots not feasable at the moment" - @echo " see http://bugzilla.mozilla.org/show_bug.cgi?id=135137" - @echo " see http://www.mozilla.org/issues/show_bug.cgi?id=91209" + @echo " Not building the mozilla address book driver" + @echo " dependency to Mozilla developer snapshots not feasable at the moment" + @echo " see http://bugzilla.mozilla.org/show_bug.cgi?id=135137" + @echo " see http://www.mozilla.org/issues/show_bug.cgi?id=91209" .ENDIF # --- begin of mozilla specific stuff @@ -89,10 +89,10 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1TARGET= $(TARGET)$(DLLPOSTFIX) SHL1OBJS=$(SLOFILES) SHL1STDLIBS=\ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(DBTOOLSLIB) + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(SALLIB) \ + $(DBTOOLSLIB) SHL1DEPN= SHL1IMPLIB= i$(TARGET)$(DLLPOSTFIX) @@ -101,45 +101,45 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ - $(SLB)$/$(TARGET).lib + $(SLB)$/$(TARGET).lib DEFLIB1NAME=$(TARGET) # --- Files ------------------------------------- MOZSLOFILES=\ - $(SLO)$/MNSInit.obj \ - $(SLO)$/MQueryHelper.obj \ - $(SLO)$/MDatabaseMetaDataHelper.obj \ - $(SLO)$/MQuery.obj \ - $(SLO)$/MTypeConverter.obj \ - $(SLO)$/MNameMapper.obj \ - $(SLO)$/MNSMozabProxy.obj \ - $(SLO)$/MNSTerminateListener.obj \ - $(SLO)$/MMozillaBootstrap.obj \ - $(SLO)$/MNSFolders.obj \ - $(SLO)$/MNSProfileDiscover.obj \ - $(SLO)$/MNSProfileManager.obj \ - $(SLO)$/MNSINIParser.obj \ - $(SLO)$/MNSRunnable.obj \ - $(SLO)$/MNSProfile.obj \ - $(SLO)$/MNSProfileDirServiceProvider.obj \ - $(SLO)$/MLdapAttributeMap.obj + $(SLO)$/MNSInit.obj \ + $(SLO)$/MQueryHelper.obj \ + $(SLO)$/MDatabaseMetaDataHelper.obj \ + $(SLO)$/MQuery.obj \ + $(SLO)$/MTypeConverter.obj \ + $(SLO)$/MNameMapper.obj \ + $(SLO)$/MNSMozabProxy.obj \ + $(SLO)$/MNSTerminateListener.obj \ + $(SLO)$/MMozillaBootstrap.obj \ + $(SLO)$/MNSFolders.obj \ + $(SLO)$/MNSProfileDiscover.obj \ + $(SLO)$/MNSProfileManager.obj \ + $(SLO)$/MNSINIParser.obj \ + $(SLO)$/MNSRunnable.obj \ + $(SLO)$/MNSProfile.obj \ + $(SLO)$/MNSProfileDirServiceProvider.obj \ + $(SLO)$/MLdapAttributeMap.obj SLO2FILES=\ - $(SLO)$/MConfigAccess.obj \ - $(SLO)$/MCatalog.obj \ - $(SLO)$/MColumns.obj \ - $(SLO)$/MTable.obj \ - $(SLO)$/MTables.obj \ - $(SLO)$/MColumnAlias.obj \ - $(SLO)$/MPreparedStatement.obj \ - $(SLO)$/MStatement.obj \ - $(SLO)$/MResultSetMetaData.obj \ - $(SLO)$/MResultSet.obj \ - $(SLO)$/MDatabaseMetaData.obj \ - $(SLO)$/MConnection.obj \ - $(MOZSLOFILES) + $(SLO)$/MConfigAccess.obj \ + $(SLO)$/MCatalog.obj \ + $(SLO)$/MColumns.obj \ + $(SLO)$/MTable.obj \ + $(SLO)$/MTables.obj \ + $(SLO)$/MColumnAlias.obj \ + $(SLO)$/MPreparedStatement.obj \ + $(SLO)$/MStatement.obj \ + $(SLO)$/MResultSetMetaData.obj \ + $(SLO)$/MResultSet.obj \ + $(SLO)$/MDatabaseMetaData.obj \ + $(SLO)$/MConnection.obj \ + $(MOZSLOFILES) DEPOBJFILES=$(SLO2FILES) @@ -159,7 +159,7 @@ SHL2STDLIBS=\ $(MOZ_LIB_XPCOM) .IF "$(GUI)"=="WNT" - SHL2STDLIBS += \ + SHL2STDLIBS += \ $(SHELL32LIB) .ENDIF # "$(GUI)"=="WNT" @@ -175,12 +175,20 @@ DEF2NAME= $(SHL2TARGET) # --- filter file ------------------------------ $(MISC)$/$(SHL1TARGET).flt: makefile.mk - @echo ------------------------------ - @echo _TI >$@ - @echo _real >>$@ + @echo ------------------------------ + @echo _TI >$@ + @echo _real >>$@ $(MISC)$/$(SHL2TARGET).flt: makefile.mk - @echo ------------------------------ - @echo _TI >$@ - @echo _real >>$@ + @echo ------------------------------ + @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/mozab.component b/connectivity/source/drivers/mozab/mozab.component new file mode 100644 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/mozillasrc/makefile.mk b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk index 49c0bd8033..c14fdf4513 100755 --- a/connectivity/source/drivers/mozab/mozillasrc/makefile.mk +++ b/connectivity/source/drivers/mozab/mozillasrc/makefile.mk @@ -46,9 +46,9 @@ VISIBILITY_HIDDEN=TRUE .IF ("$(SYSTEM_MOZILLA)" == "YES" && "$(WITH_MOZILLA)" == "YES") || "$(WITH_MOZILLA)" == "NO" || "$(OS)" == "OS2" dummy: - @echo " Not building the mozillasrc stuff in LibreOffice build" - @echo " dependency to Mozilla developer snapshots not feasable at the moment" - @echo " see http://bugzilla.mozilla.org/show_bug.cgi?id=135137" + @echo " Not building the mozillasrc stuff in LibreOffice.org build" + @echo " dependency to Mozilla developer snapshots not feasable at the moment" + @echo " see http://bugzilla.mozilla.org/show_bug.cgi?id=135137" .ELSE .INCLUDE : $(PRJ)$/version.mk @@ -60,14 +60,14 @@ INCPRE += -I../bootstrap # --- Files ------------------------------------- SLOFILES = \ - $(SLO)$/MQueryHelper.obj \ - $(SLO)$/MDatabaseMetaDataHelper.obj \ - $(SLO)$/MQuery.obj \ - $(SLO)$/MTypeConverter.obj \ - $(SLO)$/MNameMapper.obj \ - $(SLO)$/MNSMozabProxy.obj \ - $(SLO)$/MNSTerminateListener.obj \ - $(SLO)$/MLdapAttributeMap.obj \ + $(SLO)$/MQueryHelper.obj \ + $(SLO)$/MDatabaseMetaDataHelper.obj \ + $(SLO)$/MQuery.obj \ + $(SLO)$/MTypeConverter.obj \ + $(SLO)$/MNameMapper.obj \ + $(SLO)$/MNSMozabProxy.obj \ + $(SLO)$/MNSTerminateListener.obj \ + $(SLO)$/MLdapAttributeMap.obj \ .ENDIF diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx index 508c4ed377..bb4bdf6a47 100644 --- 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 --- 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..7cbd10e9df 100644 --- a/connectivity/source/drivers/mysql/makefile.mk +++ b/connectivity/source/drivers/mysql/makefile.mk @@ -45,15 +45,15 @@ ENVCFLAGS+=/FR$(SLO)$/ # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/YDriver.obj \ - $(SLO)$/YTables.obj \ - $(SLO)$/YTable.obj \ - $(SLO)$/YViews.obj \ - $(SLO)$/YCatalog.obj \ - $(SLO)$/YColumns.obj \ - $(SLO)$/YUser.obj \ - $(SLO)$/YUsers.obj \ - $(SLO)$/Yservices.obj + $(SLO)$/YDriver.obj \ + $(SLO)$/YTables.obj \ + $(SLO)$/YTable.obj \ + $(SLO)$/YViews.obj \ + $(SLO)$/YCatalog.obj \ + $(SLO)$/YColumns.obj \ + $(SLO)$/YUser.obj \ + $(SLO)$/YUsers.obj \ + $(SLO)$/Yservices.obj SHL1VERSIONMAP=$(SOLARENV)/src/component.map @@ -62,11 +62,11 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1TARGET= $(MYSQL_TARGET)$(DLLPOSTFIX) SHL1OBJS=$(SLOFILES) SHL1STDLIBS=\ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(DBTOOLSLIB) \ - $(COMPHELPERLIB) + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(SALLIB) \ + $(DBTOOLSLIB) \ + $(COMPHELPERLIB) SHL1DEPN= @@ -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 100644 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/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx index 86f173a395..e81bdd906e 100644 --- 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/makefile.mk b/connectivity/source/drivers/odbc/makefile.mk index a13837224b..fa9e92671b 100644 --- a/connectivity/source/drivers/odbc/makefile.mk +++ b/connectivity/source/drivers/odbc/makefile.mk @@ -52,9 +52,9 @@ CFLAGS+=-DSYSTEM_ODBC_HEADERS # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/oservices.obj \ - $(SLO)$/ORealDriver.obj \ - $(SLO)$/OFunctions.obj + $(SLO)$/oservices.obj \ + $(SLO)$/ORealDriver.obj \ + $(SLO)$/OFunctions.obj # --- ODBC Library ----------------------------------- @@ -64,7 +64,7 @@ SHL1STDLIBS=\ $(ODBCBASELIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ - $(SALLIB) \ + $(SALLIB) \ $(SALHELPERLIB) SHL1IMPLIB= i$(ODBC_TARGET) @@ -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 100644 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/oservices.cxx b/connectivity/source/drivers/odbc/oservices.cxx index 15d39337b3..93a1ccbce1 100644 --- 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/makefile.mk b/connectivity/source/drivers/odbcbase/makefile.mk index 85e96ea857..ecfc8bc736 100644 --- a/connectivity/source/drivers/odbcbase/makefile.mk +++ b/connectivity/source/drivers/odbcbase/makefile.mk @@ -47,15 +47,15 @@ CFLAGS+=-DSYSTEM_ODBC_HEADERS # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/OPreparedStatement.obj \ - $(SLO)$/OStatement.obj \ - $(SLO)$/OResultSetMetaData.obj \ - $(SLO)$/OResultSet.obj \ - $(SLO)$/OTools.obj \ - $(SLO)$/ODatabaseMetaDataResultSet.obj \ - $(SLO)$/ODatabaseMetaData.obj \ - $(SLO)$/ODriver.obj \ - $(SLO)$/OConnection.obj + $(SLO)$/OPreparedStatement.obj \ + $(SLO)$/OStatement.obj \ + $(SLO)$/OResultSetMetaData.obj \ + $(SLO)$/OResultSet.obj \ + $(SLO)$/OTools.obj \ + $(SLO)$/ODatabaseMetaDataResultSet.obj \ + $(SLO)$/ODatabaseMetaData.obj \ + $(SLO)$/ODriver.obj \ + $(SLO)$/OConnection.obj # --- ODBC BASE Library ----------------------------------- @@ -66,7 +66,7 @@ SHL1STDLIBS=\ $(COMPHELPERLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ - $(SALLIB) \ + $(SALLIB) \ $(SALHELPERLIB) SHL1DEPN= @@ -77,7 +77,7 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME= $(SHL1TARGET) DEF1DEPN= $(MISC)$/$(SHL1TARGET).flt \ - $(SLB)$/$(TARGET).lib + $(SLB)$/$(TARGET).lib DEFLIB1NAME=$(TARGET) # --- Targets ---------------------------------- diff --git a/connectivity/source/inc/adabas/BResultSet.hxx b/connectivity/source/inc/adabas/BResultSet.hxx index 64f5932d9f..bc2f46a300 100644 --- a/connectivity/source/inc/adabas/BResultSet.hxx +++ b/connectivity/source/inc/adabas/BResultSet.hxx @@ -2,11 +2,9 @@ /************************************************************************* * * 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 diff --git a/connectivity/source/inc/adabas/BStatement.hxx b/connectivity/source/inc/adabas/BStatement.hxx index 67f7a954c2..a45721e1fc 100644 --- a/connectivity/source/inc/adabas/BStatement.hxx +++ b/connectivity/source/inc/adabas/BStatement.hxx @@ -2,11 +2,9 @@ /************************************************************************* * * 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 diff --git a/connectivity/source/inc/dbase/DIndexPage.hxx b/connectivity/source/inc/dbase/DIndexPage.hxx index 7de170c1ca..47241e017d 100644 --- a/connectivity/source/inc/dbase/DIndexPage.hxx +++ b/connectivity/source/inc/dbase/DIndexPage.hxx @@ -2,11 +2,9 @@ /************************************************************************* * * 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 diff --git a/connectivity/source/inc/file/fcomp.hxx b/connectivity/source/inc/file/fcomp.hxx index be00efaac1..ed0f7586b1 100644 --- a/connectivity/source/inc/file/fcomp.hxx +++ b/connectivity/source/inc/file/fcomp.hxx @@ -110,7 +110,7 @@ namespace connectivity inline void startSelection(ORowSetValueDecoratorRef& _rVal) { - return evaluateSelection(m_rCompiler->m_aCodeList,_rVal); + evaluateSelection(m_rCompiler->m_aCodeList,_rVal); } diff --git a/connectivity/source/inc/odbc/OFunctiondefs.hxx b/connectivity/source/inc/odbc/OFunctiondefs.hxx index c5874e61a8..266dd97af9 100644 --- a/connectivity/source/inc/odbc/OFunctiondefs.hxx +++ b/connectivity/source/inc/odbc/OFunctiondefs.hxx @@ -30,7 +30,7 @@ #ifndef _CONNECTIVITY_OFUNCTIONDEFS_HXX_ #define _CONNECTIVITY_OFUNCTIONDEFS_HXX_ -#if defined(WIN) || defined(WNT) +#if defined(WNT) #ifdef _MSC_VER #pragma warning(push) diff --git a/connectivity/source/manager/exports.dxp b/connectivity/source/manager/exports.dxp index 9630d7e067..f0e1c69934 100644 --- a/connectivity/source/manager/exports.dxp +++ b/connectivity/source/manager/exports.dxp @@ -1,3 +1,2 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory diff --git a/connectivity/source/manager/makefile.mk b/connectivity/source/manager/makefile.mk index 52ec191ec8..1e039fdcc0 100644 --- a/connectivity/source/manager/makefile.mk +++ b/connectivity/source/manager/makefile.mk @@ -56,12 +56,12 @@ SHL1VERSIONMAP=$(SOLARENV)/src/component.map SHL1OBJS=$(SLOFILES) SHL1STDLIBS=\ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) \ - $(DBTOOLSLIB) \ - $(UNOTOOLSLIB) \ - $(SALLIB) + $(CPPULIB) \ + $(CPPUHELPERLIB) \ + $(COMPHELPERLIB) \ + $(DBTOOLSLIB) \ + $(UNOTOOLSLIB) \ + $(SALLIB) SHL1DEPN= SHL1IMPLIB= i$(SHL1TARGET) @@ -76,4 +76,10 @@ DEF1EXPORTFILE= exports.dxp .INCLUDE : target.mk +ALLTAR : $(MISC)/sdbc2.component +$(MISC)/sdbc2.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ + sdbc2.component + $(XSLTPROC) --nonet --stringparam uri \ + '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ + $(SOLARENV)/bin/createcomponent.xslt sdbc2.component diff --git a/connectivity/source/manager/mregistration.cxx b/connectivity/source/manager/mregistration.cxx index 383bef3a9a..6fbebf55e0 100644 --- a/connectivity/source/manager/mregistration.cxx +++ b/connectivity/source/manager/mregistration.cxx @@ -37,7 +37,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::registry; //========================================================================== //= registration @@ -52,38 +51,6 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const } //--------------------------------------------------------------------------------------- -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* /*_pServiceManager*/, com::sun::star::registry::XRegistryKey* _pRegistryKey) -{ - - - sal_Bool bReturn = sal_False; - - try - { - ::rtl::OUString sMainKeyName( RTL_CONSTASCII_USTRINGPARAM( "/" )); - sMainKeyName += ::drivermanager::OSDBCDriverManager::getImplementationName_static(); - sMainKeyName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")); - Reference< XRegistryKey > xMainKey = _pRegistryKey->createKey(sMainKeyName); - if (xMainKey.is()) - { - Sequence< ::rtl::OUString > sServices(::drivermanager::OSDBCDriverManager::getSupportedServiceNames_static()); - const ::rtl::OUString* pBegin = sServices.getConstArray(); - const ::rtl::OUString* pEnd = pBegin + sServices.getLength(); - for (;pBegin != pEnd ; ++pBegin) - xMainKey->createKey(*pBegin); - bReturn = sal_True; - } - } - catch(InvalidRegistryException&) - { - } - catch(InvalidValueException&) - { - } - return bReturn; -} - -//--------------------------------------------------------------------------------------- SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* _pImplName, ::com::sun::star::lang::XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/) { void* pRet = NULL; diff --git a/connectivity/source/manager/sdbc.mxp.map b/connectivity/source/manager/sdbc.mxp.map index 14e33ebafb..431725adbb 100644 --- a/connectivity/source/manager/sdbc.mxp.map +++ b/connectivity/source/manager/sdbc.mxp.map @@ -1,5 +1,4 @@ component_getImplementationEnvironment -component_writeInfo component_getFactory __mh_dylib_header ___builtin_delete diff --git a/connectivity/source/manager/sdbc2.component b/connectivity/source/manager/sdbc2.component new file mode 100644 index 0000000000..6cce2b1d9f --- /dev/null +++ b/connectivity/source/manager/sdbc2.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.OSDBCDriverManager"> + <service name="com.sun.star.sdbc.DriverManager"/> + </implementation> +</component> diff --git a/connectivity/source/parse/makefile.mk b/connectivity/source/parse/makefile.mk index 510fbb2fc2..d7a95a8dc5 100644 --- a/connectivity/source/parse/makefile.mk +++ b/connectivity/source/parse/makefile.mk @@ -29,6 +29,7 @@ PRJ=..$/.. PRJNAME=connectivity TARGET=sql +ENABLE_EXCEPTIONS=TRUE INCPRE=$(MISC) # --- Settings ----------------------------------------------------- @@ -53,13 +54,12 @@ EXCEPTIONSFILES = \ SLOFILES = \ $(EXCEPTIONSFILES) - # --- Targets ------------------------------------------------------- .INCLUDE : target.mk $(MISC)$/%.cxx: %.l - flex -i -8 -PSQLyy -L -o$(MISC)$/sqlflex.cxx sqlflex.l + flex -i -8 -PSQLyy -L -o$(MISC)$/sqlflex.cxx sqlflex.l $(INCCOM)$/sqlbison.hxx : $(YACCTARGET) $(EXCEPTIONSFILES) : $(INCCOM)$/sqlbison.hxx diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 7e6f0cf27b..41b2518341 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -494,7 +494,7 @@ void OSQLParseTreeIterator::impl_fillJoinConditions(const OSQLParseNode* i_pJoin else if (SQL_ISRULEOR2(i_pJoinCondition,search_condition,boolean_term) && // AND/OR-Verknuepfung: i_pJoinCondition->count() == 3) { - // nur AND Verknüpfung zulassen + // nur AND Verknüpfung zulassen if ( SQL_ISTOKEN(i_pJoinCondition->getChild(1),AND) ) { impl_fillJoinConditions(i_pJoinCondition->getChild(0)); diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index e7b06155a0..c36911addb 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -2514,7 +2514,6 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode rString.append(m_aNodeValue); rString.appendAscii("#"); break; - case SQL_NODE_INTNUM: case SQL_NODE_APPROXNUM: { diff --git a/connectivity/source/resource/makefile.mk b/connectivity/source/resource/makefile.mk index 3ccb8ffd16..8b89df259f 100644 --- a/connectivity/source/resource/makefile.mk +++ b/connectivity/source/resource/makefile.mk @@ -55,7 +55,7 @@ EXCEPTIONSFILES=\ $(SLO)$/sharedresources.obj SLOFILES=\ - $(EXCEPTIONSFILES) + $(EXCEPTIONSFILES) # ............................................... diff --git a/connectivity/source/sdbcx/makefile.mk b/connectivity/source/sdbcx/makefile.mk index c036e83db5..1658d54526 100644 --- a/connectivity/source/sdbcx/makefile.mk +++ b/connectivity/source/sdbcx/makefile.mk @@ -43,18 +43,18 @@ ENVCFLAGS+=/FR$(SLO)$/ # --- Files ------------------------------------- SLOFILES=\ - $(SLO)$/VDescriptor.obj \ - $(SLO)$/VCollection.obj \ - $(SLO)$/VColumn.obj \ - $(SLO)$/VIndexColumn.obj \ - $(SLO)$/VKeyColumn.obj \ - $(SLO)$/VUser.obj \ - $(SLO)$/VGroup.obj \ - $(SLO)$/VTable.obj \ - $(SLO)$/VKey.obj \ - $(SLO)$/VIndex.obj \ - $(SLO)$/VCatalog.obj \ - $(SLO)$/VView.obj + $(SLO)$/VDescriptor.obj \ + $(SLO)$/VCollection.obj \ + $(SLO)$/VColumn.obj \ + $(SLO)$/VIndexColumn.obj \ + $(SLO)$/VKeyColumn.obj \ + $(SLO)$/VUser.obj \ + $(SLO)$/VGroup.obj \ + $(SLO)$/VTable.obj \ + $(SLO)$/VKey.obj \ + $(SLO)$/VIndex.obj \ + $(SLO)$/VCatalog.obj \ + $(SLO)$/VView.obj # --- Targets ---------------------------------- |