diff options
-rw-r--r-- | xmlhelp/source/cxxhelp/inc/tvfactory.hxx | 32 | ||||
-rw-r--r-- | xmlhelp/source/treeview/tvfactory.cxx | 38 |
2 files changed, 4 insertions, 66 deletions
diff --git a/xmlhelp/source/cxxhelp/inc/tvfactory.hxx b/xmlhelp/source/cxxhelp/inc/tvfactory.hxx index e095bc7618c8..38d10b02cc06 100644 --- a/xmlhelp/source/cxxhelp/inc/tvfactory.hxx +++ b/xmlhelp/source/cxxhelp/inc/tvfactory.hxx @@ -28,16 +28,14 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> - +#include <cppuhelper/implbase2.hxx> namespace treeview { - class TVFactory: - public cppu::OWeakObject, - public com::sun::star::lang::XServiceInfo, - public com::sun::star::lang::XTypeProvider, - public com::sun::star::lang::XMultiServiceFactory +class TVFactory: public cppu::WeakImplHelper2 < + css::lang::XServiceInfo, + css::lang::XMultiServiceFactory > { public: @@ -45,28 +43,6 @@ namespace treeview { ~TVFactory(); - // 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(); - - - // XTypeProvider - - XTYPEPROVIDER_DECL() - - // XServiceInfo virtual OUString SAL_CALL getImplementationName( diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx index 288d542daea4..d0bd2e955264 100644 --- a/xmlhelp/source/treeview/tvfactory.cxx +++ b/xmlhelp/source/treeview/tvfactory.cxx @@ -41,44 +41,6 @@ TVFactory::~TVFactory() { } -// XInterface - -void SAL_CALL -TVFactory::acquire( - void ) - throw() -{ - OWeakObject::acquire(); -} - -void SAL_CALL -TVFactory::release( - void ) - throw() -{ - OWeakObject::release(); -} - -Any SAL_CALL -TVFactory::queryInterface( - const Type& rType ) - throw( RuntimeException, std::exception ) -{ - Any aRet = cppu::queryInterface( rType, - (static_cast< XServiceInfo* >(this)), - (static_cast< XTypeProvider* >(this)), - (static_cast< XMultiServiceFactory* >(this)) ); - - return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ); -} - -// XTypeProvider methods. - -XTYPEPROVIDER_IMPL_3( TVFactory, - XServiceInfo, - XTypeProvider, - XMultiServiceFactory ); - // XServiceInfo methods. OUString SAL_CALL |