summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@collabora.co.uk>2024-11-07 12:04:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-07 14:31:03 +0100
commit8d0a0bc4d4bc9d6b453f98164c4ab33d0afa91f9 (patch)
treef4de4e04a634908b07c93dc812ca9280509b79f9 /connectivity
parent2de45b85574063cfef3d6ccddc9efe959a8b1076 (diff)
use more concrete UNO type in connectivity::ado
Change-Id: Ia9bc0e4aade832373def4460e44750be4415967d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176205 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/ado/APreparedStatement.cxx2
-rw-r--r--connectivity/source/drivers/ado/AStatement.cxx11
-rw-r--r--connectivity/source/inc/ado/AStatement.hxx3
3 files changed, 8 insertions, 8 deletions
diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx
index 9e17d71b0bed..6be6cfefd993 100644
--- a/connectivity/source/drivers/ado/APreparedStatement.cxx
+++ b/connectivity/source/drivers/ado/APreparedStatement.cxx
@@ -264,7 +264,7 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( )
rtl::Reference<OResultSet> pSet = new OResultSet(m_RecordSet,this);
pSet->construct();
pSet->setMetaData(getMetaData());
- m_xResultSet = WeakReference<XResultSet>(pSet);
+ m_xResultSet = pSet.get();
return pSet;
}
diff --git a/connectivity/source/drivers/ado/AStatement.cxx b/connectivity/source/drivers/ado/AStatement.cxx
index c2a09385dee6..f5fed2c22027 100644
--- a/connectivity/source/drivers/ado/AStatement.cxx
+++ b/connectivity/source/drivers/ado/AStatement.cxx
@@ -79,7 +79,7 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection ) : OStatement_BASE(
void OStatement_Base::disposeResultSet()
{
// free the cursor if alive
- Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
+ rtl::Reference< OResultSet > xComp = m_xResultSet.get();
if (xComp.is())
xComp->dispose();
m_xResultSet.clear();
@@ -178,8 +178,7 @@ void OStatement_Base::clearMyResultSet ()
try
{
- Reference<XCloseable> xCloseable(
- m_xResultSet.get(), css::uno::UNO_QUERY);
+ rtl::Reference<OResultSet> xCloseable = m_xResultSet.get();
if ( xCloseable.is() )
xCloseable->close();
}
@@ -286,7 +285,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const OUString&
reset();
- m_xResultSet = WeakReference<XResultSet>(nullptr);
+ m_xResultSet.clear();
WpADORecordset aSet;
aSet.Create();
@@ -308,7 +307,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const OUString&
rtl::Reference<OResultSet> pSet = new OResultSet(aSet,this);
pSet->construct();
- m_xResultSet = WeakReference<XResultSet>(pSet);
+ m_xResultSet = pSet.get();
return pSet;
}
@@ -417,7 +416,7 @@ Reference< XResultSet > SAL_CALL OStatement_Base::getResultSet( )
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
- return m_xResultSet;
+ return m_xResultSet.get();
}
diff --git a/connectivity/source/inc/ado/AStatement.hxx b/connectivity/source/inc/ado/AStatement.hxx
index 625339917591..ce4369b347f2 100644
--- a/connectivity/source/inc/ado/AStatement.hxx
+++ b/connectivity/source/inc/ado/AStatement.hxx
@@ -29,6 +29,7 @@
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/basemutex.hxx>
#include <comphelper/proparrhlp.hxx>
+#include <unotools/weakref.hxx>
#include <ado/AConnection.hxx>
#include <string_view>
#include <vector>
@@ -59,7 +60,7 @@ namespace connectivity::ado
protected:
std::vector< OUString> m_aBatchVector;
- css::uno::WeakReference< css::sdbc::XResultSet> m_xResultSet; // The last ResultSet created
+ unotools::WeakReference<OResultSet> m_xResultSet; // The last ResultSet created
// for this Statement
OConnection* m_pConnection;// The owning Connection object