diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-11-10 08:58:11 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-11-10 09:58:25 +0100 |
commit | 652df8c733f381cac4e22286acd12a2ec72d41ae (patch) | |
tree | f20b5504244dd890b18d25749212de0e466bd15b /sw | |
parent | 397f5daa850e59f0f4d3881cb99d110b50e34e3d (diff) |
sw content controls: drop not needed XServiceInfo impl
As noted in
<https://gerrit.libreoffice.org/c/core/+/142454/3#message-18fe8bb36fc24d317ad16dd25e236ed51c88a910>,
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 <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/unocontentcontrol.hxx | 8 | ||||
-rw-r--r-- | sw/source/core/unocore/unocontentcontrol.cxx | 12 |
2 files changed, 2 insertions, 18 deletions
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<css::container::XIndexAccess>, + 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<OUString> 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<OUString> SwXContentControls::getSupportedServiceNames() -{ - return { "com.sun.star.text.ContentControls" }; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |