diff options
author | Noel Grandin <noel@peralex.com> | 2020-07-22 12:34:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-23 10:14:17 +0200 |
commit | ced1dd9e2dfb92230ed0a91114956160f0e29c9a (patch) | |
tree | 5b58193ff1f930c096ab00dc791acfa210bd0b7b /connectivity/source/inc/ado/ADriver.hxx | |
parent | c049d5336c110196886480330dba9238faee0e39 (diff) |
connectivity/ado: create instances with uno constructors
See tdf#74608 for motivation.
Change-Id: I27bfc55d401fb1a9b9c33309f4b1f00ec13a92fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99212
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/inc/ado/ADriver.hxx')
-rw-r--r-- | connectivity/source/inc/ado/ADriver.hxx | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/connectivity/source/inc/ado/ADriver.hxx b/connectivity/source/inc/ado/ADriver.hxx index c7bc558fb4d3..a428ed1636ca 100644 --- a/connectivity/source/inc/ado/ADriver.hxx +++ b/connectivity/source/inc/ado/ADriver.hxx @@ -26,13 +26,10 @@ #include <cppuhelper/compbase.hxx> #include <connectivity/CommonTools.hxx> -namespace com::sun::star::lang { class XMultiServiceFactory; } +namespace com::sun::star::uno { class XComponentContext; } namespace connectivity::ado { - /// @throws css::uno::Exception - css::uno::Reference< css::uno::XInterface > ODriver_CreateInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& _rxFactory); - typedef ::cppu::WeakComponentImplHelper< css::sdbc::XDriver, css::sdbcx::XDataDefinitionSupplier, css::lang::XServiceInfo @@ -44,23 +41,19 @@ namespace connectivity::ado connectivity::OWeakRefArray m_xConnections; // vector containing a list // of all the Connection objects // for this Driver - css::uno::Reference< css::lang::XMultiServiceFactory > m_xORB; + css::uno::Reference< css::uno::XComponentContext > m_xContext; // to put back all the inits with COINIT_MULTITHREADED if needed int mnNbCallCoInitializeExForReinit; public: - ODriver(const css::uno::Reference< css::lang::XMultiServiceFactory >& _xORB); + ODriver(const css::uno::Reference< css::uno::XComponentContext >& xContext); ~ODriver() override; // OComponentHelper virtual void SAL_CALL disposing() override; - // XInterface - /// @throws css::uno::RuntimeException - static OUString getImplementationName_Static( ); - /// @throws css::uno::RuntimeException - static css::uno::Sequence< OUString > getSupportedServiceNames_Static( ); - css::uno::Reference< css::lang::XMultiServiceFactory > getORB() const { return m_xORB; } + + css::uno::Reference< css::uno::XComponentContext > getContext() const { return m_xContext; } private: void impl_checkURL_throw(const OUString& _sUrl); |