AcceleratorKeyChecker: Fix retrieving the accessibility context

The macro in the document was relying on the document window directly
implementing the XAcessible interface. This is no longer the case so the
macro was hitting an error. This fix is based on the changes in the
commit below:

commit d1a25112bb
Author: Michael Weghorn <m.weghorn@posteo.de>
Date:   Wed Jun 18 17:49:48 2025 +0200

    java a11y tests: Don't rely on XWindow being XAccessible

Change-Id: Ie8cede2108f26e9d36cf1cf16e47f7ec5feab722
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208207
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
This commit is contained in:
Neil Roberts
2026-07-20 10:01:10 +02:00
parent 54b3494de7
commit b42b3d5c64
+3 -1
View File
@@ -345,8 +345,10 @@ End Sub
Function getAccessibleContextOfDocument(oDoc)
Dim oContainerWindow As Object
Dim oAccessible as Object
oContainerWindow = oDoc.getCurrentController().getFrame().getContainerWindow()
getAccessibleContextOfDocument = oContainerWindow.getAccessibleContext()
oAccessible = oContainerWindow.getProperty(&quot;XAccessible&quot;)
getAccessibleContextOfDocument = oAccessible.getAccessibleContext()
End Function
Function makeKeyStrokeReadable(oKeyStroke, Optional bIgnoreAltModifier)