summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-09-07 08:41:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-09-07 13:37:23 +0200
commit7bc010d624215b3d1830546e5c6f0a24567c54f4 (patch)
tree3cfd60c91350beee89aede2847b012d3b448bce4
parentbe8b031d8b3c66b223ea2478f1129427f3a362bd (diff)
SvxUnoDrawPool 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: I50283dff8832557ffaa9074532a2245210dc6d7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156633 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/svx/unopool.hxx13
-rw-r--r--sd/source/ui/unoidl/unopool.cxx2
-rw-r--r--svx/source/unodraw/unopool.cxx10
3 files changed, 9 insertions, 16 deletions
diff --git a/include/svx/unopool.hxx b/include/svx/unopool.hxx
index 9e86c957a27f..331a8e4ae67e 100644
--- a/include/svx/unopool.hxx
+++ b/include/svx/unopool.hxx
@@ -23,7 +23,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <comphelper/propertysethelper.hxx>
-#include <cppuhelper/weakagg.hxx>
+#include <comphelper/compbase.hxx>
#include <svx/svxdllapi.h>
#include <svl/itempool.hxx>
@@ -36,9 +36,9 @@ class SfxItemPool;
The class can work in a read only mode without a model. Derivated
classes can set a model on demand by overriding getModelPool().
*/
-class SVX_DLLPUBLIC SvxUnoDrawPool : public ::cppu::OWeakAggObject,
- public css::lang::XServiceInfo,
- public css::lang::XTypeProvider,
+typedef ::comphelper::WeakComponentImplHelper<css::lang::XServiceInfo> SvxUnoDrawPool_Base;
+
+class SVX_DLLPUBLIC SvxUnoDrawPool : public SvxUnoDrawPool_Base,
public comphelper::PropertySetHelper
{
public:
@@ -60,12 +60,11 @@ public:
virtual css::uno::Any _getPropertyDefault( const comphelper::PropertyMapEntry* pEntry ) override;
// 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
- { OWeakAggObject::acquire(); }
+ { OWeakObject::acquire(); }
virtual void SAL_CALL release() noexcept override
- { OWeakAggObject::release(); }
+ { OWeakObject::release(); }
// XTypeProvider
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
diff --git a/sd/source/ui/unoidl/unopool.cxx b/sd/source/ui/unoidl/unopool.cxx
index 5791aa6984ed..6a4124bcfe62 100644
--- a/sd/source/ui/unoidl/unopool.cxx
+++ b/sd/source/ui/unoidl/unopool.cxx
@@ -83,7 +83,7 @@ void SdUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEnt
uno::Reference< uno::XInterface > SdUnoCreatePool( SdDrawDocument* pDrawModel )
{
- return static_cast<uno::XAggregation*>(new SdUnoDrawPool( pDrawModel ));
+ return static_cast<cppu::OWeakObject*>(new SdUnoDrawPool( pDrawModel ));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index eb897556eff9..5dc577a3e87b 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -40,7 +40,7 @@ using namespace ::com::sun::star;
using namespace ::cppu;
SvxUnoDrawPool::SvxUnoDrawPool(SdrModel* pModel, rtl::Reference<comphelper::PropertySetInfo> const & xDefaults)
-: PropertySetHelper( xDefaults ), mpModel( pModel )
+: SvxUnoDrawPool_Base(), PropertySetHelper( xDefaults ), mpModel( pModel )
{
init();
}
@@ -308,11 +308,6 @@ uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry
uno::Any SAL_CALL SvxUnoDrawPool::queryInterface( const uno::Type & rType )
{
- return OWeakAggObject::queryInterface( rType );
-}
-
-uno::Any SAL_CALL SvxUnoDrawPool::queryAggregation( const uno::Type & rType )
-{
uno::Any aAny;
if( rType == cppu::UnoType<lang::XServiceInfo>::get())
@@ -326,7 +321,7 @@ uno::Any SAL_CALL SvxUnoDrawPool::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;
}
@@ -334,7 +329,6 @@ uno::Any SAL_CALL SvxUnoDrawPool::queryAggregation( const uno::Type & rType )
uno::Sequence< uno::Type > SAL_CALL SvxUnoDrawPool::getTypes()
{
static const uno::Sequence aTypes {
- cppu::UnoType<uno::XAggregation>::get(),
cppu::UnoType<lang::XServiceInfo>::get(),
cppu::UnoType<lang::XTypeProvider>::get(),
cppu::UnoType<beans::XPropertySet>::get(),