svtools/source/graphic/renderer.cxx |   19 +++++--------------
 svtools/source/uno/unoimap.cxx      |   16 ++++------------
 2 files changed, 9 insertions(+), 26 deletions(-)

New commits:
commit 8d8afabeab1e93c42d13496a855f0ad4efd2e9cd
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Sep 10 12:13:23 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Sep 10 19:04:08 2023 +0200

    SvUnoImageMapObject does not need to implement XAggreggation
    
    Checked on jenkins using 'make check' and
    
    +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const 
&) final { assert(false); }
    
    Change-Id: I79cf929cc64ea7af7351674e02fb0bc83538c869
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156792
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx
index 210e580818c0..1776f2ce7305 100644
--- a/svtools/source/uno/unoimap.cxx
+++ b/svtools/source/uno/unoimap.cxx
@@ -28,7 +28,6 @@
 #include <comphelper/servicehelper.hxx>
 #include <comphelper/propertysethelper.hxx>
 #include <comphelper/propertysetinfo.hxx>
-#include <cppuhelper/weakagg.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <algorithm>
@@ -64,7 +63,7 @@ const sal_Int32 HANDLE_TITLE = 10;
 
 namespace {
 
-class SvUnoImageMapObject : public OWeakAggObject,
+class SvUnoImageMapObject : public OWeakObject,
                             public XEventsSupplier,
                             public XServiceInfo,
                             public PropertySetHelper,
@@ -83,7 +82,6 @@ public:
     virtual void _getPropertyValues( const PropertyMapEntry** ppEntries, Any* 
pValue ) override;
 
     // XInterface
-    virtual Any SAL_CALL queryAggregation( const Type & rType ) override;
     virtual Any SAL_CALL queryInterface( const Type & rType ) override;
     virtual void SAL_CALL acquire() noexcept override;
     virtual void SAL_CALL release() noexcept override;
@@ -293,11 +291,6 @@ std::unique_ptr<IMapObject> 
SvUnoImageMapObject::createIMapObject() const
 // XInterface
 
 Any SAL_CALL SvUnoImageMapObject::queryInterface( const Type & rType )
-{
-    return OWeakAggObject::queryInterface( rType );
-}
-
-Any SAL_CALL SvUnoImageMapObject::queryAggregation( const Type & rType )
 {
     Any aAny;
 
@@ -312,25 +305,24 @@ Any SAL_CALL SvUnoImageMapObject::queryAggregation( const 
Type & rType )
     else if( rType == cppu::UnoType<XMultiPropertySet>::get())
         aAny <<= Reference< XMultiPropertySet >(this);
     else
-        aAny = OWeakAggObject::queryAggregation( rType );
+        aAny = OWeakObject::queryInterface( rType );
 
     return aAny;
 }
 
 void SAL_CALL SvUnoImageMapObject::acquire() noexcept
 {
-    OWeakAggObject::acquire();
+    OWeakObject::acquire();
 }
 
 void SAL_CALL SvUnoImageMapObject::release() noexcept
 {
-    OWeakAggObject::release();
+    OWeakObject::release();
 }
 
 uno::Sequence< uno::Type > SAL_CALL SvUnoImageMapObject::getTypes()
 {
     static const uno::Sequence< uno::Type > aTypes {
-        cppu::UnoType<XAggregation>::get(),
         cppu::UnoType<XEventsSupplier>::get(),
         cppu::UnoType<XServiceInfo>::get(),
         cppu::UnoType<XPropertySet>::get(),
commit 83dea83cc5079c615923910727b95ef89a1936cc
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Sep 10 12:27:29 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sun Sep 10 19:03:56 2023 +0200

    GraphicRendererVCL does not need to implement XAggreggation
    
    Checked on jenkins using 'make check' and
    
    +void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const 
&) final { assert(false); }
    
    Change-Id: Ie2ee4b774167dd5f26ac88b97b0a5013ff379ac3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156793
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svtools/source/graphic/renderer.cxx 
b/svtools/source/graphic/renderer.cxx
index d031026b1317..e5988af75336 100644
--- a/svtools/source/graphic/renderer.cxx
+++ b/svtools/source/graphic/renderer.cxx
@@ -30,7 +30,6 @@
 #include <comphelper/propertysethelper.hxx>
 #include <comphelper/propertysetinfo.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <cppuhelper/weakagg.hxx>
 #include <rtl/ref.hxx>
 #include <vcl/GraphicObject.hxx>
 #include <vcl/outdev.hxx>
@@ -43,7 +42,7 @@ using namespace ::com::sun::star;
 
 namespace {
 
-class GraphicRendererVCL : public ::cppu::OWeakAggObject,
+class GraphicRendererVCL : public ::cppu::OWeakObject,
                            public css::lang::XServiceInfo,
                            public css::lang::XTypeProvider,
                            public ::comphelper::PropertySetHelper,
@@ -56,7 +55,6 @@ public:
     GraphicRendererVCL();
 
     // XInterface
-    virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & 
rType ) override;
     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;
@@ -92,7 +90,7 @@ GraphicRendererVCL::GraphicRendererVCL() :
 {
 }
 
-uno::Any SAL_CALL GraphicRendererVCL::queryAggregation( const uno::Type & 
rType )
+uno::Any SAL_CALL GraphicRendererVCL::queryInterface( const uno::Type & rType )
 {
     uno::Any aAny;
 
@@ -109,29 +107,23 @@ uno::Any SAL_CALL GraphicRendererVCL::queryAggregation( 
const uno::Type & rType
     else if( rType == cppu::UnoType<graphic::XGraphicRenderer>::get())
         aAny <<= uno::Reference< graphic::XGraphicRenderer >(this);
     else
-        aAny = OWeakAggObject::queryAggregation( rType );
+        aAny = OWeakObject::queryInterface( rType );
 
     return aAny;
 }
 
 
-uno::Any SAL_CALL GraphicRendererVCL::queryInterface( const uno::Type & rType )
-{
-    return OWeakAggObject::queryInterface( rType );
-}
-
-
 void SAL_CALL GraphicRendererVCL::acquire()
     noexcept
 {
-    OWeakAggObject::acquire();
+    OWeakObject::acquire();
 }
 
 
 void SAL_CALL GraphicRendererVCL::release()
     noexcept
 {
-    OWeakAggObject::release();
+    OWeakObject::release();
 }
 
 
@@ -155,7 +147,6 @@ uno::Sequence< OUString > SAL_CALL 
GraphicRendererVCL::getSupportedServiceNames(
 uno::Sequence< uno::Type > SAL_CALL GraphicRendererVCL::getTypes()
 {
     static const uno::Sequence< uno::Type >  aTypes {
-        cppu::UnoType<uno::XAggregation>::get(),
         cppu::UnoType<lang::XServiceInfo>::get(),
         cppu::UnoType<lang::XTypeProvider>::get(),
         cppu::UnoType<beans::XPropertySet>::get(),

Reply via email to