diff options
-rw-r--r-- | connectivity/source/drivers/file/FPreparedStatement.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/file/FStatement.cxx | 10 | ||||
-rw-r--r-- | connectivity/source/inc/file/FStatement.hxx | 3 |
3 files changed, 7 insertions, 8 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( ) diff --git a/connectivity/source/inc/file/FStatement.hxx b/connectivity/source/inc/file/FStatement.hxx index 57ce0a2fc0de..52fbd3d2850f 100644 --- a/connectivity/source/inc/file/FStatement.hxx +++ b/connectivity/source/inc/file/FStatement.hxx @@ -36,6 +36,7 @@ #include <comphelper/propertycontainer.hxx> #include <file/fanalyzer.hxx> #include <TSortIndex.hxx> +#include <unotools/weakref.hxx> namespace connectivity::file { @@ -62,7 +63,7 @@ namespace connectivity::file std::vector<TAscendingOrder> m_aOrderbyAscending; css::sdbc::SQLWarning m_aLastWarning; - css::uno::WeakReference< css::sdbc::XResultSet> m_xResultSet; // The last ResultSet created + unotools::WeakReference< OResultSet> m_xResultSet; // The last ResultSet created css::uno::Reference< css::sdbc::XDatabaseMetaData> m_xDBMetaData; css::uno::Reference< css::container::XNameAccess> m_xColNames; // table columns // for this Statement |