Age | Commit message (Collapse) | Author |
|
There are 2 parts here:
1) in vcl/qt5:
- for release versions: avoid to call QtAccessibleRegistry::getQObject on a null object
- for debug version: add an assertion on object to check it's not null
2) in svtools:
the specific root cause was in EditBrowseBox::DeactivateCell,
we must check m_aImpl->m_xActiveCell in addition to isAccessibleAlive()
Import remark: I had a very naive/bandaid patch at the beginning
this one is entirely thanks to Michael Weghorn
Change-Id: I90214e9c5b7c0aa45481915d7be6020a7dc8c42e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162182
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
(cherry picked from commit 1a637a07a0fb23f4d4bfac69378caff7ee965737)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162141
|
|
Add reporting/handling of the CHECKABLE a11y state
added in
commit d6c6472bbe1c90b733a4d69c4c8528f4de3750d3
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Nov 13 15:53:44 2023 +0100
tdf#123864 a11y: Add new AccessibleStateType::CHECKABLE
in various places where it seems pretty straightforward.
`VCLXAccessibleMenuItem` is a bit more complex and will be
handled separately.
Change-Id: I212b8439609d34410413959973163aa7d809cbf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160901
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161036
|
|
No longer comment out the code to send a
`QAccessible::ObjectDestroyed` event when
receiving an `AccessibleEventId::CHILD` event with
its `OldValue` set.
The underlying issues causing crashes previously seem
to be fixed, I can no longer reproduce these on Debian
testing with Orca 44.1-2 when using the font color
popup as described in
commit 734d10ed3612d75edcee145475ddd0b0165efeac
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Apr 14 16:57:09 2023 +0300
qt a11y: Send QAccessible::ObjectCreated event for correct object
> Adapting this for the case where a child has
> been removed (bridged to Qt as `QAccessible::ObjectDestroyed`
> event) would currently results in crashes when closing the
> application e.g. after using the character font color popup in
> the Writer toolbar. This needs further investigation, so don't
> send the event for now, but add a `SAL_WARN`.
Change-Id: Ib8f21850dd56645cf64a74be0e1ff8242615b928
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156647
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Forwarding of a11y state change events had in general
been implemented in
commit 8c3e8af0e60865ec6d38e2117efdb4ed2f10a20c
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Jun 17 17:29:19 2022 +0200
qt a11y: Forward STATE_CHANGED event as such
, but that commit explicitly did not yet enable forwarding
of changes to the `active` state; quoting from the commit
message:
> For some reason, forwarding changes to state `AccessibleStateType::ACTIVE`
> resulted in Orca becoming unresponsive (stop talking) quite quickly.
> That needs further analysis, so that state change isn't forwarded
> to Qt for now.
I no longer see this problem on Debian testing with Orca 43.1-1,
current LO master and qtbase dev branch as of commit
589c6d066f84833a7c3dda1638037f4b2e91b7aa
plus the pending Qt Gerrit change [1]
("a11y atspi: Implement TableCell methods Get{Column,Row}HeaderCells")
in place. Without the latter qtbase change, I can observe
Orca becoming unresponsive quite quickly when moving around in Calc
after pressing Shift, which may be due to waiting for a timeout
instead of receiving the proper reply to the AT-SPI methods
that that Gerrit change implements. (S.a. QTBUG-113110 [2] for
another scenario using a simple pyatspi script to trigger
what is potentially the same underlying issue.)
Therefore, drop the old workaround.
With this LO and the Qt change in place, Orca announces the
focused and selected cell(s) in Calc with the qt6 VCL
plugin and these steps:
1) start LO Calc with the qt6 VCL plugin
2) press Shift and wait a few seconds
3) move around using the arrow keys
4) select cells using Shift + arrow keys
Ideally, this should also work without step 2, but
apparently that step currently somehow triggers something
relevant (creation of relevant a11y objects and registration
of their listeners?) that doesn't yet happen without step 2.
[1] https://codereview.qt-project.org/c/qt/qtbase/+/473907
[2] https://bugreports.qt.io/browse/QTBUG-113110
Change-Id: Icff8bbe7a6ee233407804c9098166945cdef4315
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151176
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
When an `AccessibleEventId::CHILD` event with
its s `NewValue` set is received, that means that
this a11y child object has been created, so the
`QAccessible::ObjectCreated` event needs to be
sent for the newly created object, not the accessible
interface of the listener (which is the parent).
This makes announcement of (part of) the font color popup
button in Writer's toolbar generally work with Orca and the
qt6 VCL plugin e.g. the buttons in the popup are now announced
(but the colors are not yet).
Adapting this for the case where a child has
been removed (bridged to Qt as `QAccessible::ObjectDestroyed`
event) would currently results in crashes when closing the
application e.g. after using the character font color popup in
the Writer toolbar. This needs further investigation, so don't
send the event for now, but add a `SAL_WARN`.
Also warn when receiving a `CHILD` event with neither `OldValue`
nore `NewValue` set, since that shouldn't happen,
s.a. documentation in
`offapi/com/sun/star/accessibility/AccessibleEventId.idl`.
Change-Id: I183e71de061489fdc9751620820268f280f1949f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150417
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
While Qt doesn't have an equivalent state for the SHOWING
state used in LibreOffice and in IAccessible2, it has
separate `QAccessible::ObjectHide` and `QAccessible::ObjectShow`
event types used to indicate that an object changed state
to being (no longer) displayed, so use those.
In fact, Qt's `AtspiAdaptor` handles those by mapping them to
state change events for the AT-SPI "showing" state again. [1]
[1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=ce16eb2679f69b28d2debd1ce18a99f7279b4295#n896
Change-Id: Iae2b9ec26403d9a9887e86c4155ba64a73f19b60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139812
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Passing the `QObject` of the child directly in the
`QAccessibleEvent` ctor generally has the same effect
as setting the parent in the ctor and then passing the
child index via `QAccessibleEvent::setChild`. In both
cases, `QAccessibleEvent::accessibleInterface` will
return the `QAccessibleInterface*` for the child
afterwards.
However, the latter only works correctly with child
indices that fit into 32 bit, which isn't the case
for all cells in a Calc spreadsheet with 16k column
support.
Change-Id: Iaa7b936df237f82dc21a00d3ac419a1519a95226
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139147
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Qt itself sets the child index when sending
`QAccessible::SelectionAdd` or `QAccessible::SelectionRemove`
events for its own widgets and the handling in its AT-SPI adapter
assumes that this is the case, so do so here as well.
Work around QTBUG-105988 [1] by using the
`QAccessibleEvent` ctor that takes a `QObject*` instead
of the one that takes the `QAccesibleInterface*`, since
calling `QAccessibleEvent::setChild` in the event object
would otherwise break things.
When used in combination with the suggested Qt changes to
send AT-SPI `SelectionChanged` events for these event
types and `QAccessible::SelectionWithin` [2] [3],
the suggested Qt changes to add support
for the AT-SPI selection interface [4] [5] and a
corresponding LibreOffice demo change [6] that implements
the suggested `QAccessibleSelectionInterface`, this
makes Orca announce selected Calc cells for the qt6 VCL
plugin.
[1] https://bugreports.qt.io/browse/QTBUG-105988
[2] https://codereview.qt-project.org/c/qt/qtbase/+/429146
[3] https://codereview.qt-project.org/c/qt/qtbase/+/429147
[4] https://codereview.qt-project.org/c/qt/qtbase/+/428566
[5] https://codereview.qt-project.org/c/qt/qtbase/+/428567
[6] https://gerrit.libreoffice.org/c/core/+/138750
Change-Id: Id1cd28aa8cab208d7713ddd46ede5a7acd73334a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138882
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I7e208d964c5b5badb0a3ea3a19c3ca3cc7fa4ff4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138838
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
While Qt has a `QAccessible::ActiveDescendantChanged` event type,
events of that type are just ignored in Qt's AT-SPI adapter [1].
Work around that by sending a "focused" event for the child
instead, for which handling inside Qt has been added in [2].
While adding support for properly handling
`QAccessible::ActiveDescendantChanged` in Qt might be
worth looking into at some point, this appears to
work just fine for now and e.g. makes Orca announce
the focused cell in Calc when moving between cells using
the keyboard in the qt6 VCL plugin.
[1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=0131dbd2f95449c09758208d8b190c9238a5c46a#n1121
[2] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f3509565480107c2587212f7d55cc5f92facc417
Change-Id: I809695de427b6438d37a5a4840044e7ca3d4cd08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138809
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
The `XEventListener::disposing` doc
(in `./udkapi/com/sun/star/lang/XEventListener.idl`) says:
> /** gets called when the broadcaster is about to be disposed.
>
> <p>All listeners and all other objects, which reference the
> broadcaster should release the reference to the source.
> No method should be invoked anymore on this object (
> including XComponent::removeEventListener() ).
> </p>
>
> <p>This method is called for every listener registration
> of derived listener interfaced, not only for registrations
> at XComponent. </p>
> */
Therefore, clear the `XAccessible` reference held in
the associated `QtAccessibleWidget`
in `QtAccessibleEventListener::disposing`.
This also implies that `QtAccessibleWidget::isValid()`
(overriding the `QAccessibleInterface` method)
will return `false` from that point on.
Change-Id: I077dffe6ca3e887707d1f578e947ccf3c2c2a492
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138364
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
`QtAccessibleEventListener` was holding a reference
to the `XAccessible` but not making use of it.
The `QtAccessibleWidget` class that actually
operates on the `XAccessible` is holding its own reference
in its `m_xAccessible` member, so there's no need for
the corresponding `QtAccessibleEventListener` to
hold another one.
Change-Id: I5b838e55d8285b4e52287dc8c9c70e06e45ab317
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138363
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
which is internal API, unused (as far as I can tell) by external
users.
This state is purely a bitset
(as implemented by utl::AccessibleStateSetHelper)
so we can just return it as a 64-bit value.
This shaves significant time off the performance profiles
of code that loads very complex shapes, because this state
is frequently used, and we no longer need to allocate a return
value on the heap for every call.
Change-Id: Icf1b3bd367c256646ae9015f9127025f59459c2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136786
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Handle `AccessibleEventId::STATE_CHANGED` by
sending a corresponding `QAccessibleStateChangeEvent`.
The previous way of sending a `QAccessible::ForegroundChanged`
event looked rather arbitrary and had no effect in practice,
since that type of event is currently ignored in Qt's AT-SPI adapter
anyway.
At this point in time, the Qt library doesn't forward
changes of all states to the AT-SPI layer. Most notably,
it ignores changes to the focused state.
(Qt itself uses events of type `QAccessible::Focus`
instead of `QAccessibleStateChangeEvent` with the `focused`
state set to notify about focus changes, but that's not exactly the
same, and e.g. causes Orca to ignore some focus changes).
I have submitted a change to Qt to implement
forwarding of `QAccessibleStateChangeEvent`s for the
focused state to the AT-SPI layer, currently awaiting
review. [1]
With that Qt change in place, Orca still ignored these
events in LibreOffice message dialogs, since those
use a11y role `ALERT`, which wasn't previously considered
when trying to retrieve a potential dialog that an
a11y object belonged to.
The corresponding Orca merge request [2] has just been merged.
With these two in place, Orca now announces the focused
button when switching focus using the tab key
e.g. in the "Save document?" dialog when using the qt6 VCL plugin.
(Most other things in the LO UI are still usually not announced.)
For some reason, forwarding changes to state `AccessibleStateType::ACTIVE`
resulted in Orca becoming unresponsive (stop talking) quite quickly.
That needs further analysis, so that state change isn't forwarded
to Qt for now.
[1] https://codereview.qt-project.org/c/qt/qtbase/+/416510
[2] https://gitlab.gnome.org/GNOME/orca/-/merge_requests/127
Change-Id: I81c9a0f5ec8c74f95943d3073bba5b304f995d31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136057
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Note however, that as of now, this doesn't
have any effect in practice, since
`AtSpiAdaptor` for Linux in the Qt library
currently just ignores `QAccessible::TableModelChanged`
events instead of forwarding them as corresponding
AT-SPI events. [1]
[1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=9a4c32cedda3a00e06eb3aed13a731d23f6c56d9#n1105
Change-Id: I6339d172da54bc30987bb9261ce37005ebce5501
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132222
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: Ib4e6f06a5cdac1ac47eb3d273ca103fb5081550e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130361
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I34d813ced29a591b0a6652eeb1271a978980bba5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130359
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Trigger the corresponding Qt accessibility
events for deleted and inserted text rather
than sending a QAccessible::TextColumnChanged
event (which looks like a rather arbitrary choice...).
Qt also has a 'QAccessibleTextUpdateEvent'
class that could be used to send a combined
event, but since we get the relevant data
separately in the LO event, using the latter
wouldn't make things easier. And at least
for the AT-SPI case on Linux, Qt sends
separate AT-SPI events via D-Bus anyway. [1]
Unfortunately, qt5/qt6 VCL a11y is not yet functional
enough to e.g. test that the correct AT-SPI events
are actually received when using the the script mentioned in
Change-Id: Ibcae27ecfccf41a909e06d01ce681e4b7b97eb25
(gtk3 a11y: Migrate from deprecated "text-changed" ATK signal).
[1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp#n964
Change-Id: Ia9282382b6d5fd6bffd536dcda2989a6da901e90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130356
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
The previous handling of mapping that to
QAccessible::TableSummaryChanged looks rather arbitrary.
Change-Id: I066cee4bd90a49a47dd29252c11f8f74edccb637
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130141
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
And also: "vcl.opengl.qt5" -> "vcl.opengl.qt"
Change-Id: I86f8a34cb8c1303a81ffbf40c801ba628f3fa0d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124065
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
This renames the source and header files according to the
new class names without a "5" in them, as mentioned in
Change-Id: Idf422f82ca9dafbb70e9a64de9c8cfc4cc8c0909
(qt5: Remove "5" from class names in qt5 VCL plugin):
> Renaming the headers and source files will be done
> in a separate commit to make tracking git history easier.
Change-Id: If955e77c8ba508d0a2e01e3a9df1be6dc04c4e4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122806
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|