summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-08-07 22:37:59 +0100
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-08-11 16:05:08 +0100
commit6e11164d57c5f8be324e32f65a31b1112e65639f (patch)
treeb0cfdc76978d52fd013d82f9c267847f624b0b4c /connectivity
parent6044f52c5e34de55f1f07bf29519f0ed3b937516 (diff)
Explicit close/disposing.
Change-Id: Idcd89bd5f879a38f4c06f3602313672fb20bd098
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.cxx10
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.hxx7
-rw-r--r--connectivity/source/drivers/firebird/Statement.cxx9
-rw-r--r--connectivity/source/drivers/firebird/Statement.hxx7
4 files changed, 27 insertions, 6 deletions
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index da53c7a4141a..7e4b5af909a8 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -177,14 +177,14 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData()
void SAL_CALL OPreparedStatement::close() throw(SQLException, RuntimeException)
{
- SAL_INFO("connectivity.firebird", "close()");
-
- MutexGuard aGuard( m_pConnection->getMutex() );
- checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
-
OStatementCommonBase::close();
}
+void SAL_CALL OPreparedStatement::disposing()
+{
+ close();
+}
+
void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex,
const OUString& x)
throw(SQLException, RuntimeException)
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.hxx b/connectivity/source/drivers/firebird/PreparedStatement.hxx
index afb73d74cd4b..8d4a0e1dd429 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.hxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.hxx
@@ -154,7 +154,12 @@ namespace connectivity
::com::sun::star::uno::RuntimeException);
// XCloseable
- virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL close()
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
// XResultSetMetaDataSupplier
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL getMetaData( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
diff --git a/connectivity/source/drivers/firebird/Statement.cxx b/connectivity/source/drivers/firebird/Statement.cxx
index ed63ea69c893..3cf8c79a8c49 100644
--- a/connectivity/source/drivers/firebird/Statement.cxx
+++ b/connectivity/source/drivers/firebird/Statement.cxx
@@ -181,4 +181,13 @@ uno::Sequence< Type > SAL_CALL OStatement::getTypes()
OStatementCommonBase::getTypes());
}
+void SAL_CALL OStatement::close() throw(SQLException, RuntimeException)
+{
+ OStatementCommonBase::close();
+}
+
+void SAL_CALL OStatement::disposing()
+{
+ close();
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/firebird/Statement.hxx b/connectivity/source/drivers/firebird/Statement.hxx
index 7f68aadfac0a..bfac534c74c0 100644
--- a/connectivity/source/drivers/firebird/Statement.hxx
+++ b/connectivity/source/drivers/firebird/Statement.hxx
@@ -77,6 +77,13 @@ namespace connectivity
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL
getTypes()
throw(::com::sun::star::uno::RuntimeException);
+ // XCloseable
+ virtual void SAL_CALL close()
+ throw(::com::sun::star::sdbc::SQLException,
+ ::com::sun::star::uno::RuntimeException);
+ // OComponentHelper
+ virtual void SAL_CALL disposing();
+
};
}