diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-07 15:14:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-08 13:59:53 +0200 |
commit | 41772463ca1ab22b213dbf1cb7449ec695b2f457 (patch) | |
tree | 618ad152f728fc2917df247a9405e39828ef974f /ucb/source/ucp | |
parent | 8f4fdb405a8470b9d06ab14ced120da89b213e82 (diff) |
use cppu::WeakImplHelper in fileaccess::BaseContent
Change-Id: I1a677ce5c3eed773c04709808d0d019a2f59585d
Reviewed-on: https://gerrit.libreoffice.org/80425
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r-- | ucb/source/ucp/file/bc.cxx | 51 | ||||
-rw-r--r-- | ucb/source/ucp/file/bc.hxx | 42 |
2 files changed, 11 insertions, 82 deletions
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx index 34ce91c146f5..fe00d74c8533 100644 --- a/ucb/source/ucp/file/bc.cxx +++ b/ucb/source/ucp/file/bc.cxx @@ -126,43 +126,6 @@ BaseContent::~BaseContent( ) } -// XInterface - - -void SAL_CALL -BaseContent::acquire() - throw() -{ - OWeakObject::acquire(); -} - - -void SAL_CALL -BaseContent::release() - throw() -{ - OWeakObject::release(); -} - - -Any SAL_CALL -BaseContent::queryInterface( const Type& rType ) -{ - Any aRet = cppu::queryInterface( rType, - static_cast< lang::XComponent* >(this), - static_cast< lang::XTypeProvider* >(this), - static_cast< lang::XServiceInfo* >(this), - static_cast< XCommandProcessor* >(this), - static_cast< container::XChild* >(this), - static_cast< beans::XPropertiesChangeNotifier* >(this), - static_cast< beans::XPropertyContainer* >(this), - static_cast< XContentCreator* >(this), - static_cast< beans::XPropertySetInfoChangeNotifier* >(this), - static_cast< XContent* >(this) ); - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); -} - - // XComponent @@ -241,20 +204,6 @@ BaseContent::getSupportedServiceNames() return ret; } -// XTypeProvider -XTYPEPROVIDER_IMPL_10( BaseContent, - lang::XComponent, - lang::XTypeProvider, - lang::XServiceInfo, - XCommandProcessor, - XContentCreator, - XContent, - container::XChild, - beans::XPropertiesChangeNotifier, - beans::XPropertyContainer, - beans::XPropertySetInfoChangeNotifier ) - - // XCommandProcessor diff --git a/ucb/source/ucp/file/bc.hxx b/ucb/source/ucp/file/bc.hxx index 4bfd72abc4de..5d6e36d88957 100644 --- a/ucb/source/ucp/file/bc.hxx +++ b/ucb/source/ucp/file/bc.hxx @@ -22,7 +22,7 @@ #include <osl/mutex.hxx> #include <rtl/ustring.hxx> -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase.hxx> #include <comphelper/interfacecontainer2.hxx> #include <com/sun/star/uno/XInterface.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> @@ -54,17 +54,16 @@ namespace fileaccess { class TaskManager; class BaseContent: - public cppu::OWeakObject, - public css::lang::XComponent, - public css::lang::XServiceInfo, - public css::lang::XTypeProvider, - public css::ucb::XCommandProcessor, - public css::beans::XPropertiesChangeNotifier, - public css::beans::XPropertyContainer, - public css::beans::XPropertySetInfoChangeNotifier, - public css::ucb::XContentCreator, - public css::container::XChild, - public css::ucb::XContent, + public cppu::WeakImplHelper< + css::lang::XComponent, + css::lang::XServiceInfo, + css::ucb::XCommandProcessor, + css::beans::XPropertiesChangeNotifier, + css::beans::XPropertyContainer, + css::beans::XPropertySetInfoChangeNotifier, + css::ucb::XContentCreator, + css::container::XChild, + css::ucb::XContent>, public fileaccess::Notifier // implementation class { private: @@ -82,19 +81,6 @@ namespace fileaccess { virtual ~BaseContent() 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; - - // XComponent virtual void SAL_CALL dispose() override; @@ -107,12 +93,6 @@ namespace fileaccess { removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) 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; |