From ed1f20d2f1674261c30a503c5b429ad35dabf033 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Oct 2019 15:09:58 +0200 Subject: use cppu::WeakImplHelper in CachedDynamicResultSetStubFactory Change-Id: Ide129bb5de11f967aa42d46704a0d00487fc5419 Reviewed-on: https://gerrit.libreoffice.org/80423 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/cacher/cacheddynamicresultsetstub.cxx | 33 ------------------------ ucb/source/cacher/cacheddynamicresultsetstub.hxx | 21 ++++----------- 2 files changed, 5 insertions(+), 49 deletions(-) (limited to 'ucb') diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.cxx b/ucb/source/cacher/cacheddynamicresultsetstub.cxx index da240c2d6635..330d159bca67 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.cxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.cxx @@ -152,39 +152,6 @@ CachedDynamicResultSetStubFactory::~CachedDynamicResultSetStubFactory() { } - -// CachedDynamicResultSetStubFactory XInterface methods. -void SAL_CALL CachedDynamicResultSetStubFactory::acquire() - throw() -{ - OWeakObject::acquire(); -} - -void SAL_CALL CachedDynamicResultSetStubFactory::release() - throw() -{ - OWeakObject::release(); -} - -css::uno::Any SAL_CALL CachedDynamicResultSetStubFactory::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = cppu::queryInterface( rType, - static_cast< XTypeProvider* >(this), - static_cast< XServiceInfo* >(this), - static_cast< XCachedDynamicResultSetStubFactory* >(this) - ); - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); -} - -// CachedDynamicResultSetStubFactory XTypeProvider methods. - - -XTYPEPROVIDER_IMPL_3( CachedDynamicResultSetStubFactory, - XTypeProvider, - XServiceInfo, - XCachedDynamicResultSetStubFactory ); - - // CachedDynamicResultSetStubFactory XServiceInfo methods. XSERVICEINFO_COMMOM_IMPL( CachedDynamicResultSetStubFactory, diff --git a/ucb/source/cacher/cacheddynamicresultsetstub.hxx b/ucb/source/cacher/cacheddynamicresultsetstub.hxx index 868701127ef2..e6ca57a94070 100644 --- a/ucb/source/cacher/cacheddynamicresultsetstub.hxx +++ b/ucb/source/cacher/cacheddynamicresultsetstub.hxx @@ -26,6 +26,7 @@ #include #include #include +#include #define CACHED_DRS_STUB_SERVICE_NAME "com.sun.star.ucb.CachedDynamicResultSetStub" #define CACHED_DRS_STUB_FACTORY_NAME "com.sun.star.ucb.CachedDynamicResultSetStubFactory" @@ -68,11 +69,10 @@ public: }; -class CachedDynamicResultSetStubFactory final - : public cppu::OWeakObject - , public css::lang::XTypeProvider - , public css::lang::XServiceInfo - , public css::ucb::XCachedDynamicResultSetStubFactory +class CachedDynamicResultSetStubFactory final : + public cppu::WeakImplHelper< + css::lang::XServiceInfo, + css::ucb::XCachedDynamicResultSetStubFactory> { css::uno::Reference< css::uno::XComponentContext > m_xContext; @@ -83,17 +83,6 @@ public: virtual ~CachedDynamicResultSetStubFactory() override; - // XInterface - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override; - virtual void SAL_CALL acquire() - throw() override; - virtual void SAL_CALL release() - throw() override; - - // XTypeProvider - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override; - virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; - // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; -- cgit