summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-07 15:18:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-09 07:44:10 +0200
commitc71896debc7ef5f6d6e918f59fa44423eb5df480 (patch)
tree50fef0b11d6fd00783d111e179c5dea33b5ce172 /ucb
parentb16730d8f10b596e00f34e15ca9c011f347f57b1 (diff)
use cppu::WeakImplHelper in HierarchyDataSource
Change-Id: I52da5a05e20f4971720e59589511eeacb1911b95 Reviewed-on: https://gerrit.libreoffice.org/80454 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasource.cxx35
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasource.hxx22
2 files changed, 5 insertions, 52 deletions
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index 5f358dd76fc0..490c3c0eaecf 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -192,41 +192,6 @@ HierarchyDataSource::~HierarchyDataSource()
{
}
-
-// XInterface methods.
-void SAL_CALL HierarchyDataSource::acquire()
- throw()
-{
- OWeakObject::acquire();
-}
-
-void SAL_CALL HierarchyDataSource::release()
- throw()
-{
- OWeakObject::release();
-}
-
-css::uno::Any SAL_CALL HierarchyDataSource::queryInterface( const css::uno::Type & rType )
-{
- css::uno::Any aRet = cppu::queryInterface( rType,
- static_cast< lang::XTypeProvider* >(this),
- static_cast< lang::XServiceInfo* >(this),
- static_cast< lang::XComponent* >(this),
- static_cast< lang::XMultiServiceFactory* >(this)
- );
- return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
-}
-
-// XTypeProvider methods.
-
-
-XTYPEPROVIDER_IMPL_4( HierarchyDataSource,
- lang::XTypeProvider,
- lang::XServiceInfo,
- lang::XComponent,
- lang::XMultiServiceFactory );
-
-
// XServiceInfo methods.
XSERVICEINFO_COMMOM_IMPL( HierarchyDataSource,
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
index 5eb3a9e50006..48015ea2b0da 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
@@ -27,7 +27,7 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase.hxx>
#include <memory>
namespace comphelper { class OInterfaceContainerHelper2; }
@@ -35,11 +35,10 @@ namespace comphelper { class OInterfaceContainerHelper2; }
namespace hierarchy_ucp {
-class HierarchyDataSource : public cppu::OWeakObject,
- public css::lang::XServiceInfo,
- public css::lang::XTypeProvider,
- public css::lang::XComponent,
- public css::lang::XMultiServiceFactory
+class HierarchyDataSource : public cppu::WeakImplHelper<
+ css::lang::XServiceInfo,
+ css::lang::XComponent,
+ css::lang::XMultiServiceFactory>
{
osl::Mutex m_aMutex;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
@@ -50,13 +49,6 @@ public:
explicit HierarchyDataSource( const css::uno::Reference< css::uno::XComponentContext > & rxContext );
virtual ~HierarchyDataSource() 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;
-
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
@@ -68,10 +60,6 @@ public:
static css::uno::Reference< css::lang::XSingleServiceFactory > createServiceFactory( const css::uno::Reference<
css::lang::XMultiServiceFactory >& rxServiceMgr );
- // XTypeProvider
- virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
- virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
-
// XComponent
virtual void SAL_CALL dispose() override;
virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener > & xListener ) override;