diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-20 23:11:29 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-20 23:11:29 -0500 |
commit | 4cf5556f12812c1fea256252e1d01fa40983c666 (patch) | |
tree | e856dfb09a4d6827d269c36e61578921f51bc821 /ucb | |
parent | 37aeda6be1c636270a7c270facf478b5b97f9997 (diff) |
use WeakImplHelper for ucb FileProvider
Change-Id: I7de8301fc1a071f91d25f559ace44e9f27040d63
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/file/prov.cxx | 56 | ||||
-rw-r--r-- | ucb/source/ucp/file/prov.hxx | 40 |
2 files changed, 8 insertions, 88 deletions
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 1510a77a2422..d4903f749189 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -102,45 +102,6 @@ FileProvider::~FileProvider() -// XInterface - - -void SAL_CALL -FileProvider::acquire( - void ) - throw() -{ - OWeakObject::acquire(); -} - - -void SAL_CALL -FileProvider::release( - void ) - throw() -{ - OWeakObject::release(); -} - - -Any SAL_CALL -FileProvider::queryInterface( - const Type& rType ) - throw( RuntimeException, std::exception ) -{ - Any aRet = cppu::queryInterface( - rType, - (static_cast< XContentProvider* >(this)), - (static_cast< XInitialization* >(this)), - (static_cast< XContentIdentifierFactory* >(this)), - (static_cast< XServiceInfo* >(this)), - (static_cast< XTypeProvider* >(this)), - (static_cast< XFileIdentifierConverter* >(this)), - (static_cast< XPropertySet* >(this)) ); - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); -} - - // XInitialization void SAL_CALL FileProvider::init() @@ -166,23 +127,6 @@ FileProvider::initialize( } } - - - -// XTypeProvider methods. - - -XTYPEPROVIDER_IMPL_7( FileProvider, - XTypeProvider, - XServiceInfo, - XInitialization, - XContentIdentifierFactory, - XPropertySet, - XFileIdentifierConverter, - XContentProvider ) - - - // XServiceInfo methods. OUString SAL_CALL FileProvider::getImplementationName() diff --git a/ucb/source/ucp/file/prov.hxx b/ucb/source/ucp/file/prov.hxx index 690408348359..c95a0dbcb48a 100644 --- a/ucb/source/ucp/file/prov.hxx +++ b/ucb/source/ucp/file/prov.hxx @@ -35,6 +35,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/ucb/XFileIdentifierConverter.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp> +#include <cppuhelper/implbase6.hxx> // FileProvider @@ -47,15 +48,13 @@ namespace fileaccess { class BaseContent; class shell; - class FileProvider: - public cppu::OWeakObject, - public com::sun::star::lang::XServiceInfo, - public com::sun::star::lang::XInitialization, - public com::sun::star::lang::XTypeProvider, - public com::sun::star::ucb::XContentProvider, - public com::sun::star::ucb::XContentIdentifierFactory, - public com::sun::star::beans::XPropertySet, - public com::sun::star::ucb::XFileIdentifierConverter + class FileProvider: public cppu::WeakImplHelper6 < + css::lang::XServiceInfo, + css::lang::XInitialization, + css::ucb::XContentProvider, + css::ucb::XContentIdentifierFactory, + css::beans::XPropertySet, + css::ucb::XFileIdentifierConverter > { friend class BaseContent; public: @@ -63,22 +62,6 @@ namespace fileaccess { FileProvider( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext ); ~FileProvider(); - // XInterface - virtual com::sun::star::uno::Any SAL_CALL - queryInterface( - const com::sun::star::uno::Type& aType ) - throw( com::sun::star::uno::RuntimeException, std::exception); - - virtual void SAL_CALL - acquire( - void ) - throw(); - - virtual void SAL_CALL - release( - void ) - throw(); - // XServiceInfo virtual OUString SAL_CALL getImplementationName( @@ -104,13 +87,6 @@ namespace fileaccess { CreateInstance( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMultiServiceFactory ); - // XTypeProvider - - virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw( css::uno::RuntimeException, std::exception ); - virtual css::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes() - throw( css::uno::RuntimeException, std::exception ); - // XInitialization virtual void SAL_CALL initialize( |