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
This commit is contained in:
parent
2de45b8557
commit
8d0a0bc4d4
3 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue