summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/dbase
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2001-05-17 05:46:55 +0000
committerOcke Janssen <oj@openoffice.org>2001-05-17 05:46:55 +0000
commit367e22c38163e4ae9a407c5ebdc1ff20c23f70d3 (patch)
tree5cb3e266aa3e785371e84b5372a54a016461e82b /connectivity/source/drivers/dbase
parent98b43366d54d975a589d8d901f0cd9c399d55ae8 (diff)
#86528# size changes
Diffstat (limited to 'connectivity/source/drivers/dbase')
-rw-r--r--connectivity/source/drivers/dbase/DConnection.cxx24
-rw-r--r--connectivity/source/drivers/dbase/DResultSet.cxx28
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx16
3 files changed, 35 insertions, 33 deletions
diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx
index 96ec97877a53..0a79324e7e0c 100644
--- a/connectivity/source/drivers/dbase/DConnection.cxx
+++ b/connectivity/source/drivers/dbase/DConnection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DConnection.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2001-04-27 10:08:09 $
+ * last change: $Author: oj $ $Date: 2001-05-17 06:46:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -119,8 +119,8 @@ IMPLEMENT_SERVICE_INFO(ODbaseConnection, "com.sun.star.sdbc.drivers.dbase.Connec
Reference< XDatabaseMetaData > SAL_CALL ODbaseConnection::getMetaData( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OConnection_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OConnection_BASE::rBHelper.bDisposed);
+
Reference< XDatabaseMetaData > xMetaData = m_xMetaData;
if(!xMetaData.is())
@@ -148,8 +148,8 @@ Reference< XDatabaseMetaData > SAL_CALL ODbaseConnection::getMetaData( ) throw(
Reference< XStatement > SAL_CALL ODbaseConnection::createStatement( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OConnection_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OConnection_BASE::rBHelper.bDisposed);
+
Reference< XStatement > xReturn = new ODbaseStatement(this);
m_aStatements.push_back(WeakReferenceHelper(xReturn));
@@ -159,10 +159,10 @@ Reference< XStatement > SAL_CALL ODbaseConnection::createStatement( ) throw(SQL
Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OConnection_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OConnection_BASE::rBHelper.bDisposed);
+
- ODbasePreparedStatement* pStmt = new ODbasePreparedStatement(this,m_aTypeInfo);
+ ODbasePreparedStatement* pStmt = new ODbasePreparedStatement(this);
Reference< XPreparedStatement > xHoldAlive = pStmt;
pStmt->construct(sql);
m_aStatements.push_back(WeakReferenceHelper(*pStmt));
@@ -172,9 +172,11 @@ Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( con
Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareCall( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OConnection_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OConnection_BASE::rBHelper.bDisposed);
+
return NULL;
}
+// -----------------------------------------------------------------------------
+
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx
index 5860b9ba85bd..bee3b954b678 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: DResultSet.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: oj $ $Date: 2001-05-14 11:37:37 $
+ * last change: $Author: oj $ $Date: 2001-05-17 06:46:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -140,8 +140,8 @@ Any SAL_CALL ODbaseResultSet::queryInterface( const Type & rType ) throw(Runtime
Any SAL_CALL ODbaseResultSet::getBookmark( ) throw( SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OResultSet_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+
return makeAny((sal_Int32)(*m_aRow)[0]);
}
@@ -149,8 +149,8 @@ Any SAL_CALL ODbaseResultSet::getBookmark( ) throw( SQLException, RuntimeExcep
sal_Bool SAL_CALL ODbaseResultSet::moveToBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OResultSet_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+
m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
@@ -160,8 +160,8 @@ sal_Bool SAL_CALL ODbaseResultSet::moveToBookmark( const Any& bookmark ) throw(
sal_Bool SAL_CALL ODbaseResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw( SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OResultSet_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+
m_bRowDeleted = m_bRowInserted = m_bRowUpdated = sal_False;
@@ -172,8 +172,8 @@ sal_Bool SAL_CALL ODbaseResultSet::moveRelativeToBookmark( const Any& bookmark,
sal_Int32 SAL_CALL ODbaseResultSet::compareBookmarks( const Any& first, const Any& second ) throw( SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OResultSet_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+
sal_Int32 nFirst,nSecond,nResult;
first >>= nFirst;
@@ -199,8 +199,8 @@ sal_Bool SAL_CALL ODbaseResultSet::hasOrderedBookmarks( ) throw( SQLException,
sal_Int32 SAL_CALL ODbaseResultSet::hashBookmark( const Any& bookmark ) throw( SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OResultSet_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+
return connectivity::getINT32(bookmark);
}
@@ -209,8 +209,8 @@ sal_Int32 SAL_CALL ODbaseResultSet::hashBookmark( const Any& bookmark ) throw(
Sequence< sal_Int32 > SAL_CALL ODbaseResultSet::deleteRows( const Sequence< Any >& rows ) throw( SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
- if (OResultSet_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
+
return Sequence< sal_Int32 >();
}
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 33e6434869ea..1a6bc6319191 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.44 $
+ * $Revision: 1.45 $
*
- * last change: $Author: oj $ $Date: 2001-05-14 11:37:37 $
+ * last change: $Author: oj $ $Date: 2001-05-17 06:46:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1911,8 +1911,8 @@ BOOL ODbaseTable::WriteBuffer()
void SAL_CALL ODbaseTable::alterColumnByName( const ::rtl::OUString& colName, const Reference< XPropertySet >& descriptor ) throw(SQLException, NoSuchElementException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
Reference<XDataDescriptorFactory> xOldColumn;
m_pColumns->getByName(colName) >>= xOldColumn;
@@ -1923,8 +1923,8 @@ void SAL_CALL ODbaseTable::alterColumnByName( const ::rtl::OUString& colName, co
void SAL_CALL ODbaseTable::alterColumnByIndex( sal_Int32 index, const Reference< XPropertySet >& descriptor ) throw(SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
if(index < 0 || index >= m_pColumns->getCount())
throw IndexOutOfBoundsException(::rtl::OUString::valueOf(index),*this);
@@ -2025,8 +2025,8 @@ void ODbaseTable::alterColumn(sal_Int32 index,
void SAL_CALL ODbaseTable::rename( const ::rtl::OUString& newName ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
- if (OTableDescriptor_BASE::rBHelper.bDisposed)
- throw DisposedException();
+ checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
+
FileClose();
String aName = getEntry();