diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-07 15:16:04 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-08 18:31:09 +0200 |
commit | d8ad8cc3c8b09f82e2ee722c98b335bfd19b2041 (patch) | |
tree | 1724b54b0b40d95c91577242747d9a6e9655d3cb /ucb | |
parent | 707436f0b37fa2cf0e5a3fd41bcda504246876c6 (diff) |
use cppu::WeakImplHelper in fileaccess::FileContentIdentifier
Change-Id: I944bd19d432c18708bc822e186cd2ea1ce304403
Reviewed-on: https://gerrit.libreoffice.org/80452
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/file/filid.cxx | 45 | ||||
-rw-r--r-- | ucb/source/ucp/file/filid.hxx | 25 |
2 files changed, 2 insertions, 68 deletions
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; |