include/editeng/AccessibleContextBase.hxx | 1 svx/source/accessibility/GraphCtlAccessibleContext.cxx | 18 ++++------------- svx/source/inc/GraphCtlAccessibleContext.hxx | 2 - 3 files changed, 5 insertions(+), 16 deletions(-)
New commits: commit 83bbcc139943c32575f18f8d18563502cad31729 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Apr 10 18:15:18 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Apr 10 19:45:50 2025 +0200 svx a11y: Drop SvxGraphCtrlAccessibleContext::CommitChange Use the base class method OAccessibleComponentHelper::NotifyAccessibleEvent directly instead, for which old and new value need to be passed in reverse order. Also just pass an empty/default-constructed uno::Any instead of an empty XAccessible reference in SvxGraphCtrlAccessibleContext::getAccessible. Change-Id: Ida49b0359ab3f3316f710e0c9383f16d5ccafc2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183985 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 1bd4285c808b..c60eefb66a7c 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -120,7 +120,7 @@ Reference< XAccessible > SvxGraphCtrlAccessibleContext::getAccessible( const Sdr mxShapes[pObj] = std::move(pAcc); // Create event and inform listeners of the object creation. - CommitChange( AccessibleEventId::CHILD, Any( xAccessibleShape ), Any( Reference<XAccessible>() ) ); + NotifyAccessibleEvent(AccessibleEventId::CHILD, Any(), Any(xAccessibleShape)); } } @@ -200,16 +200,6 @@ SdrObject* SvxGraphCtrlAccessibleContext::getSdrObject( sal_Int64 nIndex ) return mpPage->GetObj( nIndex ); } - -/** sends an AccessibleEventObject to all added XAccessibleEventListeners */ -void SvxGraphCtrlAccessibleContext::CommitChange ( - sal_Int16 nEventId, - const uno::Any& rNewValue, - const uno::Any& rOldValue) -{ - NotifyAccessibleEvent(nEventId, rOldValue, rNewValue); -} - Reference< XAccessible > SAL_CALL SvxGraphCtrlAccessibleContext::getAccessibleChild( sal_Int64 nIndex ) { ::SolarMutexGuard aGuard; @@ -570,10 +560,12 @@ void SvxGraphCtrlAccessibleContext::Notify( SfxBroadcaster& /*rBC*/, const SfxHi break; case SdrHintKind::ObjectInserted: - CommitChange( AccessibleEventId::CHILD, Any( getAccessible( pSdrHint->GetObject() ) ) , uno::Any()); + NotifyAccessibleEvent(AccessibleEventId::CHILD, uno::Any(), + Any(getAccessible(pSdrHint->GetObject()))); break; case SdrHintKind::ObjectRemoved: - CommitChange( AccessibleEventId::CHILD, uno::Any(), Any( getAccessible( pSdrHint->GetObject() ) ) ); + NotifyAccessibleEvent(AccessibleEventId::CHILD, + Any(getAccessible(pSdrHint->GetObject())), uno::Any()); break; case SdrHintKind::ModelCleared: dispose(); diff --git a/svx/source/inc/GraphCtlAccessibleContext.hxx b/svx/source/inc/GraphCtlAccessibleContext.hxx index 1ec1a82bbab9..fca754663de2 100644 --- a/svx/source/inc/GraphCtlAccessibleContext.hxx +++ b/svx/source/inc/GraphCtlAccessibleContext.hxx @@ -141,8 +141,6 @@ private: /// @throws css::lang::IndexOutOfBoundsException SdrObject* getSdrObject( sal_Int64 nIndex ); - void CommitChange (sal_Int16 aEventId, const css::uno::Any& rNewValue, const css::uno::Any& rOldValue); - css::uno::Reference< css::accessibility::XAccessible > getAccessible( const SdrObject* pObj ); /** Description of this object. This is not a constant because it can commit f4f99ef3de1b78c19a7d1290b9b04fa18a785aef Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Apr 10 18:02:03 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Apr 10 19:45:36 2025 +0200 editeng a11y: Drop unused forward-decl Change-Id: Ic6830053ef281e24e4e358209b87935ad5a3ffbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183984 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/include/editeng/AccessibleContextBase.hxx b/include/editeng/AccessibleContextBase.hxx index ef1d80fb269b..6a19371019c7 100644 --- a/include/editeng/AccessibleContextBase.hxx +++ b/include/editeng/AccessibleContextBase.hxx @@ -28,7 +28,6 @@ #include <editeng/editengdllapi.h> #include <rtl/ref.hxx> -namespace com::sun::star::accessibility { struct AccessibleEventObject; } namespace utl { class AccessibleRelationSetHelper; } namespace accessibility {