Files
odfstudio/wizards/source/sfwidgets
Jean-Pierre Ledure 7420eb7b55 ScriptForge fix tdf#168409 AccessibleContext
Extract from above bug report:
 The accessibility UNO API is unpublished and
 for LibreOffice-internal use only and
 subject to change by design.

The com.sub.star.accessibility.AccessibleContext
service is used in ScriptForge to determine
the location on the screen, in pixels, of
next window subsets:
(1) a Calc cell or cellrange
    => calc.XRectangle(range) property
(2) a toolbarbutton in a docked toolbar
    => toolbar.ToolbarButtons(buttonname) method
In both situations, SF offers a facility
to display a well-positioned popup menu
triggered by a mouse left-  or right-click.

The situation of the API is as follows:
- fully available in 25.2
- partially available in 25.8
  (1) is not broken
  (2) is broken
- fully vanished in 26.2

The gradual phase-out of the API requires,
to fix the bug, a tiered adaptation of
the code.
The choice is made to incorporate, where
appropriate, a switch to the right code
snippet based on the run LibreOffice version:
25.2, 25.8 or 26.2.

Now the behaviours in 25.2 and 25.8 are
identical. In 26.2, a different location
is returned for undocked toolbars.

The solution used for 26.2 must be considered
as still subject to change.
The emergency is to fix the issue in 25.8,
which is currently broken.

With the actual patch, the compatibility
between releases is restored, both in
Basic and Pythonuser scripts, and does
not need any documentation revision.

Change-Id: I29b4ccca3f11eca39e5a1841d3cfd744d5eb1fe3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191670
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
2025-10-01 10:00:23 +02:00
..