summaryrefslogtreecommitdiff
path: root/vcl/source/accessibility
AgeCommit message (Collapse)Author
44 hoursRename con-const vcl::Font property getters for clarityMike Kaganski
There are two sets of getters there; and the non-const ones may copy the COW mpImplFont, and may call its AskConfig. The name overload is unfortunate. It is not obvious at the call site, which of the two will be called; and what is different. IMO, the way to fix it would be to keep only one set of getters (the const one), and make the call to AskConfig explicit (in the places that set font name, and know that resolution of other properties will be needed). But in this change, I only rename the non-const getters, making sure to keep the behavior unchanged (at least the intention is to have a non-functional change, meaning that the places that called non-const overload, now use the renamed functions), to make it clear where we actually may copy and initialize it. Change-Id: I9a5cd91d5c1c0de7ff8577b9b982d165e4cdd2c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183116 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
4 daysvcl a11y: Call AccessibleIconView ctor directlyMichael Weghorn
No longer use AccessibleFactory for this, which was needed in the past to break a dependency cycle, which is no longer the case since commit 9283da858506fe3b4383e4cfe0506e470a4356f6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Dec 17 12:04:04 2024 +0100 a11y: Merge accessibility module into vcl The // need to be done here to get the vclxwindow later on in the accessible css::uno::Reference<css::awt::XVclWindowPeer> xHoldAlive(GetComponentInterface()); part is also obsolete, since the VCLXWindow is no longer used by the a11y implementation class. Change-Id: I36831850da4934c78a8f7a754bca82a02a50f6ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182988 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
4 daysvcl a11y: Call AccessibleListBox ctor directlyMichael Weghorn
No longer use AccessibleFactory for this, which was needed in the past to break a dependency cycle, which is no longer the case since commit 9283da858506fe3b4383e4cfe0506e470a4356f6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Dec 17 12:04:04 2024 +0100 a11y: Merge accessibility module into vcl The // need to be done here to get the vclxwindow later on in the accessible css::uno::Reference< css::awt::XVclWindowPeer > xHoldAlive(GetComponentInterface()); part is also obsolete, since the VCLXWindow is no longer used by the a11y implementation class. Change-Id: I9b6a1a3f000434c2b0d3d856f2ac2ff34ab5ebe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182987 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
5 daysvcl a11y: Use sal_Int32 in IComboListBoxHelper::GetBoundingRectangleMichael Weghorn
Align the param type with what both, ComboBox::GetBoundingRectangle and ListBox::GetBoundingRectangle have, which get called by the implementation in the only subclass implementation in VCLListBoxHelper::GetBoundingRectangle. Drop unnecessary casting in VCLXAccessibleListItem. Change-Id: I8f8b7c9f355768a05174b753ac28d0dd60374673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182985 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
5 daysvcl a11y: Use more specific ListBox subclass in VCLXAccessibleTextField ctorMichael Weghorn
Use a ListBox* param instead of having a vcl::Window* param and documentation stating that this is expected to be a ListBox. VCLXAccessibleTextField::implGetText does a cast to ListBox. Change-Id: I9ef6c4cb8fc7c7fa38af79a8aac7b95d984075b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182984 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
5 daystdf#163989 vcl a11y: Rework toolbar item window a11yMichael Weghorn
If a toolbar item has a window (as returned by ToolBox::GetItemWindow), then the toolbar item's accessible (a VCLXAccessibleToolBoxItem) should be reported as the parent of the accessible object for that item window. Reporting the item window's accessible as a child is pretty straightforward and already implemented in The VCLXAccessibleToolBoxItem::getAccessibleChild. Ensuring that the item window's accessible reports the VCLXAccessibleToolBoxItem as its parent and the proper index is more challenging, because it does not match the vcl::Window hierarchy. (There is no vcl::Window for toolbar items, but only for the toolbar itself.) So far, in order to make that work, OToolBoxWindowItem was the XAccessible implementation for toolbar item windows and OToolBoxWindowItemContext was the XAccessibleContext implementation that got returned by OToolBoxWindowItem::getAccessibleContext (via the base class implementation OAccessibleWrapper::getAccessibleContext). Those were subclassing OAccessibleWrapper and OAccessibleContextWrapper in order to report the parent (and index in parent) as needed. One effect of this however is that the gtk3 logic to include native GtkWidgets that are contained in a vcl::Window in the a11y hierarchy, as implemented in commit 305c6fee0be4db38023d9ca5f7915e443e0bc1fc Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Mar 24 11:33:42 2021 +0000 tdf#141197 if we have a sysobj child then include that in the atk hierarchy does not work for that case, because it relies on the accessible to be an XWindow in order to extract the underlying vcl::Window. With OAccessibleWrapper being used, that is not the case. As a consequence, native GTK widgets inside the vcl ToolBox (i.e. non-native toolbar) like the Paragraph Styles or Font Style comboboxes or the combobox in Writer's search toolbar cannot be found in Accerciser's treeview of the LO a11y hierarchy. (There are panels, but the comboboxes inside the panels are missing.) While the logic inside the gtk3 a11y bridge could be extended to cover that case also (by making use of implementation details in OAccessibleWrapper, e.g. getting its OAccessibleWrapper::m_xInnerAccessible), choose another solution that doesn't depend on making use of more implementation details and ports away from OAccessible(Context)Wrapper for the toolbar item windows completely: Introduce Window::SetAccessibleParent that allows to explicitly set an accessible parent for a vcl::Window. If this is done, Window::GetAccessibleParent, used by VCLXAccessibleComponent::getAccessibleParent returns this accessible instead of using the accessible for the vcl::Window returned by vcl::Window::GetAccessibleParentWindow. This ensures that the item window returns the toolbar item as its parent in VCLXAccessibleComponent::getAccessibleParent and the base class implementation in OCommonAccessibleComponent::getAccessibleIndexInParent ensures that the correct child index is also returned. Drop the now unused classes OToolBoxWindowItem and OToolBoxWindowItemContext. With this commit in place, the native GTK widgets inside VCL toolbars now show up in Accerciser's treeview of the LO a11y tree when using the gtk3 VCL plugin as expected. Change-Id: I3b2182ca953056a939670e73687f4568620a4087 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182426 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
5 daystdf#163989 vcl a11y: Don't rely on Window a11y parent being WindowMichael Weghorn
In VCLXAccessibleComponent::implGetBounds, use Window::GetAccessibleParent introduced in commit 5ef30632ede4258f0c45194259567849cc172dab Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Mar 3 17:05:16 2025 +0100 tdf#163989 a11y: Introduce Window::GetAccessibleParent to get the accessible parent of the vcl::Window instead of using vcl::Window::GetAccessibleParentWindow directly. The latter would give an incorrect result if the accessible parent is not a vcl::Window itself. This prepares for upcoming commit Change-Id: I3b2182ca953056a939670e73687f4568620a4087 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Mar 3 17:42:03 2025 +0100 tdf#163989 vcl a11y: Rework toolbar item window a11y Change-Id: Iffa85bd9b6733eeed5357dd4937aac00966724c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182978 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
5 daysvcl a11y: Flatten VCLXAccessibleComponent::implGetBoundsMichael Weghorn
Change-Id: I17936af21d34d56fe02d20a4ebe065a79786f92d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182977 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-03-04iconchoicectrl a11y: Reuse parent handling + disposing from base classMichael Weghorn
Drop the custom handling for the accessible parent from AccessibleIconChoiceCtrl, as the base class VCLXAccessibleComponent already has an implementation for vcl::Window subclasses that effectively does the same. Drop AccessibleIconChoiceCtrl::disposing, which also means that the base class one is used now, which so far wasn't called from the override for no apparent reason. Change-Id: Iec4b297462fb8265e75fd9f298ba0838c23053db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182491 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-03-04vcl a11y: Call AccessibleIconChoiceCtrl ctor directlyMichael Weghorn
... and no longer use AccessibleFactory::createAccessibleIconChoiceCtrl, which was used in the past to break a dependency cycle between vcl and the (no longer existing) accessibility module. Change-Id: I0c7a7bb621b391ec0840abad0ee86b07696ee763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182490 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-03-04tdf#163989 a11y: Introduce Window::GetAccessibleParentMichael Weghorn
Add new method Window::GetAccessibleParent that for now uses the existing logic duplicated in multiple places to get the accessible for the window returned by `Window::GetAccessibleParentWindow()`. Deduplicate code by using the newly introduced method instead. No change in behavior intended by this change, but this also prepares for an upcoming commit that will allow explicitly setting a parent. Change-Id: I0ac5e370d34994c1ede864204d4d41019f7b9336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182441 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-03-03use more conrete UNO classes in vclNoel Grandin
Change-Id: I1caceef305fb88a25a505633c7fa31fd70b7e960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182417 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2025-03-01toolbar a11y: Don't pass component contextMichael Weghorn
... to the OToolBoxWindowItem ctor, but call comphelper::getProcessComponentContext directly there instead to get a component context to pass to the base class ctor. Change-Id: I2ea2bbf7a48096c50e0f703e6589b0346a0665ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182373 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-28tdf#163989 toolbar item window a11y: Leave wrapped accessible in placeMichael Weghorn
OToolBoxWindowItem wraps the accessible for toolbar item windows using OAccessibleWrapper as its base class. In addition to setting that wrapper, VCLXAccessibleToolBox::getAccessibleChild was so far also setting the wrapper as the new accesible for the item window, i.e. the wrapper was now somewhat replacing the accessible it was meant to wrap. This e.g. broke the logic to get the proper accessible child index for a panel in the Find toolbar in Writer when using the qt6 VCL plugin. This could e.g. be seen using in a similar way to the approach/observations described for gtk3 in tdf#163989 comment 1: 1) start LO Writer using the qt6 VCL plugin 2) in Accerciser, enable event monitoring for LO object:text-caret-moved events 3) start Orca (to trigger creation of accessible objects in LO) 4) Press Ctrl+F to enable the search toolbar 5) type, move cursor 6) In Accerciser's Event Monitor, identify a corresponding "object:text-caret-moved" event 7) click on the event source -> First issue: The object is not highlighted in Accerciser's treeview of the LO a11y. 8) print the a11y hierarchy of the object bottom-up (i.e. from the object to the desktop) using Accerciser's IPython console: In [2]: obj = acc In [3]: while obj: In [3]: print(f'object: {obj}, index in parent: {obj.get_index_in_parent()}') In [3]: obj = obj.parent In [3]: object: [text | eeee], index in parent: 0 object: [combo box | eeee], index in parent: 0 object: [filler | ], index in parent: 0 -> object: [filler | ], index in parent: -1 object: [panel | ], index in parent: 0 object: [panel | Find Values], index in parent: 1 object: [tool bar | Find], index in parent: 0 object: [panel | ], index in parent: 5 object: [panel | Untitled 1 — LibreOfficeDev Writer 25.8 [fbdfde26391730216bae230cd6f228a6ae6ee89c]], index in parent: 0 object: [panel | Untitled 1 — LibreOfficeDev Writer 25.8 [fbdfde26391730216bae230cd6f228a6ae6ee89c]], index in parent: 0 object: [frame | Untitled 1 — LibreOfficeDev Writer 25.8 [fbdfde26391730216bae230cd6f228a6ae6ee89c]], index in parent: 0 object: [application | soffice.bin], index in parent: -1 object: [desktop frame | main], index in parent: -1 Second issue (which is cause for the first one): There is a filler with invalid child index -1 in the path (highlighted by an arrow above). With this fix in place, both issues no longer appear, but the combobox's text entry is correctly selected in Accerciser's treeview and the child index is correct: In [6]: obj = acc In [7]: while obj: In [7]: print(f'object: {obj}, index in parent: {obj.get_index_in_parent()}') In [7]: obj = obj.parent In [7]: object: [text | eee], index in parent: 0 object: [combo box | eee], index in parent: 0 object: [filler | ], index in parent: 0 -> object: [filler | ], index in parent: 0 object: [panel | ], index in parent: 0 object: [panel | Find Values], index in parent: 1 object: [tool bar | Find], index in parent: 0 object: [panel | ], index in parent: 5 object: [panel | Untitled 1 — LibreOfficeDev Writer 25.8 [89cb9707f45fdf2e00c1670701a5abc393f0c13d]], index in parent: 0 object: [panel | Untitled 1 — LibreOfficeDev Writer 25.8 [89cb9707f45fdf2e00c1670701a5abc393f0c13d]], index in parent: 0 object: [frame | Untitled 1 — LibreOfficeDev Writer 25.8 [89cb9707f45fdf2e00c1670701a5abc393f0c13d]], index in parent: 0 object: [application | soffice.bin], index in parent: -1 object: [desktop frame | main], index in parent: -1 For gtk3, the issue described in tdf#163989 18 comment 1 remains however and will have to be addressed separately. Change-Id: Ie16b34caf1df70c25a4b2a52eaeb22ff0ab3d9e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182371 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-26vcl a11y: Drop XTypeProvider::getImplementationId overridesMichael Weghorn
They all do the same as their base class implementations. Change-Id: Ib6055b51f0417a7d76973989420b4ba910bc6d03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182261 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-26use more concrete UNO types in some local varsNoel Grandin
found by a little plugin I created. Plugin parked into store/ folder because it needs hand-holding when run. Change-Id: I2b4da7378f0becbc5f020ac9e78cd765aa0119b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181768 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2025-02-24icon choice ctrl a11y: Drop obsolete commentMichael Weghorn
AccessibleIconChoiceCtrlEntry no longer directly implements XAccessibleEventBroadcaster methods since commit 1c892a7729234202e6ce14e116e91786b248835a Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Jul 11 16:54:09 2024 +0200 icon choice ctrl entry a11y: Use OAccessibleComponentHelper as base Change-Id: Idb575ebe1a1abbc6a12570a76fe4b412f9404945 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182096 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-18vcl: nType -> eTypeChristopher Sherlock
Change-Id: I3e55e6173494f660febc296ec342ab223e5cdec1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178227 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-02-13vcl a11y: Don't use same text for list item a11y name and descriptionMichael Weghorn
Unless an accessible name has explicitly been set, AccessibleListBoxEntry::getAccessibleName calls AccessibleListBoxEntry::implGetText which calls SvTreeListBox::SearchEntryTextWithHeadTitle to get an accessible name. AccessibleListBoxEntry::getAccessibleDescription either returns an empty string or also calls SvTreeListBox::SearchEntryTextWithHeadTitle, in which case the accessible description would be the same as the accessible name (unless an a11y name was explicitly set). Reporting the same string for both, a11y name and a11y description doesn't make much sense. Let AccessibleListBoxEntry::getAccessibleDescription always return an empty string instead. In case there is a need to set/report an accessible description, introducing a new method in the weld API to set the a11y description explicitly would likely be the better approach, see Change-Id: I8fcbdddd74d75283469f046ff5b60f111051b021 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Feb 13 13:42:05 2025 +0100 a11y: Introduce weld::IconView::set_item_accessible_name which did the same for the accessible name for icon views. (That would also ensure that it works for other implementations, not just the VCL one.) Change-Id: I1026d6a2c3d5a79359fd4b65352491ebe98db092 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181638 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-02-13vcl a11y: Move listbox entry a11y desc logic to only callerMichael Weghorn
Since Change-Id: I153e91292ec70bb3a6dc4e1d473dc0362af55c79 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Feb 13 16:43:03 2025 +0100 vcl a11y: No longer report IconView item tooltip as a11y desc , SvTreeListBox::GetEntryAccessibleDescription is a static method used only in AccessibleListBoxEntry::getAccessibleDescription. Move the existing logic right into that method instead. (Let AccessibleListBoxEntry, the a11y class, be responsible.) Change-Id: I3faf5fc8643ca4f39b7926b43b251ab9c7f92c5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181637 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-02-13vcl a11y: No longer report IconView item tooltip as a11y descMichael Weghorn
Now after Change-Id: I8fcbdddd74d75283469f046ff5b60f111051b021 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Feb 13 13:42:05 2025 +0100 a11y: Introduce weld::IconView::set_item_accessible_name introduced API to explicitly set the a11y name for IconView items and commits Change-Id: I59275d8020d0ebd46256bdc1531849cf5be5a353 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Feb 13 13:48:35 2025 +0100 svx a11y: Set accessible name for Fontwork Gallery items Change-Id: Ie54f41014822ec92576f30c72f569a8d186151c6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Feb 13 15:00:43 2025 +0100 sd a11y: Set a11y names for items in master page selector Change-Id: I74d1aa41896b70f6025fdc7e4784a2b6539ec6f6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Feb 13 15:18:10 2025 +0100 math a11y: Set a11y names for items in Elements sidebar deck implemented setting a11y names for those items which previously had no accessible name, but only an accessible description based on the tooltip, drop the fallback of using the tooltip for the accessible description of tooltip items that was originally introduced in commit 2a28ebeef5ea3e2b01d836a7233d2316b765bf38 Date: Wed Jun 1 11:18:26 2022 +0300 Accessibility for IconView and which would now result in the same text being used for the accessible name and accessible description for the above cases when the VCL implementation (SalInstanceIconView) is used. (Screenreaders usually still announce only one of them if they are the same, but the accessible description is no longer needed now.) See commit message of the above-mentioned Change-Id: I8fcbdddd74d75283469f046ff5b60f111051b021 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Feb 13 13:42:05 2025 +0100 a11y: Introduce weld::IconView::set_item_accessible_name for more details. As far as I can see, the UI elements addressed by the above commits are the only ones that relied on the tooltip getting used, as other dialogs etc. using IconView pass a string/text when calling weld::IconView::insert etc., and the three ones above are the only ones calling weld::IconView::connect_query_tooltip to be able to provide a tooltip text this way. In case I missed anything and this commit results in IconView items no longer getting announced somewhere, an accessible name should presumably be set for those as well, using weld::IconView::set_item_accessible_name (s. above commits for examples). Change-Id: I153e91292ec70bb3a6dc4e1d473dc0362af55c79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181636 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-02-13a11y: Introduce weld::IconView::set_item_accessible_nameMichael Weghorn
Introduce a new weld::IconView::set_item_accessible_name method that allows to set the accessible name for an item in the IconView. So far, IconView icons don't have any accessible name if no text is set in addition to the icon. There is some logic to use (or fall back to) the tooltip text for the accessible *description* in both, SalInstanceIconView (introduced in commit 2a28ebeef5ea3e2b01d836a7233d2316b765bf38 Author: Mike Kaganski <mike.kaganski@collabora.com> Date: Wed Jun 1 11:18:26 2022 +0300 Accessibility for IconView ) and GtkInstanceIconView (introduced in commit ba0e36e607d1c380fd09b6725a4ebcb69ff399de Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Mar 9 11:38:36 2023 +0100 tdf#153657 tdf#140659 gtk3 a11y: Use IconView item tooltip as a11y desc ), but having a way to directly set the a11y name has the following advantages: * Focusable objects should have an accessible name, not just an accessible description (that is meant to provide additional information only, and whether or not accessible descriptions are announced is usually configurable in screen readers). * The tooltip text may or may not be appropriate as the accessible name. * a11y name/description and tooltip are generally conceptually different things in UI toolkits, so reflect that in the weld API as well and set them explicitly rather than making assumptions in the implementations that need to implement the weld API using specific toolkits (VCL or third-party). Therefore, introduce this method to allow explicitly setting the accessible name and implement it for all 3 implementations (SalInstanceIconView, GtkInstanceIconView, QtInstanceIconView). It will be used to set a11y names in upcoming commits. (The fallback to use the tooltip for the a11y description can be dropped once an accessible name is set everywhere.) For the VCL implementation (SalInstanceIconView), introduce a new SvTreeListEntry::m_sAccesibleName member and prefer that in AccessibleListBoxEntry::getAccessibleName if set. For GtkInstanceIconView, the logic is similar to the one in the existing GtkInstanceIconView::set_item_accessible_description_from_tooltip (which is gtk3-only, i.e. doesn't work for gtk4). For QtInstanceIconView, set the Qt::AccessibleTextRole [1] for the item. [1] https://doc.qt.io/qt-6/qt.html#ItemDataRole-enum Change-Id: I8fcbdddd74d75283469f046ff5b60f111051b021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181616 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-12list item a11y: Use comphelper::OAccessibleComponentHelperMichael Weghorn
Let VCLXAccessibleListItem subclass comphelper::OAccessibleComponentHelper which already implements the logic for event handling and most of the location/bounds handling, instead of duplicating the logic here. The existing VCLXAccessibleListItem::implGetBounds basically already implements the logic needed to override the purely virtual comphelper::OAccessibleComponentHelper::implGetBounds, only the required conversion from tools::Rectangle to awt::Rectangle is still added in this commit. Tested as described in more detail in previous commit Change-Id: I53c686276537713fec604eb22d19be2331ce1f56 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Feb 11 15:13:41 2025 +0100 list item a11y: Fix parent-relative position with no change in behavior noticed (now that the issues detected previously have been addressed in previous commits already in preparation for this commit). Change-Id: I74e53e3297948977bed1b8608468dc8378859426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181433 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-12list item a11y: Fix parent-relative positionMichael Weghorn
XAccessibleComponent::getLocation etc. are supposed to return the objects position relative to its direct accessible parent. However, IComboListBoxHelper::GetBoundingRectangle used by the VCLXAccessibleListItem::implGetBounds helper method returns the position relative to the ComboBox or ListBox for which the a11y implementation is , which is a VCLXAccessibleBox subclass, and that is actually the VCLXAccessibleListItem's accessible "grandparent" (parent's parent), as the direct parent is a VCLXAccessibleList. Therefore, the parent-relative position was incorrect. Fix that by subtracting the parent's relative position within the ListBox/ComboBox. VCLXAccessibleListItem::getLocationOnScreen, which returns the absolute screen position, was correct, because it added the combobox/listbox position to the "parent-relative" position (which was actually the position relative to the combobox/listbox). Now that VCLXAccessibleListItem::implGetBounds returns the position relative to the actual parent, also adjust VCLXAccessibleListItem::getLocationOnScreen to add the actual parent's location on screen. The issue about incorrect parent-relative positions was noticed with an (upcoming) change that refactors VCLXAccessibleListItem to subclass comphelper::OAccessibleComponentHelper where the parent-relative position gets used. Issue could also be reproduced like this: 1) apply only the VCLXAccessibleListItem::getLocationOnScreen part of this change 2) run Python script attachment 199141 from tdf#161087 on X11/XWayland which highlights the area of the currently focused object: GDK_BACKEND=x11 python3 ./highlight-focused-object.py 3) start LO with the qt6 VCL plugin on X11/XWayland: QT_QPA_PLATFORM=xcb SAL_USE_VCLPLUGIN=qt6 ./instdir/program/soffice.bin --writer 4) Navigate to the "Styles" combobox in the formatting toolbar 5) Press Alt+Down to expand, then arrow keys to navigate through the combobox entries (Note: Running Orca in addition can help to trigger creation of the the required a11y objects and events.) Without this change in place, the wrong area was highlighted when moving between entries. Now, the correct area of the currently focused combobox entry is highlighted. Change-Id: I53c686276537713fec604eb22d19be2331ce1f56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181432 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-12list a11y: Fix parent-relative positionMichael Weghorn
So far, VCLXAccessibleList::implGetBounds (which is supposed to report the bounds relative to the direct parent) and VCLXAccessibleList::getLocationOnScreen (which is supposed to report the absolte screen position) were mostly duplicating the logic. VCLXAccessibleList::getLocationOnScreen seems correct, but VCLXAccessibleList::implGetBounds reported an incorrect position for an expanded combobox list. This is because VCLListBoxHelper::GetDropDownPosSizePixel was returning a screen position, not a position relative to the parent. Fix this by: * Making VCLListBoxHelper::GetDropDownPosSizePixel return a parent-relative position instead. * Adjusting VCLXAccessibleList::getLocationOnScreen to not duplicate most of the logic, but calling VCLXAccessibleList::implGetBounds to get the parent-relative position and then adding the parent's screen position to get the own screen position. The fact that the parent-relative position is incorrect was noticed while working on fixing the parent-relative position reported by VCLXAccessibleListItem and even with an issue in the implementation there, the incorrect position was still reported. (The VCLXAccessibleListItem will be done in a separate upcoming commit.) Change-Id: I322327753ceec7bc7912ec13c45e208a79dd6976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181431 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-02-12list a11y: Use ref to concrete VCLXAccessibleBoxMichael Weghorn
This will come in handy when simplifying and fixing VCLXAccessibleList::implGetBounds and VCLXAccessibleList::getLocationOnScreen in upcoming commits. Change-Id: I8b969243d9731ab997cc1a02c187491dbf171952 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181430 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-12list item a11y: Deduplicate bounds calculationMichael Weghorn
Introduce and use new helper method VCLXAccessibleListItem::implGetBounds instead of duplicating the code to calculate the parent-relative bounds in multiple places. This is also in preparation of fixing parent-relative coordinates (in a single rather than multiple places). Change-Id: Ie2791a73a392ed1c0d6872d2131cc59785c214b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181429 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-02-12listbox a11y: Consistently lock (only) SolarMutexMichael Weghorn
So far, some of the public XAccessible* method implementations were locking only the SolarMutex, some were locking only `m_aMutex` and some were locking both. Unify that to always lock only the SolarMutex in all of those methods. Change-Id: Ia6e7655d47a372d4b70d3c7de8715881b9aaddc5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181428 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-02-12browsebox a11y: Let base class implement XAccessibleMichael Weghorn
By now, all non-abstract subclasses of AccessibleBrowseBoxBase implement the XAccessible interface (Either directly or by subclassing BrowseBoxAccessibleElement) and their XAccessible::getAccessibleContext implementation returns a reference to self. Deduplicate code by letting AccessibleBrowseBoxBase implement the XAccessible interface and dropping the implementations from subclasses. Also drop the now unused BrowseBoxAccessibleElement class. Change-Id: I0cef92acc67f176b55c97bc7ab5ae28b69433b49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181407 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-12browsebox a11y: Use cppu:ImplInheritanceHelperMichael Weghorn
Change-Id: Iae300fb7b6472397706f64526c36ce228c1b33ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181406 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07a11y: Move EditBrowseBoxTableCell to svtoolsMichael Weghorn
While the AccessibleBrowseBoxCell base class and other AccessibleBrowseBox* classes are used for both, SvHeaderTabListBox (in vcl) and BrowseBox (in svtools), EditBrowseBoxTableCell is only used for the latter, in order to make the currently active edit control accessible. Therefore, move the class to the svtools library, where BrowseBox is located as well. This is also in preparation of reworking how accessibility for BrowseBox's currently active control is implemented. Change-Id: Ia290df4b497baa66f98c1065c2425a0e2e079d13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181267 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07browsebox a11y: Drop duplicate checkMichael Weghorn
If `nChildIndex` is negative, an exception is already thrown above, so don't check again. Change-Id: Ia73fe554529ba3ad4b6adc3dff6aee28713b0132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181238 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07browsebox a11y: Report correct child index for cellsMichael Weghorn
No longer add any offset when a cell's child index is calculated in AccessibleBrowseBoxTableCell::getAccessibleIndexInParent. For SvHeaderTabListBox, that offset was already 0 anyway. For BrowseBox, that offset was 3 (BBINDEX_FIRSTCONTROL), presumably so that the first cell comes after * the column header (BBINDEX_COLUMNHEADERBAR, 0) * the row header (BBINDEX_ROWHEADERBAR, 1) * the table (BBINDEX_TABLE, 2) However, that doesn't make sense, because the row and column headers and the table are children of the AccessibleBrowseBox, not the AccessibleBrowseBoxTable, and the AccessibleBrowseBoxTableCells are children of the AccessibleBrowseBoxTable, not the AccessibleBrowseBox, so whatever children the AccessibleBrowseBox has is irrelevant for the cell's child index. The incorrect index could be seen like this: 1) Start Base, create a new database 2) With the "Tables" section enabled, click on "Create Table in Design View..." 3) Start Accerciser 4) In Accerciser's treeview of the LO a11y, navigate to the accessible object for the table (which has an accessible name of "Table"). 5) Request the child index from the child at index 0 Without this change in place, this is incorrect (0 != 3): In [2]: acc.get_child_at_index(0).get_index_in_parent() Out[2]: 3 With this change in place, this is now 0 as expected: In [3]: acc.get_child_at_index(0).get_index_in_parent() Out[3]: 0 This also makes Accerciser's bookmark feature work for these table cells, i.e. creating a bookmark for a cell and then jumping to that bookmark later will now select the correct cell in the treeview again instead of a different one. Change-Id: Ic1a074cf604a0d0342dd9e2d4b62b58866b78351 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181237 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07browsebox a11y: Drop AccessibleBrowseBoxAccessMichael Weghorn
So far, AccessibleBrowseBoxAccess was the XAccessible implementation for the BrowseBox (in svtools) while AccessibleBrowseBox is the XAccessibleContext implementation that AccessibleBrowseBoxAccess::getAccessibleContext() returns. AccessibleBrowseBoxAccess has some additional methods that call the corresponding AccessibleBrowseBox methods. Drop AccessibleBrowseBoxAccess and instead let AccessibleBrowseBox be the XAccessible and XAccessibleContext implementation for BrowseBox at the same time. AccessibleBrowseBox already implements the XAccessible interface (and AccessibleBrowseBox::getAccessibleContext() returns a reference to self) since Change-Id: I5cc292e86e2549fa15e00edcc417308d18335b9e Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Feb 5 16:45:43 2025 +0100 browsebox a11y: Let AccessibleBrowseBox implement XAccessible Let AccessibleBrowseBox implement the XAccessible interface and return a reference to self in its XAccessible::getAccessibleContext implementation. The AccessibleTabListBox subclass was already doing this. Drop the override (that didn't hold the mutex or check whether the accessible is still alive). This also prepares for merging AccessibleBrowseBoxAccess into AccessibleBrowseBox into an upcoming commit. Now that AccessibleBrowseBox is always its own "creator" (i.e. the XAccessible whose associated XAccessibleContext it is), there's no more need to keep track of who created it, so drop AccessibleBrowseBox::m_aCreator and simply use `this` instead. Change-Id: I51099442d600dce0db78a78d37b1f4709c6f95b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181217 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-02-07browsebox a11y: Call AccessibleBrowseBox* ctors directlyMichael Weghorn
No longer use the AccessibleFactory for creating the accessible objects. In the past, this was necessary to break a dependency cycle, but that's no longer the case, see commit 9283da858506fe3b4383e4cfe0506e470a4356f6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Dec 17 12:04:04 2024 +0100 a11y: Merge accessibility module into vcl Mark copy ctors and operator= as deleted. Otherwise, the Windows build fails like this [1]: [build CXX] vcl/source/accessibility/AccessibleBrowseBoxTableCell.cxx C:\cygwin64\home\tdf\jenkins\workspace\gerrit_windows\include\cppuhelper/implbase.hxx(152): error C2280: 'AccessibleBrowseBoxCell::AccessibleBrowseBoxCell(const AccessibleBrowseBoxCell &)': attempting to reference a deleted function C:\cygwin64\home\tdf\jenkins\workspace\gerrit_windows\include\vcl/accessibility/AccessibleBrowseBoxCell.hxx(61): note: see declaration of 'AccessibleBrowseBoxCell::AccessibleBrowseBoxCell' C:\cygwin64\home\tdf\jenkins\workspace\gerrit_windows\include\vcl/accessibility/AccessibleBrowseBoxCell.hxx(61): note: 'AccessibleBrowseBoxCell::AccessibleBrowseBoxCell(const AccessibleBrowseBoxCell &)': function was explicitly deleted C:\cygwin64\home\tdf\jenkins\workspace\gerrit_windows\include\vcl/accessibility/AccessibleBrowseBoxTableCell.hxx(100): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<AccessibleBrowseBoxCell,com::sun::star::accessibility::XAccessibleText,com::sun::star::accessibility::XAccessible>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<AccessibleBrowseBoxCell,com::sun::star::accessibility::XAccessibleText,com::sun::star::accessibility::XAccessible>>(cppu::ImplInheritanceHelper<AccessibleBrowseBoxCell,com::sun::star::accessibility::XAccessibleText,com::sun::star::accessibility::XAccessible> &&)' being compiled C:\cygwin64\home\tdf\jenkins\workspace\gerrit_windows\include\vcl/accessibility/AccessibleBrowseBoxTableCell.hxx(100): note: see reference to function template instantiation 'cppu::ImplInheritanceHelper<AccessibleBrowseBoxCell,com::sun::star::accessibility::XAccessibleText,com::sun::star::accessibility::XAccessible>::ImplInheritanceHelper<cppu::ImplInheritanceHelper<AccessibleBrowseBoxCell,com::sun::star::accessibility::XAccessibleText,com::sun::star::accessibility::XAccessible>>(cppu::ImplInheritanceHelper<AccessibleBrowseBoxCell,com::sun::star::accessibility::XAccessibleText,com::sun::star::accessibility::XAccessible> &&)' being compiled C:\cygwin64\home\tdf\jenkins\workspace\gerrit_windows\include\cppuhelper/implbase.hxx(151): error C2248: 'AccessibleBrowseBoxCell::AccessibleBrowseBoxCell': cannot access private member declared in class 'AccessibleBrowseBoxCell' C:\cygwin64\home\tdf\jenkins\workspace\gerrit_windows\include\vcl/accessibility/AccessibleBrowseBoxCell.hxx(61): note: see declaration of 'AccessibleBrowseBoxCell::AccessibleBrowseBoxCell' C:\cygwin64\home\tdf\jenkins\workspace\gerrit_windows\include\vcl/accessibility/AccessibleBrowseBoxCell.hxx(30): note: see declaration of 'AccessibleBrowseBoxCell' make[1]: *** [C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/solenv/gbuild/LinkTarget.mk:339: C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/workdir/CxxObject/vcl/source/accessibility/AccessibleBrowseBoxTableCell.o] Error 2 make[1]: *** Waiting for unfinished jobs.... [1] https://ci.libreoffice.org/job/gerrit_windows/193155/console Change-Id: Ib24fc6b7f85e4ca575cb2505c172243da2cfb8b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181206 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07a11y: Move AccessibleBrowseBox* headers to global vcl include dirMichael Weghorn
AccessibleBrowseBox and related classes are the a11y implementations for both, SvHeaderTabListBox (see SvHeaderTabListBox::CreateAccessible) and BrowseBox (see BrowseBox::CreateAccessible). The former is in the vcl module, but the latter is in svtools. Move the headers to include/vcl/accessibility to be able to use the classes directly from both modules in upcoming commits instead of having to use the AccessibleFactory to create the accessible objects. Change-Id: Idfd5cf2d605f8413f4fa4091ae7c5e4df8cc0cfb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181202 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07browsebox a11y: Let AccessibleBrowseBox implement XAccessibleMichael Weghorn
Let AccessibleBrowseBox implement the XAccessible interface and return a reference to self in its XAccessible::getAccessibleContext implementation. The AccessibleTabListBox subclass was already doing this. Drop the override (that didn't hold the mutex or check whether the accessible is still alive). This also prepares for merging AccessibleBrowseBoxAccess into AccessibleBrowseBox into an upcoming commit. Change-Id: I5cc292e86e2549fa15e00edcc417308d18335b9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181201 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-02-07browsebox a11y: Use ImplInheritanceHelper for cellMichael Weghorn
Change-Id: I523f98b1e374e8eb56a52171eccf707c64550364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181200 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07browsebox a11y: Drop '_bOnScreen' paramMichael Weghorn
It's always `false` since commit 261dd0fd48b2e2c284485c25feade854154595aa Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Jan 31 11:40:09 2025 +0100 browsebox a11y: Use comphelper::OAccessibleComponentHelper , so dro the param altogether to simplify code. Change-Id: If184b3103f87a7d5391ed97b673ed10ed9953f60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181166 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07a11y: Rename IAccessibleTableProvider::GetFieldRectPixelMichael Weghorn
to IAccessibleTableProvider::calcFieldRectPixel. This aligns the naming with the IAccessibleTableProvider::calcHeaderRect and IAccessibleTableProvider::calcHeaderRect methods and prevents a name clash with the other BrowseBox::GetFieldRectPixel variant only taking 3 params in an upcoming commit that will drop the `_bOnScreen` param from the now renamed method. Change-Id: I156412f825a187d86390325050147cd84e934251 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181165 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07browsebox a11y: Merge helper function into only callerMichael Weghorn
Merge `getRectangle` into AccessibleBrowseBoxHeaderCell::implGetBoundingBox and simplify a bit. Change-Id: If432ec8fcb64645d293cead1d9a97b98d31c19a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181164 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07browsebox a11y: Don't report EditBrowseBoxTableCell as its own parentMichael Weghorn
The EditBrowseBoxTableCell ctor's first param is the parent, the second one is the owner. The EditBrowseBoxTableCellAccess is the owner, but not the parent, which means that the params were passed in the wrong order. Since EditBrowseBoxTableCellAccess::getAccessibleContext returns the EditBrowseBoxTableCell, this would result in the EditBrowseBoxTableCell reporting itself as its own parent. This results in infinite recursion when trying to walk up the a11y hierarchy starting at the EditBrowseBoxTableCell. Switch the order of the first 2 params to fix that. This addresses a preexisting issue that was now triggering a crash as described in commit 261dd0fd48b2e2c284485c25feade854154595aa Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Jan 31 11:40:09 2025 +0100 browsebox a11y: Use comphelper::OAccessibleComponentHelper [...] Sample scenario for BrowseBox: 1) Start Base, create a new database 2) With the "Tables" section enabled, click on "Create Table in Design View..." 3) in Accerciser's treeview of the LO a11y, navigate through the a11y objects of the table and its children A quick test with Orca [...] triggered a crash for the BrowseBox case. The underlying problem is a preexisting issue however, and will be addressed in an upcoming commit. Sample backtrace: Thread 1 received signal SIGSEGV, Segmentation fault. 0x00007fd5a4700cde in std::scoped_lock<std::mutex>::scoped_lock (this=0x7ffe58c71100, __m=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/mutex:787 787 { _M_device.lock(); } (rr) bt #0 0x00007fd5a4700cde in std::scoped_lock<std::mutex>::scoped_lock (this=0x7ffe58c71100, __m=...) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/mutex:787 #1 0x00007fd5a47402e4 in cppu::getTypeEntries (cd=0x7fd59e2da610 <cppu::detail::ImplClassData<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>, com::sun::star::accessibility::XAccessibleComponent>::operator()()::s_cd>) at /home/michi/development/git/libreoffice/cppuhelper/source/implbase_ex.cxx:69 #2 0x00007fd5a473f399 in cppu::queryDeepNoXInterface (pDemandedTDR=0x55ca49389ab0, cd=0x7fd59e2da610 <cppu::detail::ImplClassData<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>, com::sun::star::accessibility::XAccessibleComponent>::operator()()::s_cd>, that=0x55ca4a156260) at /home/michi/development/git/libreoffice/cppuhelper/source/implbase_ex.cxx:148 #3 0x00007fd5a473f917 in cppu::ImplHelper_queryNoXInterface (rType=invalid uno::Type, cd=0x7fd59e2da610 <cppu::detail::ImplClassData<cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>, com::sun::star::accessibility::XAccessibleComponent>::operator()()::s_cd>, that=0x55ca4a156260) at /home/michi/development/git/libreoffice/cppuhelper/source/implbase_ex.cxx:225 #4 0x00007fd59ccdac55 in cppu::ImplInheritanceHelper<comphelper::OCommonAccessibleComponent, com::sun::star::accessibility::XAccessibleComponent>::queryInterface (this=0x55ca4a156260, aType=invalid uno::Type) at include/cppuhelper/implbase.hxx:165 #5 0x00007fd59ccd8375 in cppu::ImplInheritanceHelper<comphelper::OAccessibleComponentHelper, com::sun::star::awt::XFocusListener, com::sun::star::lang::XServiceInfo>::queryInterface (this=0x55ca4a156260, aType=invalid uno::Type) at include/cppuhelper/implbase.hxx:166 #6 0x00007fd59ccfab51 in EditBrowseBoxTableCell::queryInterface (this=0x55ca4a156260, _rType=invalid uno::Type) at /home/michi/development/git/libreoffice/vcl/source/accessibility/accessibleeditbrowseboxcell.cxx:62 #7 0x00007fd59ccd9ac5 in com::sun::star::uno::BaseReference::iquery (pInterface=0x55ca4a156260, rType=invalid uno::Type) at include/com/sun/star/uno/Reference.hxx:59 #8 0x00007fd59cce8739 in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext>::iquery (pInterface=0x55ca4a156260) at include/com/sun/star/uno/Reference.hxx:74 #9 0x00007fd59ccfe39c in com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext>::query (rRef=...) at include/com/sun/star/uno/Reference.hxx:380 #10 0x00007fd59ccfd0b6 in com::sun::star::uno::WeakReference<com::sun::star::accessibility::XAccessibleContext>::operator com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext> (this=0x55ca4a14a1e0) at include/cppuhelper/weakref.hxx:218 #11 0x00007fd59ccfc4d1 in EditBrowseBoxTableCellAccess::getAccessibleContext (this=0x55ca4a14a1a0) at /home/michi/development/git/libreoffice/vcl/source/accessibility/accessibleeditbrowseboxcell.cxx:202 #12 0x00007fd59ccfc6a4 in non-virtual thunk to EditBrowseBoxTableCellAccess::getAccessibleContext() () at /home/michi/development/git/libreoffice/instdir/program/libvcllo.so #13 0x00007fd5a4ce8642 in comphelper::OCommonAccessibleComponent::implGetParentContext (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:208 #14 0x00007fd5a4ce8bdb in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:238 #15 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #16 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #17 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #18 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #19 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #20 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #21 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #22 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #23 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #24 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #25 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #26 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #27 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #28 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #29 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #30 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #31 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #32 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #33 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #34 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #35 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #36 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #37 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #38 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #39 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #40 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #41 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #42 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #43 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #44 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #45 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #46 0x00007fd5a4ce90a9 in non-virtual thunk to comphelper::OAccessibleComponentHelper::getLocationOnScreen() () at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 #47 0x00007fd5a4ce8cb6 in comphelper::OCommonAccessibleComponent::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:242 #48 0x00007fd5a4ce9075 in comphelper::OAccessibleComponentHelper::getLocationOnScreen (this=0x55ca4a156260) at /home/michi/development/git/libreoffice/comphelper/source/misc/accessiblecomponenthelper.cxx:285 [...] Change-Id: If8b0edba80c804ba621c808495358d6358be96ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181154 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07browsebox a11y: Use comphelper::OAccessibleComponentHelperMichael Weghorn
Let AccessibleBrowseBoxBase derive from comphelper::OAccessibleComponentHelper instead of duplicating much of the logic for notifying of a11y events and location/bounds handling. The involved classes are the a11y classes for both, BrowseBox (see BrowseBox::CreateAccessible) and SvHeaderTabListBox (see SvHeaderTabListBox::CreateAccessible). With the fixes to the involved classes from previous commits in place, a quick test for both of these with Accerciser and the qt6 VCL plugin didn't show any change in behavior with this commit in place. Sample scenario for SvHeaderTabListBox: "Tools" -> "Options" -> "Advanced" -> "Open Expert Configuration" Sample scenario for BrowseBox: 1) Start Base, create a new database 2) With the "Tables" section enabled, click on "Create Table in Design View..." 3) in Accerciser's treeview of the LO a11y, navigate through the a11y objects of the table and its children A quick test with Orca also didn't reveal any changes in behavior for the expert configuration case, but triggered a crash for the BrowseBox case. The underlying problem is a preexisting issue however, and will be addressed in an upcoming commit. Change-Id: I2a540ade0c5f6a5a82c764de4cef37be556453fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181153 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-07browsebox a11y: Fix parent-relative cell coordsMichael Weghorn
Parent-relative coordinates are meant to be relative to the immediate parent. The immediate parent of the cells is the table, and the immediate parent of the AccessibleBrowseBoxTable is the AccessibleBrowseBox (which is the a11y class for BrowseBox). Therefore: * Don't add the position of the BrowseBox inside of its parent widget when relative coords are requested. * In AccessibleBrowseBoxCell::implGetBoundingBox, subtract the relative position of the table from the result of BrowseBox::GetFieldRectPixel, because BrowseBox::GetFieldRectPixel returns the relative position within the BrowseBox (i.e. the parent's parent), not within the accessible parent. Without this commit, the wrong area would be highlighted e.g. for the following scenario when using the gtk3 VCL plugin: 1) Start base, create a new database 2) With the "Tables" section enabled, click on "Create Table in Design View..."# 3) Start Accerciser 4) in Accerciser's treeview of the LO a11y, navigate to the a11y object of the (non-header) table cells Result: Incorrect area is highlighted on screen, not the one actually covered by the cell. See also commit 589ead3a6ae776fdbcb426f2817fbb94933a8bf7 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Feb 4 17:16:27 2025 +0100 treeview a11y: Fix parent-relative coordinates for a similar case. Change-Id: I45154fcb8365d40984b34ea750cff621ddd0331f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181152 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-05treeview a11y: Don't report header twiceMichael Weghorn
AccessibleTabListBox is the a11y class for SvHeaderTabListBox. That widget only contains the table without the header, while the (column) header is implemented by HeaderBar which is a sibling of the SvHeaderTabListBox, see the "GtkTreeView" case in VclBuilder::makeObject. The header bar is already part of the a11y tree as a11y class for the HeaderBar. The fact that AccessibleTabListBox::getAccessibleChild was reporting that as a child as well resulted in the header bar (an a11y object with Table role) to appear in the a11y hierarchy seen in Accerciser twice when using the qt6 VCL plugin. (And clicking on it would result in an area to be highlighted that is not part of the area that the parent a11y object occupies. No longer report it as a child of the AccessibleTabListBox. The above can be observed with the "Tools" -> "Options" -> "Advanced" -> "Open Expert Configuration" dialog and the qt6 VCL plugin on Linux. Change-Id: If3099e12dd84cd4f3c420e94c377182c87c65106 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181137 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-05a11y: Use ImplInheritanceHelperMichael Weghorn
Change-Id: I040c0c0e0caac924d97d015adf248aba7dce8dc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181135 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-29icon choice ctrl a11y: Separate selection from active descendant changeMichael Weghorn
When receiving a VclEventId::ListboxSelect event, always send an a11y event to notify about the changed selection if an entry is selected, regardless of whether or not the icon choice control has focus. Make only the ACTIVE_DESCENDANT_CHANGED event conditional on focus, as that is the event that notifies about the child that newly receives focus. Change-Id: Ibea29092ff33be69fde098777b13a9fa96b19c8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180912 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-29icon choice ctrl a11y: Don't announce selection change on focusMichael Weghorn
When processing a VclEventId::WindowGetFocus event, only send and event to notify that the active descendant (= child that has focus) of the icon choice control has changed, but don't announce a selection change event. The latter is handled in VclEventId::ListboxSelect instead. (And when receiving focus, the selected entry generally remains the same, i.e. the selection does not change.) Also, don't try to extract the selected entry from the data sent in the focus event. This code gets triggered for the "Insert" -> "Hyperlink" dialog in Writer. Change-Id: I013da234b78f872b1b286769acdf38a66d58801b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180911 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-29icon choice ctrl a11y: Drop commented code + outdated commentMichael Weghorn
The `NotifyAccessibleEvent` call that the comment refers to was commented and replaced by different handling in commit efb23f29983f87104a684e7fab00b84fc59d131d Author: Steve Yin <steve_y@apache.org> Date: Mon Nov 25 15:24:55 2013 +0000 Integrate branch of IAccessible2 Therefore, drop them. Change-Id: I18f6d80958e369b8a9ef3bce76a03531c3e79057 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180910 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-01-29a11y: Replace Paragraph::checkDisposed uses with base class equivalentMichael Weghorn
Use the existing OCommonAccessibleComponent::ensureAlive instead of reimplementing the logic here. Change-Id: I24d66e4c577a58619d968a4efcb1bad7a19aed7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180897 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>