diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2025-03-04 13:23:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2025-03-04 20:29:51 +0100 |
commit | 773fa222432cd8191d3155cfa7608f7ba516f947 (patch) | |
tree | 4fe442df95f99056a35bb470e289234b274613e1 /connectivity/source | |
parent | 99f20f69dd9a5cdcee460135a3c8a2e0b5ba0d14 (diff) |
improve type safety in mysqlc::OPreparedResultSet
Change-Id: If0a427ff5c02ed15f62608603e641a8f6dbe5755
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182474
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx index d8bfbe5f9892..6fd5d67823d5 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx @@ -180,7 +180,7 @@ OPreparedResultSet::OPreparedResultSet(OConnection& rConn, OPreparedStatement* p : OPreparedResultSet_BASE(m_aMutex) , OPropertySetHelper(OPreparedResultSet_BASE::rBHelper) , m_rConnection(rConn) - , m_aStatement(css::uno::Reference(cppu::getXWeak(pStmt))) + , m_xStatement(pStmt) , m_pStmt(pMyStmt) , m_encoding(rConn.getConnectionEncoding()) , m_nColumnCount(mysql_stmt_field_count(pMyStmt)) @@ -198,7 +198,7 @@ void OPreparedResultSet::disposing() MutexGuard aGuard(m_aMutex); - m_aStatement.clear(); + m_xStatement.clear(); m_xMetaData = nullptr; } @@ -689,7 +689,7 @@ uno::Reference<uno::XInterface> SAL_CALL OPreparedResultSet::getStatement() MutexGuard aGuard(m_aMutex); checkDisposed(OPreparedResultSet_BASE::rBHelper.bDisposed); - return m_aStatement.get(); + return cppu::getXWeak(m_xStatement.get().get()); } sal_Bool SAL_CALL OPreparedResultSet::rowDeleted() diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx index 4374fc7ad091..3f79ddcd1e73 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.hxx @@ -56,7 +56,7 @@ class OPreparedResultSet final : public cppu::BaseMutex, public OPropertyArrayUsageHelper<OPreparedResultSet> { OConnection& m_rConnection; - css::uno::WeakReferenceHelper m_aStatement; + unotools::WeakReference<OPreparedStatement> m_xStatement; rtl::Reference<OResultSetMetaData> m_xMetaData; // non-owning pointers |