office-gobmx/desktop/source
Michael Weghorn 2d25e27069 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 08fe2669a0
    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>
2024-10-25 11:09:35 +02:00
..
app win a11y: Assert creating MSAAService succeeds 2024-10-25 11:09:35 +02:00
deployment cid#1545605 COPY_INSTEAD_OF_MOVE 2024-10-22 11:56:02 +02:00
inc Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]String 2023-10-23 11:04:42 +02:00
lib cid#1633781 Initialization or destruction ordering is unspecified 2024-10-25 09:22:55 +02:00
migration cid#1556086 COPY_INSTEAD_OF_MOVE 2024-08-02 10:05:45 +02:00
minidump Revert "tdf#109347: don't verify SSL certificate for crashreport upload" 2024-05-17 13:27:54 +02:00
offacc loplugin:ostr in desktop 2024-05-07 14:41:40 +02:00
pkgchk/unopkg workaround compiler crash on macos-intel 2024-05-07 22:38:50 +02:00
splash loplugin:ostr in desktop 2024-05-07 14:41:40 +02:00