Base BaseControl on WeakComponentImplHelper

Desktop / LibreOffice - Stephan Bergmann [redhat.com] - 20 January 2023 17:18 UTC

...rather than on the deprecated OComponentHelper.

Various classes like BaseContainerControl, FrameControl, and ProgressBar, all deriving from BaseControl, had been found to implement their respective queryInterface in a way that is incompatible with the XAggregation protocol inherited via OComponentHelper. It looks like no code actually made use of the XAggregation offered by this class hierarchy, so the easiest fix for those queryInterface implementations appears to switch from OComponentHelper to WeakComponentImplHelper.

Ideally, BaseControl would derive from WeakComponentImplHelper covering all the UNO interface classes from which it currently derives manually. But changing that manual implementation across the BaseControl class Hierarchy looks tricky, so merely introduce an "empty" WeakComponentImplHelper<> for now and keep all the manual stuff, and leave proper clean up for later.

Change-Id: I1aa8b06f78700008f844415818f4a5801daa89b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145902

99ac0876bd2e Base BaseControl on WeakComponentImplHelper
UnoControls/inc/basecontainercontrol.hxx | 8 +--
UnoControls/inc/basecontrol.hxx | 19 +-----
UnoControls/source/base/basecontainercontrol.cxx | 51 +++++----------
UnoControls/source/base/basecontrol.cxx | 79 ++++++++----------------
UnoControls/source/base/multiplexer.cxx | 2 +-
UnoControls/source/controls/framecontrol.cxx | 55 +++++------------
UnoControls/source/controls/progressbar.cxx | 47 ++++----------
UnoControls/source/controls/progressmonitor.cxx | 48 ++++----------
UnoControls/source/controls/statusindicator.cxx | 47 ++++----------
UnoControls/source/inc/framecontrol.hxx | 6 --
UnoControls/source/inc/progressbar.hxx | 4 --
UnoControls/source/inc/progressmonitor.hxx | 4 --
UnoControls/source/inc/statusindicator.hxx | 4 --
13 files changed, 97 insertions(+), 277 deletions(-)

Upstream: cgit.freedesktop.org


  • Share