comphelper/source/misc/accessiblewrapper.cxx     |   33 ++++-------------------
 include/comphelper/accessiblewrapper.hxx         |    9 ------
 svx/source/accessibility/ChildrenManagerImpl.cxx |    3 --
 3 files changed, 8 insertions(+), 37 deletions(-)

New commits:
commit be07b0ae141ba9e59a5651ccd381d14d40a9f4d5
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed May 21 18:28:48 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu May 22 05:52:42 2025 +0200

    svx a11y: Drop unnecessary static_cast
    
    Change-Id: Id787572bc2542655733289bd73c55d98dc40ed67
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185626
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx 
b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 2bcad6d8332f..2137b309d03b 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -710,8 +710,7 @@ void ChildrenManagerImpl::impl_dispose()
             xController, uno::UNO_QUERY);
         if (xSelectionSupplier.is())
         {
-            xSelectionSupplier->removeSelectionChangeListener (
-                static_cast<view::XSelectionChangeListener*>(this));
+            xSelectionSupplier->removeSelectionChangeListener(this);
         }
     }
     catch( uno::RuntimeException&)
commit c9fb4e4b5b82d6ff39268dd2025ec722b44e3fd5
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed May 21 16:43:21 2025 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Thu May 22 05:52:36 2025 +0200

    a11y: Merge OAccessibleContextWrapperHelper::baseGet* into callers
    
    Move the logic directly into the only callers in
    the OAccessibleContextWrapper subclass to get rid
    of one level of indirection.
    
    Change-Id: I8d04e5587bbb8464982e7a80469419a74ba44ac2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185625
    Reviewed-by: Michael Weghorn <[email protected]>
    Tested-by: Jenkins

diff --git a/comphelper/source/misc/accessiblewrapper.cxx 
b/comphelper/source/misc/accessiblewrapper.cxx
index be0548e52fc1..0ed9a96daba7 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -380,29 +380,6 @@ Any SAL_CALL 
OAccessibleContextWrapperHelper::queryInterface( const Type& _rType
 
 IMPLEMENT_FORWARD_XTYPEPROVIDER2( OAccessibleContextWrapperHelper, 
OComponentProxyAggregationHelper, OAccessibleContextWrapperHelper_Base )
 
-
-sal_Int64 OAccessibleContextWrapperHelper::baseGetAccessibleChildCount(  )
-{
-    return m_xInnerContext->getAccessibleChildCount();
-}
-
-
-Reference< XAccessible > 
OAccessibleContextWrapperHelper::baseGetAccessibleChild( sal_Int64 i )
-{
-    // get the child of the wrapped component
-    Reference< XAccessible > xInnerChild = 
m_xInnerContext->getAccessibleChild( i );
-    return m_xChildMapper->getAccessibleWrapperFor( xInnerChild );
-}
-
-
-Reference< XAccessibleRelationSet > 
OAccessibleContextWrapperHelper::baseGetAccessibleRelationSet(  )
-{
-    return m_xInnerContext->getAccessibleRelationSet();
-        // TODO: if this relation set would contain relations to siblings, we 
would normally need
-        // to wrap them, too...
-}
-
-
 void SAL_CALL OAccessibleContextWrapperHelper::notifyEvent( const 
AccessibleEventObject& _rEvent )
 {
 #if OSL_DEBUG_LEVEL > 0
@@ -489,13 +466,15 @@ OAccessibleContextWrapper::~OAccessibleContextWrapper()
 
 sal_Int64 SAL_CALL OAccessibleContextWrapper::getAccessibleChildCount(  )
 {
-    return baseGetAccessibleChildCount();
+    return m_xInnerContext->getAccessibleChildCount();
 }
 
 
 Reference< XAccessible > SAL_CALL 
OAccessibleContextWrapper::getAccessibleChild( sal_Int64 i )
 {
-    return baseGetAccessibleChild( i );
+    // get the child of the wrapped component
+    Reference<XAccessible> xInnerChild = 
m_xInnerContext->getAccessibleChild(i);
+    return m_xChildMapper->getAccessibleWrapperFor(xInnerChild);
 }
 
 
@@ -531,7 +510,9 @@ OUString SAL_CALL 
OAccessibleContextWrapper::getAccessibleName(  )
 
 Reference< XAccessibleRelationSet > SAL_CALL 
OAccessibleContextWrapper::getAccessibleRelationSet(  )
 {
-    return baseGetAccessibleRelationSet();
+    return m_xInnerContext->getAccessibleRelationSet();
+        // TODO: if this relation set would contain relations to siblings, we 
would normally need
+        // to wrap them, too...
 }
 
 
diff --git a/include/comphelper/accessiblewrapper.hxx 
b/include/comphelper/accessiblewrapper.hxx
index af18d3ade4e5..60522f09642d 100644
--- a/include/comphelper/accessiblewrapper.hxx
+++ b/include/comphelper/accessiblewrapper.hxx
@@ -179,15 +179,6 @@ protected:
     // XTypeProvider
     DECLARE_XTYPEPROVIDER( )
 
-    // XAccessibleContext
-    /// @throws css::uno::RuntimeException
-    sal_Int64 baseGetAccessibleChildCount(  );
-    /// @throws css::lang::IndexOutOfBoundsException
-    /// @throws css::uno::RuntimeException
-    css::uno::Reference< css::accessibility::XAccessible > 
baseGetAccessibleChild( sal_Int64 i );
-    /// @throws css::uno::RuntimeException
-    css::uno::Reference< css::accessibility::XAccessibleRelationSet > 
baseGetAccessibleRelationSet(  );
-
     // XAccessibleEventListener
     virtual void SAL_CALL notifyEvent( const 
css::accessibility::AccessibleEventObject& aEvent ) override final;
 

Reply via email to