include/comphelper/accessiblecomponenthelper.hxx |    8 ++++----
 svx/source/inc/charmapacc.hxx                    |    1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 941ab8acf0765131fb9d0af560846293f3768d13
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Wed Jan 11 11:39:35 2023 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Thu Jan 12 08:12:44 2023 +0000

    comphelper::OCommonAccessibleComponent's XAggregation is apparently unused
    
    It had been using WeakAggComponentImplHelper2 ever since
    2f79d5f4794ec7f076bb290702b4c9c0afb2a6c8 "initial checkin - helper for
    implementing an XAccessibleContext", but all the classes that derive from it
    (comphelper::OAccessibleComponentHelper,
    comphelper::OAccessibleExtendedComponentHelper, and classes that in turn 
derive
    from those) implement queryInterface (in a way not just forwarding to the 
base
    class queryInterface, as would be required for classes implementing
    XAggregation) rather than queryAggregation, so aggregation was broken and 
any
    delegator would be ignored when calling queryInterface on one of the derived
    classes.
    
    Also, without this commit but instead with a local
    
    > --- a/include/comphelper/accessiblecomponenthelper.hxx
    > +++ b/include/comphelper/accessiblecomponenthelper.hxx
    > @@ -49,6 +49,7 @@ namespace comphelper
    >                  :public ::cppu::BaseMutex
    >                  ,public OCommonAccessibleComponent_Base
    >      {
    > +        void SAL_CALL 
setDelegator(css::uno::Reference<css::uno::XInterface> const &) final { 
assert(false); }
    >          friend class OContextEntryGuard;
    >      private:
    >          css::uno::WeakReference< css::accessibility::XAccessible > 
m_aCreator;         // the XAccessible which created our XAccessibleContext
    
    on all of Linux, macOS, and Windows: `make check` still succeeded, and 
running
    the resulting LibreOffice with the system in some assistive technology 
narration
    mode produced audio, all without hitting that injected assert that should 
have
    fired if the XAggregation mechanism had been used after all.
    
    Change-Id: I47045824d0762a5f3de150a11576694621b163b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145330
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/include/comphelper/accessiblecomponenthelper.hxx 
b/include/comphelper/accessiblecomponenthelper.hxx
index 0c738d0e6df0..8743b322a4d8 100644
--- a/include/comphelper/accessiblecomponenthelper.hxx
+++ b/include/comphelper/accessiblecomponenthelper.hxx
@@ -26,7 +26,7 @@
 #include <com/sun/star/accessibility/XAccessibleExtendedComponent.hpp>
 #include <comphelper/accessibleeventnotifier.hxx>
 #include <cppuhelper/basemutex.hxx>
-#include <cppuhelper/compbase2.hxx>
+#include <cppuhelper/compbase.hxx>
 #include <cppuhelper/implbase1.hxx>
 #include <comphelper/uno3.hxx>
 #include <comphelper/comphelperdllapi.h>
@@ -38,9 +38,9 @@ namespace comphelper
 
     //= OCommonAccessibleComponent
 
-    typedef ::cppu::WeakAggComponentImplHelper2 <   
css::accessibility::XAccessibleContext2,
-                                                    
css::accessibility::XAccessibleEventBroadcaster
-                                                >   
OCommonAccessibleComponent_Base;
+    typedef ::cppu::WeakComponentImplHelper <   
css::accessibility::XAccessibleContext2,
+                                                
css::accessibility::XAccessibleEventBroadcaster
+                                            >   
OCommonAccessibleComponent_Base;
 
     /** base class encapsulating common functionality for the helper classes 
implementing
         the XAccessibleComponent respectively XAccessibleExtendendComponent
diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx
index 3831c3485ccf..201f53db3f37 100644
--- a/svx/source/inc/charmapacc.hxx
+++ b/svx/source/inc/charmapacc.hxx
@@ -23,6 +23,7 @@
 #include <comphelper/accessibleselectionhelper.hxx>
 #include <com/sun/star/accessibility/XAccessibleAction.hpp>
 #include <com/sun/star/accessibility/XAccessibleTable.hpp>
+#include <cppuhelper/implbase2.hxx>
 #include <tools/gen.hxx>
 #include <rtl/ref.hxx>
 

Reply via email to