From 8035df9dae15cea92ea105135fe86e87467f8ed9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 5 Dec 2022 15:55:12 +0200 Subject: tdf#151847 Some chart UNO objects were not advertising their types property which means that accessin them from python and trying to use the XPropertySet and related interfaces doesn't work nicely Change-Id: I873f6a6fcb048e7f8244313cd737c04b003259a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143675 Tested-by: Jenkins Reviewed-by: Noel Grandin --- chart2/source/model/inc/StockBar.hxx | 3 +++ chart2/source/model/main/PageBackground.cxx | 8 ++++++++ chart2/source/model/main/PageBackground.hxx | 3 +++ chart2/source/model/main/StockBar.cxx | 8 ++++++++ chart2/source/model/main/Wall.cxx | 8 ++++++++ chart2/source/model/main/Wall.hxx | 3 +++ 6 files changed, 33 insertions(+) (limited to 'chart2') diff --git a/chart2/source/model/inc/StockBar.hxx b/chart2/source/model/inc/StockBar.hxx index dd8160574fd2..dbc357ea46fc 100644 --- a/chart2/source/model/inc/StockBar.hxx +++ b/chart2/source/model/inc/StockBar.hxx @@ -53,6 +53,9 @@ public: private: explicit StockBar( const StockBar & rOther ); + // ____ XTypeProvider ____ + virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; + // ____ OPropertySet ____ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override; diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx index 0849f9224f99..b617203186c9 100644 --- a/chart2/source/model/main/PageBackground.cxx +++ b/chart2/source/model/main/PageBackground.cxx @@ -124,6 +124,14 @@ PageBackground::PageBackground( const PageBackground & rOther ) : PageBackground::~PageBackground() {} +// ____ XTypeProvider ____ +uno::Sequence< css::uno::Type > SAL_CALL PageBackground::getTypes() +{ + return ::comphelper::concatSequences( + impl::PageBackground_Base::getTypes(), + ::property::OPropertySet::getTypes()); +} + // ____ XCloneable ____ uno::Reference< util::XCloneable > SAL_CALL PageBackground::createClone() { diff --git a/chart2/source/model/main/PageBackground.hxx b/chart2/source/model/main/PageBackground.hxx index 3bc2dcfd0224..15c32234c839 100644 --- a/chart2/source/model/main/PageBackground.hxx +++ b/chart2/source/model/main/PageBackground.hxx @@ -58,6 +58,9 @@ public: explicit PageBackground( const PageBackground & rOther ); + // ____ XTypeProvider ____ + virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; + // ____ OPropertySet ____ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override; diff --git a/chart2/source/model/main/StockBar.cxx b/chart2/source/model/main/StockBar.cxx index fcc60846bf67..f319478e07bf 100644 --- a/chart2/source/model/main/StockBar.cxx +++ b/chart2/source/model/main/StockBar.cxx @@ -131,6 +131,14 @@ StockBar::StockBar( const StockBar & rOther ) : StockBar::~StockBar() {} +// ____ XTypeProvider ____ +uno::Sequence< css::uno::Type > SAL_CALL StockBar::getTypes() +{ + return ::comphelper::concatSequences( + impl::StockBar_Base::getTypes(), + ::property::OPropertySet::getTypes()); +} + // ____ XCloneable ____ uno::Reference< util::XCloneable > SAL_CALL StockBar::createClone() { diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx index 1727cbf317db..f139a3e9d11f 100644 --- a/chart2/source/model/main/Wall.cxx +++ b/chart2/source/model/main/Wall.cxx @@ -119,6 +119,14 @@ Wall::Wall( const Wall & rOther ) : Wall::~Wall() {} +// ____ XTypeProvider ____ +uno::Sequence< css::uno::Type > SAL_CALL Wall::getTypes() +{ + return ::comphelper::concatSequences( + impl::Wall_Base::getTypes(), + ::property::OPropertySet::getTypes()); +} + // ____ XCloneable ____ uno::Reference< util::XCloneable > SAL_CALL Wall::createClone() { diff --git a/chart2/source/model/main/Wall.hxx b/chart2/source/model/main/Wall.hxx index ddec92b6c876..696772438d75 100644 --- a/chart2/source/model/main/Wall.hxx +++ b/chart2/source/model/main/Wall.hxx @@ -52,6 +52,9 @@ public: explicit Wall( const Wall & rOther ); + // ____ XTypeProvider ____ + virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override; + // ____ OPropertySet ____ virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override; -- cgit