diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-01-03 15:14:10 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-01-03 15:14:10 +0000 |
commit | 42d6a62d8a3a92d5eb6e4397ce75d7670a289bad (patch) | |
tree | 1195889434151268a2578ecff8de21173c69ee01 /dbaccess/source/core/api/datacolumn.cxx | |
parent | a447eb655794016d255f532490cb494ff70f6314 (diff) |
INTEGRATION: CWS dba202c (1.6.58); FILE MERGED
2005/12/05 11:56:11 oj 1.6.58.1: #128689# check m_xRow if null throw an disposedexception
Diffstat (limited to 'dbaccess/source/core/api/datacolumn.cxx')
-rw-r--r-- | dbaccess/source/core/api/datacolumn.cxx | 79 |
1 files changed, 39 insertions, 40 deletions
diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx index 182d27d3e..d95e402bc 100644 --- a/dbaccess/source/core/api/datacolumn.cxx +++ b/dbaccess/source/core/api/datacolumn.cxx @@ -4,9 +4,9 @@ * * $RCSfile: datacolumn.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: obo $ $Date: 2005-12-19 17:14:14 $ + * last change: $Author: kz $ $Date: 2006-01-03 16:14:10 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -152,7 +152,6 @@ void ODataColumn::disposing() { OResultColumn::disposing(); - MutexGuard aGuard(m_aMutex); m_xRow = NULL; m_xRowUpdate = NULL; } @@ -162,7 +161,7 @@ void ODataColumn::disposing() sal_Bool ODataColumn::wasNull(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->wasNull(); } @@ -171,7 +170,7 @@ sal_Bool ODataColumn::wasNull(void) throw( SQLException, RuntimeException ) rtl::OUString ODataColumn::getString(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getString(m_nPos); } @@ -180,7 +179,7 @@ rtl::OUString ODataColumn::getString(void) throw( SQLException, RuntimeException sal_Bool ODataColumn::getBoolean(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getBoolean(m_nPos); } @@ -189,7 +188,7 @@ sal_Bool ODataColumn::getBoolean(void) throw( SQLException, RuntimeException ) sal_Int8 ODataColumn::getByte(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getByte(m_nPos); } @@ -198,7 +197,7 @@ sal_Int8 ODataColumn::getByte(void) throw( SQLException, RuntimeException ) sal_Int16 ODataColumn::getShort(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getShort(m_nPos); } @@ -207,7 +206,7 @@ sal_Int16 ODataColumn::getShort(void) throw( SQLException, RuntimeException ) sal_Int32 ODataColumn::getInt(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getInt(m_nPos); } @@ -216,7 +215,7 @@ sal_Int32 ODataColumn::getInt(void) throw( SQLException, RuntimeException ) sal_Int64 ODataColumn::getLong(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getLong(m_nPos); } @@ -225,7 +224,7 @@ sal_Int64 ODataColumn::getLong(void) throw( SQLException, RuntimeException ) float ODataColumn::getFloat(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getFloat(m_nPos); } @@ -233,7 +232,7 @@ float ODataColumn::getFloat(void) throw( SQLException, RuntimeException ) double ODataColumn::getDouble(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getDouble(m_nPos); } @@ -242,7 +241,7 @@ double ODataColumn::getDouble(void) throw( SQLException, RuntimeException ) Sequence< sal_Int8 > ODataColumn::getBytes(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getBytes(m_nPos); } @@ -250,7 +249,7 @@ Sequence< sal_Int8 > ODataColumn::getBytes(void) throw( SQLException, RuntimeExc com::sun::star::util::Date ODataColumn::getDate(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getDate(m_nPos); } @@ -259,7 +258,7 @@ com::sun::star::util::Date ODataColumn::getDate(void) throw( SQLException, Runti com::sun::star::util::Time ODataColumn::getTime(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getTime(m_nPos); } @@ -267,7 +266,7 @@ com::sun::star::util::Time ODataColumn::getTime(void) throw( SQLException, Runti com::sun::star::util::DateTime ODataColumn::getTimestamp(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getTimestamp(m_nPos); } @@ -276,7 +275,7 @@ com::sun::star::util::DateTime ODataColumn::getTimestamp(void) throw( SQLExcepti Reference< ::com::sun::star::io::XInputStream > ODataColumn::getBinaryStream(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getBinaryStream(m_nPos); } @@ -285,7 +284,7 @@ Reference< ::com::sun::star::io::XInputStream > ODataColumn::getBinaryStream(vo Reference< ::com::sun::star::io::XInputStream > ODataColumn::getCharacterStream(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getCharacterStream(m_nPos); } @@ -294,7 +293,7 @@ Reference< ::com::sun::star::io::XInputStream > ODataColumn::getCharacterStream Any ODataColumn::getObject(const Reference< ::com::sun::star::container::XNameAccess > & typeMap) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getObject(m_nPos, typeMap); } @@ -303,7 +302,7 @@ Any ODataColumn::getObject(const Reference< ::com::sun::star::container::XNameAc Reference< XRef > ODataColumn::getRef(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getRef(m_nPos); } @@ -312,7 +311,7 @@ Reference< XRef > ODataColumn::getRef(void) throw( SQLException, RuntimeExcepti Reference< XBlob > ODataColumn::getBlob(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getBlob(m_nPos); } @@ -321,7 +320,7 @@ Reference< XBlob > ODataColumn::getBlob(void) throw( SQLException, RuntimeExcep Reference< XClob > ODataColumn::getClob(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getClob(m_nPos); } @@ -330,7 +329,7 @@ Reference< XClob > ODataColumn::getClob(void) throw( SQLException, RuntimeExcep Reference< XArray > ODataColumn::getArray(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard(m_aMutex); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRow.is()); return m_xRow->getArray(m_nPos); } @@ -340,7 +339,7 @@ Reference< XArray > ODataColumn::getArray(void) throw( SQLException, RuntimeExc void ODataColumn::updateNull(void) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateNull(m_nPos); } @@ -349,7 +348,7 @@ void ODataColumn::updateNull(void) throw( SQLException, RuntimeException ) void ODataColumn::updateBoolean(sal_Bool x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateBoolean(m_nPos, x); } @@ -358,7 +357,7 @@ void ODataColumn::updateBoolean(sal_Bool x) throw( SQLException, RuntimeExceptio void ODataColumn::updateByte(sal_Int8 x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateByte(m_nPos, x); } @@ -367,7 +366,7 @@ void ODataColumn::updateByte(sal_Int8 x) throw( SQLException, RuntimeException ) void ODataColumn::updateShort(sal_Int16 x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateShort(m_nPos, x); } @@ -376,7 +375,7 @@ void ODataColumn::updateShort(sal_Int16 x) throw( SQLException, RuntimeException void ODataColumn::updateInt(sal_Int32 x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateInt(m_nPos, x); } @@ -385,7 +384,7 @@ void ODataColumn::updateInt(sal_Int32 x) throw( SQLException, RuntimeException ) void ODataColumn::updateLong(sal_Int64 x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateLong(m_nPos, x); } @@ -394,7 +393,7 @@ void ODataColumn::updateLong(sal_Int64 x) throw( SQLException, RuntimeException void ODataColumn::updateFloat(float x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateFloat(m_nPos, x); } @@ -403,7 +402,7 @@ void ODataColumn::updateFloat(float x) throw( SQLException, RuntimeException ) void ODataColumn::updateDouble(double x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateDouble(m_nPos, x); } @@ -412,7 +411,7 @@ void ODataColumn::updateDouble(double x) throw( SQLException, RuntimeException ) void ODataColumn::updateString(const rtl::OUString& x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateString(m_nPos, x); } @@ -421,7 +420,7 @@ void ODataColumn::updateString(const rtl::OUString& x) throw( SQLException, Runt void ODataColumn::updateBytes(const Sequence< sal_Int8 >& x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateBytes(m_nPos, x); } @@ -430,7 +429,7 @@ void ODataColumn::updateBytes(const Sequence< sal_Int8 >& x) throw( SQLException void ODataColumn::updateDate(const com::sun::star::util::Date& x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateDate(m_nPos, x); } @@ -439,7 +438,7 @@ void ODataColumn::updateDate(const com::sun::star::util::Date& x) throw( SQLExce void ODataColumn::updateTime(const ::com::sun::star::util::Time& x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateTime(m_nPos, x); } @@ -448,7 +447,7 @@ void ODataColumn::updateTime(const ::com::sun::star::util::Time& x) throw( SQLEx void ODataColumn::updateTimestamp(const ::com::sun::star::util::DateTime& x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateTimestamp(m_nPos, x); } @@ -457,7 +456,7 @@ void ODataColumn::updateTimestamp(const ::com::sun::star::util::DateTime& x) thr void ODataColumn::updateCharacterStream(const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateCharacterStream(m_nPos, x, length); } @@ -466,7 +465,7 @@ void ODataColumn::updateCharacterStream(const Reference< ::com::sun::star::io::X void ODataColumn::updateBinaryStream(const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateBinaryStream(m_nPos, x, length); } @@ -475,7 +474,7 @@ void ODataColumn::updateBinaryStream(const Reference< ::com::sun::star::io::XInp void ODataColumn::updateNumericObject(const Any& x, sal_Int32 scale) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateNumericObject(m_nPos, x, scale); } @@ -484,7 +483,7 @@ void ODataColumn::updateNumericObject(const Any& x, sal_Int32 scale) throw( SQLE void ODataColumn::updateObject(const Any& x) throw( SQLException, RuntimeException ) { MutexGuard aGuard( m_aMutex ); - ::connectivity::checkDisposed(OColumnBase::rBHelper.bDisposed); + ::connectivity::checkDisposed(!m_xRowUpdate.is()); m_xRowUpdate->updateObject(m_nPos, x); } |