diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-07 15:17:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-08 18:31:20 +0200 |
commit | 0adf816ccde0ad7a7449bb30b47ef27c49414b4f (patch) | |
tree | af46a98d2a3804a51a05acbefa4589713c99cceb /ucb | |
parent | d8ad8cc3c8b09f82e2ee722c98b335bfd19b2041 (diff) |
use cppu::WeakImplHelper in FTPContentIdentifier
Change-Id: Id4ea2006fab9607fdbd744ba73deb3dbd30b374b
Reviewed-on: https://gerrit.libreoffice.org/80453
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/ftp/ftpcontentidentifier.cxx | 42 | ||||
-rw-r--r-- | 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_Int8> SAL_CALL -FTPContentIdentifier::getImplementationId() -{ - return css::uno::Sequence<sal_Int8>(); -} - - -Sequence<Type> SAL_CALL -FTPContentIdentifier::getTypes() -{ - static cppu::OTypeCollection s_aCollection( - cppu::UnoType<XTypeProvider>::get(), - cppu::UnoType<XContentIdentifier>::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 <cppuhelper/weak.hxx> +#include <cppuhelper/implbase.hxx> #include <com/sun/star/ucb/XContentIdentifier.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> namespace ftp { - class FTPContentIdentifier - : public cppu::OWeakObject, - public css::lang::XTypeProvider, - public css::ucb::XContentIdentifier + class FTPContentIdentifier : + public cppu::WeakImplHelper<css::ucb::XContentIdentifier> { 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<css::uno::Type> SAL_CALL - getTypes() override; - - virtual css::uno::Sequence<sal_Int8> SAL_CALL - getImplementationId() override; - - // XContentIdentifier virtual OUString SAL_CALL |