From 6a1485d4109ae5d0666d769406811d1918c90388 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Oct 2019 15:06:49 +0200 Subject: use cppu::WeakImplHelper in CachedContentResultSetStubFactory Change-Id: Ic0fb9aa44fefc9377ead2d815be0f522eaf8cb33 Reviewed-on: https://gerrit.libreoffice.org/80413 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/cacher/cachedcontentresultsetstub.cxx | 32 ------------------------ ucb/source/cacher/cachedcontentresultsetstub.hxx | 23 ++++------------- 2 files changed, 5 insertions(+), 50 deletions(-) (limited to 'ucb') diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index 24459ec66e6b..bf4651f79694 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx @@ -507,38 +507,6 @@ CachedContentResultSetStubFactory::~CachedContentResultSetStubFactory() } -// CachedContentResultSetStubFactory XInterface methods. -void SAL_CALL CachedContentResultSetStubFactory::acquire() - throw() -{ - OWeakObject::acquire(); -} - -void SAL_CALL CachedContentResultSetStubFactory::release() - throw() -{ - OWeakObject::release(); -} - -css::uno::Any SAL_CALL CachedContentResultSetStubFactory::queryInterface( const css::uno::Type & rType ) -{ - css::uno::Any aRet = cppu::queryInterface( rType, - static_cast< XTypeProvider* >(this), - static_cast< XServiceInfo* >(this), - static_cast< XCachedContentResultSetStubFactory* >(this) - ); - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); -} - -// CachedContentResultSetStubFactory XTypeProvider methods. - - -XTYPEPROVIDER_IMPL_3( CachedContentResultSetStubFactory, - XTypeProvider, - XServiceInfo, - XCachedContentResultSetStubFactory ); - - // CachedContentResultSetStubFactory XServiceInfo methods. XSERVICEINFO_COMMOM_IMPL( CachedContentResultSetStubFactory, diff --git a/ucb/source/cacher/cachedcontentresultsetstub.hxx b/ucb/source/cacher/cachedcontentresultsetstub.hxx index 1913d3ebd6a9..d5e2838a269a 100644 --- a/ucb/source/cacher/cachedcontentresultsetstub.hxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.hxx @@ -28,6 +28,7 @@ #include #include #include +#include #define CACHED_CRS_STUB_SERVICE_NAME "com.sun.star.ucb.CachedContentResultSetStub" #define CACHED_CRS_STUB_FACTORY_NAME "com.sun.star.ucb.CachedContentResultSetStubFactory" @@ -142,11 +143,10 @@ public: }; -class CachedContentResultSetStubFactory final - : public cppu::OWeakObject - , public css::lang::XTypeProvider - , public css::lang::XServiceInfo - , public css::ucb::XCachedContentResultSetStubFactory +class CachedContentResultSetStubFactory final : + public cppu::WeakImplHelper< + css::lang::XServiceInfo, + css::ucb::XCachedContentResultSetStubFactory> { public: @@ -154,19 +154,6 @@ public: virtual ~CachedContentResultSetStubFactory() 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