diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-09-30 15:39:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-09-30 18:24:52 +0200 |
commit | c69ea1dd5a993c23d5be6a0ec40a7cac15fb2ecc (patch) | |
tree | f42237bfca21e78fb7d00fb84570f752850a2e19 /connectivity/source/drivers/file | |
parent | 6571e77d03491090c9d3a4ef74295bd4cfc3fda4 (diff) |
use more concrete UNO type in file::OStatement_Base
Change-Id: I9ce6ed7768e8c79e6105152f3907a5468e8fb828
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174282
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'connectivity/source/drivers/file')
-rw-r--r-- | connectivity/source/drivers/file/FPreparedStatement.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FStatement.cxx | 10 |
2 files changed, 5 insertions, 7 deletions
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx index 5139eba871cd..5a3f09adb920 100644 --- a/connectivity/source/drivers/file/FPreparedStatement.cxx +++ b/connectivity/source/drivers/file/FPreparedStatement.cxx @@ -101,7 +101,7 @@ rtl::Reference<OResultSet> OPreparedStatement::makeResultSet() closeResultSet(); rtl::Reference<OResultSet> xResultSet(createResultSet()); - m_xResultSet = uno::Reference<uno::XWeak>(xResultSet); + m_xResultSet = xResultSet.get(); initializeResultSet(xResultSet.get()); initResultSet(xResultSet.get()); return xResultSet; diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index 9fdafb171e42..a2be8e7695cd 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -93,7 +93,7 @@ void OStatement_Base::disposeResultSet() { SAL_INFO( "connectivity.drivers", "file Ocke.Janssen@sun.com OStatement_Base::disposeResultSet" ); // free the cursor if alive - Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY); + rtl::Reference< OResultSet > xComp(m_xResultSet.get()); assert(xComp.is() || !m_xResultSet.get().is()); if (xComp.is()) xComp->dispose(); @@ -175,7 +175,7 @@ void OStatement_Base::closeResultSet() ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(OStatement_BASE::rBHelper.bDisposed); - Reference< XCloseable > xCloseable(m_xResultSet.get(), UNO_QUERY); + rtl::Reference< OResultSet > xCloseable(m_xResultSet.get()); assert(xCloseable.is() || !m_xResultSet.get().is()); if (xCloseable.is()) { @@ -252,15 +252,13 @@ Reference< XResultSet > SAL_CALL OStatement::executeQuery( const OUString& sql ) checkDisposed(OStatement_BASE::rBHelper.bDisposed); construct(sql); - Reference< XResultSet > xRS; rtl::Reference<OResultSet> pResult = createResultSet(); - xRS = pResult; initializeResultSet(pResult.get()); - m_xResultSet = xRS; + m_xResultSet = pResult.get(); pResult->OpenImpl(); - return xRS; + return pResult; } Reference< XConnection > SAL_CALL OStatement::getConnection( ) |