diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/CRowSetDataColumn.cxx | 11 | ||||
-rw-r--r-- | dbaccess/source/core/api/CRowSetDataColumn.hxx | 10 | ||||
-rw-r--r-- | dbaccess/source/core/api/CacheSet.cxx | 15 | ||||
-rw-r--r-- | dbaccess/source/core/api/CacheSet.hxx | 10 | ||||
-rw-r--r-- | dbaccess/source/core/api/RowSetBase.hxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/api/column.cxx | 11 | ||||
-rw-r--r-- | dbaccess/source/core/api/datacolumn.hxx | 141 | ||||
-rw-r--r-- | dbaccess/source/core/api/definitioncolumn.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/api/querycontainer.cxx | 19 | ||||
-rw-r--r-- | dbaccess/source/core/api/resultcolumn.hxx | 63 | ||||
-rw-r--r-- | dbaccess/source/core/api/table.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/core/api/tablecontainer.cxx | 14 |
12 files changed, 175 insertions, 136 deletions
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx index acd317a4a841..1ee7dc588a07 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.cxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx @@ -2,9 +2,9 @@ * * $RCSfile: CRowSetDataColumn.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: oj $ $Date: 2000-10-25 07:30:24 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -271,3 +271,10 @@ Reference< ::com::sun::star::container::XNamed > ORowSetDataColumns::createObjec return Reference< ::com::sun::star::container::XNamed >(*first,UNO_QUERY); } +// ----------------------------------------------------------------------------- +void SAL_CALL ORowSetDataColumns::disposing(void) +{ + ORowSetDataColumns_BASE::disposing(); + m_aColumns.clear(); +} + diff --git a/dbaccess/source/core/api/CRowSetDataColumn.hxx b/dbaccess/source/core/api/CRowSetDataColumn.hxx index 164a65ea33e6..898ef625e8e2 100644 --- a/dbaccess/source/core/api/CRowSetDataColumn.hxx +++ b/dbaccess/source/core/api/CRowSetDataColumn.hxx @@ -2,9 +2,9 @@ * * $RCSfile: CRowSetDataColumn.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2000-10-17 10:18:12 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -121,7 +121,9 @@ namespace dbaccess // ------------------------------------------------------------------------- typedef connectivity::ORefVector< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> > ORowSetDataColumns_COLLECTION; - class ORowSetDataColumns : public connectivity::sdbcx::OCollection + + typedef connectivity::sdbcx::OCollection ORowSetDataColumns_BASE; + class ORowSetDataColumns : public ORowSetDataColumns_BASE { ORowSetDataColumns_COLLECTION m_aColumns; protected: @@ -143,6 +145,8 @@ namespace dbaccess {} ~ORowSetDataColumns() {} + // only the name is identical to ::cppu::OComponentHelper + virtual void SAL_CALL disposing(void); }; } diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx index 07550a0d1076..2079f83b25b5 100644 --- a/dbaccess/source/core/api/CacheSet.cxx +++ b/dbaccess/source/core/api/CacheSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: CacheSet.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2000-10-25 07:30:24 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -109,6 +109,14 @@ using namespace ::com::sun::star::lang; using namespace ::osl; // ------------------------------------------------------------------------- +OCacheSet::~OCacheSet() +{ + m_xDriverSet = NULL; + m_xDriverRow = NULL; + m_xSetMetaData = NULL; + m_xConnection = NULL; +} +// ----------------------------------------------------------------------------- void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQLException, RuntimeException) { OSL_ENSHURE(_xTable.is(),"OCacheSet::fillTableName: PropertySet is empty!"); @@ -484,6 +492,9 @@ void OCacheSet::fillValueRow(ORowSetRow& _rRow) /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.5 2000/10/25 07:30:24 oj + make strings unique for lib's + Revision 1.4 2000/10/17 10:18:12 oj some changes for the rowset diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx index 853a3ee8e4f3..15b01c347c03 100644 --- a/dbaccess/source/core/api/CacheSet.hxx +++ b/dbaccess/source/core/api/CacheSet.hxx @@ -2,9 +2,9 @@ * * $RCSfile: CacheSet.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2000-10-17 10:18:12 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -93,7 +93,6 @@ #endif namespace com{ namespace sun { namespace star{namespace sdbc{ class XParameters; } } } } -namespace connectivity{ class OSQLParseTreeIterator; } namespace dbaccess { @@ -106,7 +105,6 @@ namespace dbaccess ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection; ORowSetRow m_aInsertRow; - // const connectivity::OSQLParseTreeIterator* m_pIterator; // the parseiterator from RowSet ::rtl::OUString m_aComposedTableName; sal_Bool m_bInserted; sal_Bool m_bUpdated; @@ -137,6 +135,7 @@ namespace dbaccess void setParameter(sal_Int32 nPos,::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XParameters > _xParameter,const ORowSetValue& _rValue) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); void fillTableName(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); public: + virtual ~OCacheSet(); virtual void fillValueRow(ORowSetRow& _rRow); // ::com::sun::star::sdbc::XRow @@ -353,6 +352,9 @@ namespace dbaccess /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.3 2000/10/17 10:18:12 oj + some changes for the rowset + Revision 1.2 2000/10/11 11:18:10 fs replace unotools with comphelper diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx index c8c01b059b58..7945a50ac7df 100644 --- a/dbaccess/source/core/api/RowSetBase.hxx +++ b/dbaccess/source/core/api/RowSetBase.hxx @@ -2,9 +2,9 @@ * * $RCSfile: RowSetBase.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2000-10-26 09:44:07 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -111,7 +111,6 @@ #endif -namespace connectivity { class OSQLParseTreeIterator; } namespace com { namespace sun { namespace star { namespace sdb { struct RowChangeEvent; } } } } namespace dbaccess diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index 29697e990e90..13f6110d1a23 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -2,9 +2,9 @@ * * $RCSfile: column.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2000-10-25 07:30:24 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -533,7 +533,12 @@ void OColumns::clearColumns() m_aNameMap.clear(); m_aElements.clear(); } - +// ----------------------------------------------------------------------------- +void SAL_CALL OColumns::disposing(void) +{ + OColumns_BASE::disposing(); + m_xDrvColumns = NULL; +} //------------------------------------------------------------------------------ void OColumns::loadSettings(const OConfigurationNode& _rLocation, const IColumnFactory* _pColFactory) { diff --git a/dbaccess/source/core/api/datacolumn.hxx b/dbaccess/source/core/api/datacolumn.hxx index 4f2fd2801a6b..cabafab17590 100644 --- a/dbaccess/source/core/api/datacolumn.hxx +++ b/dbaccess/source/core/api/datacolumn.hxx @@ -2,9 +2,9 @@ * * $RCSfile: datacolumn.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2000-10-11 11:18:11 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -80,81 +80,82 @@ #ifndef _DBA_COREAPI_RESULTCOLUMN_HXX_ #include <resultcolumn.hxx> #endif - -//************************************************************ -// ODataColumn -//************************************************************ -class ODataColumn : public OResultColumn, - public ::com::sun::star::sdb::XColumn, - public ::com::sun::star::sdb::XColumnUpdate +namespace dbaccess { -protected: - ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow > m_xRow; - ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate > m_xRowUpdate; - -public: - ODataColumn (const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData, - const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >& _xRow, - const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate >& _xRowUpdate, - sal_Int32 _nPos); + //************************************************************ + // ODataColumn + //************************************************************ + class ODataColumn : public OResultColumn, + public ::com::sun::star::sdb::XColumn, + public ::com::sun::star::sdb::XColumnUpdate + { + protected: + ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow > m_xRow; + ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate > m_xRowUpdate; -// com::sun::star::lang::XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException); + public: + ODataColumn (const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData, + const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >& _xRow, + const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate >& _xRowUpdate, + sal_Int32 _nPos); -// com::sun::star::uno::XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() throw(::com::sun::star::uno::RuntimeException) { OResultColumn::acquire(); } - virtual void SAL_CALL release() throw(::com::sun::star::uno::RuntimeException) { OResultColumn::release(); } + // com::sun::star::lang::XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException); -// ::com::sun::star::lang::XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); + // com::sun::star::uno::XInterface + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(::com::sun::star::uno::RuntimeException) { OResultColumn::acquire(); } + virtual void SAL_CALL release() throw(::com::sun::star::uno::RuntimeException) { OResultColumn::release(); } -// cppu::OComponentHelper - virtual void SAL_CALL disposing(void); + // ::com::sun::star::lang::XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); -// ::com::sun::star::sdb::XColumn - virtual sal_Bool SAL_CALL wasNull( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getString( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL getBoolean( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int8 SAL_CALL getByte( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int16 SAL_CALL getShort( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getInt( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual sal_Int64 SAL_CALL getLong( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual float SAL_CALL getFloat( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual double SAL_CALL getDouble( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBytes( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::util::Date SAL_CALL getDate( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::util::Time SAL_CALL getTime( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::util::DateTime SAL_CALL getTimestamp( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getBinaryStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getCharacterStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getObject( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef > SAL_CALL getRef( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL getBlob( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL getClob( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + // cppu::OComponentHelper + virtual void SAL_CALL disposing(void); -// ::com::sun::star::sdb::XColumnUpdate - virtual void SAL_CALL updateNull( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateBoolean( sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateByte( sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateShort( sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateInt( sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateLong( sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateFloat( float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateDouble( double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateString( const ::rtl::OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateDate( const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateTime( const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateTimestamp( const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateBinaryStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateCharacterStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateObject( const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL updateNumericObject( const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); -}; + // ::com::sun::star::sdb::XColumn + virtual sal_Bool SAL_CALL wasNull( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getString( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL getBoolean( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int8 SAL_CALL getByte( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int16 SAL_CALL getShort( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int32 SAL_CALL getInt( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual sal_Int64 SAL_CALL getLong( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual float SAL_CALL getFloat( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual double SAL_CALL getDouble( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getBytes( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::util::Date SAL_CALL getDate( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::util::Time SAL_CALL getTime( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::util::DateTime SAL_CALL getTimestamp( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getBinaryStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getCharacterStream( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getObject( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRef > SAL_CALL getRef( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL getBlob( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL getClob( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL getArray( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + // ::com::sun::star::sdb::XColumnUpdate + virtual void SAL_CALL updateNull( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateBoolean( sal_Bool x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateByte( sal_Int8 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateShort( sal_Int16 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateInt( sal_Int32 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateLong( sal_Int64 x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateFloat( float x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateDouble( double x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateString( const ::rtl::OUString& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateBytes( const ::com::sun::star::uno::Sequence< sal_Int8 >& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateDate( const ::com::sun::star::util::Date& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateTime( const ::com::sun::star::util::Time& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateTimestamp( const ::com::sun::star::util::DateTime& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateBinaryStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateCharacterStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateObject( const ::com::sun::star::uno::Any& x ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL updateNumericObject( const ::com::sun::star::uno::Any& x, sal_Int32 scale ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException); + }; +} #endif // _DBACORE_RESULTCOLUMN_HXX_ diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx index 64bbca525da9..495a8a4f8b54 100644 --- a/dbaccess/source/core/api/definitioncolumn.cxx +++ b/dbaccess/source/core/api/definitioncolumn.cxx @@ -2,9 +2,9 @@ * * $RCSfile: definitioncolumn.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2000-10-25 07:32:18 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,6 +89,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::cppu; +using namespace ::comphelper; using namespace ::osl; using namespace dbaccess; diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index f48847f757c8..63a3133f4507 100644 --- a/dbaccess/source/core/api/querycontainer.cxx +++ b/dbaccess/source/core/api/querycontainer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: querycontainer.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2000-10-25 07:30:24 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -136,9 +136,13 @@ OQueryContainer::OQueryContainer( ,m_xCommandDefinitions(_rxCommandDefinitions) ,m_xORB(_rxORB) { - m_aConfigurationNode = _rRootConfigNode; DBG_CTOR(OQueryContainer, NULL); + m_aConfigurationNode = _rRootConfigNode; + + m_pCommandsListener = new OCommandsListener(this); + m_pCommandsListener->acquire(); + DBG_ASSERT(m_aConfigurationNode.isValid() && m_xORB.is(), "OQueryContainer::OQueryContainer : invalid arguments !"); m_aConfigurationNode.setEscape(m_aConfigurationNode.isSetNode()); @@ -146,7 +150,7 @@ OQueryContainer::OQueryContainer( { Reference< XContainer > xContainer(m_xCommandDefinitions, UNO_QUERY); DBG_ASSERT(xContainer.is(), "OQueryContainer::OQueryContainer : the CommandDefinitions container is invalid !"); - xContainer->addContainerListener(this); + xContainer->addContainerListener(m_pCommandsListener); // fill my structures with dummies OQuery* pDummyObject = NULL; @@ -166,8 +170,8 @@ OQueryContainer::OQueryContainer( OQueryContainer::~OQueryContainer() { DBG_DTOR(OQueryContainer, NULL); - dispose(); - // maybe we're already disposed, but this should be uncritical + // dispose(); + // maybe we're already disposed, but this should be uncritical } //------------------------------------------------------------------------------ @@ -207,7 +211,8 @@ void OQueryContainer::dispose() Reference< XContainer > xContainer(m_xCommandDefinitions, UNO_QUERY); if (xContainer.is()) - xContainer->removeContainerListener(this); + xContainer->removeContainerListener(m_pCommandsListener); + m_pCommandsListener->release(); m_xCommandDefinitions = NULL; } diff --git a/dbaccess/source/core/api/resultcolumn.hxx b/dbaccess/source/core/api/resultcolumn.hxx index ab902976b85b..1a8d1991ae41 100644 --- a/dbaccess/source/core/api/resultcolumn.hxx +++ b/dbaccess/source/core/api/resultcolumn.hxx @@ -2,9 +2,9 @@ * * $RCSfile: resultcolumn.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2000-10-11 11:18:11 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,41 +68,42 @@ #ifndef _DBA_COREAPI_COLUMN_HXX_ #include <column.hxx> #endif - -//************************************************************ -// OResultColumn -//************************************************************ -class OResultColumn : public OColumn, - public ::comphelper::OPropertyArrayUsageHelper < OResultColumn > +namespace dbaccess { -protected: - ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; - sal_Int32 m_nPos; - -public: - OResultColumn(const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData, - sal_Int32 _nPos); + //************************************************************ + // OResultColumn + //************************************************************ + class OResultColumn : public OColumn, + public ::comphelper::OPropertyArrayUsageHelper < OResultColumn > + { + protected: + ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; + sal_Int32 m_nPos; -// com::sun::star::lang::XTypeProvider - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException); + public: + OResultColumn(const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData, + sal_Int32 _nPos); -// com::sun::star::lang::XServiceInfo - virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); + // com::sun::star::lang::XTypeProvider + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException); -// cppu::OComponentHelper - virtual void SAL_CALL disposing(void); + // com::sun::star::lang::XServiceInfo + virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException); -// comphelper::OPropertyArrayUsageHelper - virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; + // cppu::OComponentHelper + virtual void SAL_CALL disposing(void); -// cppu::OPropertySetHelper - virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); - virtual void SAL_CALL getFastPropertyValue( - ::com::sun::star::uno::Any& rValue, - sal_Int32 nHandle - ) const; -}; + // comphelper::OPropertyArrayUsageHelper + virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const; + // cppu::OPropertySetHelper + virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); + virtual void SAL_CALL getFastPropertyValue( + ::com::sun::star::uno::Any& rValue, + sal_Int32 nHandle + ) const; + }; +} #endif // _DBACORE_RESULTCOLUMN_HXX_ diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 3dde46c96e07..4cc54c0ba5db 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -2,9 +2,9 @@ * * $RCSfile: table.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: oj $ $Date: 2000-10-25 07:30:24 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -185,11 +185,10 @@ Sequence< sal_Int8 > ODBTable::getImplementationId() throw (RuntimeException) // OComponentHelper //------------------------------------------------------------------------------ -void ODBTable::disposing() +void SAL_CALL ODBTable::disposing() { OTable_Base::disposing(); MutexGuard aGuard(m_aMutex); - // m_aColumns.disposing(); m_aConnection = Reference< XConnection > (); m_xTable = NULL; } diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index 80cc8b73cecc..33fe00aa8330 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: tablecontainer.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2000-10-26 09:44:26 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:32:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -130,6 +130,7 @@ OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent, ::osl::Mutex& _r //------------------------------------------------------------------------------ OTableContainer::~OTableContainer() { + dispose(); DBG_DTOR(OTableContainer, NULL); } @@ -355,8 +356,8 @@ void OTableContainer::dispose() // !!! do this before clearing the map which the vector elements refer to !!! m_aTables.clear(); m_xMasterTables = NULL; - - m_bConstructed = sal_False; + m_xConnection = NULL; + m_bConstructed = sal_False; } // XServiceInfo @@ -411,6 +412,7 @@ Any OTableContainer::getByIndex(sal_Int32 _nIndex) throw( IndexOutOfBoundsExcept comphelper::getString(xProp->getPropertyValue(PROPERTY_NAME)), comphelper::getString(xProp->getPropertyValue(PROPERTY_TYPE)), comphelper::getString(xProp->getPropertyValue(PROPERTY_DESCRIPTION))); + m_aTablesIndexed[_nIndex]->second = xReturn; } return makeAny(xReturn); } @@ -419,7 +421,7 @@ Any OTableContainer::getByIndex(sal_Int32 _nIndex) throw( IndexOutOfBoundsExcept //------------------------------------------------------------------------------ Any OTableContainer::getByName(const rtl::OUString& _rName) throw( NoSuchElementException, WrappedTargetException, RuntimeException ) { - ConstTablesIterator aPos = m_aTables.find(_rName); + TablesIterator aPos = m_aTables.find(_rName); if (aPos == m_aTables.end()) throw NoSuchElementException(); @@ -438,6 +440,8 @@ Any OTableContainer::getByName(const rtl::OUString& _rName) throw( NoSuchElement comphelper::getString(xProp->getPropertyValue(PROPERTY_NAME)), comphelper::getString(xProp->getPropertyValue(PROPERTY_TYPE)), comphelper::getString(xProp->getPropertyValue(PROPERTY_DESCRIPTION))); + + aPos->second = xReturn; } return makeAny(xReturn); } |