canvas/source/vcl/canvas.cxx                     |   13 +++++++++++++
 canvas/source/vcl/canvas.hxx                     |    8 +++++++-
 configmgr/source/update.cxx                      |   16 +++++++++++++++-
 forms/source/component/imgprod.cxx               |   14 ++++++++++++++
 forms/source/component/imgprod.hxx               |    6 ++++++
 sd/source/ui/presenter/PresenterHelper.cxx       |   13 +++++++++++++
 sd/source/ui/presenter/PresenterHelper.hxx       |    6 ++++++
 sd/source/ui/presenter/PresenterPreviewCache.cxx |   13 +++++++++++++
 sd/source/ui/presenter/PresenterPreviewCache.hxx |    6 ++++++
 sw/source/filter/ww8/rtfexportfilter.cxx         |   13 +++++++++++++
 sw/source/filter/ww8/rtfexportfilter.hxx         |    8 +++++++-
 vcl/source/app/session.cxx                       |   18 ++++++++++++++++--
 12 files changed, 129 insertions(+), 5 deletions(-)

New commits:
commit 7c36c5fdfdfeab9d15ea733fe2a831cd4ff25d27
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Apr 17 21:33:37 2023 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Tue Apr 18 07:38:29 2023 +0200

    Some missing XServiceInfo implementations
    
    Change-Id: I1cf871b40f9f4020147dac0456ebeed3de0438e6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150533
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/canvas/source/vcl/canvas.cxx b/canvas/source/vcl/canvas.cxx
index 7e38276e06d3..ac73acd96a8f 100644
--- a/canvas/source/vcl/canvas.cxx
+++ b/canvas/source/vcl/canvas.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/lang/NoSupportException.hpp>
 #include <sal/log.hxx>
 #include <comphelper/diagnose_ex.hxx>
+#include <cppuhelper/supportsservice.hxx>
 #include <vcl/outdev.hxx>
 
 #include "outdevholder.hxx"
@@ -96,6 +97,18 @@ namespace vclcanvas
         return "com.sun.star.rendering.Canvas.VCL";
     }
 
+    OUString Canvas::getImplementationName() {
+        return "com.sun.star.comp.rendering.Canvas.VCL";
+    }
+
+    sal_Bool Canvas::supportsService(OUString const & ServiceName) {
+        return cppu::supportsService(this, ServiceName);
+    }
+
+    css::uno::Sequence<OUString> Canvas::getSupportedServiceNames() {
+        return {getServiceName()};
+    }
+
     bool Canvas::repaint( const GraphicObjectSharedPtr& rGrf,
                           const rendering::ViewState&   viewState,
                           const rendering::RenderState& renderState,
diff --git a/canvas/source/vcl/canvas.hxx b/canvas/source/vcl/canvas.hxx
index be7d7858e3ad..8bcbc1f49894 100644
--- a/canvas/source/vcl/canvas.hxx
+++ b/canvas/source/vcl/canvas.hxx
@@ -21,6 +21,7 @@
 
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XServiceName.hpp>
 #include <com/sun/star/util/XUpdatable.hpp>
 #include <com/sun/star/rendering/XBitmapCanvas.hpp>
@@ -48,7 +49,8 @@ namespace vclcanvas
                                              css::lang::XMultiServiceFactory,
                                              css::util::XUpdatable,
                                              css::beans::XPropertySet,
-                                             css::lang::XServiceName >    
GraphicDeviceBase_Base;
+                                             css::lang::XServiceName,
+                                             css::lang::XServiceInfo >    
GraphicDeviceBase_Base;
     typedef ::canvas::GraphicDeviceBase< ::canvas::BaseMutexHelper< 
GraphicDeviceBase_Base >,
                                            DeviceHelper,
                                            tools::LocalGuard,
@@ -96,6 +98,10 @@ namespace vclcanvas
         // XServiceName
         virtual OUString SAL_CALL getServiceName(  ) override;
 
+        OUString SAL_CALL getImplementationName() override;
+        sal_Bool SAL_CALL supportsService(OUString const & ServiceName) 
override;
+        css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() 
override;
+
         // RepaintTarget
         virtual bool repaint( const GraphicObjectSharedPtr&                 
rGrf,
                               const css::rendering::ViewState&              
viewState,
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index 1cc2a06fe2a2..5851a6af05a3 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -23,10 +23,12 @@
 #include <set>
 
 #include <com/sun/star/configuration/XUpdate.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uno/XInterface.hpp>
 #include <cppuhelper/implbase.hxx>
+#include <cppuhelper/supportsservice.hxx>
 #include <cppuhelper/weak.hxx>
 #include <osl/mutex.hxx>
 #include <rtl/ref.hxx>
@@ -50,7 +52,7 @@ std::set< OUString > seqToSet(
 }
 
 class Service:
-    public cppu::WeakImplHelper< css::configuration::XUpdate >
+    public cppu::WeakImplHelper< css::configuration::XUpdate, 
css::lang::XServiceInfo >
 {
 public:
     explicit Service(const css::uno::Reference< css::uno::XComponentContext >& 
context):
@@ -79,6 +81,18 @@ private:
         css::uno::Sequence< OUString > const & includedPaths,
         css::uno::Sequence< OUString > const & excludedPaths) override;
 
+    OUString SAL_CALL getImplementationName() override {
+        return "com.sun.star.comp.configuration.Update";
+    }
+
+    sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override {
+        return cppu::supportsService(this, ServiceName);
+    }
+
+    css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override {
+        return {"com.sun.star.configuration.Update_Service"};
+    }
+
     std::shared_ptr<osl::Mutex> lock_;
     css::uno::Reference< css::uno::XComponentContext > context_;
 };
diff --git a/forms/source/component/imgprod.cxx 
b/forms/source/component/imgprod.cxx
index a496f5bb4aa5..faa8663a2461 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -27,6 +27,7 @@
 #include <vcl/svapp.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <cppuhelper/queryinterface.hxx>
+#include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/awt/ImageStatus.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
 
@@ -176,6 +177,7 @@ css::uno::Any ImageProducer::queryInterface( const 
css::uno::Type & rType )
 {
     css::uno::Any aRet = ::cppu::queryInterface( rType,
                                         static_cast< 
css::lang::XInitialization* >(this),
+                                        static_cast< css::lang::XServiceInfo* 
>(this),
                                         static_cast< css::awt::XImageProducer* 
>(this) );
     return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ));
 }
@@ -481,6 +483,18 @@ void ImageProducer::initialize( const css::uno::Sequence< 
css::uno::Any >& aArgu
     }
 }
 
+OUString ImageProducer::getImplementationName() {
+    return "com.sun.star.form.ImageProducer";
+}
+
+sal_Bool ImageProducer::supportsService(OUString const & ServiceName) {
+    return cppu::supportsService(this, ServiceName);
+}
+
+css::uno::Sequence<OUString> ImageProducer::getSupportedServiceNames() {
+    return {"com.sun.star.awt.ImageProducer"};
+}
+
 
 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
 
com_sun_star_form_ImageProducer_get_implementation(css::uno::XComponentContext*,
diff --git a/forms/source/component/imgprod.hxx 
b/forms/source/component/imgprod.hxx
index 4b68a9fcfeb0..bfcb2c66b0ee 100644
--- a/forms/source/component/imgprod.hxx
+++ b/forms/source/component/imgprod.hxx
@@ -23,6 +23,7 @@
 #include <com/sun/star/awt/XImageConsumer.hpp>
 #include <com/sun/star/awt/XImageProducer.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 #include <cppuhelper/weak.hxx>
 #include <vcl/graph.hxx>
 #include <memory>
@@ -36,6 +37,7 @@ namespace com::sun::star::io { class XInputStream; }
 
 class ImageProducer :   public css::awt::XImageProducer,
                         public css::lang::XInitialization,
+                        public css::lang::XServiceInfo,
                         public ::cppu::OWeakObject
 {
 private:
@@ -85,6 +87,10 @@ public:
     // css::lang::XInitialization
     void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& 
aArguments ) override;
 
+    OUString SAL_CALL getImplementationName() override;
+    sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
+    css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx 
b/sd/source/ui/presenter/PresenterHelper.cxx
index 5be9f2964016..cc85e6353f79 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -24,6 +24,7 @@
 #include "PresenterHelper.hxx"
 #include "PresenterCanvas.hxx"
 #include <cppcanvas/vclfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/awt/XVclWindowPeer.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <toolkit/helper/vclunohelper.hxx>
@@ -54,6 +55,18 @@ PresenterHelper::~PresenterHelper()
 
 void SAL_CALL PresenterHelper::initialize (const Sequence<Any>&) {}
 
+OUString PresenterHelper::getImplementationName() {
+    return "com.sun.star.comp.Draw.PresenterHelper";
+}
+
+sal_Bool PresenterHelper::supportsService(OUString const & ServiceName) {
+    return cppu::supportsService(this, ServiceName);
+}
+
+css::uno::Sequence<OUString> PresenterHelper::getSupportedServiceNames() {
+    return {"com.sun.star.drawing.PresenterHelper"};
+}
+
 //----- XPaneHelper ----------------------------------------------------
 
 Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
diff --git a/sd/source/ui/presenter/PresenterHelper.hxx 
b/sd/source/ui/presenter/PresenterHelper.hxx
index cee7e39fb349..5450447dd60e 100644
--- a/sd/source/ui/presenter/PresenterHelper.hxx
+++ b/sd/source/ui/presenter/PresenterHelper.hxx
@@ -21,6 +21,7 @@
 
 #include <com/sun/star/drawing/XPresenterHelper.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 #include <comphelper/compbase.hxx>
 
 namespace com::sun::star::uno { class XComponentContext; }
@@ -29,6 +30,7 @@ namespace sd::presenter {
 
 typedef comphelper::WeakComponentImplHelper<
     css::lang::XInitialization,
+    css::lang::XServiceInfo,
     css::drawing::XPresenterHelper
 > PresenterHelperInterfaceBase;
 
@@ -48,6 +50,10 @@ public:
 
     virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& 
rArguments) override;
 
+    OUString SAL_CALL getImplementationName() override;
+    sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
+    css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
     // XPresenterHelper
 
     virtual css::uno::Reference<css::awt::XWindow> SAL_CALL createWindow (
diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx 
b/sd/source/ui/presenter/PresenterPreviewCache.cxx
index fd29cdbfac1b..26068492f4fc 100644
--- a/sd/source/ui/presenter/PresenterPreviewCache.cxx
+++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx
@@ -24,6 +24,7 @@
 #include <vcl/bitmapex.hxx>
 #include <sdpage.hxx>
 #include <cppcanvas/vclfactory.hxx>
+#include <cppuhelper/supportsservice.hxx>
 #include <com/sun/star/drawing/XDrawPage.hpp>
 #include <osl/diagnose.h>
 
@@ -91,6 +92,18 @@ void SAL_CALL PresenterPreviewCache::initialize (const 
Sequence<Any>& rArguments
         throw RuntimeException();
 }
 
+OUString PresenterPreviewCache::getImplementationName() {
+    return "com.sun.star.comp.Draw.PresenterPreviewCache";
+}
+
+sal_Bool PresenterPreviewCache::supportsService(OUString const & ServiceName) {
+    return cppu::supportsService(this, ServiceName);
+}
+
+css::uno::Sequence<OUString> PresenterPreviewCache::getSupportedServiceNames() 
{
+    return {"com.sun.star.drawing.PresenterPreviewCache"};
+}
+
 //----- XSlidePreviewCache ----------------------------------------------------
 
 void SAL_CALL PresenterPreviewCache::setDocumentSlides (
diff --git a/sd/source/ui/presenter/PresenterPreviewCache.hxx 
b/sd/source/ui/presenter/PresenterPreviewCache.hxx
index 4f8c522804c3..9c4e5be7145a 100644
--- a/sd/source/ui/presenter/PresenterPreviewCache.hxx
+++ b/sd/source/ui/presenter/PresenterPreviewCache.hxx
@@ -21,6 +21,7 @@
 
 #include <com/sun/star/drawing/XSlidePreviewCache.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 #include <tools/gen.hxx>
 #include <comphelper/compbase.hxx>
 #include <memory>
@@ -31,6 +32,7 @@ namespace sd::presenter {
 
 typedef comphelper::WeakComponentImplHelper<
     css::lang::XInitialization,
+    css::lang::XServiceInfo,
     css::drawing::XSlidePreviewCache
 > PresenterPreviewCacheInterfaceBase;
 
@@ -52,6 +54,10 @@ public:
     */
     virtual void SAL_CALL initialize (const css::uno::Sequence<css::uno::Any>& 
rArguments) override;
 
+    OUString SAL_CALL getImplementationName() override;
+    sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
+    css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
     // XSlidePreviewCache
 
     virtual void SAL_CALL setDocumentSlides (
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx 
b/sw/source/filter/ww8/rtfexportfilter.cxx
index 6fcae65d2376..83016728901d 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -25,6 +25,7 @@
 #include <unotxdoc.hxx>
 #include <viewsh.hxx>
 
+#include <cppuhelper/supportsservice.hxx>
 #include <unotools/mediadescriptor.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 
@@ -95,6 +96,18 @@ void RtfExportFilter::setSourceDocument(const 
uno::Reference<lang::XComponent>&
     m_xSrcDoc = xDoc;
 }
 
+OUString RtfExportFilter::getImplementationName() { return 
"com.sun.star.comp.Writer.RtfExport"; }
+
+sal_Bool RtfExportFilter::supportsService(OUString const& ServiceName)
+{
+    return cppu::supportsService(this, ServiceName);
+}
+
+css::uno::Sequence<OUString> RtfExportFilter::getSupportedServiceNames()
+{
+    return { "com.sun.star.comp.Writer.RtfExport" };
+}
+
 // UNO helpers
 
 extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx 
b/sw/source/filter/ww8/rtfexportfilter.hxx
index 7135f7602d34..d58a6be5a896 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -22,6 +22,7 @@
 
 #include <com/sun/star/document/XFilter.hpp>
 #include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 #include <cppuhelper/implbase.hxx>
 #include <shellio.hxx>
 
@@ -39,7 +40,8 @@ protected:
 
 /// The physical access to the RTF document (for writing).
 class RtfExportFilter final
-    : public cppu::WeakImplHelper<css::document::XFilter, 
css::document::XExporter>
+    : public cppu::WeakImplHelper<css::document::XFilter, 
css::document::XExporter,
+                                  css::lang::XServiceInfo>
 {
     css::uno::Reference<css::uno::XComponentContext> m_xCtx;
     css::uno::Reference<css::lang::XComponent> m_xSrcDoc;
@@ -58,6 +60,10 @@ public:
     void SAL_CALL
     setSourceDocument(const css::uno::Reference<css::lang::XComponent>& xDoc) 
override;
 
+    OUString SAL_CALL getImplementationName() override;
+    sal_Bool SAL_CALL supportsService(OUString const& ServiceName) override;
+    css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+
     Writer& GetWriter() { return m_aWriter; }
 };
 
diff --git a/vcl/source/app/session.cxx b/vcl/source/app/session.cxx
index 9f9313ad6722..d84777764941 100644
--- a/vcl/source/app/session.cxx
+++ b/vcl/source/app/session.cxx
@@ -23,6 +23,7 @@
 
 #include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/compbase.hxx>
+#include <cppuhelper/supportsservice.hxx>
 
 #include <comphelper/diagnose_ex.hxx>
 #include <utility>
@@ -35,6 +36,7 @@
 
 #include <com/sun/star/frame/XSessionManagerClient.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/frame/XSessionManagerListener2.hpp>
 
 #include <vector>
@@ -51,7 +53,7 @@ namespace {
 
 class VCLSession:
     private cppu::BaseMutex,
-    public cppu::WeakComponentImplHelper < XSessionManagerClient >
+    public cppu::WeakComponentImplHelper < XSessionManagerClient, 
css::lang::XServiceInfo >
 {
     struct Listener
     {
@@ -86,6 +88,18 @@ class VCLSession:
     virtual void SAL_CALL saveDone( const css::uno::Reference< 
XSessionManagerListener >& xListener ) override;
     virtual sal_Bool SAL_CALL cancelShutdown() override;
 
+    OUString SAL_CALL getImplementationName() override {
+        return "com.sun.star.frame.VCLSessionManagerClient";
+    }
+
+    sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override {
+        return cppu::supportsService(this, ServiceName);
+    }
+
+    css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override {
+        return {"com.sun.star.frame.SessionManagerClient"};
+    }
+
     void SAL_CALL disposing() override;
 
     void callSaveRequested( bool bShutdown );
@@ -100,7 +114,7 @@ public:
 }
 
 VCLSession::VCLSession()
-        : cppu::WeakComponentImplHelper< XSessionManagerClient >( m_aMutex ),
+        : WeakComponentImplHelper( m_aMutex ),
           m_xSession( ImplGetSVData()->mpDefInst->CreateSalSession() ),
           m_bInteractionRequested( false ),
           m_bInteractionGranted( false ),

Reply via email to