summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-01-19 09:42:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-01-19 09:53:24 +0000
commit579d144290c1617fdb38d09b30900a6bbe390b8d (patch)
tree5ebe23ff58be92041a8cb0d07e9e19deed659bd7 /toolkit
parentede696562a38a8ffe5c27b397108ee1f59716ae3 (diff)
Fix some toolkit UnoControlBase derivates' queryAggregation
The base UnoControl uses WeakAggImplHelper9, so (for better or worse) derives from XAggregation, but UnoGridControl, UnoRoadmapControl, and UnoTreeControl all failed to properly implement the XAggregation protocol. Change-Id: Ia1676782e616216f645dc86ba978c2f5887dc508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145767 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/inc/controls/roadmapcontrol.hxx4
-rw-r--r--toolkit/source/controls/grid/gridcontrol.hxx4
-rw-r--r--toolkit/source/controls/roadmapcontrol.cxx9
-rw-r--r--toolkit/source/controls/tree/treecontrol.cxx4
4 files changed, 15 insertions, 6 deletions
diff --git a/toolkit/inc/controls/roadmapcontrol.hxx b/toolkit/inc/controls/roadmapcontrol.hxx
index 2a4a1021e0ad..cfc7fbdb9c74 100644
--- a/toolkit/inc/controls/roadmapcontrol.hxx
+++ b/toolkit/inc/controls/roadmapcontrol.hxx
@@ -168,7 +168,9 @@ namespace toolkit
// XTypeProvider
DECLARE_XTYPEPROVIDER( )
- DECLARE_XINTERFACE()
+ DECLARE_UNO3_AGG_DEFAULTS(UnoRoadmapControl, UnoControlRoadmap_Base)
+
+ css::uno::Any SAL_CALL queryAggregation(css::uno::Type const & aType) override;
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName() override;
diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx
index 6b4f8152bbd0..435ff2fab089 100644
--- a/toolkit/source/controls/grid/gridcontrol.hxx
+++ b/toolkit/source/controls/grid/gridcontrol.hxx
@@ -25,7 +25,7 @@
#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/controls/unocontrolmodel.hxx>
-#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/implbase2.hxx>
#include <toolkit/helper/listenermultiplexer.hxx>
#include <memory>
@@ -78,7 +78,7 @@ public:
// = UnoGridControl
-typedef ::cppu::ImplInheritanceHelper < UnoControlBase
+typedef ::cppu::AggImplInheritanceHelper2 < UnoControlBase
, css::awt::grid::XGridControl
, css::awt::grid::XGridRowSelection
> UnoGridControl_Base;
diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx
index 2640dc6b5b67..84d49a78f48b 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -362,7 +362,14 @@ static void lcl_throwIndexOutOfBoundsException( )
}
IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoRoadmapControl, UnoControlRoadmap_Base, UnoControlRoadmap_IBase )
-IMPLEMENT_FORWARD_XINTERFACE2( UnoRoadmapControl, UnoControlRoadmap_Base, UnoControlRoadmap_IBase )
+
+css::uno::Any UnoRoadmapControl::queryAggregation(css::uno::Type const & aType) {
+ auto ret = UnoControlRoadmap_Base::queryAggregation(aType);
+ if (!ret.hasValue()) {
+ ret = UnoControlRoadmap_IBase::queryInterface(aType);
+ }
+ return ret;
+}
sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel >& _rModel)
diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index d4439a4ff1e3..43d353079f43 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -27,7 +27,7 @@
#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/helper/property.hxx>
#include <osl/diagnose.h>
-#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/implbase1.hxx>
#include <helper/unopropertyarrayhelper.hxx>
@@ -120,7 +120,7 @@ Reference< XPropertySetInfo > UnoTreeModel::getPropertySetInfo( )
namespace {
-typedef ::cppu::ImplInheritanceHelper< UnoControlBase, css::awt::tree::XTreeControl > UnoTreeControl_Base;
+typedef ::cppu::AggImplInheritanceHelper1< UnoControlBase, css::awt::tree::XTreeControl > UnoTreeControl_Base;
class UnoTreeControl : public UnoTreeControl_Base
{
public: