diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2024-10-24 14:15:03 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2024-10-25 11:09:35 +0200 |
commit | 2d25e27069ba01d564352d59a7ec8bd8317d092c (patch) | |
tree | c664b4166a0fcd3d7fc59670e7058d85bdc65fbd /desktop/source | |
parent | 22074628b2a020ca7103be27c4aecbb3927ecad9 (diff) |
win a11y: Assert creating MSAAService succeeds
Add an assert that creating the MSAAservice/a11 bridge
succeeds in ImplInitAccessBridge on Windows, as this
should never fail unless the LibreOffice installation is broken.
Drop the return values of the ImplInitAccessBridge
and InitAccessBridge functions accordingly and
simplify code calling them.
While at it, also switch to using `#ifdef _WIN32` for
the Windows-specific code in `InitAccessBridge`
instead of having it in the `#else` branch of
`#if defined UNX`, to align this with the `#ifdef _WIN32`
condition for the `ImplInitAccessBridge` declaration,
as that's the function that gets called.
Even if the creation of the service should fail for some
reason, the DeploymentException in ImplInitAccessBridge
is still handled, so unless I'm missing something, this
commit shouldn't cause any harm. The "EnableATToolSupport"
setting would then incorrectly be set to true indicating
that AT support is enabled, but besides being used in
the a11y bridge code itself, that's only used to determine
whether or not to pre-populate menus, so they are
available in the a11y hierarchy before the corresponding
(sub)menu gets activated, s. MenuBarManager::FillMenuManager,
the corresponding commit that originally introduced this,
commit 08fe2669a0ed807812d005195b54cc41f092d09a
Author: Rüdiger Timm <rt@openoffice.org>
Date: Fri May 13 06:29:54 2005 +0000
INTEGRATION: CWS tbe22 (1.25.30); FILE MERGED
2005/05/04 14:21:00 tbe 1.25.30.1: #i48612# Opening a menu with GOK shows Tips instead of entries (fixed by CD)
and the referenced bug report [1], in particular comment 3 [2]:
> TBE->CD: As discussed, the accessibility hierarchy is built up, but part of the
> information is missing, e.g. Menu::GetItemText() returns an empty string.
> Also keyboard shortcuts should be available.
> In addition, the File/New menu and the File/Wizards menu are missing.
> All this information is only available, after the corresponding menus have
> been opened by the user.
>
> In OO.o 1.1.x all this was working. The AT tools require, that the whole menu
> hierarchy is available as soon as the menu bar is visible, that means before
> a user has opened a menu.
>
> The whole menu hierarchy must be only provided, if accessiblity is enabled.
> This can be checked by
> BOOL bAccessibilityEnabled =
> Application::GetSettings().GetMiscSettings().GetEnableATToolSupport();
This commit is also in preparation of further simplifying
the handling for that setting.
[1] https://bz.apache.org/ooo/show_bug.cgi?id=48612
[2] https://bz.apache.org/ooo/show_bug.cgi?id=48612#c3
Change-Id: I46149ed215c354d33003513d55defe4920a7c381
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175565
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/app/app.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 624b5cb0b6b4..f33080482bba 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1404,12 +1404,9 @@ int Desktop::Main() } } - // check if accessibility is enabled but not working and allow to quit + // check if accessibility is enabled if( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() ) - { - if( !InitAccessBridge() ) - return EXIT_FAILURE; - } + InitAccessBridge(); #endif // terminate if requested... |