Age | Commit message (Collapse) | Author |
|
Change-Id: Ia7abdd7fe1fbc5b1a6eaecf7d842852bc3815e6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167201
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Change-Id: I9659627ce90d6e23bbb3c27e01c365f1167b39ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167171
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
|
|
…by a simple/static $(gb_UnpackedTarball_workdir)/foo
see also 0c4c84a14b01c71c76a9c45a7f26aec4d64f3e4f
Change-Id: I8e6aa55c85534c4446556548910c950ddbe7c6fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167163
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
|
|
…by a simple/static $(gb_CustomTarget_workdir)/foo
The build system has a lot of overly complicated leftovers from when it
was introduced and had not only deal with split repositories but also
had to coexist with another buildsystem. Along with lots of copy'n'paste
along the years the makefiles became hard to grasp for newcomers with
all our calls and evals.
As a first step to streamline that, the macros from TargetLocations that
simply prefix a static path to the argument (and similar of the same
kind) are a natural pick before simplifying the rules themselves/getting
rid of a bunch of eval statements.
Change-Id: Ia06dbbcd5d1994755a2ff05b84f72ccbc4e3cab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167005
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
|
|
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
|
|
... instead of hard-coded 7.
Change-Id: I2ac44719043c827ce2a65687be021d7f823898d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166505
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Use `AccessibleRelationType::LABELED_BY` and
`AccessibleRelationType::LABEL_FOR` instead of
hard-coded numbers 6 and 5.
While at it, also rename the misspelt
"pRLebelContext" to "xLabelContext".
Change-Id: Id4e5cec0f04b9257eb141fd9bac64e7f01fa32ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166504
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
`AccObject::GetMAccessibleValueFromAny` converts an
Any to a string representation, which is unrelated
to any class members, so drop the null check for the
`m_pIMAcc` member and make the method static.
Change-Id: I07216f87c0fadbe239d1e16a048e2799cebac7bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166184
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
When the checked or indeterminate state of a toolbar button
changes, forward the corresponding UNO a11y event as
a corresponding MSAA event.
For roles `AccessibleRole::PUSH_BUTTON` and
`AccessibleRole::TOGGLE_BUTTON`, `AccObject::GetMSAAStateFromUNO`
uses `STATE_SYSTEM_PRESSED` instead of
`STATE_SYSTEM_CHECKED`, so also use
`UnoMSAAEvent::STATE_PRESSED` for the event.
It's unclear why sending of such events would generally
be omitted for "special toolbar items" previously.
The events can be used to implement announcement of
toggled font attributes in NVDA, e.g. when the "Bold"
button in the formatting toolbar is toggled via a keyboard
shortcut, similar to how Orca does it (s. tdf#123864).
Related NVDA issue for which I plan to submit a PR: [1]
[1] https://github.com/nvaccess/nvda/issues/4248
Change-Id: Ic2846e338802c3cb7656de5b77e4df23bd5b0703
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166155
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I859138dee575ef7fd76db28b619c673782914782
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161235
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
|
|
Inspired by
commit 0a2622760a967e9d64cfdc632548dd42c1836324
Date: Wed Nov 8 13:54:14 2023 +0100
Drop presumably redundant null check
Change-Id: Icb2bfb83ebf4146eb3091a6021ecac75aa6626b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160464
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
And while at it, also replace the local variable that holds
the role with 2 `sal_Int16` ones adhering to our naming scheme
instead of calling it "Role".
Change-Id: Ia49cfd23f919098eaea929601c4c432be3fcfe63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159383
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
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>
|
|
Rather than having one array with UNO states and one with IAccessible2
states, map the states explicitly using a new helper function.
The third array that the
// maintenance the consistency, change one array, change the three all
comment was referring to is potentially one of the two
removed in
commit 3d4da2347ee6ef787902e0af57e7f9635e3bd6c0
Date: Fri Nov 27 16:48:38 2015 +0100
Remove unused data
Change-Id: I5553b28c58fedab24f2adc789ad91c9889a4ef61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159381
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Just use the `m_accRole` member directly.
Change-Id: I6a4eae9bc00422683e600fa1be300264d45fec46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159380
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Just use `m_accRole` directly, as already
happens elsewhere in this method.
Change-Id: Ibd3358e9f85621ba7d9c99d5ed0812b6c692d473
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159379
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
In a18bdb3bc05e761704cc345a66a9d642bc4f4a0a "Integrate branch of IAccessible2",
this had originally been
> if (pAgent && pAgent->IsStateManageDescendant(pXAccessible))
> {
> return;
> }
so lets assume the `pAgent` check was only there to avoid a null deref
Change-Id: I320c181ff7d86d7c328bf9e5139dce2df1facb7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159130
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
Change-Id: Ifa06de5d3798bc426678aa7e3bec339282061bb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159112
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Id34e34b8f2bbd903f60d293783031a728a6da8ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158587
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Ic34324139bb02ff72d68f59ff761b4491f17322e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158586
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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>
|
|
The previous `ROLE_TABLE` looked like it might
explicitly map the UNO role on the left-hand side
to the IAccessible2 role on the right-hand side,
and the comment also said so.
In reality, the UNO role on the left hand side was
not really accessed, but the assumption was that
the index of each entry would correspond to the
sal_Int16 value of the UNO role
(`css::accessibility::AccessibleRole`).
Make that mapping more explicit by replacing
it with a helper function
`lcl_mapToIAccessible2Role` and slightly
simplify `AccObject::UpdateRole`.
Change-Id: Id02553c4df042982f92fce3338077e95db687a83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158572
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
So far, there was an internal copy of the IAccessible2
IDL file added in 2013, and never updated since then
(except for cosmetic changes like formatting and typo
fixes), and therefore it e.g. doesn't have the
`IA2_ROLE_BLOCK_QUOTE` role needed for tdf#135586.
Drop the outdated internal copy and integrate an up to
date upstream version (current git master) instead.
Instead of duplicating things in an internal copy,
switch to using the usual mechanism for externals.
The IAccessible2 source contains separate .idl files
for the different interfaces, while the previous
interal copy was already the merged IDL file.
Call the IAccessible2 `./concatidl.sh` script to generate
the merged `ia2_api_all.idl`
(s. external/IAccessible2/ExternalProject_IAccessible2.mk)
and adapt the winaccessibility make files to use that
version instead of the internal copy.
(Add a dependency to the target that generates
`ia2_api_all.idl`.)
The tarball was generated from the master branch of the
IAccessible2 git repo [1] as of
commit 3d8c7f0b833453f761ded6b12d8be431507bfe0b (HEAD -> master, origin/master, origin/HEAD, mygithub/master)
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Oct 13 04:16:03 2023 +0300
Update no longer working links (#26)
* Update link to Linux Foundation Trademark Policy
* Update link to Object Attributes specification
Signed-off-by: Michael Weghorn <m.weghorn@posteo.de>
using this command:
$ git archive -o ../IAccessible2-1.3+git20231013.3d8c7f0.tar.gz --prefix=IAccessible2-1.3+git20231013.3d8c7f0/ master
Andrea Gelmini's typo fixes have been upstreamed in [2].
[1] https://github.com/LinuxA11y/IAccessible2
[2] https://github.com/LinuxA11y/IAccessible2/pull/21
Change-Id: I9f19ff55694da5d3a9a8750be8de387cbf6da785
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158427
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Extend `CMAccessible::get_attributes` so that
it also reports the text-related IAccessible2
object attributes, since what is meant to be
reported as a text attribute and what is meant
to be reported as an object attribute differs
between the IAccessible2 specificiation and what
LibreOffice does on the UNO level, s. the commit message
in this previous change for more details:
Change-Id Ief7c840d3c5274714a914ca0e56df0c5eaffb06d
tdf#135922 a11y: Prepare reporting text attrs as IA2 obj attrs
Just use a character offset of 0 when querying via the
`XAccessibleText` interface here. The exct offset used
used shouldn't make any difference for paragraph-specific
attributes.
With this and the NVDA pull request [1] to evaluate attributes
according to the IAccessible2 text attributes and
IAccessible2 object attributes specifications, NVDA
now reports the alignment of paragraphs in Writer, e.g.
says "align center" since the corresponding attribute is
now reported for the paragraph object, as can also
be seen by querying the IAccessible2 interface manually
in NVDA's Python console:
>>> focus.IAccessibleObject.attributes
'heading-level:;level:;text-align:center;'
("text-align:center;" was not yet reported without
this change in place.)
[1] https://github.com/nvaccess/nvda/pull/15649
Change-Id: I5723797232f89db6a2b74d4a601344f2078ee630
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158260
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
If the `XAccessibleExtendedAttributes` interface
isn't implemented, just return an empty string
for the attributes instead of an error code.
(This seems like a totally valid case to me,
no need to report an error.)
Change-Id: I986f030bc7a01da0fdd92a5aa2b4cf3c0d6a9200
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158258
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I89a4ed514e1c24e683b081d04f72cd62ede80065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158257
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
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>
|
|
`CMAccessible::get_String4Numbering` is unused since
commit 2bf88c172c9c9d159344b95fb96073f4891a6c30
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Oct 18 13:44:42 2023 +0200
tdf#157696 wina11y: Switch from custom to IA2 text attributes
, so drop it.
This means that `CMAccessible::get_StringFromAny` is then
also unused, so drop it as well.
Change-Id: I35abc94b2fc2ecec1789918fbf4ed6707a96c974
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158195
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
So far, reporting text attributes on the a11y layer on
Windows did not follow any standard/specification, but
LibreOffice's custom attribute values were mostly reported
as is (i.e. using the LibreOffice-internal attribute names
and values), and assistive tooling had to interpret those in order
to support reporting them to the user in a useful way.
For example, NVDA has custom code in the LibreOffice-specific
app module to do so. [1]
Stop using our custom attributes and switch to the
use of attributes according to the IAccessible2 text
attributes specification [2] instead, which is the applicable
specification for `IAccessibleText::get_attributes` that
is implemented here.
This implies that by reporting more IAccessible2 text attributes,
those should "automatically" work if assistive tooling handles
those, as is e.g. the case for NVDA and the the "invalid:spelling;"
attribute for spelling errors, for which bridging to IA2 has
been iplemented in
Change-Id I54e5bcbb4bef4c73068243f91a3ee69c10326460
tdf#157696 a11y: Report spelling error via IA2 "invalid:spelling" attr
(See also the other tdf#135922 commits preparing for this
change.)
A change in NVDA is still needed in addition to switch from only
handling the custom values for LO to use the existing code
path for handling IA2 text attrs instead.
Pending pull request that implents this: [3]
[1] https://github.com/nvaccess/nvda/blob/9878248c217156de4defe244d2df797d6b3bd0ca/source/appModules/soffice.py#L35-L137
[2] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes
[3] https://github.com/nvaccess/nvda/pull/15649
Change-Id: I11492bb5d09d64fd153db1b73d97a331a98ee535
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158090
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Just use the private `pRXText` member directly. The separate
getter doesn't really help regarding readability,
in particular since the typical usage pattern
involved first checking the member directly, then
using the getter, making it less obvious that this
was about the same object/reference e.g.
if(!pRXText.is())
{
return E_FAIL;
}
if( offset < 0 || offset > GetXInterface()->getCharacterCount() )
return E_FAIL;
Change-Id: Iaf786220b94a37e79a46985f58e0586252846f56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157766
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Using operator= with either an empty Reference
or nullptr has the same effect.
Change-Id: Ifa33127f3718ba4bbf3d364484b412b4108719a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157765
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
The description of the UNO API role (s.
`offapi/com/sun/star/accessibility/AccessibleRole.idl`)
and the IAccessible2 role `IA2_ROLE_FRAME`
(s. `winaccessibility/source/UAccCOMIDL/ia2_api_all.idl`)
match. (The first sentence is even identical.). Therefore, map
them accordingly instead of mapping to `ROLE_SYSTEM_DIALOG`,
which is not really the same.
It's not clear why this "perfect match" was commented
ever since
commit a18bdb3bc05e761704cc345a66a9d642bc4f4a0a
Author: Steve Yin
Date: Thu Nov 14 08:18:05 2013 +0000
Integrate branch of IAccessible2
I noticed this because announcement of the status bar in
Writer by NVDA as implemented in NVDA commit [1]
didn't work any more after
commit 2cd1408dd7d6688357257f4a58a8b467628b1884
Author: Michael Weghorn
Date: Thu Aug 17 13:15:46 2023 +0100
tdf#156561 a11y: Create VCLXTopWindow peer for border win frame
as the DIALOG role was used instead of the WINDOW role
after this, and NVDA doesn't consider that yet when
looking for the status bar.
It also doesn't take `IA2_ROLE_FRAME` into account yet,
but this NVDA PR makes NVDA to consider both,
`ROLE_SYSTEM_DIALOG` and `IA2_ROLE_FRAME` as well: [2]
Just mapping to `ROLE_SYSTEM_WINDOW` instead would
still be a better match than the previous
`ROLE_SYSTEM_DIALOG` and would make that
NVDA scenario work again without further
changes to NVDA, but would rather be a workaround
than the proper solution.
[1] https://github.com/nvaccess/nvda/commit/62536a97cd29019c7055c927746da72435d12b95
[2] https://github.com/nvaccess/nvda/pull/15592
Change-Id: Ide39222d2525cb64106c878e8b0a11174bcb16ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157658
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I94b00910d261731b712f21a92766d97fed4889a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156927
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I058551e87bca42adede860f6f299b0f7ae2af3b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156798
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Just use the `pRXAct` member directly.
In particular the fact that all of the `CAccActionBase`
methods mixed both ways of accessing the member (first checking
`pRXAct` directly, but then retrieving it via
`CAccActionBase::GetXInterface` to call a method
on it) didn't really increase readability of the code.
Change-Id: Ic6f5ce9a9b229b949ac656668e3bbf01cb65af2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155956
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
... and "#CHECK XInterface#" comments;
it's obvious that this is what the next lines do.
Change-Id: I09234d1a2f5c58cfab1580f188229d28d27fc402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155506
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
... to return the `IAccessible*` in
`AccObjectWinManager::GetIAccessibleFromXAccessible` and
`CMAccessible::get_IAccessibleFromXAccessible` and adapt
the call sites accordingly.
This is more straight-forward and the extra bool return
value didn't add anything, since it was also just
saying whether the pointer was a nullptr, so rather
check that directly.
Also drop `AccObjectWinManager::GetIMAccByXAcc` that
does the same thing and switch the only call site
to use `AccObjectWinManager::GetIAccessibleFromXAccessible`
instead.
Change-Id: I72933df62aa9ac1ff3f2a84c5045dfae354c18e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155505
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
When `AccTextBase::get_offsetAtPoint` gets called with
screen coordinates, convert them to local coordinates
within the text object first, because that is what
`XAccessibleText::getIndexAtPoint` expects.
Not doing so resulted in NVDA failing to create
a TextInfo object in the mouse event handler [1]
when hovering over a Calc cell containing text,
because the method would always return an offset
of -1.
With this change in place, NVDA now announces the
text when hovering over the text and mouse tracking
is enabled in NVDA (which is the case by default).
Other than with Microsoft Excel, the text is only
announced when the mouse is actually over the text,
not over free space in the cell, which might be
because Excel uses UIA and the UIA equivalent,
`ITextProvider::RangeFromPoint` [2] shall also return
the index of the closest character when the point
itself is not over the actual bounds of any
character.
[1] https://github.com/nvaccess/nvda/blob/a198c9b5f27e47ff2830f77c833eec584078dfd8/source/NVDAObjects/__init__.py#L1209
[2] https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextprovider-rangefrompoint
Change-Id: I1e4ab2dd3dace5fea1de2eef67a91fe3c31218a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155492
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Instead of manually iterating over the children
and checking whether the given position is in the location
that they're in in `CMAccessible::accHitTest`, use
`XAccessibleComponent::XAccessibleComponent`, which
provides exactly the functionality that's needed.
(This is similar to what the Qt-based VCL plugins
on Linux do, s. `QtAccessibleWidget::childAt`.)
This also drops the need to limit this to objects
that have at most a certain amount of children
for performance reasons (previously 256) and thus
makes this work e.g. also to identify a Calc cell
that the mouse pointer is currently over while previously
the document was returned, as could be seen also in
NVDA's Python console:
1) start NVDA
2) hover over a Calc cell
3) press NVDA+Ctrl+Z to capture snapshot variables
4) check what NVDA identifies as the mouse object
via the Python Console:
Before:
>>> mouse
<NVDAObjects.IAccessible.IAccessible object at 0x00FB9910>
>>> mouse.name
'Untitled 1 - LibreOfficeDev Spreadsheets'
>>> mouse.role
<Role.DOCUMENT: 52>
With this change in place:
>>> mouse
<NVDAObjects.Dynamic_SymphonyIATableCellEditableTextWithAutoSelectDetectionIAccessible object at 0x0774DD10>
>>> mouse.name
>>> mouse.role
<Role.TABLECELL: 29>
The cell's text still isn't announced by NVDA even
with mouse tracking enabled, but that's another issue.
Change-Id: Ib821020cef6303ab786c4c3fc3ccd917398214f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155491
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I4ae7527d9b5047d46aab44a1ab6fa42a99c43a14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155490
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
`AccObjectManagerAgent` was holding an
`AccObjectWinManager` object and forwarding
everything to that one and the event listeners
were holding a pointer to the `AccObjectManagerAgent`
object.
Drop this `AccObjectManagerAgent` indirection
and let all of the classes that were interacting
with the `AccObjectManagerAgent` directly interact
with the `AccObjectWinManager` instead.
The idea of having the agent seems to have been
to have an abstraction layer and implement
different accessible object managers for all
platforms, but the agent already has quite some
Windows-/IAccessible-specific code/interface and by now, the
Linux VCL plugins and macOS have their own
a11y bridges, so the TODO do implement this here
for Linux as well seems outdated to me.
Even if implementing this for Linux and/or macOS
in a similar way, I don't see the need for the
agent layer, but one way might be to
just have an abstract base class
(e.g. `AccObjectManager`) that `AccObjectWinManager`
and implementations for other platforms derive from,
and have the SalInstance return the platform-specific
implementation that the `AccTopWindowListener` would
then retrieve and pass on.
Given that `AccObjectManagerAgent` was forwarding
all calls to `AccObjectWinManager` and the methods
and params are mostly the same by now (s.a. the
preparatory commits), this change is mostly
straightforward.
A few notes:
* `AccObjectManagerAgent::InsertAccObj` had a default
nullptr value for the HWND that
`AccObjectWinManager:InsertAccObj` didn't have yet,
so add that.
* `AccObjectManagerAgent::GetIAccessibleFromResID` had
an out param instead of a return value; call sites
were adapted to fit
`AccObjectWinManager:GetIAccessibleFromResID`.
* The `UpdateValue` and `UpdateAccName` methods
taking 2 params are called `SetValue` and
`SetAccName` in `AccObjectWinManager` instead,
so adapt call sites accordingly.
* prewin.h and postwin.h includes had to be added
around the windows.h include in AccObjectWinManager.hxx
(build would otherwise fail)
* A few `AccObjectWinManager` methods had to be made
virtual to make linking work.
Change-Id: I88741bf416d4db25d78e973c0db060a828f27926
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155440
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I71659b8aa3ba0f0097aa4200ec159272c5c75b24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155439
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Switch the param order in `AccObjectManagerAgent::NotifyAccEvent`
to be consistent with all of its other methods that take the
`XAccessible*` first, and also with
`AccObjectWinManager::NotifyAccEvent` that is called by the
method.
This is also in preparation of dropping
AccObjectManagerAgent altogether.
Change-Id: I83d331176971cc728524266d87939f33acd375f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155438
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Calling this without passing an actual XAccessible*
wouldn't make any sense anyway.
Change-Id: Ie8d8aecc0c0a3a8a2c1ef62015fba7ad242059b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155437
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Move the casting from AccObjectManagerAgent::Get_ToATInterface to
AccObjectWinManager::Get_ToATInterface and just do a
`reinterpret_cast<HWND>(...)` right away instead of a
`static_cast<HWND>(reinterpret_cast<void*>(...))`.
This is in preparation of dropping the AccObjectManagerAgent
indirection altogether.
Change-Id: Iad759f856f727418aab0d20b479fc38feac714ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155436
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Move the logic from AccObjectManagerAgent::GetIAccessibleFromXAccessible
to the new AccObjectWinManager::GetIAccessibleFromXAccessible and just
forward to that one.
This is in preparation of dropping the AccObjectManagerAgent
indirection altogether.
Change-Id: Ic276a04cf7dda3762cee0d3932962e2a0947cfde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155435
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
`AccObjectManagerAgent::pWinManager` gets set
in the ctor and is never reset explicitly, so
I don't see any way it can ever be null before
the `AccObjectManagerAgent` object itself gets
destroyed.
Change-Id: I027ca0d15cbc7ca8e183b71b0dbee7ce1acc925d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155434
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Just retrieve it from the context directly here, and drop the now
unused `AccObjectWinManager::GetRole`.
Change-Id: I4c14d2f9b6fb1df9c58149576897c8585ba4a437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155433
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
With the grid control now reporting row/column headers
due to the previous tdf#156473-related commits, this
copy-paste mistake in
commit 8a4271e168f70f9147b567189c1770a243e7fcb1
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Aug 5 09:49:02 2022 +0100
wina11y: Implement IAccessibleTableCell::get{column,row}HeaderCells
was now causing hard to debug crashes when moving around
in the table from the tdf#156473 sample macro with
the NVDA screen reader running on Windows.
Change-Id: I9fa30c1181d0fd21a85a73fd660c49667850d82b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155311
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Now that Change-Id I62ab32342ef67c770ced9f0d2be867dc9355bd4a
("tdf#156561 wina11y: Handle CHILD event") has implemented
handling for the CHILD event in `AccEventListener`,
drop the overrides in child classes that effectively
do the same.
For the case that a new child gets added,
`AccFrameEventListener::HandleChildChangedEvent`
also passes the HWND, so leave that and only
forward to the base class for the other case.
Change-Id: I68d836abedbf3563df84187d56851820c043866f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155127
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|