ucb/source/ucp/file/filid.cxx | 45 ---------------------------- ucb/source/ucp/file/filid.hxx | 25 +-------------- ucb/source/ucp/ftp/ftpcontentidentifier.cxx | 42 -------------------------- ucb/source/ucp/ftp/ftpcontentidentifier.hxx | 27 +--------------- 4 files changed, 5 insertions(+), 134 deletions(-)
New commits: commit 0adf816ccde0ad7a7449bb30b47ef27c49414b4f Author: Noel Grandin <[email protected]> AuthorDate: Mon Oct 7 15:17:17 2019 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Oct 8 18:31:20 2019 +0200 use cppu::WeakImplHelper in FTPContentIdentifier Change-Id: Id4ea2006fab9607fdbd744ba73deb3dbd30b374b Reviewed-on: https://gerrit.libreoffice.org/80453 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> 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 commit d8ad8cc3c8b09f82e2ee722c98b335bfd19b2041 Author: Noel Grandin <[email protected]> AuthorDate: Mon Oct 7 15:16:04 2019 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Tue Oct 8 18:31:09 2019 +0200 use cppu::WeakImplHelper in fileaccess::FileContentIdentifier Change-Id: I944bd19d432c18708bc822e186cd2ea1ce304403 Reviewed-on: https://gerrit.libreoffice.org/80452 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/ucb/source/ucp/file/filid.cxx b/ucb/source/ucp/file/filid.cxx index aadcf2f14498..11ce232c7ea8 100644 --- a/ucb/source/ucp/file/filid.cxx +++ b/ucb/source/ucp/file/filid.cxx @@ -47,51 +47,6 @@ FileContentIdentifier::~FileContentIdentifier() { } - -void SAL_CALL -FileContentIdentifier::acquire() - throw() -{ - OWeakObject::acquire(); -} - - -void SAL_CALL -FileContentIdentifier::release() - throw() -{ - OWeakObject::release(); -} - - -uno::Any SAL_CALL -FileContentIdentifier::queryInterface( const uno::Type& rType ) -{ - uno::Any aRet = cppu::queryInterface( rType, - static_cast< lang::XTypeProvider* >(this), - static_cast< XContentIdentifier* >(this) ); - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); -} - - -uno::Sequence< sal_Int8 > SAL_CALL -FileContentIdentifier::getImplementationId() -{ - return css::uno::Sequence<sal_Int8>(); -} - - -uno::Sequence< uno::Type > SAL_CALL -FileContentIdentifier::getTypes() -{ - static cppu::OTypeCollection s_aCollection( - cppu::UnoType<lang::XTypeProvider>::get(), - cppu::UnoType<XContentIdentifier>::get() ); - - return s_aCollection.getTypes(); -} - - OUString SAL_CALL FileContentIdentifier::getContentIdentifier() diff --git a/ucb/source/ucp/file/filid.hxx b/ucb/source/ucp/file/filid.hxx index 9bf7053cdbb5..769ddcecfcb7 100644 --- a/ucb/source/ucp/file/filid.hxx +++ b/ucb/source/ucp/file/filid.hxx @@ -20,7 +20,7 @@ #define INCLUDED_UCB_SOURCE_UCP_FILE_FILID_HXX #include <rtl/ustring.hxx> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/ucb/XContentIdentifier.hpp> @@ -29,9 +29,7 @@ namespace fileaccess { class TaskManager; class FileContentIdentifier : - public cppu::OWeakObject, - public css::lang::XTypeProvider, - public css::ucb::XContentIdentifier + public cppu::WeakImplHelper<css::ucb::XContentIdentifier> { // This implementation has to be reworked @@ -41,25 +39,6 @@ namespace fileaccess { virtual ~FileContentIdentifier() override; - // XInterface - virtual css::uno::Any SAL_CALL - queryInterface( const css::uno::Type& aType ) 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 getContentIdentifier() override; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
