diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 10:39:56 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 10:39:56 +0000 |
commit | b620344599fc574e8517aa49f832a0139aa7572d (patch) | |
tree | bd83133f7d7f6546430061127348179d88370b4f /connectivity | |
parent | 4d308e9d63ae7ccce492aa26405881acd4756a99 (diff) |
INTEGRATION: CWS dba201b (1.2.38); FILE MERGED
2005/09/21 08:14:58 oj 1.2.38.3: RESYNC: (1.5-1.6); FILE MERGED
2005/07/11 07:11:55 oj 1.2.38.2: RESYNC: (1.2-1.5); FILE MERGED
2005/07/05 07:48:58 oj 1.2.38.1: #i51335# if table is a view remove the xrename interface
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/hsqldb/HTable.cxx | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 04dcf6702add..aa2491581e4c 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -4,9 +4,9 @@ * * $RCSfile: HTable.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: rt $ $Date: 2005-09-08 06:04:21 $ + * last change: $Author: hr $ $Date: 2005-09-23 11:39:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -382,6 +382,28 @@ void OHSQLTable::executeStatement(const ::rtl::OUString& _rStatement ) } } // ----------------------------------------------------------------------------- +Sequence< Type > SAL_CALL OHSQLTable::getTypes( ) throw(RuntimeException) +{ + if ( ! m_Type.compareToAscii("VIEW") ) + { + Sequence< Type > aTypes = OTableHelper::getTypes(); + ::std::vector<Type> aOwnTypes; + aOwnTypes.reserve(aTypes.getLength()); + const Type* pIter = aTypes.getConstArray(); + const Type* pEnd = pIter + aTypes.getLength(); + for(;pIter != pEnd;++pIter) + { + if( *pIter != ::getCppuType((const Reference<XRename>*)0) ) + { + aOwnTypes.push_back(*pIter); + } + } + Type *pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0]; + return Sequence< Type >(pTypes, aOwnTypes.size()); + } + return OTableHelper::getTypes(); +} +// ------------------------------------------------------------------------- // XRename void SAL_CALL OHSQLTable::rename( const ::rtl::OUString& newName ) throw(SQLException, ElementExistException, RuntimeException) { @@ -422,6 +444,13 @@ void SAL_CALL OHSQLTable::rename( const ::rtl::OUString& newName ) throw(SQLExce ::dbtools::qualifiedNameComponents(getMetaData(),newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::eInTableDefinitions); } +// ------------------------------------------------------------------------- +Any SAL_CALL OHSQLTable::queryInterface( const Type & rType ) throw(RuntimeException) +{ + if( !m_Type.compareToAscii("VIEW") && rType == ::getCppuType((const Reference<XRename>*)0) ) + return Any(); - + return OTableHelper::queryInterface(rType); +} +// ------------------------------------------------------------------------- |