diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-07 14:36:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-08 08:25:43 +0200 |
commit | c1c619f4b087cc4e26866a5f3d591bb610158d66 (patch) | |
tree | 31877ca5e76fdd13e67e879633cc034c9250d78b | |
parent | d3883e67bfe9f2889690b435bc57273c22e327f7 (diff) |
use cppu::WeakImplHelper in ContentIdentifier
Change-Id: Id9c0d5d1f69c516efdf45b070982bdf341e86ce8
Reviewed-on: https://gerrit.libreoffice.org/80401
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | include/ucbhelper/contentidentifier.hxx | 20 | ||||
-rw-r--r-- | ucbhelper/source/provider/contentidentifier.cxx | 52 |
2 files changed, 2 insertions, 70 deletions
diff --git a/include/ucbhelper/contentidentifier.hxx b/include/ucbhelper/contentidentifier.hxx index 093544c2b6da..85ba76570032 100644 --- a/include/ucbhelper/contentidentifier.hxx +++ b/include/ucbhelper/contentidentifier.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_UCBHELPER_CONTENTIDENTIFIER_HXX #define INCLUDED_UCBHELPER_CONTENTIDENTIFIER_HXX -#include <cppuhelper/weak.hxx> +#include <cppuhelper/implbase.hxx> #include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/ucb/XContentIdentifier.hpp> #include <ucbhelper/ucbhelperdllapi.h> @@ -40,28 +40,12 @@ struct ContentIdentifier_Impl; * be done, because URL schemes are never case sensitive. */ class UCBHELPER_DLLPUBLIC ContentIdentifier : - public cppu::OWeakObject, - public css::lang::XTypeProvider, - public css::ucb::XContentIdentifier + public cppu::WeakImplHelper<css::ucb::XContentIdentifier> { public: ContentIdentifier( const OUString& rURL ); virtual ~ContentIdentifier() 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< sal_Int8 > SAL_CALL - getImplementationId() override; - virtual css::uno::Sequence< css::uno::Type > SAL_CALL - getTypes() override; - // XContentIdentifier virtual OUString SAL_CALL getContentIdentifier() override; diff --git a/ucbhelper/source/provider/contentidentifier.cxx b/ucbhelper/source/provider/contentidentifier.cxx index 681890d0a475..6f14d953b766 100644 --- a/ucbhelper/source/provider/contentidentifier.cxx +++ b/ucbhelper/source/provider/contentidentifier.cxx @@ -82,58 +82,6 @@ ContentIdentifier::~ContentIdentifier() } -// XInterface methods. - - -// virtual -void SAL_CALL ContentIdentifier::acquire() throw() -{ - OWeakObject::acquire(); -} - - -// virtual -void SAL_CALL ContentIdentifier::release() throw() -{ - OWeakObject::release(); -} - - -// virtual -Any SAL_CALL -ContentIdentifier::queryInterface( const Type & rType ) -{ - Any aRet = cppu::queryInterface( rType, - static_cast< XTypeProvider * >( this ), - static_cast< XContentIdentifier * >( this ) ); - - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); -} - - -// XTypeProvider methods. - - -// virtual -Sequence< sal_Int8 > SAL_CALL -ContentIdentifier::getImplementationId() -{ - return css::uno::Sequence<sal_Int8>(); -} - - -// virtual -Sequence< css::uno::Type > SAL_CALL -ContentIdentifier::getTypes() -{ - static cppu::OTypeCollection s_aCollection( - cppu::UnoType<XTypeProvider>::get(), - cppu::UnoType<XContentIdentifier>::get() ); - - return s_aCollection.getTypes(); -} - - // XContentIdentifier methods. |