AccessibleBrowseBoxBase's XAggregation is apparently unused

It had been using WeakAggComponentImplHelper5 ever since at least
f5d6acb1aa "INTEGRATION: CWS a11ysep (1.1.2); FILE
ADDED", but e.g. AccessibleTabListBoxTable deriving from it implements
queryInterface in a way that is incompatible with XAggregation (it should only
have forwarded to AccessibleBrowseBoxTable::queryInterface, and rather
implemented its logic in an AccessibleTabListBoxTable::queryAggregation
override).

Also, without this commit but instead with a local

> diff --git a/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx b/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx
> index d8bcd169ac2e..45797b838167 100644
> --- a/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx
> +++ b/accessibility/inc/extended/AccessibleBrowseBoxBase.hxx
> @@ -63,6 +63,7 @@ class AccessibleBrowseBoxBase :
>      public ::cppu::BaseMutex,
>      public AccessibleBrowseBoxImplHelper
>  {
> +    void SAL_CALL setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { assert(false); }
>  public:
>      /** Constructor sets specified name and description. If the constant of a
>          text is BBTEXT_NONE, the derived class has to set the text via

on all of Linux, macOS, and Windows `make check` still succeeded, and running
the resulting LibreOffice on macOS with the system's VoiceOver enabled, and
doing "LibreOffice - Preferences... - LibreOffice - Advanced" and clicking
around in the "Java runtime environments (JRE) already installed:" table (which
actually uses AccessibleBrowseBoxBase via SvHeaderTabListBox::CreateAccessible
in vcl/source/treelist/svtabbx.cxx) also still succeeded and produced audio, all
without hitting that injected assert that should have fired if the XAggregation
mechanism had been used after all.

Change-Id: Ic213a03adf31bb1754443c1951b9b267f805115b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145477
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann
2023-01-13 14:32:20 +01:00
parent b008831a55
commit 192b0ab41e

View File

@@ -26,7 +26,7 @@
#include <rtl/ustring.hxx>
#include <tools/gen.hxx>
#include <vcl/svapp.hxx>
#include <cppuhelper/compbase5.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/basemutex.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -48,7 +48,7 @@ namespace vcl {
namespace accessibility {
typedef ::cppu::WeakAggComponentImplHelper5<
typedef ::cppu::WeakComponentImplHelper<
css::accessibility::XAccessibleContext,
css::accessibility::XAccessibleComponent,
css::accessibility::XAccessibleEventBroadcaster,