From 652df8c733f381cac4e22286acd12a2ec72d41ae Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 10 Nov 2022 08:58:11 +0100 Subject: sw content controls: drop not needed XServiceInfo impl As noted in , introducing a dedicated css.text.ContentControls service is actually not needed and client code should be fine with just an "anonymous" object returned by getContentControls() + implementing XIndexAccess. Remove it before somebody starts to depend on it. Let's rather have a bit of inconsistency (e.g. SwXFootnotes implements XServiceInfo, while SwXContentControls not) than an XServiceInfo implementation that we'll have to support from now on, without a user. Change-Id: Ifde4fb6bcafdffabb189447415b89b01c9675296 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142511 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sw/source/core/inc/unocontentcontrol.hxx | 8 ++------ sw/source/core/unocore/unocontentcontrol.cxx | 12 ------------ 2 files changed, 2 insertions(+), 18 deletions(-) (limited to 'sw') diff --git a/sw/source/core/inc/unocontentcontrol.hxx b/sw/source/core/inc/unocontentcontrol.hxx index c77aad1d9853..a541313c6e55 100644 --- a/sw/source/core/inc/unocontentcontrol.hxx +++ b/sw/source/core/inc/unocontentcontrol.hxx @@ -156,7 +156,8 @@ public: }; /// UNO wrapper around SwContentControlManager. -class SwXContentControls final : public SwSimpleIndexAccessBaseClass, public SwUnoCollection +class SwXContentControls final : public cppu::WeakImplHelper, + public SwUnoCollection { ~SwXContentControls() override; @@ -170,11 +171,6 @@ public: // XElementAccess css::uno::Type SAL_CALL getElementType() override; sal_Bool SAL_CALL hasElements() override; - - // XServiceInfo - OUString SAL_CALL getImplementationName() override; - sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override; - css::uno::Sequence SAL_CALL getSupportedServiceNames() override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/unocore/unocontentcontrol.cxx b/sw/source/core/unocore/unocontentcontrol.cxx index fbded5b45baf..175e12f35165 100644 --- a/sw/source/core/unocore/unocontentcontrol.cxx +++ b/sw/source/core/unocore/unocontentcontrol.cxx @@ -1359,16 +1359,4 @@ sal_Bool SwXContentControls::hasElements() return !GetDoc()->GetContentControlManager().IsEmpty(); } -OUString SwXContentControls::getImplementationName() { return "SwXContentControls"; } - -sal_Bool SwXContentControls::supportsService(const OUString& rServiceName) -{ - return cppu::supportsService(this, rServiceName); -} - -uno::Sequence SwXContentControls::getSupportedServiceNames() -{ - return { "com.sun.star.text.ContentControls" }; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit