From b42b3d5c649735dc255cebcdf1f37936e5004c38 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Fri, 17 Jul 2026 10:02:55 +0200 Subject: [PATCH] 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 d1a25112bbbe3eb8e1c86840cb853e1694ec96ba Author: Michael Weghorn 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 --- officecfg/util/AcceleratorKeyChecker.fodt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/officecfg/util/AcceleratorKeyChecker.fodt b/officecfg/util/AcceleratorKeyChecker.fodt index e40928c28a10..71e14e9c829e 100644 --- a/officecfg/util/AcceleratorKeyChecker.fodt +++ b/officecfg/util/AcceleratorKeyChecker.fodt @@ -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("XAccessible") + getAccessibleContextOfDocument = oAccessible.getAccessibleContext() End Function Function makeKeyStrokeReadable(oKeyStroke, Optional bIgnoreAltModifier)