[Libreoffice-commits] core.git: 3 commits - include/toolkit include/ucbhelper toolkit/source ucbhelper/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 8 06:27:11 UTC 2019
include/toolkit/awt/vclxregion.hxx | 18 +-------
include/ucbhelper/contentidentifier.hxx | 20 ---------
include/ucbhelper/contentinfo.hxx | 19 --------
toolkit/source/awt/vclxregion.cxx | 23 ----------
ucbhelper/source/provider/contentidentifier.cxx | 52 ------------------------
ucbhelper/source/provider/contentinfo.cxx | 29 -------------
6 files changed, 8 insertions(+), 153 deletions(-)
New commits:
commit e47172ce2ac486b909ee8f46380dca8efedb6a24
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 7 14:37:52 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 8 08:25:53 2019 +0200
use cppu::WeakImplHelper in PropertySetInfo
Change-Id: I4da5d73ee7b531927066a1a4d4d7561ef9648483
Reviewed-on: https://gerrit.libreoffice.org/80402
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/ucbhelper/contentinfo.hxx b/include/ucbhelper/contentinfo.hxx
index b6d2bad87e65..f3f455af98ff 100644
--- a/include/ucbhelper/contentinfo.hxx
+++ b/include/ucbhelper/contentinfo.hxx
@@ -24,7 +24,7 @@
#include <com/sun/star/ucb/XCommandInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
@@ -45,9 +45,7 @@ class ContentImplHelper;
* Core Properties that may have been added to the content.
*/
class PropertySetInfo :
- public cppu::OWeakObject,
- public css::lang::XTypeProvider,
- public css::beans::XPropertySetInfo
+ public cppu::WeakImplHelper<css::beans::XPropertySetInfo>
{
css::uno::Reference< css::ucb::XCommandEnvironment >
m_xEnv;
@@ -65,19 +63,6 @@ public:
ContentImplHelper* pContent );
virtual ~PropertySetInfo() 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;
-
// XPropertySetInfo
virtual css::uno::Sequence<
css::beans::Property > SAL_CALL
diff --git a/ucbhelper/source/provider/contentinfo.cxx b/ucbhelper/source/provider/contentinfo.cxx
index c64bba28212b..64feb16e2b74 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -56,35 +56,6 @@ PropertySetInfo::~PropertySetInfo()
}
-// XInterface methods.
-
-void SAL_CALL PropertySetInfo::acquire()
- throw()
-{
- OWeakObject::acquire();
-}
-
-void SAL_CALL PropertySetInfo::release()
- throw()
-{
- OWeakObject::release();
-}
-
-css::uno::Any SAL_CALL PropertySetInfo::queryInterface( const css::uno::Type & rType )
-{
- css::uno::Any aRet = cppu::queryInterface( rType,
- static_cast< lang::XTypeProvider* >(this),
- static_cast< beans::XPropertySetInfo* >(this)
- );
- return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
-}
-
-// XTypeProvider methods.
-XTYPEPROVIDER_IMPL_2( PropertySetInfo,
- lang::XTypeProvider,
- beans::XPropertySetInfo );
-
-
// XPropertySetInfo methods.
commit c1c619f4b087cc4e26866a5f3d591bb610158d66
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 7 14:36:09 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 8 08:25:43 2019 +0200
use cppu::WeakImplHelper in ContentIdentifier
Change-Id: Id9c0d5d1f69c516efdf45b070982bdf341e86ce8
Reviewed-on: https://gerrit.libreoffice.org/80401
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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.
commit d3883e67bfe9f2889690b435bc57273c22e327f7
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Oct 7 14:32:45 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 8 08:25:39 2019 +0200
use cppu::WeakImplHelper in VCLXRegion
Change-Id: I93bb52b35b4c15dc93d7638d7fc1e00652a2a1e7
Reviewed-on: https://gerrit.libreoffice.org/80400
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/toolkit/awt/vclxregion.hxx b/include/toolkit/awt/vclxregion.hxx
index b91e40fd70b1..aec3e0b0af5d 100644
--- a/include/toolkit/awt/vclxregion.hxx
+++ b/include/toolkit/awt/vclxregion.hxx
@@ -25,7 +25,7 @@
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <comphelper/servicehelper.hxx>
-#include <cppuhelper/weak.hxx>
+#include <cppuhelper/implbase.hxx>
#include <osl/mutex.hxx>
#include <vcl/region.hxx>
@@ -34,10 +34,9 @@
// class VCLXRegion
-class VCLXRegion final : public css::awt::XRegion,
- public css::lang::XTypeProvider,
- public css::lang::XUnoTunnel,
- public ::cppu::OWeakObject
+class VCLXRegion final : public cppu::WeakImplHelper<
+ css::awt::XRegion,
+ css::lang::XUnoTunnel>
{
::osl::Mutex maMutex;
vcl::Region maRegion;
@@ -50,18 +49,9 @@ public:
const vcl::Region& GetRegion() const { return maRegion; }
- // css::uno::XInterface
- css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- void SAL_CALL acquire() throw() override { OWeakObject::acquire(); }
- void SAL_CALL release() throw() override { OWeakObject::release(); }
-
// css::lang::XUnoTunnel
UNO3_GETIMPLEMENTATION_DECL(VCLXRegion)
- // css::lang::XTypeProvider
- css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
- css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
-
// css::awt::XRegion
css::awt::Rectangle SAL_CALL getBounds() override;
void SAL_CALL clear() override;
diff --git a/toolkit/source/awt/vclxregion.cxx b/toolkit/source/awt/vclxregion.cxx
index fa24e203d0a8..93298a1893a0 100644
--- a/toolkit/source/awt/vclxregion.cxx
+++ b/toolkit/source/awt/vclxregion.cxx
@@ -34,32 +34,9 @@ VCLXRegion::~VCLXRegion()
{
}
-// css::uno::XInterface
-css::uno::Any VCLXRegion::queryInterface( const css::uno::Type & rType )
-{
- css::uno::Any aRet = ::cppu::queryInterface( rType,
- static_cast< css::awt::XRegion* >(this),
- static_cast< css::lang::XUnoTunnel* >(this),
- static_cast< css::lang::XTypeProvider* >(this) );
- return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
-}
-
// css::lang::XUnoTunnel
UNO3_GETIMPLEMENTATION_IMPL( VCLXRegion );
-IMPL_IMPLEMENTATION_ID( VCLXRegion )
-
-// css::lang::XTypeProvider
-css::uno::Sequence< css::uno::Type > VCLXRegion::getTypes()
-{
- static const css::uno::Sequence< css::uno::Type > aTypeList {
- cppu::UnoType<css::lang::XTypeProvider>::get(),
- cppu::UnoType<css::awt::XRegion>::get()
- };
- return aTypeList;
-}
-
-
css::awt::Rectangle VCLXRegion::getBounds()
{
::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
More information about the Libreoffice-commits
mailing list