summaryrefslogtreecommitdiff
path: root/bean
diff options
context:
space:
mode:
Diffstat (limited to 'bean')
0 files changed, 0 insertions, 0 deletions
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44 #1 0x00007f889b09ddef in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:78 #2 0x00007f889b049d02 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #3 0x00007f889b0324f0 in __GI_abort () at ./stdlib/abort.c:79 #4 0x00007f889aca1a3d in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #5 0x00007f889acb300a in ??? () at /lib/x86_64-linux-gnu/libstdc++.so.6 #6 0x00007f889aca15e9 in std::terminate() () at /lib/x86_64-linux-gnu/libstdc++.so.6 #7 0x00007f889acb3288 in __cxa_throw () at /lib/x86_64-linux-gnu/libstdc++.so.6 #8 0x00007f8862346900 in SwAccessibleSelectionHelper::throwIndexOutOfBoundsException (this=0x561f2f8d1910) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:72 #9 0x00007f8862347df8 in SwAccessibleSelectionHelper::getSelectedAccessibleChild (this=0x561f2f8d1910, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accselectionhelper.cxx:283 #10 0x00007f8862298e6f in SwAccessibleDocument::getSelectedAccessibleChild (this=0x561f2f8d1800, nSelectedChildIndex=0) at .../libreoffice/sw/source/core/access/accdoc.cxx:467 #11 0x00007f8862298eaf in non-virtual thunk to SwAccessibleDocument::getSelectedAccessibleChild(long) () at .../libreoffice/sw/source/core/access/accdoc.cxx:467 #12 0x00007f88878c6200 in QtAccessibleWidget::selectedItem (this=0x7f887c014ac0, nSelectionIndex=0) at vcl/qt6/../qt5/QtAccessibleWidget.cxx:1861 #13 0x00007f8885f08ba0 in AtSpiAdaptor::selectionInterface (this=0x561f2b8a7070, interface=0x7f887c014ac0, function=..., message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:2596 #14 0x00007f8885f03ce1 in AtSpiAdaptor::handleMessage (this=0x561f2b8a7070, message=..., connection=...) at .../qt5/qtbase/src/gui/accessible/linux/atspiadaptor.cpp:1479 #15 0x00007f888366d217 in QDBusConnectionPrivate::activateObject (this=0x7f887c00a390, node=..., msg=..., pathStartPos=27) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1448 #16 0x00007f888366e1d0 in QDBusActivateObjectEvent::placeMetaCall (this=0x7f887c03aca0) at .../qt5/qtbase/src/dbus/qdbusintegrator.cpp:1604 #17 0x00007f8886b09bb1 in QObject::event (this=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qobject.cpp:1431 #18 0x00007f88849e2dd0 in QApplicationPrivate::notify_helper (this=0x561f2a554ae0, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3305 #19 0x00007f88849e6ced in QApplication::notify (this=0x561f2a541420, receiver=0x561f2b8a7070, e=0x7f887c03aca0) at .../qt5/qtbase/src/widgets/kernel/qapplication.cpp:3255 #20 0x00007f8886a481b9 in QCoreApplication::notifyInternal2 (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1118 #21 0x00007f8886a48e29 in QCoreApplication::sendEvent (receiver=0x561f2b8a7070, event=0x7f887c03aca0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1558 #22 0x00007f8886a49d68 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x561f2a56fee0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1898 #23 0x00007f8886a48c6c in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at .../qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1752 #24 0x00007f88870377b1 in postEventSourceDispatch (s=0x561f2a5cce80) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:246 #25 0x00007f888d50b81f in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #26 0x00007f888d50da57 in ??? () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #27 0x00007f888d50e1c0 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #28 0x00007f88870369eb in QEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/corelib/kernel/qeventdispatcher_glib.cpp:399 #29 0x00007f8886164858 in QPAEventDispatcherGlib::processEvents (this=0x561f2a545d00, flags=...) at .../qt5/qtbase/src/gui/platform/unix/qeventdispatcher_glib.cpp:89 #30 0x00007f888796a492 in QtInstance::ImplYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:464 #31 0x00007f888796d511 in QtInstance::DoYield (this=0x561f2a5d16c0, bWait=true, bHandleAllCurrentEvents=false) at vcl/qt6/../qt5/QtInstance.cxx:475 #32 0x00007f88924bd626 in ImplYield (i_bWait=true, i_bAllEvents=false) at .../libreoffice/vcl/source/app/svapp.cxx:385 #33 0x00007f88924bcf3f in Application::Yield () at .../libreoffice/vcl/source/app/svapp.cxx:488 #34 0x00007f88924bcd20 in Application::Execute () at .../libreoffice/vcl/source/app/svapp.cxx:360 #35 0x00007f889b327b89 in desktop::Desktop::Main (this=0x7ffcd9ea1c00) at .../libreoffice/desktop/source/app/app.cxx:1679 #36 0x00007f88924deaa6 in ImplSVMain () at .../libreoffice/vcl/source/app/svmain.cxx:230 #37 0x00007f88924e0699 in SVMain () at .../libreoffice/vcl/source/app/svmain.cxx:248 #38 0x00007f889b3a146a in soffice_main () at .../libreoffice/desktop/source/app/sofficemain.cxx:121 #39 0x0000561ef2802a6d in sal_main () at .../libreoffice/desktop/source/app/main.c:51 #40 0x0000561ef2802a47 in main (argc=2, argv=0x7ffcd9ea1e08) at .../libreoffice/desktop/source/app/main.c:49 While QtAccessibleWidget::selectedItem already returns early if the passed selection index is too large according to what XAccessibleSelection::getSelectedAccessibleChildCount() returns, this is not enough because Writer's SwAccessibleSelectionHelper has an inconsistent/broken implementation: SwAccessibleSelectionHelper::getSelectedAccessibleChildCount returns the count of paragraphs that are (partially) selected by the text cursor if no other objects are selected. However, SwAccessibleSelectionHelper::getSelectedAccessibleChild doesn't take these into account and therefore throws the IndexOutOfBoundsException when called with any index. Temporarily (in particular for backporting to release branches), handle the exception in QtAccessibleWidget::selectedItem like other a11y bridges do (see e.g. `selection_ref_selection` for the gtk3 VCL plugin) to avoid the crash. The underlying Writer issue described above will be fixed in a separate commit (and for master only). Change-Id: I874ad4a7a9faf79492967c943517d83df5f47e75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180228 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-11-19improve loplugin passparamsbyrefNoel Grandin I think I managed to disable this when I converted it to use the shared plugin infrastructure. So fix that, and then make it much smarter to avoid various false positives. Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2024-11-18qt: Update vim headers/trailersMichael Weghorn Following commit 4f08a15f3be9b39d0f1e83e6cffa47b62c183b69 Author: lovatico21 <lorenzo04lovato@gmail.com> Date: Wed Nov 13 18:12:58 2024 +0100 updated vim footers in vcl/qt6/*.cxx , update vim header/trailers to those in current `TEMPLATE.SOURCECODE.HEADER` for other qt5/qt6 headers and sources as well (i.e. for directories `vcl/inc/qt5`, `vcl/inc/qt6` and `vcl/qt5/`). Change-Id: If9fea8f4ce955396f064dbd9fd706e76d947bce1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176705 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-11-10com::sun::star -> cssMike Kaganski Change-Id: I890ec73e30d3cc6b210903ecee29431f3cb5f635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175979 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> 2024-11-07[API CHANGE] a11y: Switch AccessibleRelationType to enumMichael Weghorn Switch css::accessibility::AccessibleRelationType from integer constants to an enum. This provides more type safety and improves the debugging experience, e.g. GDB now prints com::sun::star::accessibility::AccessibleRelationType::AccessibleRelationType_CONTENT_FLOWS_TO instead of just "2" when printing the value of a corresponding variable, so it's no longer necessary to manually look up what constant has that integer value to know what relation this refers to. offapi/com/sun/star/accessibility/AccessibleRelationType.idl had this comment: > <p>We are using constants instead of a more typesafe enum. The reason > for this is that IDL enums may not be extended. Therefore, in order to > include future extensions to the set of roles we have to use constants > here.</p> However, the a11y UNO API is internal (not published), so that shouldn't be a concern. Change-Id: I44a7d56cb085dc24effb24fcd34bb222b78ef4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176153 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-10-24qt: Have just a single toQString(const OUString&)Michael Weghorn Move the `toQString` helper function to include/vcl/qt/QtUtils.hxx where it can be used from multiple modules, instead of defining it twice for both, avmedia (avmedia/source/qt6/QtPlayer.cxx) and vcl (vcl/inc/qt5/QtTools.hxx). Change-Id: I7ffe06eaa3aaf3e7c8cc7aa1a4ac41b14db5c20c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175526 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-10-21qt a11y: Map BLOCK_QUOTE role to new Qt equivalentMichael Weghorn For Qt >= 6.9, map the BLOCK_QUOTE role to QAccessible::BlockQuote, newly introduced upstream in qtbase commit [1]: commit 0b5874bc96f4d1a8cba4fe14ee0b3499cc04c8cd Author: Michael Weghorn <m.weghorn@posteo.de> AuthorDate: Thu Sep 12 17:21:37 2024 +0200 Commit: Volker Hilsheimer <volker.hilsheimer@qt.io> CommitDate: Fri Oct 18 21:03:09 2024 +0000 a11y: Add new BlockQuote role With this in place, paragraphs to which the "Block Quotation" paragraph style has been assigned, are now shown with the "block quote" role in Accerciser when using the qt6 VCL plugin with a current qtbase dev build. [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=0b5874bc96f4d1a8cba4fe14ee0b3499cc04c8cd Change-Id: I3b9822e4a5ce6eed3ab4820a208f794bcf398e85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173272 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-10-01tdf#160837 qt a11y: Don't report window role for non-top-levelMichael Weghorn Quoting from offapi/com/sun/star/accessibility/AccessibleRole.idl, AccessibleRole::Frame is for: > A top level window with a title bar, border, menu bar, etc. > It is often used as the primary window for an application. However, the FRAME role also gets used for frames that are not actually top-levels at least with the Qt-based VCL plugins, where there is an object of role FRAME as a child of the actual top-level for e.g. the Writer main window. (The actual top-level is a QtMainWindow.) That frame contains the window content starting right below the (native) menu bar. Mapping the AccessibleRole::FRAME a11y role to the Qt equivalent QAccessible::Window would result in window-relative positions reported via AT-SPI to be relative to that frame, instead of the actual top-level, s. the implementation in qtbase's AtSpiAdaptor::translateFromScreenCoordinates [1] which calculates the relative position to the first top-level in its a11y hierarchy. This resulted in Accerciser's highlighting of the currently selected object to be too far up, as the "window-relative position" was missing the menu bar height in the y coordinate when window-relative positions are used, which is the case on Wayland, s.a. the commit message of commit a499874d9c0685d79b629b4bb246394b6b15691a Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Sep 26 18:22:12 2024 +0200 tdf#160837 qt: Rely on toolkit for frame positions, drop menubar hack for more background. To fix this, prevent reporting an invalid top-level window role for frames that are not actually top-levels: When mapping AccessibleRole::FRAME to a corresponding Qt a11y role, take into account whether the frame still has another (real) top-level window as a parent. This makes the highlighted area in Accerciser become correct when using LO with the qt6 VCL plugin and Accerciser with ACCERCISER_WINDOW_MANAGER=kwin in a KDE Plasma Wayland session. The same would generally make sense for AccessibleRole::DIALOG. However, there that would currently result in the additional semantics of this being a dialog (not another kind of top-level window) getting lost when doing so. As dialogs usually don't have a separate menu bar, at least the incorrect reporting of window-relative positions is less relevant. Leave dialog unchanged for now, maybe reconsider later as needed. Ultimately, using native Qt widgets for dialogs (see tdf#130857) should presumably fix the underlying problem of the extra frame on VCL side being used altogether. [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=da4a6cf78ff42a4f69c2775997ff174ef647f3f3#n2401 Change-Id: I5ae066bd996f042b370b067a30213d3a1045480e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174350 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-07-24tdf#155447 qt a11y: Map TEXT_FRAME role to QAccessible::PaneMichael Weghorn This makes the "sentence" drawing area from the spelling dialog (cui/uiconfig/ui/spellingdialog.ui) show up with role panel instead of "unknown" in Accerciser when using the qt6 VCL plugin. This is the same as with gtk3, where the `TEXT_FRAME` role is mapped to `ATK_ROLE_PANEL`. Change-Id: I41133c51c64749ccd808cb675fe647a0daefac33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170944 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-07-17tdf#155447 qt a11y: Report accessible IDMichael Weghorn For Qt >= 6.8, report the accessible ID provided by `XAccessibleContext2::getAccessibleId` when `QtAccessibleWidget::text` gets called with param `QAccessible::Identifier`, as introduced in qtbase commit [1]: commit 9ec1de2528b871099d416d15592fcc5ef9242a64 Author: Jens Trillmann <jens.trillmann@governikus.de> Date: Wed Mar 13 14:00:38 2024 +0100 Add Identifier role to QAccessible and use it in OS interfaces * Unify the default identifier creation for QAccessibleInterface on all platforms to be the same as the previous identifier on Linux. This may change some identifiers on Windows. [ChangeLog][QAccessible][QAccessibleInterface] Add possibility to add unique identifier to QAccessibleInterface to give a11y elements consistent identifiers. Task-number: QTBUG-123361 Change-Id: I8c42956a4c497e71909d71dcb27bc87433937b69 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> `VCLXAccessibleComponent::getAccessibleId` returns the ID of the corresponding `vcl::Window` which equals to the GtkBuilder ID set in the .ui file, e.g. "SpellingDialog" for the spelling dialog (see `cui/uiconfig/ui/spellingdialog.ui`). This could be used for reliable identification by ATs, e.g. to identify the spelling dialog and specific widgets in it (see tdf#155447) or for automated tests. [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9ec1de2528b871099d416d15592fcc5ef9242a64 Change-Id: I2281d15c38a229410469c29a14fdc4221aeb3e1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170583 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-07-17tdf#155447 qt a11y: Don't report "Unknown" for unsupported propsMichael Weghorn Return an empty string instead of "Unknown" for unsupported properties/text types in `QtAccessibleWidget::text`. Explicitly returning a non-empty string can be misleading, and e.g. also prevents the default calculation of an accessible ID that Qt does internally when an empty string is returned for `QAccessible::Identifier` which was introduced into qtbase in [1] commit 9ec1de2528b871099d416d15592fcc5ef9242a64 Author: Jens Trillmann <jens.trillmann@governikus.de> Date: Wed Mar 13 14:00:38 2024 +0100 Add Identifier role to QAccessible and use it in OS interfaces * Unify the default identifier creation for QAccessibleInterface on all platforms to be the same as the previous identifier on Linux. This may change some identifiers on Windows. [ChangeLog][QAccessible][QAccessibleInterface] Add possibility to add unique identifier to QAccessibleInterface to give a11y elements consistent identifiers. Task-number: QTBUG-123361 Change-Id: I8c42956a4c497e71909d71dcb27bc87433937b69 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9ec1de2528b871099d416d15592fcc5ef9242a64 Change-Id: I5eb5bd7adbc998a74a25f3c6c9ef373bd8faf1c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170582 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2024-04-24[API CHANGE] a11y: Use XAccessible for relation targetsMichael Weghorn Use a Sequence of XAccessible rather than its base interface XInterface for AccessibleRelation's TargetSet. As the targets are accessible objects as well, anything other than XAccessible doesn't make much sense. Using XAccessible right away makes that clearer and avoids the need to query the XAccessible interface. (The winaccessibility bridge was already using `static_cast`, relying on the fact that the objects are XAccessibles.) The a11y UNO API is not published, so an API change should be unproblematic. Change-Id: I7f08e98d1ec303d5343d9a7954187cdd71495ebc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166586 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2024-03-31tdf#146619 Drop unused 'using namespace' in: vcl/Gabor Kelemen Change-Id: Id25d5e3dbf84dea1f9aca5a6ec921d30cbe84bf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165524 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> 2024-02-29tdf#158030 qt a11y: Implement new QAccessibleAttributesInterfaceMichael Weghorn Implement the new `QAccessibleAttributesInterface` just added upstream to Qt in qtbase commit [1] commit fb5ffe862688a87cfc136113e067bcba0c49a7ae Author: Michael Weghorn <m.weghorn@posteo.de> AuthorDate: Fri Nov 10 18:25:02 2023 +0100 Commit: Volker Hilsheimer <volker.hilsheimer@qt.io> CommitDate: Thu Feb 29 04:44:22 2024 +0000 a11y: Add new QAccessibleAttributesInterface , see also QTBUG-119057. [2] This API is available with Qt >= 6.8. That interface makes it possible to report object attributes that are bridged to the platform a11y layers. Use it to bridge the attributes retrieved from the `XAccessibleExtendedAttributes` UNO interface. Together with the pending upstream qtbase change that implements the AT-SPI bridge for Linux [3], the "level" AT-SPI object attribute for headings in Writer is correctly reported to AT-SPI, making the Orca screen reader announce "Heading level N" as expected. For now, map not explicitly handled attributes as key-value pairs to Qt via the special `QAccessible::Attribute::Custom` attribute, which causes them to be mapped to AT-SPI unchanged, and can e.g. be used for testing the tdf#158030 scenario. For common attributes - like those specified in the Core Accessibility API Mappings specification [4] - suggesting to add new enum values to the `QAccessible::Attribute` enum to upstream Qt and using those instead should be considered for the future. Related commit for gtk4: commit 3aca2d9776a871f15009a1aa70628ba3a03ee147 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Nov 9 15:31:57 2023 +0100 gtk4 a11y: Handle the "level" object attribute [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=fb5ffe862688a87cfc136113e067bcba0c49a7ae [2] https://bugreports.qt.io/browse/QTBUG-119057 [3] https://codereview.qt-project.org/c/qt/qtbase/+/517526 [4] https://www.w3.org/TR/core-aam-1.2/ Change-Id: Ibe357bfd72bb2dc6e44ad941e62737d5cac21e1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159309 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-11-14tdf#123864 a11y: Add new AccessibleStateType::CHECKABLEMichael Weghorn Both, AT-SPI and IAccessible2 have a CHECKABLE state that describes whether an item is checkable, i.e. whether it can be checked, i.e. whether it is possible that this object can have the CHECKED state. So far, LibreOffice didn't have any equivalent, and e.g. a checkbox that is ticked would report state CHECKED but not CHECKABLE, which is inconsistent. ("How can an object that is not checkable be checked?") For an unchecked object, the fact that it can be checked is unclear since that one will just have the CHECKED state not being present. Introduce a new a11y state, `AccessibleStateType::CHECKABLE` with the same semantics as in AT-SPI and IAccessible2 to bridge the gap. Map the state in winaccessibility (to IAccessible2), gtk3 and an the Qt-based VCL plugins, which are responsible for mapping to AT-SPI. While Qt has an equivalent state flag, it currently doesn't map that to AT-SPI yet. Pending upstream Gerrit change to implement that: [1] The gtk4 a11y API doesn't have a direct equivalent and will be handled separately in a following commit. Reporting the new state where applicable will be implemented in following commits. [1] https://codereview.qt-project.org/c/qt/qtbase/+/517844 Change-Id: I6aa7fec3b3bd728a5cfedcdc8d6b66f06337f7ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159382 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-11-07qt a11y: Map AccessibleStateType::INDETERMINATE to Qt equivalentMichael Weghorn `QAccessible::State` has a `checkStateMixed` state flag [1] that matches what `AccessibleStateType::INDETERMINATE` is for, and Qt's AT-SPI adapter maps that to the AT-SPI equivalent, `ATSPI_STATE_INDETERMINATE`, so add the corresponding mapping. [1] https://doc.qt.io/qt-6/qaccessible-state.html [2] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/qspi_constant_mappings.cpp?id=c5d9e4a7a78b82ed31e5225c169de4718dfe4f05#n41 Change-Id: Ic16f50344040f3d4ff7ad4ef0002abf5a7ae3dcc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159004 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-11-07qt a11y: Set passwordEdit state for PASSWORD_TEXTMichael Weghorn The Qt API doesn't have a separate role to distinguish password edits from other text edits, but has a `passwordEdit` state. Set that state for objects that have role `AccessibleRole::PASSWORD_TEXT`. With this in place, password entries, e.g. the one in the "Tools" -> "Options" -> "Security" -> "Password for Web Connections" -> "Master Password" dialog, are exposed via the `ATSPI_ROLE_PASSWORD_TEXT` role with the qt6 VCL plugin on Linux, because Qt's AT-SPI adapter takes the `passwordEdit` state into account when mapping the Qt a11y roles to AT-SPI ones. [1] [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=c5d9e4a7a78b82ed31e5225c169de4718dfe4f05#n1637 Change-Id: Icb3f0935e703e2786c5704007cad7eea9070f8a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158987 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-28tdf#135586 a11y: Add a new BLOCK_QUOTE a11y roleMichael Weghorn A block quote role exists in all of WAI-ARIA 1.3 (role "blockquote", [1]), IAccessible2 (`IA2_ROLE_BLOCK_QUOTE`, [2]) and AT-SPI (`ROLE_BLOCK_QUOTE`, [3]). Take over the definition that is the same in WAI-ARIA and IAccessible2: > A section of content that is quoted from another source. The intended use for now is for a Writer paragraph using the "Block Quotation" paragraph style, similar to how the HEADING role is used for paragraphs using a corresponding paragraph style. For gtk3 (ATK) and winaccessibility (IAccessible2), map the new role to the equivalant roles. For macOS and the gtk4 as well as the Qt-based VCL plugins on Linux which currently don't have an equivalent role, fall back to the same role that the PARAGRAPH role is mapped to. This way, the behavior there will remain unchanged once the BLOCK_QUOTE role is used for Writer paragraphs with the corresponding style. In general, treat BLOCK_QUOTE like PARAGRAPH in code applying special handling for the PARAGRAPH role. [1] https://w3c.github.io/aria/#blockquote [2] https://github.com/LinuxA11y/IAccessible2/blob/3d8c7f0b833453f761ded6b12d8be431507bfe0b/api/AccessibleRole.idl#L318 [3] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/7cc4cee53ddbd22631fd110f0e5ce045dec2e411/xml/Accessible.xml#L615-616 Change-Id: I248c183a2e7ec5d6f0a89bf3cb4829bbd8588c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158573 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-24qt a11y: Take current type into account when setting new valueMichael Weghorn As the `XAccessibleValue` documentation [1] describes, the underlying implementations can used different types of numerical values. Qt's `QAccessibleValueInterface` uses `QVariant`, so could in theory also support different numerical types. The AT-SPI Value interface however always uses double. [2] So far, `QtAccessibleWidget::setCurrentValue` was also always extracting a double value from the `QVariant` param and creating an `Any` from that. This however would result in any `XAccessibleValue::setCurrentValue` implementations assuming to be passed an integer would fail to extract a proper new value from the Any. As an example, selecting a currently checked checkbox (e.g. the "Automatic" checkbox in Writer's "Paragraph" formatting dialog, "Indents & Spacing" tab) in Accerciser's treeview of LO's a11y hierarchy woul result in the checkbox to be unchecked, because Accerciser reads the current and then sets the same value again when selecting an item with its "Interface View" tab active. Prevent that from happening by passing a `sal_Int32`/`sal_Int64` value again if the current value is also using that type. [1] offapi/com/sun/star/accessibility/XAccessibleValue.idl [2] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/7cc4cee53ddbd22631fd110f0e5ce045dec2e411/xml/Value.xml Change-Id: I8674fc37798491fd0b57543acb491edbd4a5a056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158380 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-23fix wasm build (int vs sal_Int32 mismatch)Christian Lohmaier error: non-const lvalue reference to type 'sal_Int32' (aka 'long') cannot bind to a value of unrelated type 'int' in file /home/tdf/jenkins/workspace/lo_gerrit/tb/src_wasm/vcl/qt5/QtAccessibleWidget.cxx (since refactoring in 15a6e23c4fc160c50a316da3d18980a02fc10ce8 ) Change-Id: I2689701839ba18b5cffae13afcaa5b1a32b5e4b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158305 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins 2023-10-22Fix typoAndrea Gelmini Change-Id: Iae66bf4a14fd3cdcc8c735832cd6cdc8f73b21ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158317 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr> 2023-10-21tdf#135922 a11y: Prepare reporting text attrs as IA2 obj attrsMichael Weghorn According to the IAccessible2 specification, some of the attributes that LibreOffice handles as text attributes are mapped to IAccessible2 text attributes as well [1], but others should be reported as object attributes [2], e.g. text alignment is reported via the "text-align" object attribute on the paragraph object. So far, `AccessibleTextAttributeHelper` was only handling attributes that are mapped to IAccessible2 text attributes. Prepare for reporting object attributes as well, which will be required to report text alignment on Windows in a compliant way (s. tdf#135922). On the other hand, Qt also expects `QAccessibleTextInterface::attributes` to return text formatting using the attributes specified in the IAccessible2 attribute specifications and maps that to the platform-specific attributes (AT-SPI text attributes on Linux), but currently does not provide any way to report object attributes in addition to text attributes. It however supports e.g. the "text-align" attribute mentioned in the IAccessible2 object attribute specification when it's reported as a text attribute [3]. Therefore, add a new `IA2AttributeType` enum that can be used to specify what kind of IAccessible2 attributes (text attributes, object attributes) to report. Only request IA2 text attributes on Windows when text attributes are requested, but both types for Qt. So far, support for none of the object attributes has been implemented, but an upcoming change will do that. [1] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes [2] https://wiki.linuxfoundation.org/accessibility/iaccessible2/objectattributes [3] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=546208f0ff23819d216cbb5bf0b5daded79b454e#n2193 Change-Id: Ief7c840d3c5274714a914ca0e56df0c5eaffb06d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158255 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-18tdf#157696 qt a11y: Move handling for text attr offsets to helperMichael Weghorn Add a new method `AccessibleTextAttributeHelper::GetIAccessible2TextAttributes` and move some more of the logic from `QtAccessibleWidget::attributes` there to prepare adding handling for spelling errors via the "invalid:spelling" IAccessible2 text attribute and for reuse in winaccessibility. Change-Id: I3b4a89ee680437fa2c35c429639b372a55f5a4b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158088 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-18qt: Drop code for Qt < 5.15Michael Weghorn Our new AlmaLinux 8 baseline provides Qt 5.15.3, so require 5.15 and drop the code for older, now unsupported Qt versions. Change-Id: I512ade1ba503fc7a86527a45142f37f043db6784 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155325 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-12tdf#157696 vcl a11y: Move qt's translation to IA2 text attrs for reuseMichael Weghorn Qt expects the text attributes to be reported as IAccessible2 attributes. Therefore, there is a translation/conversion from the LO-internal text attributes to IAccessible2 text attributes in `QtAccessibleWidget::attributes`. Move the logic from the qt-VCL-specific code into a new VCL helper class `AccessibleTextAttributeHelper`, so it can be reused in winaccessibility in following commits. Change-Id: I434481faa53c74bae95cae5b2c9f0907b87fb1bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157804 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-10-07loplugin:ostr: automatic rewriteStephan Bergmann Change-Id: I2d09b2b83e1b50493ec88d0b2c323a83c0c86395 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157647 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins 2023-07-27qt a11y: Return app as parent for top-level objectsMichael Weghorn If an accessible object does not have a parent in the LO a11y hierarchy or in the QObject hierarchy, return the app as accessible parent. Top-level items (like dialogs) don't have another accessible parent, but are children of the app. This can also be seen e.g. in Accerciser: For example Writer's "Page Style" dialog is listed as a child of the application, but it had no parent without this change in place, breaking automatically selecting the bookmarked a11y object in Accerciser's treeview of the LO a11y hierarchy when restoring the bookmark, since that relies being able to walk up the a11y hierarchy. This is in line with what Qt itself does, s. e.g. qtbase commit [1]: commit 6ec35ff8c56222a317b838b6aac390eb6974de85 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Sat Jul 8 15:16:12 2023 +0200 a11y: Report app as parent for top-level item views As happens for other widgets (s. QAccessibleWidget::parentObject), report the app as accessible parent for item views that don't have another parent set. Otherwise, the accessible tree is broken when there's a top-level item view: The application has the item view as a child, but the child does not have any parent set. Extend a QListView autotest accordingly. Fixes: QTBUG-115135 Pick-to: 6.6 6.5 Change-Id: Ie06874681180a30fc6248dc98f80c4158d837278 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=6ec35ff8c56222a317b838b6aac390eb6974de85 Change-Id: Ia20bf1d5311dd918eb7563161745cdb70edc0787 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154982 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-07-12qt a11y: Check child index in QtAccessibleWidget::childMichael Weghorn Check the child index is valid. Otherwise, calling the method with an invalid index would result in a crash due to a com::sun::star::lang::IndexOutOfBoundsException, e.g. when manually using an invalid index in Accerciser's IPython console: In [12]: acc.get_child_count() Out[12]: 3 In [13]: acc.get_child_at_index(3) In [14]: Change-Id: I95f680a5ac6ee1052f3046a83000fa5b07009239 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154345 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-04-22qt a11y: Implement QAccessibleSelectionInterface added in Qt 6.5Michael Weghorn This adds an implementation of the `QAccessibleSelectionInterface` that was added in Qt 6.5 in commit [1] commit 9d16d5e2245c26e5746fd7609300b84a2a983457 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Oct 11 15:23:54 2022 +0200 a11y: Add new QAccessibleSelectionInterface , s.a. QTBUG-105909 [2]. The `QAccessibleSelectionInterface` is currently still marked as preliminary in Qt, so changes to the API *might* still happen and require an update of the implementation here as well). Quoting from the commit message of the above commit: > This interface is marked \preliminary until: > > 1. There is a working a11y bridge for macOS/VoiceOver > 2. There is a working a11y bridge for Windows/UI Automation > 3. There is a working a11y bridge for linux/AT-SPI > 4. There is at least one implementation (e.g. QAccessibleTable) > that implements it successfully (second candidate: > Qt Quick TableView [...]) The AT-SPI bridge (point 3 from above) has been implemented in [3] commit ece2feee0317b582a56a0bfc783f11fe67d3edee Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Oct 11 15:24:04 2022 +0200 a11y atspi: Bridge newly introduced QAccessibleSelectionInterface , an implementation for `QAccessibleTable` (point 4 from above) was added in [4] commit 092bbc9ad30c6cd7389053dc4b332cc762693676 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Oct 12 07:07:48 2022 +0200 a11y: Implement QAccessibleSelectionInterface for item views . The Qt Gerrit changes for the macOS implementation (point 1 from above) and the Windows/UIA implementation (point 2 from above) are currently still awaiting review: [5] [6] To avoid duplication, just call the newly added methods `QtAccessibleWidget::selectedItemCount` and `QtAccessibleWidget::selectedItem` from the `QAccessibleTableInterface` methods `QtAccessibleWidget::selectedCellCount` and and `QtAccessibleWidget::selectedCells`, and therefore implement the former also for Qt < 6.5. Sample use of the interface from Accerciser's IPython console (with 18 cells selected in Calc and the spreadsheet object selected in Accerciser's a11y object tree; screencast attached to QTBUG-105909 [2]): In [10]: acc.get_interfaces() Out[10]: ['Accessible', 'Component', 'Selection', 'Table'] In [11]: sel = acc.querySelection() In [12]: sel.nSelectedChildren Out[12]: 18 In [13]: sel.getSelectedChild(0).name Out[13]: 'B1' In [14]: sel.deselectSelectedChild(1) Out[14]: True In [15]: sel.deselectChild(1) Out[15]: True In [16]: sel.selectChild(0) Out[16]: True In [17]: sel.clearSelection() Out[17]: True In [18]: sel.selectAll() Out[18]: True [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=9d16d5e2245c26e5746fd7609300b84a2a983457 [2] https://bugreports.qt.io/browse/QTBUG-105909 [3] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=ece2feee0317b582a56a0bfc783f11fe67d3edee [4] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=092bbc9ad30c6cd7389053dc4b332cc762693676 [5] https://codereview.qt-project.org/c/qt/qtbase/+/451353 [6] https://codereview.qt-project.org/c/qt/qtbase/+/451646 Change-Id: Iac3c050448183610af3bd3b10a56e82d7d52cb91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138750 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-03-06qt a11y: Handle all QAccessible::Relation flagsMichael Weghorn The bits/flags in `QAccessible::Relation` can be set in any combination, while the previous code would only properly handle the case that `QAccessible::AllRelations` is set. This would e.g. mean that QtAccessibleWidget::relations(QAccessible::FlowsTo | QAccessible::FlowsFrom) would not return both relations as it should. The previous handling of the case that just a single flag is set also looks odd, since it would use the sal_Int16 value of the UNO relation as an index into the set of relations... Fix this by always iterating over all relations and applying the filter in `lcl_appendRelation` (only append those that match the filter). (At least for AT-SPI, the previous handling should not have caused any issues in practice, since Qt's AT-SPI bridge always passes `QAccessible::AllRelations` from what I can see.) Change-Id: Icc21ac252db026f607fe8d6041252916b1d9e3a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148352 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-03-06qt a11y: Add mapping for relations added in Qt 6.6Michael Weghorn Map `AccessibleRelationType::CONTENT_FLOWS_FROM`, `AccessibleRelationType::CONTENT_FLOWS_TO` and `AccessibleRelationType::DESCRIBED_BY` to the Qt equivalents added in Qt 6.6 and vice versa. As described in more detail in commit e55713dffbe8d8eba18068f6c2af14c10b787220 Date: Fri Feb 17 15:25:37 2023 +0100 qt a11y: Invert relation type to match Qt's semantic , the "inverse" relation needs to be used when mapping to/from the Qt relation. For example the Orca screen reader on Linux makes use of the FlOWS_FROM and FLOWS_TO relations. So far, when using the qt6 VCL plugin with Orca running, moving focus to a Writer paragraph resulted in these warnings being emitted: warn:vcl.qt:220606:220606:vcl/qt6/../qt5/QtAccessibleWidget.cxx:218: Unmatched relation: 1 warn:vcl.qt:220606:220606:vcl/qt6/../qt5/QtAccessibleWidget.cxx:218: Unmatched relation: 2 and thus Orca not being able to make use of those relations. Sample use in Accerciser's Python console, with a Writer document having three paragraphs with texts "First", "second", and "third" and the a11y object of the second paragraph's a11y object selected in Accerciser's a11y tree view: In [1]: acc.queryText().getStringAtOffset(0, pyatspi.TEXT_GRANULARITY_PARAGRAPH) Out[1]: ('second', 0, 6) In [2]: acc.get_relation_set() Out[2]: [<Atspi.Relation object at 0x7fccc36862c0 (AtspiRelation at 0x421e100)>, <Atspi.Relation object at 0x7fccc358c280 (AtspiRelation at 0x4493c60)>] In [3]: first_relation = acc.get_relation_set()[0] In [4]: first_relation.get_n_targets() Out[4]: 1 In [5]: first_relation.get_relation_type() Out[5]: <enum ATSPI_RELATION_FLOWS_FROM of type Atspi.RelationType> In [6]: first_relation.get_target(0) Out[6]: <Atspi.Accessible object at 0x7fccc35aa4c0 (AtspiAccessible at 0x4479820)> In [7]: first_relation.get_target(0).queryText().getStringAtOffset(0, 1) Out[7]: ('First', 0, 5) In [8]: second_relation = acc.get_relation_set()[1] In [9]: second_relation.get_n_targets() Out[9]: 1 In [10]: second_relation.get_relation_type() Out[10]: <enum ATSPI_RELATION_FLOWS_TO of type Atspi.RelationType> In [11]: second_relation.get_target(0).queryText().getStringAtOffset(0,1) Out[11]: ('third', 0, 5) (QTBUG-105864 [1] also has a sample doc and pyatspi script that can be used for testing.) Qt commit adding the relations [2]: commit f5358e5932bc8701621389c265c4ea86c92c536c Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Feb 17 13:48:38 2023 +0100 a11y: Add new relations DescriptionFor, Described, Flows{From,To} This is equivalent to the corresponding relation types defined in the IAccessible2 spec [1] (IA2_RELATION_DESCRIPTION_FOR, IA2_RELATION_DESCRIBED_BY, IA2_RELATION_FLOWS_FROM, IA2_RELATION_FLOWS_TO) and for AT-SPI on Linux [2] (relation types ATSPI_RELATION_DESCRIPTION_FOR, ATSPI_RELATION_DESCRIBED_BY, ATSPI_RELATION_FLOWS_FROM, ATSPI_RELATION_FLOWS_TO). User Interface Automation (UIA) on Windows also has corresponding properties for 3 of them [3]: UIA_DescribedByPropertyId, UIA_FlowsFromPropertyId, UIA_FlowsToPropertyId. This commit adds the new flags and implements the mapping for the AT-SPI case. Note that the relation type is conceptually always "inverted" when comparing Qt and AT-SPI (or Qt and UIA) as clarified in afbfe30093d49eff0ec4c28c220d33c233b9f807. "QAccessible::Description" instead of "QAccessible::DescriptionFor" would align better with the naming scheme of the other relations, but that is already used in the Text enum. [1] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/group__grp_relations.html [2] https://lazka.github.io/pgi-docs/Atspi-2.0/enums.html#Atspi.RelationType [3] https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-automation-element-propids [ChangeLog][QtGui][QAccessible::RelationFlag] Added new relation flags DescriptionFor, Described, FlowsFrom and FlowsTo. Fixes: QTBUG-105864 Change-Id: If2d46099eeea75e177358c821d1ae833a553bd0e Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> [1] https://bugreports.qt.io/browse/QTBUG-105864 [2] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f5358e5932bc8701621389c265c4ea86c92c536c Change-Id: I6e5d78fb26f62a6f1745d4f94647e8dc0fe2abfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138687 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> 2023-02-20qt a11y: Invert relation type to match Qt's semanticMichael Weghorn As Jan Arve Sæther pointed out in a review comment [1] for a pending Qt change to add more a11y relation types to Qt, Qt's semantic for relations is basically the other way around (i.e. inversed) as compared to the semantic used by AT-SPI or LO. For example, if an a11y interface `interfaceA` is the label for another a11y interface `interfaceB`, interfaceA->relations() will contain a pair { interfaceB, QAccessible::Labelled } since the target `interfaceB` is labelled by `interfaceA`. On the other hand in LO, the `XAccessibleRelationSet` for an `XAccessibleContext` has the role that the a11y object itself has *for* the targets, i.e. in that case the interfaceA->getAccessibleRelationSet() would contain an item of type `AccessibleRelationType::LABEL_FOR` because `interfaceA` is a label for the relation target `interfaceB`. Therefore, adapt the mapping between the relation types accordingly. AT-SPI's semantic/handling matches the one that LO has again, which is taken care of by the fact that Qt maps the relation types the other way around in it's AT-SPI bridge again. [2] There's also a pending Qt change [3] to clarify the Qt doc. [1] https://codereview.qt-project.org/c/qt/qtbase/+/428174/comment/eef0cf38_e6ff7dea/ [2] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/qspi_constant_mappings.cpp?id=e8322a4cc043e1a150cc4c6b86ee2f9cf858cd24#n98 [3] https://codereview.qt-project.org/c/qt/qtbase/+/460414 Change-Id: Ic30d878afc477ad3c6a188d22f35078034f8123c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147223 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>