diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-06 22:16:32 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-03-06 23:34:38 -0600 |
commit | 864afb34d6e3ed8c4033dc395931874881f7571d (patch) | |
tree | 4ae12cae8a541930d124835b1016ba3e226da37b /ucb | |
parent | 20ed6886ade81ee015a22b2eb3aeff64691971bf (diff) |
use WeakImplhelper1 for ContentIdentifier
Change-Id: I830d2642bde6affbc400fbaab11955ac082b7bc5
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/core/identify.cxx | 49 | ||||
-rw-r--r-- | ucb/source/core/identify.hxx | 27 |
2 files changed, 7 insertions, 69 deletions
diff --git a/ucb/source/core/identify.cxx b/ucb/source/core/identify.cxx index 7da0d476f89b..e36442c241b2 100644 --- a/ucb/source/core/identify.cxx +++ b/ucb/source/core/identify.cxx @@ -31,15 +31,9 @@ using namespace com::sun::star::lang; using namespace com::sun::star::ucb; - - // ContentIdentifier Implementation. - - - -ContentIdentifier::ContentIdentifier( - const OUString& ContentId ) -: m_aContentId( ContentId ) +ContentIdentifier::ContentIdentifier( const OUString& ContentId ) + : m_aContentId( ContentId ) { } @@ -50,46 +44,7 @@ ContentIdentifier::~ContentIdentifier() } - -// XInterface methods. - -void SAL_CALL ContentIdentifier::acquire() - throw() -{ - OWeakObject::acquire(); -} - -void SAL_CALL ContentIdentifier::release() - throw() -{ - OWeakObject::release(); -} - -css::uno::Any SAL_CALL ContentIdentifier::queryInterface( - const css::uno::Type & rType ) - throw( css::uno::RuntimeException, std::exception ) -{ - css::uno::Any aRet = cppu::queryInterface( rType, - (static_cast< XTypeProvider* >(this)), - (static_cast< XContentIdentifier* >(this)) - ); - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); -} - -// XTypeProvider methods. - - - -XTYPEPROVIDER_IMPL_2( ContentIdentifier, - XTypeProvider, - XContentIdentifier ); - - - // XContentIdentifier methods. - - - // virtual OUString SAL_CALL ContentIdentifier::getContentIdentifier() throw( RuntimeException, std::exception ) diff --git a/ucb/source/core/identify.hxx b/ucb/source/core/identify.hxx index dae7402e7a0f..deb7cdcfa9b9 100644 --- a/ucb/source/core/identify.hxx +++ b/ucb/source/core/identify.hxx @@ -21,39 +21,22 @@ #define _IDENTIFY_HXX #include <com/sun/star/ucb/XContentIdentifier.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XTypeProvider.hpp> #include <rtl/ustrbuf.hxx> -#include <cppuhelper/weak.hxx> -#include <ucbhelper/macros.hxx> +#include <cppuhelper/implbase1.hxx> - -class ContentIdentifier : - public cppu::OWeakObject, - public com::sun::star::lang::XTypeProvider, - public com::sun::star::ucb::XContentIdentifier +class ContentIdentifier : public cppu::WeakImplHelper1 < + css::ucb::XContentIdentifier > { public: ContentIdentifier( const OUString& ContentId ); virtual ~ContentIdentifier(); - // XInterface - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) - throw( css::uno::RuntimeException, std::exception ); - virtual void SAL_CALL acquire() - throw(); - virtual void SAL_CALL release() - throw(); - - // XTypeProvider - XTYPEPROVIDER_DECL() - // XContentIdentifier virtual OUString SAL_CALL getContentIdentifier() - throw( com::sun::star::uno::RuntimeException, std::exception ); + throw( css::uno::RuntimeException, std::exception ); virtual OUString SAL_CALL getContentProviderScheme() - throw( com::sun::star::uno::RuntimeException, std::exception ); + throw( css::uno::RuntimeException, std::exception ); private: OUString m_aContentId; |