From 0adf816ccde0ad7a7449bb30b47ef27c49414b4f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 7 Oct 2019 15:17:17 +0200 Subject: use cppu::WeakImplHelper in FTPContentIdentifier Change-Id: Id4ea2006fab9607fdbd744ba73deb3dbd30b374b Reviewed-on: https://gerrit.libreoffice.org/80453 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/ucp/ftp/ftpcontentidentifier.cxx | 42 ----------------------------- ucb/source/ucp/ftp/ftpcontentidentifier.hxx | 27 +++---------------- 2 files changed, 3 insertions(+), 66 deletions(-) diff --git a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx b/ucb/source/ucp/ftp/ftpcontentidentifier.cxx index ed8c312c592d..ece8525d8631 100644 --- a/ucb/source/ucp/ftp/ftpcontentidentifier.cxx +++ b/ucb/source/ucp/ftp/ftpcontentidentifier.cxx @@ -48,48 +48,6 @@ FTPContentIdentifier::~FTPContentIdentifier() } -Any SAL_CALL -FTPContentIdentifier::queryInterface( - const Type& rType -) -{ - Any aRet = - ::cppu::queryInterface(rType, - static_cast< XTypeProvider* >(this), - static_cast< XContentIdentifier* >(this)); - - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); -} - - -void SAL_CALL FTPContentIdentifier::acquire() throw() { - OWeakObject::acquire(); -} - - -void SAL_CALL FTPContentIdentifier::release() throw() { - OWeakObject::release(); -} - - -Sequence SAL_CALL -FTPContentIdentifier::getImplementationId() -{ - return css::uno::Sequence(); -} - - -Sequence SAL_CALL -FTPContentIdentifier::getTypes() -{ - static cppu::OTypeCollection s_aCollection( - cppu::UnoType::get(), - cppu::UnoType::get()); - - return s_aCollection.getTypes(); -} - - OUString SAL_CALL FTPContentIdentifier::getContentIdentifier( ) diff --git a/ucb/source/ucp/ftp/ftpcontentidentifier.hxx b/ucb/source/ucp/ftp/ftpcontentidentifier.hxx index cd8de1494ada..367c7820b413 100644 --- a/ucb/source/ucp/ftp/ftpcontentidentifier.hxx +++ b/ucb/source/ucp/ftp/ftpcontentidentifier.hxx @@ -25,17 +25,15 @@ #ifndef INCLUDED_UCB_SOURCE_UCP_FTP_FTPCONTENTIDENTIFIER_HXX #define INCLUDED_UCB_SOURCE_UCP_FTP_FTPCONTENTIDENTIFIER_HXX -#include +#include #include #include namespace ftp { - class FTPContentIdentifier - : public cppu::OWeakObject, - public css::lang::XTypeProvider, - public css::ucb::XContentIdentifier + class FTPContentIdentifier : + public cppu::WeakImplHelper { public: @@ -43,25 +41,6 @@ namespace ftp { virtual ~FTPContentIdentifier() 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_CALL - getTypes() override; - - virtual css::uno::Sequence SAL_CALL - getImplementationId() override; - - // XContentIdentifier virtual OUString SAL_CALL -- cgit