diff options
author | Ocke Janssen <oj@openoffice.org> | 2001-05-02 11:57:37 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2001-05-02 11:57:37 +0000 |
commit | 84d83710fd5a7fd2059a9a1bdd7cf1eead7c1eee (patch) | |
tree | f25070183296a1faad7385d80c2ee12a4e0fa9a1 /connectivity | |
parent | a091593c36ec75b8683279dd8fce2266d2056b31 (diff) |
some changes for ref vector and some typedefs
Diffstat (limited to 'connectivity')
66 files changed, 387 insertions, 331 deletions
diff --git a/connectivity/inc/connectivity/CommonTools.hxx b/connectivity/inc/connectivity/CommonTools.hxx index 78cd78c9391a..1272109f5652 100644 --- a/connectivity/inc/connectivity/CommonTools.hxx +++ b/connectivity/inc/connectivity/CommonTools.hxx @@ -2,9 +2,9 @@ * * $RCSfile: CommonTools.hxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:13:36 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -126,18 +126,20 @@ namespace connectivity template< class VectorVal > class ORefVector : public ::std::vector< VectorVal > { oslInterlockedCount m_refCount; + protected: + virtual ~ORefVector(){} public: ORefVector() : m_refCount(0) {} ORefVector(size_t _st) : ::std::vector< VectorVal > (_st) , m_refCount(0) {} inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) { return ::rtl_allocateMemory( nSize ); } -// inline static void * SAL_CALL operator new( size_t nSize,const void* _pHint ) SAL_THROW( () ) -// { return ::rtl_allocateMemory( nSize ); } + inline static void * SAL_CALL operator new( size_t nSize,const void* _pHint ) SAL_THROW( () ) + { return ::rtl_allocateMemory( nSize ); } inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) { ::rtl_freeMemory( pMem ); } -// inline static void SAL_CALL operator delete( void * pMem,const void* _pHint ) SAL_THROW( () ) -// { ::rtl_freeMemory( pMem ); } + inline static void SAL_CALL operator delete( void * pMem,const void* _pHint ) SAL_THROW( () ) + { ::rtl_freeMemory( pMem ); } void acquire() { diff --git a/connectivity/inc/connectivity/sdbcx/VCollection.hxx b/connectivity/inc/connectivity/sdbcx/VCollection.hxx index 9dd889e128b0..0ab48b41dfb0 100644 --- a/connectivity/inc/connectivity/sdbcx/VCollection.hxx +++ b/connectivity/inc/connectivity/sdbcx/VCollection.hxx @@ -2,9 +2,9 @@ * * $RCSfile: VCollection.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:13:37 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -116,6 +116,9 @@ #ifndef _COM_SUN_STAR_CONTAINER_XCONTAINER_HPP_ #include <com/sun/star/container/XContainer.hpp> #endif +#ifndef CONNECTIVITY_STDTYPEDEFS_HXX +#include "connectivity/StdTypeDefs.hxx" +#endif namespace connectivity @@ -167,7 +170,7 @@ namespace connectivity // the returned object is empty will be filled outside and added to the collection virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createEmptyObject() = 0; - OCollection(::cppu::OWeakObject& _rParent,sal_Bool _bCase, ::osl::Mutex& _rMutex,const ::std::vector< ::rtl::OUString> &_rVector); + OCollection(::cppu::OWeakObject& _rParent,sal_Bool _bCase, ::osl::Mutex& _rMutex,const TStringVector &_rVector); /** clear the name map <p>Does <em>not</em> dispose the objects hold by the collection.</p> @@ -179,7 +182,7 @@ namespace connectivity DECLARE_SERVICE_INFO(); - void reFill(const ::std::vector< ::rtl::OUString> &_rVector); + void reFill(const TStringVector &_rVector); sal_Bool isCaseSensitive() const { return m_aNameMap.key_comp().isCaseSensitive(); } // only the name is identical to ::cppu::OComponentHelper diff --git a/connectivity/source/drivers/adabas/BCatalog.cxx b/connectivity/source/drivers/adabas/BCatalog.cxx index e36977b7f916..fa32f6455787 100644 --- a/connectivity/source/drivers/adabas/BCatalog.cxx +++ b/connectivity/source/drivers/adabas/BCatalog.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BCatalog.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2001-03-29 07:02:32 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -109,7 +109,7 @@ OAdabasCatalog::OAdabasCatalog(SQLHANDLE _aConnectionHdl, OAdabasConnection* _pC // ------------------------------------------------------------------------- void OAdabasCatalog::refreshTables() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Sequence< ::rtl::OUString > aTypes(1); aTypes[0] = ::rtl::OUString::createFromAscii("%"); Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), @@ -134,7 +134,7 @@ void OAdabasCatalog::refreshTables() // ------------------------------------------------------------------------- void OAdabasCatalog::refreshViews() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Reference< XStatement > xStmt = m_pConnection->createStatement( ); Reference< XResultSet > xResult = xStmt->executeQuery( @@ -159,7 +159,7 @@ void OAdabasCatalog::refreshViews() // ------------------------------------------------------------------------- void OAdabasCatalog::refreshGroups() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Reference< XStatement > xStmt = m_pConnection->createStatement( ); Reference< XResultSet > xResult = xStmt->executeQuery( ::rtl::OUString::createFromAscii("SELECT DISTINCT GROUPNAME FROM DOMAIN.USERS WHERE GROUPNAME IS NOT NULL AND GROUPNAME <> ' '")); @@ -176,7 +176,7 @@ void OAdabasCatalog::refreshGroups() // ------------------------------------------------------------------------- void OAdabasCatalog::refreshUsers() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Reference< XStatement > xStmt = m_pConnection->createStatement( ); Reference< XResultSet > xResult = xStmt->executeQuery( ::rtl::OUString::createFromAscii("SELECT DISTINCT USERNAME FROM DOMAIN.USERS WHERE USERNAME IS NOT NULL AND USERNAME <> ' ' AND USERNAME <> 'CONTROL'")); diff --git a/connectivity/source/drivers/adabas/BGroup.cxx b/connectivity/source/drivers/adabas/BGroup.cxx index 6dcf349e1457..9763f2e0c42f 100644 --- a/connectivity/source/drivers/adabas/BGroup.cxx +++ b/connectivity/source/drivers/adabas/BGroup.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BGroup.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-24 15:54:39 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,7 +92,7 @@ OAdabasGroup::OAdabasGroup( OAdabasConnection* _pConnection) : connectivity::sdb ,m_pConnection(_pConnection) { construct(); - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; m_pUsers = new OUsers(*this,m_aMutex,aVector,m_pConnection,this); } // ------------------------------------------------------------------------- @@ -110,7 +110,7 @@ void OAdabasGroup::refreshUsers() if(!m_pConnection) return; - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Reference< XStatement > xStmt = m_pConnection->createStatement( ); ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("SELECT DISTINCT USERNAME FROM DOMAIN.USERS WHERE USERNAME IS NOT NULL AND USERNAME <> ' ' AND USERNAME <> 'CONTROL' AND GROUPNAME = '"); diff --git a/connectivity/source/drivers/adabas/BIndex.cxx b/connectivity/source/drivers/adabas/BIndex.cxx index 555ee2f2e584..05efd57977f0 100644 --- a/connectivity/source/drivers/adabas/BIndex.cxx +++ b/connectivity/source/drivers/adabas/BIndex.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BIndex.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: fs $ $Date: 2001-03-15 08:00:50 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -113,7 +113,7 @@ void OAdabasIndex::refreshColumns() if(!m_pTable) return; - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; if(!isNew()) { Reference< XResultSet > xResult = m_pTable->getConnection()->getMetaData()->getIndexInfo(Any(), diff --git a/connectivity/source/drivers/adabas/BTable.cxx b/connectivity/source/drivers/adabas/BTable.cxx index 928bebc74d28..7188d8201e01 100644 --- a/connectivity/source/drivers/adabas/BTable.cxx +++ b/connectivity/source/drivers/adabas/BTable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BTable.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:11:25 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -137,7 +137,7 @@ OAdabasTable::OAdabasTable( OAdabasConnection* _pConnection, // ------------------------------------------------------------------------- void OAdabasTable::refreshColumns() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; if(!isNew()) { Reference< XResultSet > xResult = m_pConnection->getMetaData()->getColumns(Any(), @@ -185,7 +185,7 @@ void OAdabasTable::refreshForgeinKeys(std::vector< ::rtl::OUString>& _rKeys) // ------------------------------------------------------------------------- void OAdabasTable::refreshKeys() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; if(!isNew()) { @@ -199,7 +199,7 @@ void OAdabasTable::refreshKeys() // ------------------------------------------------------------------------- void OAdabasTable::refreshIndexes() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; if(!isNew()) { // fill indexes diff --git a/connectivity/source/drivers/adabas/BUser.cxx b/connectivity/source/drivers/adabas/BUser.cxx index 22ed4adf08a0..e25294984e67 100644 --- a/connectivity/source/drivers/adabas/BUser.cxx +++ b/connectivity/source/drivers/adabas/BUser.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BUser.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2000-11-03 14:08:03 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -114,7 +114,7 @@ void OAdabasUser::refreshGroups() if(!m_pConnection) return; - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Reference< XStatement > xStmt = m_pConnection->createStatement( ); ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("SELECT DISTINCT GROUPNAME FROM DOMAIN.USERS WHERE GROUPNAME IS NOT NULL AND GROUPNAME <> ' ' AND USERNAME = '"); aSql += getName( ); diff --git a/connectivity/source/drivers/adabas/makefile.mk b/connectivity/source/drivers/adabas/makefile.mk index fbc8e524c2b2..631844a5dbcd 100644 --- a/connectivity/source/drivers/adabas/makefile.mk +++ b/connectivity/source/drivers/adabas/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.14 $ +# $Revision: 1.15 $ # -# last change: $Author: oj $ $Date: 2001-03-29 07:02:32 $ +# last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -100,17 +100,17 @@ SLOFILES=\ $(SLO)$/BDatabaseMetaData.obj \ $(SLO)$/BPreparedStatement.obj \ $(SLO)$/BStatement.obj \ - $(SLO)$/BResultSet.obj \ - $(SLO)$/OPreparedStatement.obj \ - $(SLO)$/OStatement.obj \ - $(SLO)$/OResultSetMetaData.obj \ - $(SLO)$/OResultSet.obj \ - $(SLO)$/OTools.obj \ - $(SLO)$/ODatabaseMetaData.obj \ - $(SLO)$/ODatabaseMetaDataResultSet.obj \ - $(SLO)$/ODriver.obj \ - $(SLO)$/OFunctions.obj \ - $(SLO)$/OConnection.obj + $(SLO)$/BResultSet.obj +# $(SLO)$/OPreparedStatement.obj \ +# $(SLO)$/OStatement.obj \ +# $(SLO)$/OResultSetMetaData.obj \ +# $(SLO)$/OResultSet.obj \ +# $(SLO)$/OTools.obj \ +# $(SLO)$/ODatabaseMetaData.obj \ +# $(SLO)$/ODatabaseMetaDataResultSet.obj \ +# $(SLO)$/ODriver.obj \ +# $(SLO)$/OFunctions.obj \ +# $(SLO)$/OConnection.obj .IF "$(OS)"=="MACOSX" #SHL1VERSIONMAP=$(ADABAS_TARGET).$(DLLPOSTFIX).map @@ -131,9 +131,7 @@ SHL1STDLIBS=\ $(DBTOOLSLIB) \ $(COMPHELPERLIB) -.IF "$(COMPHELPERLIB)" == "" -SHL1STDLIBS+= icomphelp2.lib -.ENDIF +SHL1STDLIBS+= $(SLB)$/odbc.lib SHL1DEPN= SHL1IMPLIB= i$(SHL1TARGET) diff --git a/connectivity/source/drivers/ado/ACatalog.cxx b/connectivity/source/drivers/ado/ACatalog.cxx index 8300c5f1a360..aead9372ba78 100644 --- a/connectivity/source/drivers/ado/ACatalog.cxx +++ b/connectivity/source/drivers/ado/ACatalog.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ACatalog.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2001-04-27 11:38:25 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -102,7 +102,7 @@ OCatalog::OCatalog(_ADOCatalog* _pCatalog,OConnection* _pCon) : connectivity::sd // ------------------------------------------------------------------------- void OCatalog::refreshTables() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOTables* pTables = m_aCatalog.get_Tables(); if(pTables) @@ -130,7 +130,7 @@ void OCatalog::refreshTables() // ------------------------------------------------------------------------- void OCatalog::refreshViews() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOViews* pViews = m_aCatalog.get_Views(); if(pViews) @@ -158,7 +158,7 @@ void OCatalog::refreshViews() // ------------------------------------------------------------------------- void OCatalog::refreshGroups() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOGroups* pGroups = m_aCatalog.get_Groups(); if(pGroups) @@ -186,7 +186,7 @@ void OCatalog::refreshGroups() // ------------------------------------------------------------------------- void OCatalog::refreshUsers() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOUsers* pUsers = m_aCatalog.get_Users(); if(pUsers) diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx index 1d60b2933d0d..ac8c9cffe9f5 100644 --- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ADatabaseMetaDataResultSet.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:11:26 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -974,7 +974,7 @@ void ODatabaseMetaDataResultSet::setProceduresMap() m_aColMapping.push_back(6); m_aColMapping.push_back(4); - ::std::map<sal_Int32,sal_Int32> aMap; + TInt2IntMap aMap; aMap[DB_PT_UNKNOWN] = ProcedureResult::UNKNOWN; aMap[DB_PT_PROCEDURE] = ProcedureResult::NONE; aMap[DB_PT_FUNCTION] = ProcedureResult::RETURN; @@ -1039,7 +1039,7 @@ void ODatabaseMetaDataResultSet::setColumnsMap() m_aColMapping.push_back(7); m_aColMapping.push_back(11); - ::std::map<sal_Int32,sal_Int32> aMap; + TInt2IntMap aMap; aMap[adEmpty] = ADOS::MapADOType2Jdbc(adEmpty); aMap[adTinyInt] = ADOS::MapADOType2Jdbc(adTinyInt); aMap[adSmallInt] = ADOS::MapADOType2Jdbc(adSmallInt); @@ -1120,7 +1120,7 @@ void ODatabaseMetaDataResultSet::setProcedureColumnsMap() m_aColMapping.push_back(9); m_aColMapping.push_back(14); - ::std::map<sal_Int32,sal_Int32> aMap; + TInt2IntMap aMap; aMap[DBTYPE_EMPTY] = DataType::SQLNULL; aMap[DBTYPE_NULL] = DataType::SQLNULL; aMap[DBTYPE_I2] = DataType::SMALLINT; @@ -1203,7 +1203,7 @@ void ODatabaseMetaDataResultSet::setIndexInfoMap() m_aColMapping.push_back(23); m_aColMapping.push_back(24); - ::std::map<sal_Int32,sal_Int32> aMap; + TInt2IntMap aMap; aMap[DBPROPVAL_IT_HASH] = IndexType::HASHED; aMap[DBPROPVAL_IT_CONTENT] = IndexType::OTHER; aMap[DBPROPVAL_IT_OTHER] = IndexType::OTHER; @@ -1211,7 +1211,7 @@ void ODatabaseMetaDataResultSet::setIndexInfoMap() m_aValueRange[10] = aMap; - ::std::map<sal_Int32,sal_Int32> aMap2; + TInt2IntMap aMap2; aMap[0] = 1; aMap[1] = 0; m_aValueRange[8] = aMap2; @@ -1292,7 +1292,7 @@ void ODatabaseMetaDataResultSet::setTypeInfoMap() m_aStrValueRange[18] = aMap1; - ::std::map<sal_Int32,sal_Int32> aMap; + TInt2IntMap aMap; aMap[adEmpty] = ADOS::MapADOType2Jdbc(adEmpty); aMap[adTinyInt] = ADOS::MapADOType2Jdbc(adTinyInt); aMap[adSmallInt] = ADOS::MapADOType2Jdbc(adSmallInt); diff --git a/connectivity/source/drivers/ado/AGroup.cxx b/connectivity/source/drivers/ado/AGroup.cxx index 3a494bb0633c..15f1d7869f1f 100644 --- a/connectivity/source/drivers/ado/AGroup.cxx +++ b/connectivity/source/drivers/ado/AGroup.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AGroup.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:11:26 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -143,7 +143,7 @@ OAdoGroup::OAdoGroup(sal_Bool _bCase, const ::rtl::OUString& _Name) : OGroup_ADO // ------------------------------------------------------------------------- void OAdoGroup::refreshUsers() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOUsers* pUsers = m_aGroup.get_Users(); if(pUsers) diff --git a/connectivity/source/drivers/ado/AIndex.cxx b/connectivity/source/drivers/ado/AIndex.cxx index c4eabc5ce8fc..44e79a375876 100644 --- a/connectivity/source/drivers/ado/AIndex.cxx +++ b/connectivity/source/drivers/ado/AIndex.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AIndex.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:11:26 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -137,7 +137,7 @@ OAdoIndex::OAdoIndex(sal_Bool _bCase,OConnection* _pConnection) void OAdoIndex::refreshColumns() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOColumns* pColumns = m_aIndex.get_Columns(); if(pColumns) diff --git a/connectivity/source/drivers/ado/AKey.cxx b/connectivity/source/drivers/ado/AKey.cxx index 00135bc18927..a08153844b15 100644 --- a/connectivity/source/drivers/ado/AKey.cxx +++ b/connectivity/source/drivers/ado/AKey.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AKey.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:11:26 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -137,7 +137,7 @@ OAdoKey::OAdoKey(sal_Bool _bCase,OConnection* _pConnection) // ------------------------------------------------------------------------- void OAdoKey::refreshColumns() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOColumns* pColumns = m_aKey.get_Columns(); if(pColumns) diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx index c1ef62742209..6ed2fb987ec2 100644 --- a/connectivity/source/drivers/ado/ATable.cxx +++ b/connectivity/source/drivers/ado/ATable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ATable.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:13:38 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:57:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -161,7 +161,7 @@ OAdoTable::OAdoTable(sal_Bool _bCase,OCatalog* _pCatalog) // ------------------------------------------------------------------------- void OAdoTable::refreshColumns() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOColumns* pColumns = m_aTable.get_Columns(); if(pColumns) @@ -187,7 +187,7 @@ void OAdoTable::refreshColumns() // ------------------------------------------------------------------------- void OAdoTable::refreshKeys() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOKeys* pKeys = m_aTable.get_Keys(); if(pKeys) @@ -213,7 +213,7 @@ void OAdoTable::refreshKeys() // ------------------------------------------------------------------------- void OAdoTable::refreshIndexes() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOIndexes* pIndexes = m_aTable.get_Indexes(); if(pIndexes) diff --git a/connectivity/source/drivers/ado/AUser.cxx b/connectivity/source/drivers/ado/AUser.cxx index 52d0cdc475bf..772e0765a783 100644 --- a/connectivity/source/drivers/ado/AUser.cxx +++ b/connectivity/source/drivers/ado/AUser.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AUser.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:11:26 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -134,7 +134,7 @@ OAdoUser::OAdoUser(sal_Bool _bCase, const ::rtl::OUString& _Name) : OUser_TYPE void OAdoUser::refreshGroups() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; ADOGroups* pGroups = m_aUser.get_Groups(); if(pGroups) diff --git a/connectivity/source/drivers/calc/CCatalog.cxx b/connectivity/source/drivers/calc/CCatalog.cxx index 1fa2c096689f..759c8eb25141 100644 --- a/connectivity/source/drivers/calc/CCatalog.cxx +++ b/connectivity/source/drivers/calc/CCatalog.cxx @@ -2,9 +2,9 @@ * * $RCSfile: CCatalog.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: nn $ $Date: 2001-01-26 19:05:48 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,7 +95,7 @@ OCalcCatalog::OCalcCatalog(OCalcConnection* _pCon) : file::OFileCatalog(_pCon) // ------------------------------------------------------------------------- void OCalcCatalog::refreshTables() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 94d407e15aa9..3f29b8ecb24b 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: CTable.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: oj $ $Date: 2001-03-28 11:31:44 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -687,7 +687,7 @@ void OCalcTable::refreshColumns() { ::osl::MutexGuard aGuard( m_aMutex ); - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; for(OSQLColumns::const_iterator aIter = m_aColumns->begin();aIter != m_aColumns->end();++aIter) aVector.push_back(Reference< XNamed>(*aIter,UNO_QUERY)->getName()); diff --git a/connectivity/source/drivers/dbase/DCatalog.cxx b/connectivity/source/drivers/dbase/DCatalog.cxx index bf5ed6fc5273..1f8504d5e157 100644 --- a/connectivity/source/drivers/dbase/DCatalog.cxx +++ b/connectivity/source/drivers/dbase/DCatalog.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DCatalog.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-11 08:11:31 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,7 +95,7 @@ ODbaseCatalog::ODbaseCatalog(ODbaseConnection* _pCon) : file::OFileCatalog(_pCon // ------------------------------------------------------------------------- void ODbaseCatalog::refreshTables() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index e013cd0b9d51..7f72b88a9a40 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DIndex.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: oj $ $Date: 2001-04-30 13:38:23 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -180,7 +180,7 @@ void ODbaseIndex::refreshColumns() { ::osl::MutexGuard aGuard( m_aMutex ); - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; if(!isNew()) { OSL_ENSURE(m_pFileStream,"FileStream is not opened!"); diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index e8cba5ef345b..1f5d86524f55 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DTable.cxx,v $ * - * $Revision: 1.39 $ + * $Revision: 1.40 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:11:27 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -488,7 +488,7 @@ void ODbaseTable::refreshColumns() { ::osl::MutexGuard aGuard( m_aMutex ); - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; for(OSQLColumns::const_iterator aIter = m_aColumns->begin();aIter != m_aColumns->end();++aIter) aVector.push_back(Reference< XNamed>(*aIter,UNO_QUERY)->getName()); @@ -500,7 +500,7 @@ void ODbaseTable::refreshColumns() // ------------------------------------------------------------------------- void ODbaseTable::refreshIndexes() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; if(m_pFileStream) { INetURLObject aURL; diff --git a/connectivity/source/drivers/file/FCatalog.cxx b/connectivity/source/drivers/file/FCatalog.cxx index f75f462eeaad..0f60ead02f37 100644 --- a/connectivity/source/drivers/file/FCatalog.cxx +++ b/connectivity/source/drivers/file/FCatalog.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FCatalog.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:11:27 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -104,7 +104,7 @@ void SAL_CALL OFileCatalog::disposing() // ------------------------------------------------------------------------- void OFileCatalog::refreshTables() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); diff --git a/connectivity/source/drivers/file/FResultSetMetaData.cxx b/connectivity/source/drivers/file/FResultSetMetaData.cxx index 127edec9dde3..bdebb0708f27 100644 --- a/connectivity/source/drivers/file/FResultSetMetaData.cxx +++ b/connectivity/source/drivers/file/FResultSetMetaData.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FResultSetMetaData.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: oj $ $Date: 2001-04-17 12:17:53 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,6 +92,7 @@ OResultSetMetaData::OResultSetMetaData(const ::vos::ORef<connectivity::OSQLColum // ------------------------------------------------------------------------- OResultSetMetaData::~OResultSetMetaData() { + m_xColumns = NULL; } // ------------------------------------------------------------------------- @@ -142,7 +143,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw( if(column <= 0 || column > (sal_Int32)m_xColumns->size()) throw ::com::sun::star::sdbc::SQLException(STAT_INVALID_INDEX,*this,::rtl::OUString::createFromAscii("07009"),0,::com::sun::star::uno::Any()); - Any aName((*m_xColumns)[column-1]->getPropertyValue(PROPERTY_REALNAME)); + Any aName((*m_xColumns)[column-1]->getPropertyValue(PROPERTY_NAME)); return aName.hasValue() ? getString(aName) : getString((*m_xColumns)[column-1]->getPropertyValue(PROPERTY_NAME)); } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx index e9e03bb38463..94814b72d14d 100644 --- a/connectivity/source/drivers/file/FTable.cxx +++ b/connectivity/source/drivers/file/FTable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FTable.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:11:27 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,7 +100,7 @@ OFileTable::OFileTable(OConnection* _pConnection) : OTable_TYPEDEF(_pConnection- ,m_bWriteable(sal_False) { construct(); - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; m_pColumns = new OColumns(this,m_aMutex,aVector); m_aColumns = new OSQLColumns(); } @@ -131,7 +131,7 @@ OFileTable::OFileTable( OConnection* _pConnection, // ------------------------------------------------------------------------- void OFileTable::refreshColumns() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Reference< XResultSet > xResult = m_pConnection->getMetaData()->getColumns(Any(), m_SchemaName,m_Name,::rtl::OUString::createFromAscii("%")); diff --git a/connectivity/source/drivers/flat/ECatalog.cxx b/connectivity/source/drivers/flat/ECatalog.cxx index 76328570f525..a5f5ff2dc297 100644 --- a/connectivity/source/drivers/flat/ECatalog.cxx +++ b/connectivity/source/drivers/flat/ECatalog.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ECatalog.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-17 09:14:16 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,7 +95,7 @@ OFlatCatalog::OFlatCatalog(OFlatConnection* _pCon) : file::OFileCatalog(_pCon) // ------------------------------------------------------------------------- void OFlatCatalog::refreshTables() { - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; Sequence< ::rtl::OUString > aTypes; Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), ::rtl::OUString::createFromAscii("%"),::rtl::OUString::createFromAscii("%"),aTypes); diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx index 6dae9b52e852..ed036e989499 100644 --- a/connectivity/source/drivers/flat/ETable.cxx +++ b/connectivity/source/drivers/flat/ETable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ETable.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.23 $ * - * last change: $Author: oj $ $Date: 2001-03-28 11:31:45 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -582,7 +582,7 @@ void OFlatTable::refreshColumns() { ::osl::MutexGuard aGuard( m_aMutex ); - ::std::vector< ::rtl::OUString> aVector; + TStringVector aVector; for(OSQLColumns::const_iterator aIter = m_aColumns->begin();aIter != m_aColumns->end();++aIter) aVector.push_back(Reference< XNamed>(*aIter,UNO_QUERY)->getName()); diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx index 9b622e51162a..9f6963741556 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ODatabaseMetaDataResultSet.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:13:38 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -185,6 +185,19 @@ Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(Runtime return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes()); } +// ----------------------------------------------------------------------------- +sal_Int32 ODatabaseMetaDataResultSet::mapColumn (sal_Int32 column) +{ + sal_Int32 map = column; + + if (m_aColMapping.size()) + { + // Validate column number + map = m_aColMapping[column]; + } + + return map; +} // ------------------------------------------------------------------------- sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const ::rtl::OUString& columnName ) throw(SQLException, RuntimeException) @@ -236,7 +249,11 @@ sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 columnIndex switch(nType) { case DataType::BIT: - bRet = sal_Int8(getValue(m_aStatementHandle,columnIndex,SQL_C_BIT,m_bWasNull,**this,sal_Int8(0))) != 0; + { + sal_Int8 nValue = 0; + getValue(m_aStatementHandle,columnIndex,SQL_C_BIT,m_bWasNull,**this,nValue); + bRet = nValue != 0; + } break; default: bRet = getInt(columnIndex) != 0; @@ -252,7 +269,8 @@ sal_Int8 SAL_CALL ODatabaseMetaDataResultSet::getByte( sal_Int32 columnIndex ) t throw DisposedException(); columnIndex = mapColumn(columnIndex); - sal_Int8 nVal = getValue(m_aStatementHandle,columnIndex,SQL_C_CHAR,m_bWasNull,**this,sal_Int8(0)); + sal_Int8 nVal = 0; + getValue(m_aStatementHandle,columnIndex,SQL_C_CHAR,m_bWasNull,**this,nVal); if(m_aValueRange.size() && (m_aValueRangeIter = m_aValueRange.find(columnIndex)) != m_aValueRange.end()) return sal_Int8((*m_aValueRangeIter).second[(sal_Int32)nVal]); @@ -273,12 +291,12 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 co case DataType::VARCHAR: case DataType::LONGVARCHAR: { - ::rtl::OUString aRet = OTools::getStringValue(m_aStatementHandle,columnIndex,getMetaData()->getColumnType(columnIndex),m_bWasNull,**this,m_nTextEncoding); + ::rtl::OUString aRet = OTools::getStringValue(m_aStatementHandle,(SQLUSMALLINT)columnIndex,getMetaData()->getColumnType(columnIndex),m_bWasNull,**this,m_nTextEncoding); return Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(aRet.getStr()),sizeof(sal_Unicode)*aRet.getLength()); } break; } - return OTools::getBytesValue(m_aStatementHandle,columnIndex,nType,m_bWasNull,**this); + return OTools::getBytesValue(m_aStatementHandle,(SQLUSMALLINT)columnIndex,nType,m_bWasNull,**this); } // ------------------------------------------------------------------------- @@ -293,7 +311,7 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 co aDate.day = 0; aDate.month = 0; aDate.year = 0; - aDate = getValue(m_aStatementHandle,columnIndex,SQL_C_DATE,m_bWasNull,**this,aDate); + getValue(m_aStatementHandle,columnIndex,SQL_C_DATE,m_bWasNull,**this,aDate); return Date(aDate.day,aDate.month,aDate.year); } // ------------------------------------------------------------------------- @@ -305,7 +323,9 @@ double SAL_CALL ODatabaseMetaDataResultSet::getDouble( sal_Int32 columnIndex ) t throw DisposedException(); columnIndex = mapColumn(columnIndex); - return getValue(m_aStatementHandle,columnIndex,SQL_C_DOUBLE,m_bWasNull,**this,double(0.0)); + double nValue(0.0); + getValue(m_aStatementHandle,columnIndex,SQL_C_DOUBLE,m_bWasNull,**this,nValue); + return nValue; } // ------------------------------------------------------------------------- @@ -316,7 +336,9 @@ float SAL_CALL ODatabaseMetaDataResultSet::getFloat( sal_Int32 columnIndex ) thr throw DisposedException(); columnIndex = mapColumn(columnIndex); - return getValue(m_aStatementHandle,columnIndex,SQL_C_FLOAT,m_bWasNull,**this,float(0)); + float nVal(0); + getValue(m_aStatementHandle,columnIndex,SQL_C_FLOAT,m_bWasNull,**this,nVal); + return nVal; } // ------------------------------------------------------------------------- @@ -327,7 +349,8 @@ sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getInt( sal_Int32 columnIndex ) t throw DisposedException(); columnIndex = mapColumn(columnIndex); - sal_Int32 nVal = getValue(m_aStatementHandle,columnIndex,SQL_C_LONG,m_bWasNull,**this,sal_Int32(0)); + sal_Int32 nVal = 0; + getValue(m_aStatementHandle,columnIndex,SQL_C_LONG,m_bWasNull,**this,nVal); if(m_aValueRange.size() && (m_aValueRangeIter = m_aValueRange.find(columnIndex)) != m_aValueRange.end()) return (*m_aValueRangeIter).second[(sal_Int32)nVal]; @@ -428,7 +451,8 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) throw DisposedException(); columnIndex = mapColumn(columnIndex); - sal_Int16 nVal = getValue(m_aStatementHandle,columnIndex,SQL_C_SHORT,m_bWasNull,**this,sal_Int16(0)); + sal_Int16 nVal = 0; + getValue(m_aStatementHandle,columnIndex,SQL_C_SHORT,m_bWasNull,**this,nVal); if(m_aValueRange.size() && (m_aValueRangeIter = m_aValueRange.find(columnIndex)) != m_aValueRange.end()) return sal_Int16((*m_aValueRangeIter).second[(sal_Int32)nVal]); @@ -443,7 +467,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) throw DisposedException(); columnIndex = mapColumn(columnIndex); - ::rtl::OUString aVal = OTools::getStringValue(m_aStatementHandle,columnIndex,getMetaData()->getColumnType(columnIndex),m_bWasNull,**this,m_nTextEncoding); + ::rtl::OUString aVal = OTools::getStringValue(m_aStatementHandle,(SQLUSMALLINT)columnIndex,getMetaData()->getColumnType(columnIndex),m_bWasNull,**this,m_nTextEncoding); return aVal; } @@ -459,7 +483,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) columnIndex = mapColumn(columnIndex); TIME_STRUCT aTime={0,0,0}; - aTime = getValue(m_aStatementHandle,columnIndex,SQL_C_TIME,m_bWasNull,**this,aTime); + getValue(m_aStatementHandle,columnIndex,SQL_C_TIME,m_bWasNull,**this,aTime); return Time(0,aTime.second,aTime.minute,aTime.hour); } // ------------------------------------------------------------------------- @@ -473,7 +497,7 @@ sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) columnIndex = mapColumn(columnIndex); TIMESTAMP_STRUCT aTime={0,0,0,0,0,0,0}; - aTime = getValue(m_aStatementHandle,columnIndex,SQL_C_TIMESTAMP,m_bWasNull,**this,aTime); + getValue(m_aStatementHandle,columnIndex,SQL_C_TIMESTAMP,m_bWasNull,**this,aTime); return DateTime(aTime.fraction*1000,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year); } // ------------------------------------------------------------------------- @@ -826,7 +850,7 @@ void ODatabaseMetaDataResultSet::getFastPropertyValue( void ODatabaseMetaDataResultSet::openTypeInfo() throw(SQLException, RuntimeException) { - ::std::map<sal_Int32,sal_Int32> aMap; + TInt2IntMap aMap; aMap[SQL_BIT] = DataType::BIT; aMap[SQL_TINYINT] = DataType::TINYINT; aMap[SQL_SMALLINT] = DataType::SMALLINT; @@ -1015,7 +1039,7 @@ void ODatabaseMetaDataResultSet::openColumns( const Any& catalog, (SDB_ODBC_CHAR *) pCOL, SQL_NTS); OTools::ThrowException(nRetcode,m_aStatementHandle,SQL_HANDLE_STMT,*this); - ::std::map<sal_Int32,sal_Int32> aMap; + TInt2IntMap aMap; aMap[SQL_BIT] = DataType::BIT; aMap[SQL_TINYINT] = DataType::TINYINT; aMap[SQL_SMALLINT] = DataType::SMALLINT; diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index feac5dff3cdd..db6ee38d29b0 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -2,9 +2,9 @@ * * $RCSfile: OPreparedStatement.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:13:38 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -110,7 +110,8 @@ int OBoundParam::BINARY = 3; IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbcx.OPreparedStatement","com.sun.star.sdbc.PreparedStatement"); -OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const ::std::vector<OTypeInfo>& _TypeInfo,const ::rtl::OUString& sql) + +OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const TTypeInfoVector& _TypeInfo,const ::rtl::OUString& sql) :OStatement_BASE2(_pConnection) ,m_aTypeInfo(_TypeInfo) ,boundParams(NULL) @@ -1102,7 +1103,7 @@ sal_Int32 OPreparedStatement::getPrecision ( sal_Int32 sqlType) aInfo.nType = sqlType; if (m_aTypeInfo.size()) { - ::std::vector<OTypeInfo>::const_iterator aIter = ::std::find(m_aTypeInfo.begin(),m_aTypeInfo.end(),aInfo); + TTypeInfoVector::const_iterator aIter = ::std::find(m_aTypeInfo.begin(),m_aTypeInfo.end(),aInfo); if(aIter != m_aTypeInfo.end()) prec = (*aIter).nPrecision; } @@ -1145,7 +1146,7 @@ void OPreparedStatement::setStream ( OSL_ENSURE(m_aStatementHandle,"StatementHandle is null!"); - N3SQLBindParameter(m_aStatementHandle, ParameterIndex,SQL_PARAM_INPUT,Ctype, + N3SQLBindParameter(m_aStatementHandle, (SQLUSMALLINT)ParameterIndex,SQL_PARAM_INPUT,Ctype, SQLtype, length,0, dataBuf, sizeof(ParameterIndex),(SDWORD*)lenBuf); // Save the input stream diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index 4b799a57e65a..b9e733009f43 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: OResultSet.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:13:38 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -204,6 +204,20 @@ void OResultSet::disposing(void) m_aStatement = NULL; m_xMetaData = NULL; } +// ----------------------------------------------------------------------------- +sal_Int32 OResultSet::mapColumn (sal_Int32 column) +{ + sal_Int32 map = column; + + if (m_aColMapping.size()) + { + // Validate column number + OSL_ENSURE(column>0,"OResultSet::mapColumn column <= 0"); + map = m_aColMapping[column]; + } + + return map; +} // ------------------------------------------------------------------------- void OResultSet::allocBuffer(sal_Bool _bAllocRow) { @@ -406,7 +420,9 @@ sal_Bool SAL_CALL OResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLExcep } - return getValue(m_aStatementHandle,columnIndex,SQL_C_BIT,m_bWasNull,**this,sal_Int8(0)); + sal_Int8 nVal(0); + getValue(m_aStatementHandle,columnIndex,SQL_C_BIT,m_bWasNull,**this,nVal); + return nVal; } // ------------------------------------------------------------------------- @@ -427,7 +443,9 @@ sal_Int8 SAL_CALL OResultSet::getByte( sal_Int32 columnIndex ) throw(SQLExceptio return nRet; } - return getValue(m_aStatementHandle,columnIndex,SQL_C_CHAR,m_bWasNull,**this,sal_Int8(0)); + sal_Int8 nVal = 0; + getValue(m_aStatementHandle,columnIndex,SQL_C_CHAR,m_bWasNull,**this,nVal); + return nVal; } // ------------------------------------------------------------------------- @@ -488,7 +506,7 @@ Date SAL_CALL OResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, R aDate.day = 0; aDate.month = 0; aDate.year = 0; - aDate = getValue(m_aStatementHandle,columnIndex,SQL_C_DATE,m_bWasNull,**this,aDate); + getValue(m_aStatementHandle,columnIndex,SQL_C_DATE,m_bWasNull,**this,aDate); return Date(aDate.day,aDate.month,aDate.year); } // ------------------------------------------------------------------------- @@ -508,7 +526,9 @@ double SAL_CALL OResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLExceptio m_aRow[columnIndex] >>= nRet; return nRet; } - return getValue(m_aStatementHandle,columnIndex,SQL_C_DOUBLE,m_bWasNull,**this,double(0.0)); + double nVal(0.0); + getValue(m_aStatementHandle,columnIndex,SQL_C_DOUBLE,m_bWasNull,**this,nVal); + return nVal; } // ------------------------------------------------------------------------- @@ -519,7 +539,9 @@ float SAL_CALL OResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, throw DisposedException(); columnIndex = mapColumn(columnIndex); - return getValue(m_aStatementHandle,columnIndex,SQL_C_FLOAT,m_bWasNull,**this,float(0)); + float nVal(0); + getValue(m_aStatementHandle,columnIndex,SQL_C_FLOAT,m_bWasNull,**this,nVal); + return nVal; } // ------------------------------------------------------------------------- @@ -538,7 +560,9 @@ sal_Int32 SAL_CALL OResultSet::getInt( sal_Int32 columnIndex ) throw(SQLExceptio m_aRow[columnIndex] >>= nRet; return nRet; } - return getValue(m_aStatementHandle,columnIndex,SQL_C_LONG,m_bWasNull,**this,sal_Int32(0)); + sal_Int32 nVal(0); + getValue(m_aStatementHandle,columnIndex,SQL_C_LONG,m_bWasNull,**this,nVal); + return nVal; } // ------------------------------------------------------------------------- @@ -648,7 +672,9 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 columnIndex ) throw(SQLExcept m_aRow[columnIndex] >>= nRet; return nRet; } - return getValue(m_aStatementHandle,columnIndex,SQL_C_SHORT,m_bWasNull,**this,sal_Int16(0)); + sal_Int16 nVal(0); + getValue(m_aStatementHandle,columnIndex,SQL_C_SHORT,m_bWasNull,**this,nVal); + return nVal; } // ------------------------------------------------------------------------- @@ -689,7 +715,7 @@ Time SAL_CALL OResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, R return nRet; } TIME_STRUCT aTime={0,0,0}; - aTime = getValue(m_aStatementHandle,columnIndex,SQL_C_TIME,m_bWasNull,**this,aTime); + getValue(m_aStatementHandle,columnIndex,SQL_C_TIME,m_bWasNull,**this,aTime); return Time(0,aTime.second,aTime.minute,aTime.hour); } // ------------------------------------------------------------------------- @@ -711,7 +737,7 @@ DateTime SAL_CALL OResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLExc return nRet; } TIMESTAMP_STRUCT aTime={0,0,0,0,0,0,0}; - aTime = getValue(m_aStatementHandle,columnIndex,SQL_C_TIMESTAMP,m_bWasNull,**this,aTime); + getValue(m_aStatementHandle,columnIndex,SQL_C_TIMESTAMP,m_bWasNull,**this,aTime); return DateTime(aTime.fraction*1000,aTime.second,aTime.minute,aTime.hour,aTime.day,aTime.month,aTime.year); } // ------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx index 5c1db1172b8c..3645fdd8b9dc 100644 --- a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx +++ b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx @@ -2,9 +2,9 @@ * * $RCSfile: OResultSetMetaData.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2001-03-28 11:31:45 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,8 +86,8 @@ OResultSetMetaData::~OResultSetMetaData() char *pName = new char[BUFFER_LEN]; SQLSMALLINT nRealLen=0; OTools::ThrowException(N3SQLColAttribute(m_aStatementHandle, - column, - ident, + (SQLUSMALLINT)column, + (SQLUSMALLINT)ident, (SQLPOINTER)pName, BUFFER_LEN, &nRealLen, @@ -98,8 +98,8 @@ OResultSetMetaData::~OResultSetMetaData() delete pName; pName = new char[nRealLen]; OTools::ThrowException(N3SQLColAttribute(m_aStatementHandle, - column, - ident, + (SQLUSMALLINT)column, + (SQLUSMALLINT)ident, (SQLPOINTER)pName, nRealLen, &nRealLen, @@ -119,8 +119,8 @@ sal_Int32 OResultSetMetaData::getNumColAttrib(sal_Int32 _column,sal_Int32 ident) sal_Int32 nValue=0; sal_Int16 nLen = sizeof(nValue); OTools::ThrowException(N3SQLColAttribute(m_aStatementHandle, - column, - ident, + (SQLUSMALLINT)column, + (SQLUSMALLINT)ident, NULL, NULL, NULL, diff --git a/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx b/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx index be70fcc070a7..c9b2c3273598 100644 --- a/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx +++ b/connectivity/source/inc/FDatabaseMetaDataResultSetMetaData.hxx @@ -2,9 +2,9 @@ * * $RCSfile: FDatabaseMetaDataResultSetMetaData.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: oj $ $Date: 2001-03-28 11:26:47 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,6 +77,9 @@ #ifndef _CONNECTIVITY_COLUMN_HXX_ #include "OColumn.hxx" #endif +#ifndef CONNECTIVITY_STDTYPEDEFS_HXX +#include "connectivity/StdTypeDefs.hxx" +#endif namespace connectivity { @@ -89,7 +92,7 @@ namespace connectivity { friend class ODatabaseMetaDataResultSet; - ::std::vector<sal_Int32> m_vMapping; // when not every column is needed + TIntVector m_vMapping; // when not every column is needed ::std::map<sal_Int32,connectivity::OColumn> m_mColumns; ::std::map<sal_Int32,connectivity::OColumn>::const_iterator m_mColumnsIter; diff --git a/connectivity/source/inc/adabas/BColumns.hxx b/connectivity/source/inc/adabas/BColumns.hxx index dc847c57d716..d92f05ee1a72 100644 --- a/connectivity/source/inc/adabas/BColumns.hxx +++ b/connectivity/source/inc/adabas/BColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: BColumns.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:14:24 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,7 +90,7 @@ namespace connectivity public: OColumns( OAdabasTable* _pTable, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector + const TStringVector &_rVector ) : sdbcx::OCollection(*_pTable,sal_True,_rMutex,_rVector) ,m_pTable(_pTable) {} diff --git a/connectivity/source/inc/adabas/BGroups.hxx b/connectivity/source/inc/adabas/BGroups.hxx index 0bf5ee038b2d..c400906ff75f 100644 --- a/connectivity/source/inc/adabas/BGroups.hxx +++ b/connectivity/source/inc/adabas/BGroups.hxx @@ -2,9 +2,9 @@ * * $RCSfile: BGroups.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-09 11:44:39 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,7 +86,7 @@ namespace connectivity public: OGroups(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, OAdabasConnection* _pConnection, connectivity::sdbcx::IRefreshableGroups* _pParent) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector) ,m_pConnection(_pConnection) diff --git a/connectivity/source/inc/adabas/BIndexColumns.hxx b/connectivity/source/inc/adabas/BIndexColumns.hxx index 3348284390d5..801860bbfb10 100644 --- a/connectivity/source/inc/adabas/BIndexColumns.hxx +++ b/connectivity/source/inc/adabas/BIndexColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: BIndexColumns.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-09 11:44:40 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,7 +86,7 @@ namespace connectivity public: OIndexColumns( OAdabasIndex* _pIndex, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) + const TStringVector &_rVector) : sdbcx::OCollection(*_pIndex,sal_True,_rMutex,_rVector) ,m_pIndex(_pIndex) { diff --git a/connectivity/source/inc/adabas/BIndexes.hxx b/connectivity/source/inc/adabas/BIndexes.hxx index fc6dd39b78db..75637cc4c701 100644 --- a/connectivity/source/inc/adabas/BIndexes.hxx +++ b/connectivity/source/inc/adabas/BIndexes.hxx @@ -2,9 +2,9 @@ * * $RCSfile: BIndexes.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-09 11:44:40 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,7 +84,7 @@ namespace connectivity public: OIndexes(OAdabasTable* _pTable, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector + const TStringVector &_rVector ) : sdbcx::OCollection(*_pTable,sal_True,_rMutex,_rVector) ,m_pTable(_pTable) {} diff --git a/connectivity/source/inc/adabas/BKeys.hxx b/connectivity/source/inc/adabas/BKeys.hxx index 0fdfe744d52d..f3fe58638963 100644 --- a/connectivity/source/inc/adabas/BKeys.hxx +++ b/connectivity/source/inc/adabas/BKeys.hxx @@ -2,9 +2,9 @@ * * $RCSfile: BKeys.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-09 11:44:40 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,7 +85,7 @@ namespace connectivity public: OKeys(OAdabasTable* _pTable, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector + const TStringVector &_rVector ) : sdbcx::OCollection(*_pTable,sal_True,_rMutex,_rVector) ,m_pTable(_pTable) {} diff --git a/connectivity/source/inc/adabas/BTables.hxx b/connectivity/source/inc/adabas/BTables.hxx index 229d3260ad04..6f30ab5fa12c 100644 --- a/connectivity/source/inc/adabas/BTables.hxx +++ b/connectivity/source/inc/adabas/BTables.hxx @@ -2,9 +2,9 @@ * * $RCSfile: BTables.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: oj $ $Date: 2001-03-29 07:03:55 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,7 +83,7 @@ namespace connectivity void createTable( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ); public: OTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector) + const TStringVector &_rVector) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector) ,m_xMetaData(_rMetaData) {} diff --git a/connectivity/source/inc/adabas/BUsers.hxx b/connectivity/source/inc/adabas/BUsers.hxx index b0e4920b2c00..153518e3d4b2 100644 --- a/connectivity/source/inc/adabas/BUsers.hxx +++ b/connectivity/source/inc/adabas/BUsers.hxx @@ -2,9 +2,9 @@ * * $RCSfile: BUsers.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-09 11:44:40 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,7 +85,7 @@ namespace connectivity public: OUsers( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, OAdabasConnection* _pConnection, connectivity::sdbcx::IRefreshableUsers* _pParent) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector) ,m_pConnection(_pConnection) diff --git a/connectivity/source/inc/adabas/BViews.hxx b/connectivity/source/inc/adabas/BViews.hxx index 50684f3d6406..2e5a2bbb1f2e 100644 --- a/connectivity/source/inc/adabas/BViews.hxx +++ b/connectivity/source/inc/adabas/BViews.hxx @@ -2,9 +2,9 @@ * * $RCSfile: BViews.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: oj $ $Date: 2001-03-29 07:03:41 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,7 +82,7 @@ namespace connectivity void createView( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ); public: OViews(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector) + const TStringVector &_rVector) : sdbcx::OCollection(_rParent,sal_True,_rMutex,_rVector) ,m_xMetaData(_rMetaData) {} diff --git a/connectivity/source/inc/ado/AColumns.hxx b/connectivity/source/inc/ado/AColumns.hxx index 487129958618..9d9346d5a395 100644 --- a/connectivity/source/inc/ado/AColumns.hxx +++ b/connectivity/source/inc/ado/AColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AColumns.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2001-04-12 12:32:56 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,7 +92,7 @@ namespace connectivity public: OColumns( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, ADOColumns* _pCollection, sal_Bool _bCase, OConnection* _pConnection) : sdbcx::OCollection(_rParent,_bCase,_rMutex,_rVector) diff --git a/connectivity/source/inc/ado/ADatabaseMetaDataResultSet.hxx b/connectivity/source/inc/ado/ADatabaseMetaDataResultSet.hxx index 2be661b35ef4..072c5d0cdcd0 100644 --- a/connectivity/source/inc/ado/ADatabaseMetaDataResultSet.hxx +++ b/connectivity/source/inc/ado/ADatabaseMetaDataResultSet.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ADatabaseMetaDataResultSet.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: oj $ $Date: 2001-04-30 10:09:04 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:54:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -104,6 +104,9 @@ #ifndef _COMPHELPER_BROADCASTHELPER_HXX_ #include <comphelper/broadcasthelper.hxx> #endif +#ifndef CONNECTIVITY_STDTYPEDEFS_HXX +#include "connectivity/StdTypeDefs.hxx" +#endif namespace connectivity { @@ -129,8 +132,8 @@ namespace connectivity ::std::vector<void*> m_aBindVector; ::std::vector<sal_Int32> m_aColMapping; // pos 0 is unused so we don't have to decrement 1 everytime - ::std::map<sal_Int32, ::std::map<sal_Int32,sal_Int32> > m_aValueRange; - ::std::map<sal_Int32, ::std::map<sal_Int32,sal_Int32> >::iterator m_aValueRangeIter; + ::std::map<sal_Int32, TInt2IntMap > m_aValueRange; + ::std::map<sal_Int32, TInt2IntMap >::iterator m_aValueRangeIter; ::std::map<sal_Int32, ::std::map< ::rtl::OUString,sal_Int32> > m_aStrValueRange; ::std::map<sal_Int32, ::std::map< ::rtl::OUString,sal_Int32> >::iterator m_aStrValueRangeIter; diff --git a/connectivity/source/inc/ado/AGroups.hxx b/connectivity/source/inc/ado/AGroups.hxx index 60ce4da82caa..c4d61339b5f5 100644 --- a/connectivity/source/inc/ado/AGroups.hxx +++ b/connectivity/source/inc/ado/AGroups.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AGroups.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:14:25 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,7 +89,7 @@ namespace connectivity public: OGroups(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, ADOGroups* _pCollection,sal_Bool _bCase) : sdbcx::OCollection(_rParent,_bCase,_rMutex,_rVector) ,m_pCollection(_pCollection) { diff --git a/connectivity/source/inc/ado/AIndexColumns.hxx b/connectivity/source/inc/ado/AIndexColumns.hxx index 09d2e95e99b9..d65b4d3228bd 100644 --- a/connectivity/source/inc/ado/AIndexColumns.hxx +++ b/connectivity/source/inc/ado/AIndexColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AIndexColumns.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:14:25 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,7 +78,7 @@ namespace connectivity public: OIndexColumns( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, OTable* _pTable, connectivity::sdbcx::IRefreshableColumns* _pParent) : OColumns(_rParent,_rMutex,_rVector,_pTable,_pParent) diff --git a/connectivity/source/inc/ado/AIndexes.hxx b/connectivity/source/inc/ado/AIndexes.hxx index 999be17faf15..4f202646f1d7 100644 --- a/connectivity/source/inc/ado/AIndexes.hxx +++ b/connectivity/source/inc/ado/AIndexes.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AIndexes.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2001-04-12 12:32:56 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,7 +87,7 @@ namespace connectivity public: OIndexes(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, ADOIndexes* _pCollection, sal_Bool _bCase, OConnection* _pConnection) diff --git a/connectivity/source/inc/ado/AKeyColumns.hxx b/connectivity/source/inc/ado/AKeyColumns.hxx index a37551025917..ace9793d63e1 100644 --- a/connectivity/source/inc/ado/AKeyColumns.hxx +++ b/connectivity/source/inc/ado/AKeyColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AKeyColumns.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2001-04-12 12:32:56 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,7 +78,7 @@ namespace connectivity public: OKeyColumns( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, OTable* _pTable, connectivity::sdbcx::IRefreshableColumns* _pParent) : OColumns(_rParent,_rMutex,_rVector,_pTable,_pParent) diff --git a/connectivity/source/inc/ado/AKeys.hxx b/connectivity/source/inc/ado/AKeys.hxx index 569e4770aa09..df3aafb01e07 100644 --- a/connectivity/source/inc/ado/AKeys.hxx +++ b/connectivity/source/inc/ado/AKeys.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AKeys.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2001-04-12 12:32:56 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,7 +86,7 @@ namespace connectivity public: OKeys(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, ADOKeys* _pCollection, sal_Bool _bCase, OConnection* _pConnection) : sdbcx::OCollection(_rParent,_bCase,_rMutex,_rVector) diff --git a/connectivity/source/inc/ado/ATables.hxx b/connectivity/source/inc/ado/ATables.hxx index 012542e60ade..cace72bff505 100644 --- a/connectivity/source/inc/ado/ATables.hxx +++ b/connectivity/source/inc/ado/ATables.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ATables.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2001-04-12 12:32:56 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -87,7 +87,7 @@ namespace connectivity void setComments(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); public: OTables(OCatalog* _pParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, ADOTables* _pCollection, sal_Bool _bCase) : sdbcx::OCollection(*_pParent,_bCase,_rMutex,_rVector) ,m_pCollection(_pCollection) diff --git a/connectivity/source/inc/ado/AUsers.hxx b/connectivity/source/inc/ado/AUsers.hxx index d25a7f5c0e69..28571d9691a5 100644 --- a/connectivity/source/inc/ado/AUsers.hxx +++ b/connectivity/source/inc/ado/AUsers.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AUsers.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:14:25 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -88,7 +88,7 @@ namespace connectivity public: OUsers( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, ADOUsers* _pCollection,sal_Bool _bCase) : sdbcx::OCollection(_rParent,_bCase,_rMutex,_rVector) ,m_pCollection(_pCollection) { diff --git a/connectivity/source/inc/ado/AViews.hxx b/connectivity/source/inc/ado/AViews.hxx index 61badef21678..9ff3e49a37aa 100644 --- a/connectivity/source/inc/ado/AViews.hxx +++ b/connectivity/source/inc/ado/AViews.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AViews.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2001-04-27 11:38:26 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,7 +89,7 @@ namespace connectivity void setComments(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); public: OViews(OCatalog* _pParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector, + const TStringVector &_rVector, ADOViews* _pCollection,sal_Bool _bCase) : sdbcx::OCollection(*_pParent,_bCase,_rMutex,_rVector) ,m_pCollection(_pCollection) ,m_pCatalog(_pParent) diff --git a/connectivity/source/inc/calc/CColumns.hxx b/connectivity/source/inc/calc/CColumns.hxx index 1781ed0b342a..eb9063a12fb7 100644 --- a/connectivity/source/inc/calc/CColumns.hxx +++ b/connectivity/source/inc/calc/CColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: CColumns.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: nn $ $Date: 2001-01-26 18:27:41 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,7 +79,7 @@ namespace connectivity public: OCalcColumns(file::OFileTable* _pTable, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector + const TStringVector &_rVector ) : file::OColumns(_pTable,_rMutex,_rVector) {} diff --git a/connectivity/source/inc/calc/CTables.hxx b/connectivity/source/inc/calc/CTables.hxx index 4035c76610ad..71360832a76b 100644 --- a/connectivity/source/inc/calc/CTables.hxx +++ b/connectivity/source/inc/calc/CTables.hxx @@ -2,9 +2,9 @@ * * $RCSfile: CTables.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: nn $ $Date: 2001-01-26 18:27:41 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -80,7 +80,7 @@ namespace connectivity virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createEmptyObject(); public: OCalcTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) : OCalcTables_BASE(_rMetaData,_rParent,_rMutex,_rVector) + const TStringVector &_rVector) : OCalcTables_BASE(_rMetaData,_rParent,_rMutex,_rVector) {} virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/inc/dbase/DColumns.hxx b/connectivity/source/inc/dbase/DColumns.hxx index 189b35990098..e4f322440953 100644 --- a/connectivity/source/inc/dbase/DColumns.hxx +++ b/connectivity/source/inc/dbase/DColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DColumns.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2001-03-28 11:28:46 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,7 +79,7 @@ namespace connectivity public: ODbaseColumns(file::OFileTable* _pTable, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector + const TStringVector &_rVector ) : file::OColumns(_pTable,_rMutex,_rVector) {} diff --git a/connectivity/source/inc/dbase/DIndexColumns.hxx b/connectivity/source/inc/dbase/DIndexColumns.hxx index faa46465c0cc..edec051f2cca 100644 --- a/connectivity/source/inc/dbase/DIndexColumns.hxx +++ b/connectivity/source/inc/dbase/DIndexColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DIndexColumns.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:14:25 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,7 +86,7 @@ namespace connectivity public: ODbaseIndexColumns( ODbaseIndex* _pIndex, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) + const TStringVector &_rVector) : sdbcx::OCollection(*_pIndex,_pIndex->getTable()->getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(),_rMutex,_rVector) , m_pIndex(_pIndex) {} diff --git a/connectivity/source/inc/dbase/DIndexes.hxx b/connectivity/source/inc/dbase/DIndexes.hxx index 708e8ab47e00..efdbf659bc79 100644 --- a/connectivity/source/inc/dbase/DIndexes.hxx +++ b/connectivity/source/inc/dbase/DIndexes.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DIndexes.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:14:25 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,7 +86,7 @@ namespace connectivity virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createEmptyObject(); public: ODbaseIndexes(ODbaseTable* _pTable, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) : ODbaseIndexes_BASE(*_pTable,_pTable->getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(),_rMutex,_rVector) + const TStringVector &_rVector) : ODbaseIndexes_BASE(*_pTable,_pTable->getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(),_rMutex,_rVector) , m_pTable(_pTable) {} diff --git a/connectivity/source/inc/dbase/DTables.hxx b/connectivity/source/inc/dbase/DTables.hxx index a2b8d195c005..91fee1c22d0c 100644 --- a/connectivity/source/inc/dbase/DTables.hxx +++ b/connectivity/source/inc/dbase/DTables.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DTables.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-25 11:24:42 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,7 +81,7 @@ namespace connectivity virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createEmptyObject(); public: ODbaseTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) : ODbaseTables_BASE(_rMetaData,_rParent,_rMutex,_rVector) + const TStringVector &_rVector) : ODbaseTables_BASE(_rMetaData,_rParent,_rMutex,_rVector) {} virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/inc/file/FColumns.hxx b/connectivity/source/inc/file/FColumns.hxx index eb99ffbffde4..eec721848605 100644 --- a/connectivity/source/inc/file/FColumns.hxx +++ b/connectivity/source/inc/file/FColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: FColumns.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2000-10-30 07:28:24 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,7 +90,7 @@ namespace connectivity public: OColumns( OFileTable* _pTable, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector + const TStringVector &_rVector ) : sdbcx::OCollection(*_pTable,_pTable->getConnection()->getMetaData()->storesMixedCaseQuotedIdentifiers(),_rMutex,_rVector) ,m_pTable(_pTable) {} diff --git a/connectivity/source/inc/file/FTables.hxx b/connectivity/source/inc/file/FTables.hxx index cde2c2710c88..15bbd2a52932 100644 --- a/connectivity/source/inc/file/FTables.hxx +++ b/connectivity/source/inc/file/FTables.hxx @@ -2,9 +2,9 @@ * * $RCSfile: FTables.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:14:26 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,7 +82,7 @@ namespace connectivity virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createEmptyObject(); public: OTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) : sdbcx::OCollection(_rParent,_rMetaData->storesMixedCaseQuotedIdentifiers(),_rMutex,_rVector) + const TStringVector &_rVector) : sdbcx::OCollection(_rParent,_rMetaData->storesMixedCaseQuotedIdentifiers(),_rMutex,_rVector) ,m_xMetaData(_rMetaData) // ,m_pParent(_pParent) {} diff --git a/connectivity/source/inc/flat/EColumns.hxx b/connectivity/source/inc/flat/EColumns.hxx index 9e924107e573..5a4178496f34 100644 --- a/connectivity/source/inc/flat/EColumns.hxx +++ b/connectivity/source/inc/flat/EColumns.hxx @@ -2,9 +2,9 @@ * * $RCSfile: EColumns.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: oj $ $Date: 2000-10-05 14:46:01 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,7 +79,7 @@ namespace connectivity public: OFlatColumns(file::OFileTable* _pTable, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector + const TStringVector &_rVector ) : file::OColumns(_pTable,_rMutex,_rVector) {} diff --git a/connectivity/source/inc/flat/ETables.hxx b/connectivity/source/inc/flat/ETables.hxx index 2f7ff1932415..e2de535c4f44 100644 --- a/connectivity/source/inc/flat/ETables.hxx +++ b/connectivity/source/inc/flat/ETables.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ETables.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: oj $ $Date: 2000-10-05 14:47:15 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,7 +81,7 @@ namespace connectivity virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createEmptyObject(); public: OFlatTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, - const ::std::vector< ::rtl::OUString> &_rVector) : OFlatTables_BASE(_rMetaData,_rParent,_rMutex,_rVector) + const TStringVector &_rVector) : OFlatTables_BASE(_rMetaData,_rParent,_rMutex,_rVector) {} // XAppend diff --git a/connectivity/source/inc/odbc/OConnection.hxx b/connectivity/source/inc/odbc/OConnection.hxx index 1f59f3ff6446..8b64f677b34d 100644 --- a/connectivity/source/inc/odbc/OConnection.hxx +++ b/connectivity/source/inc/odbc/OConnection.hxx @@ -2,9 +2,9 @@ * * $RCSfile: OConnection.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2001-04-27 10:08:14 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -97,7 +97,9 @@ namespace connectivity class OStatement_Base; class ODBCDriver; class ODatabaseMetaData; + typedef connectivity::OMetaConnection OConnection_BASE; + typedef ::std::vector< ::connectivity::OTypeInfo> TTypeInfoVector; class OConnection : public OConnection_BASE, public connectivity::OSubComponent<OConnection, OConnection_BASE> @@ -108,7 +110,7 @@ namespace connectivity //==================================================================== // Data attributes //==================================================================== - ::std::vector<connectivity::OTypeInfo> m_aTypeInfo; // vector containing an entry + TTypeInfoVector m_aTypeInfo; // vector containing an entry // for each row returned by // DatabaseMetaData.getTypeInfo. ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData > m_xMetaData; diff --git a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx index bc734674eabc..dd33590ea1d7 100644 --- a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx +++ b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ODatabaseMetaDataResultSet.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2001-04-30 09:59:55 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -101,6 +101,9 @@ #ifndef _COMPHELPER_BROADCASTHELPER_HXX_ #include <comphelper/broadcasthelper.hxx> #endif +#ifndef CONNECTIVITY_STDTYPEDEFS_HXX +#include "connectivity/StdTypeDefs.hxx" +#endif namespace connectivity { @@ -123,17 +126,17 @@ namespace connectivity public ::cppu::OPropertySetHelper, public ::comphelper::OPropertyArrayUsageHelper<ODatabaseMetaDataResultSet> { - ::std::vector<void*> m_aBindVector; - ::std::vector<sal_Int32> m_aColMapping; // pos 0 is unused so we don't have to decrement 1 everytime + ::std::vector<void*> m_aBindVector; + ::connectivity::TIntVector m_aColMapping; // pos 0 is unused so we don't have to decrement 1 everytime - ::std::map<sal_Int32, ::std::map<sal_Int32,sal_Int32> > m_aValueRange; - ::std::map<sal_Int32, ::std::map<sal_Int32,sal_Int32> >::iterator m_aValueRangeIter; + ::std::map<sal_Int32, ::connectivity::TInt2IntMap > m_aValueRange; + ::std::map<sal_Int32, ::connectivity::TInt2IntMap >::iterator m_aValueRangeIter; - ::std::map<sal_Int32, ::std::map< ::rtl::OUString,sal_Int32> > m_aStrValueRange; - ::std::map<sal_Int32, ::std::map< ::rtl::OUString,sal_Int32> >::iterator m_aStrValueRangeIter; + ::std::map<sal_Int32, ::connectivity::TString2IntMap > m_aStrValueRange; + ::std::map<sal_Int32, ::connectivity::TString2IntMap >::iterator m_aStrValueRangeIter; - ::std::map<sal_Int32, ::std::map< sal_Int32,::rtl::OUString> > m_aIntValueRange; - ::std::map<sal_Int32, ::std::map< sal_Int32,::rtl::OUString> >::iterator m_aIntValueRangeIter; + ::std::map<sal_Int32, ::connectivity::TInt2StringMap > m_aIntValueRange; + ::std::map<sal_Int32, ::connectivity::TInt2StringMap >::iterator m_aIntValueRangeIter; SQLHANDLE m_aStatementHandle; @@ -163,7 +166,7 @@ namespace connectivity void setFetchSize(sal_Int32 _par0) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - inline sal_Int32 mapColumn (sal_Int32 column); + sal_Int32 mapColumn (sal_Int32 column); protected: @@ -258,7 +261,7 @@ namespace connectivity // XColumnLocate virtual sal_Int32 SAL_CALL findColumn( const ::rtl::OUString& columnName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - const ::std::vector<sal_Int32>& getColumnMapping() { return m_aColMapping; } + const ::connectivity::TIntVector& getColumnMapping() { return m_aColMapping; } void openTablesTypes( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void openTypeInfo() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); @@ -291,19 +294,6 @@ namespace connectivity void openIndexInfo( const ::com::sun::star::uno::Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table,sal_Bool unique,sal_Bool approximate )throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); }; - // ------------------------------------------------------------------------- - inline sal_Int32 ODatabaseMetaDataResultSet::mapColumn (sal_Int32 column) - { - sal_Int32 map = column; - - if (m_aColMapping.size()) - { - // Validate column number - map = m_aColMapping[column]; - } - - return map; - } } } diff --git a/connectivity/source/inc/odbc/OPreparedStatement.hxx b/connectivity/source/inc/odbc/OPreparedStatement.hxx index 5c4c7419ce66..b59ce2978be3 100644 --- a/connectivity/source/inc/odbc/OPreparedStatement.hxx +++ b/connectivity/source/inc/odbc/OPreparedStatement.hxx @@ -2,9 +2,9 @@ * * $RCSfile: OPreparedStatement.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: oj $ $Date: 2001-04-30 09:59:55 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -116,7 +116,7 @@ namespace connectivity //==================================================================== // Data attributes //==================================================================== - ::std::vector<OTypeInfo> m_aTypeInfo; // Hashtable containing an entry + TTypeInfoVector m_aTypeInfo; // Hashtable containing an entry // for each row returned by // DatabaseMetaData.getTypeInfo. @@ -158,7 +158,7 @@ namespace connectivity public: DECLARE_SERVICE_INFO(); // ein Konstruktor, der fuer das Returnen des Objektes benoetigt wird: - OPreparedStatement( OConnection* _pConnection,const ::std::vector<OTypeInfo>& _TypeInfo,const ::rtl::OUString& sql); + OPreparedStatement( OConnection* _pConnection,const TTypeInfoVector& _TypeInfo,const ::rtl::OUString& sql); //XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); diff --git a/connectivity/source/inc/odbc/OResultSet.hxx b/connectivity/source/inc/odbc/OResultSet.hxx index 1b749df9cd52..621478d9a2e9 100644 --- a/connectivity/source/inc/odbc/OResultSet.hxx +++ b/connectivity/source/inc/odbc/OResultSet.hxx @@ -2,9 +2,9 @@ * * $RCSfile: OResultSet.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: oj $ $Date: 2001-04-30 09:59:55 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -309,22 +309,8 @@ namespace connectivity virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); // special methods - inline sal_Int32 mapColumn(sal_Int32 column); + sal_Int32 mapColumn(sal_Int32 column); }; - // ------------------------------------------------------------------------- - inline sal_Int32 OResultSet::mapColumn (sal_Int32 column) - { - sal_Int32 map = column; - - if (m_aColMapping.size()) - { - // Validate column number - OSL_ENSURE(column>0,"OResultSet::mapColumn column <= 0"); - map = m_aColMapping[column]; - } - - return map; - } } } #endif // _CONNECTIVITY_ODBC_ORESULTSET_HXX_ diff --git a/connectivity/source/inc/odbc/OStatement.hxx b/connectivity/source/inc/odbc/OStatement.hxx index 1d977e7ea42f..9ef4fd90e57e 100644 --- a/connectivity/source/inc/odbc/OStatement.hxx +++ b/connectivity/source/inc/odbc/OStatement.hxx @@ -2,9 +2,9 @@ * * $RCSfile: OStatement.hxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oj $ $Date: 2001-04-30 09:59:55 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -234,13 +234,13 @@ namespace connectivity }; class OStatement_BASE2 :public OStatement_Base - ,public OSubComponent<OStatement_BASE2, OStatement_BASE> + ,public ::connectivity::OSubComponent<OStatement_BASE2, OStatement_BASE> { - friend class OSubComponent<OStatement_BASE2, OStatement_BASE>; + friend class ::connectivity::OSubComponent<OStatement_BASE2, OStatement_BASE>; public: OStatement_BASE2(OConnection* _pConnection ) : OStatement_Base(_pConnection ), - OSubComponent<OStatement_BASE2, OStatement_BASE>((::cppu::OWeakObject*)_pConnection, this){} + ::connectivity::OSubComponent<OStatement_BASE2, OStatement_BASE>((::cppu::OWeakObject*)_pConnection, this){} // OComponentHelper virtual void SAL_CALL disposing(void); // XInterface diff --git a/connectivity/source/inc/odbc/OTools.hxx b/connectivity/source/inc/odbc/OTools.hxx index 40847790244c..dc10cea03fef 100644 --- a/connectivity/source/inc/odbc/OTools.hxx +++ b/connectivity/source/inc/odbc/OTools.hxx @@ -2,9 +2,9 @@ * * $RCSfile: OTools.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2001-02-05 12:26:42 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -154,25 +154,33 @@ namespace connectivity const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); }; - template <class T> T getValue( SQLHANDLE _aStatementHandle,sal_Int32 columnIndex, - SQLSMALLINT _nType,sal_Bool &_bWasNull, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface,const T& _rValue) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) + template <class T> void getValue( SQLHANDLE _aStatementHandle, + sal_Int32 columnIndex, + SQLSMALLINT _nType, + sal_Bool &_bWasNull, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, + T& _rValue) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SQLINTEGER pcbValue; - T nValue = _rValue; + // T nValue = _rValue; OTools::ThrowException(N3SQLGetData(_aStatementHandle, - columnIndex, + (SQLUSMALLINT)columnIndex, _nType, - &nValue, - (SQLINTEGER)sizeof nValue, + &_rValue, + (SQLINTEGER)sizeof _rValue, &pcbValue), _aStatementHandle,SQL_HANDLE_STMT,_xInterface,sal_False); _bWasNull = pcbValue == SQL_NULL_DATA; - return nValue; + // return nValue; } //----------------------------------------------------------------------------- - template < class T > void bindData(SWORD fSqlType,sal_Bool _bUseWChar,void *&_pData,SDWORD*& pLen,const T* _pValue,rtl_TextEncoding _nTextEncoding) + template < class T > void bindData( SWORD fSqlType, + sal_Bool _bUseWChar, + void *&_pData, + SDWORD*& pLen, + const T* _pValue, + rtl_TextEncoding _nTextEncoding) { SDWORD nMaxLen = 0; @@ -278,9 +286,14 @@ namespace connectivity } //----------------------------------------------------------------------------- - template < class T > sal_Bool bindParameter( SQLHANDLE _hStmt,sal_Int32 nPos, sal_Int8* pDataBuffer, - sal_Int8* pLenBuffer,SQLSMALLINT _nJDBCtype, - sal_Bool _bUseWChar,sal_Bool _bUseOldTimeDate,const T* _pValue, + template < class T > void bindParameter(SQLHANDLE _hStmt, + sal_Int32 nPos, + sal_Int8* pDataBuffer, + sal_Int8* pLenBuffer, + SQLSMALLINT _nJDBCtype, + sal_Bool _bUseWChar, + sal_Bool _bUseOldTimeDate, + const T* _pValue, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, rtl_TextEncoding _nTextEncoding) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) @@ -301,10 +314,10 @@ namespace connectivity if(fSqlType == SQL_LONGVARCHAR || fSqlType == SQL_LONGVARBINARY) memcpy(pData,&nPos,sizeof(nPos)); - nRetcode = N3SQLDescribeParam(_hStmt,nPos,&fSqlType,&nColumnSize,&nDecimalDigits,&nNullable); + nRetcode = N3SQLDescribeParam(_hStmt,(SQLUSMALLINT)nPos,&fSqlType,&nColumnSize,&nDecimalDigits,&nNullable); nRetcode = N3SQLBindParameter(_hStmt, - nPos, + (SQLUSMALLINT)nPos, SQL_PARAM_INPUT, fCType, fSqlType, @@ -315,15 +328,19 @@ namespace connectivity pLen); OTools::ThrowException(nRetcode,_hStmt,SQL_HANDLE_STMT,_xInterface); - return sal_True; } - template <class T> void bindValue(SQLHANDLE _aStatementHandle,sal_Int32 columnIndex, - SQLSMALLINT _nType,SQLSMALLINT _nMaxLen,SQLSMALLINT _nScale, - const T* _pValue,void* _pData,SQLINTEGER *pLen, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, - rtl_TextEncoding _nTextEncoding) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) + template <class T> void bindValue( SQLHANDLE _aStatementHandle, + sal_Int32 columnIndex, + SQLSMALLINT _nType, + SQLSMALLINT _nMaxLen, + SQLSMALLINT _nScale, + const T* _pValue, + void* _pData, + SQLINTEGER *pLen, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xInterface, + rtl_TextEncoding _nTextEncoding) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException) { SQLRETURN nRetcode; SWORD fSqlType; diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx index 5eef17ac724a..bb49a077e8c6 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sqlnode.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: jl $ $Date: 2001-03-21 13:52:43 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -284,7 +284,7 @@ OSQLParseNode::OSQLParseNode(const OSQLParseNode& rParseNode) // Zeigers wieder eingehangen. // wenn kein Blatt, dann SubTrees bearbeiten - for (::std::vector<OSQLParseNode*>::const_iterator i = rParseNode.m_aChilds.begin(); + for (OSQLParseNodes::const_iterator i = rParseNode.m_aChilds.begin(); i != rParseNode.m_aChilds.end(); i++) append(new OSQLParseNode(**i)); } @@ -301,13 +301,13 @@ OSQLParseNode& OSQLParseNode::operator=(const OSQLParseNode& rParseNode) m_eNodeType = rParseNode.m_eNodeType; m_nNodeID = rParseNode.m_nNodeID; - for (::std::vector<OSQLParseNode*>::const_iterator i = m_aChilds.begin(); + for (OSQLParseNodes::const_iterator i = m_aChilds.begin(); i != m_aChilds.end(); i++) delete *i; m_aChilds.clear(); - for (::std::vector<OSQLParseNode*>::const_iterator j = rParseNode.m_aChilds.begin(); + for (OSQLParseNodes::const_iterator j = rParseNode.m_aChilds.begin(); j != rParseNode.m_aChilds.end(); j++) append(new OSQLParseNode(**j)); } @@ -336,7 +336,7 @@ sal_Bool OSQLParseNode::operator==(OSQLParseNode& rParseNode) const //----------------------------------------------------------------------------- OSQLParseNode::~OSQLParseNode() { - for (::std::vector<OSQLParseNode*>::const_iterator i = m_aChilds.begin(); + for (OSQLParseNodes::const_iterator i = m_aChilds.begin(); i != m_aChilds.end(); i++) delete *i; } @@ -492,7 +492,7 @@ void OSQLParseNode::parseNodeToStr(::rtl::OUString& rString, const SQLParseNodeP } else { - for (::std::vector<OSQLParseNode*>::const_iterator i = m_aChilds.begin(); + for (OSQLParseNodes::const_iterator i = m_aChilds.begin(); i != m_aChilds.end();) { const OSQLParseNode* pSubTree = *i; @@ -791,7 +791,7 @@ OSQLParseNode* OSQLParseNode::getByRule(OSQLParseNode::Rule eRule) const pRetNode = (OSQLParseNode*)this; else { - for (::std::vector<OSQLParseNode*>::const_iterator i = m_aChilds.begin(); + for (OSQLParseNodes::const_iterator i = m_aChilds.begin(); !pRetNode && i != m_aChilds.end(); i++) pRetNode = (*i)->getByRule(eRule); } @@ -1254,7 +1254,7 @@ void OSQLParseNode::showParseTree(::rtl::OUString& rString, sal_uInt32 nLevel) // einmal auswerten wieviel Subtrees dieser Knoten besitzt sal_uInt32 nStop = count(); // hol dir den ersten Subtree - for (::std::vector<OSQLParseNode*>::const_iterator i = m_aChilds.begin(); + for (OSQLParseNodes::const_iterator i = m_aChilds.begin(); i != m_aChilds.end(); i++) (*i)->showParseTree(rString, nLevel+1); } @@ -1337,7 +1337,7 @@ void OSQLParseNode::insert(sal_uInt32 nPos, OSQLParseNode* pNewSubTree) //----------------------------------------------------------------------------- OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos) { - ::std::vector<OSQLParseNode*>::iterator aPos(m_aChilds.begin() + nPos); + OSQLParseNodes::iterator aPos(m_aChilds.begin() + nPos); OSQLParseNode* pNode = *aPos; // setze den getParent des removeten auf NULL @@ -1350,7 +1350,7 @@ OSQLParseNode* OSQLParseNode::removeAt(sal_uInt32 nPos) OSQLParseNode* OSQLParseNode::remove(OSQLParseNode* pSubTree) { OSL_ENSURE(pSubTree != NULL, "OSQLParseNode: ungueltiger SubTree"); - ::std::vector<OSQLParseNode*>::iterator aPos = ::std::find(m_aChilds.begin(), m_aChilds.end(), pSubTree); + OSQLParseNodes::iterator aPos = ::std::find(m_aChilds.begin(), m_aChilds.end(), pSubTree); if (aPos != m_aChilds.end()) { // setze den getParent des removeten auf NULL diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index 0c5593195109..67fd68f0595f 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -2,9 +2,9 @@ * * $RCSfile: VCollection.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: oj $ $Date: 2001-04-30 09:59:54 $ + * last change: $Author: oj $ $Date: 2001-05-02 12:52:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -93,14 +93,14 @@ using namespace ::com::sun::star::util; IMPLEMENT_SERVICE_INFO(OCollection,"com.sun.star.sdbcx.VContainer" , "com.sun.star.sdbcx.Container") -OCollection::OCollection(::cppu::OWeakObject& _rParent,sal_Bool _bCase, ::osl::Mutex& _rMutex,const ::std::vector< ::rtl::OUString> &_rVector) +OCollection::OCollection(::cppu::OWeakObject& _rParent,sal_Bool _bCase, ::osl::Mutex& _rMutex,const TStringVector &_rVector) : m_rParent(_rParent) ,m_rMutex(_rMutex) ,m_aContainerListeners(_rMutex) ,m_aRefreshListeners(_rMutex) ,m_aNameMap(_bCase) { - for(::std::vector< ::rtl::OUString>::const_iterator i=_rVector.begin(); i != _rVector.end();++i) + for(TStringVector::const_iterator i=_rVector.begin(); i != _rVector.end();++i) m_aElements.push_back(m_aNameMap.insert(m_aNameMap.begin(), ObjectMap::value_type(*i,::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNamed >()))); } // ------------------------------------------------------------------------- @@ -203,10 +203,10 @@ void SAL_CALL OCollection::refresh( ) throw(RuntimeException) NOTIFY_LISTENERS(m_aRefreshListeners, XRefreshListener, refreshed, aEvt); } // ----------------------------------------------------------------------------- -void OCollection::reFill(const ::std::vector< ::rtl::OUString> &_rVector) +void OCollection::reFill(const TStringVector &_rVector) { OSL_ENSURE(m_aNameMap.size(),"OCollection::reFill: collection isn't empty"); - for(::std::vector< ::rtl::OUString>::const_iterator i=_rVector.begin(); i != _rVector.end();++i) + for(TStringVector::const_iterator i=_rVector.begin(); i != _rVector.end();++i) m_aElements.push_back(m_aNameMap.insert(m_aNameMap.begin(), ObjectMap::value_type(*i,::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNamed >()))); } // ------------------------------------------------------------------------- |