Add a new AccessibilityTools::getAccessibleObjectForId
helper that can be used in a11y tests to identify an object
by its accessible ID.
Add a test that checks that the accessible ID of the
spelling dialog matches what Orca's logic expects
in order to identify it, and that more UI elements
with expected accessible IDs exist.
This is to prevent breaking Orca logic without noticing.
Any changes affecting this test should be discussed with
the Orca maintainer first.
See the comment above the newly added test for more details
and a link to the corresponding Orca commits.
The new test initially only checks that objects with corresponding
IDs exist, could be extended to verify more of their
properties as needed.
Logic for checking availability of a dictionary, needed for
spell check was taken over from the existing tdf155705 test in
sw/qa/extras/accessibility/tdf155705.cxx, whose sample doc
is also used.
Change-Id: I0c5629272a89a4a570e080e62e99b6c105369cf9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176281
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
we can just take a "const &".
(found by running clang-tidy with the
performance-unnecessary-copy-initialization warning)
Change-Id: I20fd208c65303da78170b1ac06c638fdf3aa094b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176267
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
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:⭐: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
As defined by commit 69586e8381 (UI
tests: use a dedicated desktop on Windows, 2024-07-17).
Change-Id: Icd4ad6dfa95301fc1f6e699349278d3a0198fd08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175296
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
so there's a recheck on each major if they are still needed
Change-Id: I351f731fe4eaec0ebf735147a9a168cccba3bca5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174883
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
These are only sent to an external API expecting char*-like strings,
or for comparison. Having every assertXPath having three of _[ou]str
is too much syntactic noise, making the unit tests almost unreadable.
Change-Id: Ic004a36ea75e7bfe0b96f405c40f926a957b51cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174416
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
In commit cf15306ccf (ERROR: Invalid
content was found starting with element 'p:pic'., 2014-12-22), the
pic element inside the oleObj element was only alloswed for the old
revision of ECMA-736 export, because that was considered invalid by
officeotron. However, as of ECMA-376-1:2016, this element is
mandatory; CT_OleObject definition in Annex A has:
<xsd:element name="pic" type="CT_Picture" minOccurs="1" maxOccurs="1"/>
and Annex L (Primer) has L.7.2.5 "Embeddings in a PresentationML
Document" saying:
The oleObj element shall have a pic child element that (optionally)
contains the image data to be used in place of loading the actual
object data.
The omission of this in the export is the reason of tdf#163064. So
here I filter out the error from the validation results, which is
not ideal (I have no way to know if the found pic is really in the
oleObj, or somewhere else), but a lesser evil, compared to required
exclusion of all tests that export OLE objects.
Change-Id: Ia73a49da7347e8ff22c626e211b55ba1e0625070
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173761
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
So parseLayoutDump is only called once per test
Change-Id: Ia199e0a7eeac26fbde94f6450d2aa49828940806
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171219
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Increase the timeout for a11y UI tests from 1 to 2 min,
to see whether this helps with one slow Windows Jenkins
builder running into the timeout every once in a while,
as was mentioned in ESC calls.
Example from [1]:
timeout waiting for dialog 'Bookmark' to show up
warn:vcl.schedule:6600:11456:vcl/source/app/scheduler.cxx:524: Uncaught exception during Task::Invoke()!
abort() has been calledwarn:sal.cppunittester:6600:11456:sal/cppunittester/cppunittester.cxx:601: CAUGHT SIGABRT:
[...]
[1] https://ci.libreoffice.org/job/gerrit_windows/181051/console
Change-Id: I5b16ea8c538f6e2b5a30ebac714e177e696aac92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170569
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Take care to match the case of the names. Some tools rely on specific
case; so standardize on what Word outputs.
getXPath is modified to tell which XPath has failed (needed for the
unit test).
Change-Id: I3e71f5905b26d7e784d68ba11ff205eefedaaa2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168755
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Add option to check data validity with case sensitive and case
insensitive. The default set would remain the original case insensitive
mode for data validity.
Change-Id: Ic4fe56e2b31b7fc348b742f3b95fb44cd35bc49d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167280
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
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
found while doing other builds - if the build ordering is very unlucky,
acc is not built when this runs, the dynamic load fails in the
accessibility factory fails, and we fall back to using the
DummyAccessibilityFactory instead of the real one and the test will
crash.
Change-Id: Ic16fdbe17d50c6be26b5627a4f515c91e1f7f609
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163091
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Commit 260d6cc647 (INTEGRATION: CWS mtg2
(1.30.120); FILE MERGED, 2005-12-21) for #i58438# made sure to process
previously opened bookmarks that close at this node, before opening
the bookmarks that start here.
Commit 76a4305d1e (sw: fix inconsistent
bookmark behavior around at-char/as-char anchored frames, 2017-12-21)
re-introduced the problem accidentally: it only intended to handle
case when there is an anchored frame here.
This change re-instates the correct order (close bookmarks first; then
process collapsed ones; then open new bookmarks) in case there's no
anchored frames here.
To avoid a problem when a non-collapsed bookmark starts and ends at
the same point (e.g., its text was deleted), it gets converted to
collapsed in lcl_FillBookmark. Thus, testRemoveBookmarkText was fixed
in sw/qa/extras/uiwriter/uiwriter4.cxx. There is no reason to keep
the separate -begin/-end elements, especially since on the following
open/save round-trip, it will become collapsed anyway.
Change-Id: Ib555a76f6f776001e12908a1299c24eebf591f6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162743
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
it's null checked before the lambda gets called so make this a
reference
Change-Id: Ib8804a2003cbdc6b7b62d8a38fa514d0ce08128c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162495
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
so use that instead
Change-Id: I0a627fdd2f2657a3f23d47f014ff7019cab544f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162330
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
in multiple views, while the invalidations rectangles should be reported
at the same place from each view.
on load, ScTabView::SetZoom gets called with the zoom stored in the
document settings, which both calls sets Zoom on the ViewData, and then
calls ZoomChanged, which syncs the GridWindows MapMode from the ViewData
derived GetDrawMapMode().
Later lok sets zoom via setClientArea which leaves the GridWindows
MapMode untouched and out of sync with the newly changed ViewData
MapMode.
Typically then, on e.g. on deleting text in one view then
ScViewFunc::DeleteContents or similar is called which calls
ScTabView::UpdateCopySourceOverlay which calls
ScGridWindow::UpdateCopySourceOverlay and that sets the GridWindow
MapMode to the DrawMapMode but then *for lokit* returns early (among a
few other unlikely early return cases) while every other similar func
restores the orig GridWindow mode before returning. So the view which
is used to make the change ends up with GridWindows synced to the
ViewData MapMode, which looks like accident. While the other view
remains with GridWindows with MapModes unsynced with that views
ViewData MapMode.
So on invalidate, the view that was used to make the change has
GridWindows with MapModes that report the correct rectangle, while the
other unsynced view will report an incorrect rectangle, until something
happens in that view to get it to exec UpdateCopySourceOverlay and get
synced.
Here add the sync to ScModelObj::setClientZoom so the two MapModes
remain synced once that is called.
Change-Id: I2da59f50ae2b0e3ea6b7ef8b54debdab1ee98266
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162312
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162322
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Create two Calc views, set the first view language to English, second
view language to German. Type in the English view, double-click on a
chart in the German view. The sidebar in the German view will have
English strings in it. This doesn't happen if there is no typing right
after the chart activation in the English view.
What happens is that the sidebar update is async, and
sfx2::sidebar::SidebarController::notifyContextChangeEvent() gets
called, which registers an aync event when it calls
AsynchronousCall::RequestCall(). Then later this job gets scheduled, but
possibly by that time the active view is the English one, leading to
English strings when chart::ColumnChartDialogController::getName() calls
SchResId(), which works from the language of the current view.
Fix the problem similar to what commit
fb7b0b9447 (cool#7492 sfx2 lok: just set
language/locale on async binding update, 2024-01-09), did: set the
language/locale from the current view before executing the async job and
restore the old value once we're done.
Extract the now duplicated code to a new SfxLokLanguageGuard, so in case
more places have a problem with incorrect l10n, then it's meant to be a
one-liner to fix further places.
Change-Id: I52724a24d93fb753175a3b9b99bc33178519d981
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161920
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
The old name was misleading (it doesn't take an URL, but a filename);
also, now it's easier to grep for it - doesn't get mixed with
vcl::graphic::loadFromURL.
Change-Id: Ib88d2194200a6a54d2326971e0306ba39f0c7025
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161578
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Add reporting/handling of the CHECKABLE a11y state
added in
commit d6c6472bbe
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>
"for now it was decided that tables should always be printed"
-> make this decision from 2015 permanent
Change-Id: Ica5958a74ec6766040ab59f2c91224b75df4d807
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160766
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
SVG files aren't supported in OOXML, but we can write it using the
MS OOXML extension, which is supported in the latest MSO versions.
For now this only implements the support in the exporter.
Change-Id: I688180fb5772f3999c2ee3020bc234f90d57cc2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157237
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>