summaryrefslogtreecommitdiff
path: root/xmlhelp/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-12-19 08:46:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-12-20 06:05:05 +0000
commit5465a60ec2637707479487f839341da5dc8fd2cd (patch)
tree794711909a783e9345d9f1aec35c3effbef2351b /xmlhelp/source
parent5cb7fed2a5a02ff1cb4551752a0bd8d3001a1f22 (diff)
loplugin:implinheritancehelper in xmlhelp
use more ImplInheritanceHelper to reduce boilerplate Change-Id: Ie8104d40dd13b02f19bcaf1806255446d17b25a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144443 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmlhelp/source')
-rw-r--r--xmlhelp/source/cxxhelp/provider/provider.cxx49
-rw-r--r--xmlhelp/source/cxxhelp/provider/provider.hxx17
2 files changed, 3 insertions, 63 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx
index c98d3704ceb1..eb28f5a9ca37 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.cxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.cxx
@@ -43,7 +43,7 @@ using namespace chelp;
// ContentProvider Implementation.
ContentProvider::ContentProvider( const uno::Reference< uno::XComponentContext >& rxContext )
- : ::ucbhelper::ContentProviderImplHelper( rxContext )
+ : ContentProvider_Base( rxContext )
, isInitialized( false )
{
}
@@ -53,53 +53,6 @@ ContentProvider::~ContentProvider()
{
}
-// XInterface methods.
-void SAL_CALL ContentProvider::acquire()
- noexcept
-{
- OWeakObject::acquire();
-}
-
-void SAL_CALL ContentProvider::release()
- noexcept
-{
- OWeakObject::release();
-}
-
-css::uno::Any SAL_CALL ContentProvider::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< ucb::XContentProvider* >(this),
- static_cast< lang::XComponent* >(this),
- static_cast< lang::XEventListener* >(this),
- static_cast< container::XContainerListener* >(this)
- );
- return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
-}
-
-// XTypeProvider methods.
-
-css::uno::Sequence< sal_Int8 > SAL_CALL ContentProvider::getImplementationId()
-{
- return css::uno::Sequence<sal_Int8>();
-}
-
-css::uno::Sequence< css::uno::Type > SAL_CALL ContentProvider::getTypes()
-{
- static cppu::OTypeCollection ourTypeCollection(
- cppu::UnoType<lang::XTypeProvider>::get(),
- cppu::UnoType<lang::XServiceInfo>::get(),
- cppu::UnoType<ucb::XContentProvider>::get(),
- cppu::UnoType<lang::XComponent>::get(),
- cppu::UnoType<container::XContainerListener>::get()
- );
-
- return ourTypeCollection.getTypes();
-}
-
-
// XServiceInfo methods.
OUString SAL_CALL ContentProvider::getImplementationName()
diff --git a/xmlhelp/source/cxxhelp/provider/provider.hxx b/xmlhelp/source/cxxhelp/provider/provider.hxx
index 59ee39d828b3..2989d7f85cfc 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.hxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.hxx
@@ -39,10 +39,8 @@ inline constexpr OUStringLiteral MYUCP_CONTENT_TYPE = u"application/vnd.sun.star
class Databases;
- class ContentProvider :
- public ::ucbhelper::ContentProviderImplHelper,
- public css::container::XContainerListener,
- public css::lang::XComponent
+ typedef cppu::ImplInheritanceHelper< ::ucbhelper::ContentProviderImplHelper, css::container::XContainerListener, css::lang::XComponent> ContentProvider_Base;
+ class ContentProvider : public ContentProvider_Base
{
public:
explicit ContentProvider(
@@ -50,17 +48,6 @@ inline constexpr OUStringLiteral MYUCP_CONTENT_TYPE = u"application/vnd.sun.star
virtual ~ContentProvider() override;
- // XInterface
- virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
- virtual void SAL_CALL acquire()
- noexcept override;
- virtual void SAL_CALL release()
- noexcept override;
-
- // XTypeProvider
- virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
- virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
-
// XServiceInfo
virtual OUString SAL_CALL getImplementationName() override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;