svx/source/unogallery/unogalitem.cxx | 14 ++++---------- svx/source/unogallery/unogalitem.hxx | 11 ++++------- 2 files changed, 8 insertions(+), 17 deletions(-)
New commits: commit 4b814e8db4ce5f233c4bea041f90b6893084ede0 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Sep 7 09:34:52 2023 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Sep 7 18:41:46 2023 +0200 GalleryItem 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: I136a7b51ba7d5500876dcd8892f1165334daa15f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156643 Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx index c08e182a46aa..5e72a25c0a28 100644 --- a/svx/source/unogallery/unogalitem.cxx +++ b/svx/source/unogallery/unogalitem.cxx @@ -70,7 +70,7 @@ bool GalleryItem::isValid() const } -uno::Any SAL_CALL GalleryItem::queryAggregation( const uno::Type & rType ) +uno::Any SAL_CALL GalleryItem::queryInterface( const uno::Type & rType ) { uno::Any aAny; @@ -87,29 +87,23 @@ uno::Any SAL_CALL GalleryItem::queryAggregation( const uno::Type & rType ) else if( rType == cppu::UnoType<beans::XMultiPropertySet>::get()) aAny <<= uno::Reference< beans::XMultiPropertySet >(this); else - aAny = OWeakAggObject::queryAggregation( rType ); + aAny = OWeakObject::queryInterface( rType ); return aAny; } -uno::Any SAL_CALL GalleryItem::queryInterface( const uno::Type & rType ) -{ - return OWeakAggObject::queryInterface( rType ); -} - - void SAL_CALL GalleryItem::acquire() noexcept { - OWeakAggObject::acquire(); + OWeakObject::acquire(); } void SAL_CALL GalleryItem::release() noexcept { - OWeakAggObject::release(); + OWeakObject::release(); } diff --git a/svx/source/unogallery/unogalitem.hxx b/svx/source/unogallery/unogalitem.hxx index 42bc0ba603cf..5674739a8aa7 100644 --- a/svx/source/unogallery/unogalitem.hxx +++ b/svx/source/unogallery/unogalitem.hxx @@ -26,7 +26,7 @@ #include <com/sun/star/gallery/XGalleryItem.hpp> #include <comphelper/propertysethelper.hxx> #include <comphelper/propertysetinfo.hxx> -#include <cppuhelper/weakagg.hxx> +#include <comphelper/compbase.hxx> class GalleryTheme; struct GalleryObject; @@ -34,12 +34,10 @@ namespace unogallery { class GalleryTheme; } namespace unogallery { +typedef ::comphelper::WeakComponentImplHelper<css::lang::XServiceInfo, css::gallery::XGalleryItem> GalleryItem_Base; -class GalleryItem final : public ::cppu::OWeakAggObject, - public css::lang::XServiceInfo, - public css::lang::XTypeProvider, - public css::gallery::XGalleryItem, - public ::comphelper::PropertySetHelper +class GalleryItem final : public GalleryItem_Base, + public ::comphelper::PropertySetHelper { friend class ::unogallery::GalleryTheme; @@ -53,7 +51,6 @@ public: private: // 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;