summaryrefslogtreecommitdiff
path: root/stoc/source/corereflection/crcomp.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-12-19 08:44:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-12-19 10:27:01 +0000
commit6600552f80064d548fab86e2e18ca649c6dc3cf0 (patch)
tree715cd6a3dbbc9a560435f4cfc6f0af8c52dcda0f /stoc/source/corereflection/crcomp.cxx
parent40ea23ecdb46dfe4f4677ddbe5cb82d7f71ee592 (diff)
loplugin:implinheritancehelper in stoc
use more ImplInheritanceHelper to reduce boilerplate Change-Id: I2b4937ebee2e8cc16759df0eacdeb160343a7001 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144440 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/corereflection/crcomp.cxx')
-rw-r--r--stoc/source/corereflection/crcomp.cxx54
1 files changed, 3 insertions, 51 deletions
diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx
index 51cf4a6f02e4..990e5a63aa1a 100644
--- a/stoc/source/corereflection/crcomp.cxx
+++ b/stoc/source/corereflection/crcomp.cxx
@@ -35,10 +35,8 @@ namespace stoc_corefl
namespace {
-class IdlCompFieldImpl
- : public IdlMemberImpl
- , public XIdlField
- , public XIdlField2
+typedef cppu::ImplInheritanceHelper<IdlMemberImpl, XIdlField, XIdlField2> IdlCompFieldImpl_Base;
+class IdlCompFieldImpl : public IdlCompFieldImpl_Base
{
sal_Int32 _nOffset;
@@ -46,19 +44,10 @@ public:
IdlCompFieldImpl( IdlReflectionServiceImpl * pReflection, const OUString & rName,
typelib_TypeDescription * pTypeDescr, typelib_TypeDescription * pDeclTypeDescr,
sal_Int32 nOffset )
- : IdlMemberImpl( pReflection, rName, pTypeDescr, pDeclTypeDescr )
+ : IdlCompFieldImpl_Base( pReflection, rName, pTypeDescr, pDeclTypeDescr )
, _nOffset( nOffset )
{}
- // XInterface
- virtual Any SAL_CALL queryInterface( const Type & rType ) override;
- virtual void SAL_CALL acquire() noexcept override;
- virtual void SAL_CALL release() noexcept override;
-
- // XTypeProvider
- virtual Sequence< Type > SAL_CALL getTypes() override;
- virtual Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
-
// XIdlMember
virtual Reference< XIdlClass > SAL_CALL getDeclaringClass() override;
virtual OUString SAL_CALL getName() override;
@@ -73,43 +62,6 @@ public:
}
-// XInterface
-
-Any IdlCompFieldImpl::queryInterface( const Type & rType )
-{
- Any aRet( ::cppu::queryInterface( rType,
- static_cast< XIdlField * >( this ),
- static_cast< XIdlField2 * >( this ) ) );
- return (aRet.hasValue() ? aRet : IdlMemberImpl::queryInterface( rType ));
-}
-
-void IdlCompFieldImpl::acquire() noexcept
-{
- IdlMemberImpl::acquire();
-}
-
-void IdlCompFieldImpl::release() noexcept
-{
- IdlMemberImpl::release();
-}
-
-// XTypeProvider
-
-Sequence< Type > IdlCompFieldImpl::getTypes()
-{
- static cppu::OTypeCollection s_aTypes(
- cppu::UnoType<XIdlField2>::get(),
- cppu::UnoType<XIdlField>::get(),
- IdlMemberImpl::getTypes() );
-
- return s_aTypes.getTypes();
-}
-
-Sequence< sal_Int8 > IdlCompFieldImpl::getImplementationId()
-{
- return css::uno::Sequence<sal_Int8>();
-}
-
// XIdlMember
Reference< XIdlClass > IdlCompFieldImpl::getDeclaringClass()