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>
Orca commit [1]
commit 40a2d302eb52295433fd84e6c254a7dbe5108a24
Author: Joanmarie Diggs <jdiggs@igalia.com>
Date: Thu Nov 7 14:15:07 2024 +0100
Spellcheck: Check for accessible id in more places
Do the following case-insensitive checks:
* If the object's accessible id starts with "suggestions" treat it
as the suggestions list.
* If the object's accessible id starts with "replacement" treat it
as the object (likely entry) which contains the proposed replacement.
* If the label's/widget's accessible id starts with "error" treat
it as the container displaying the misspelled word.
Note that the first of the three is based on what LO 25.2 currently
exposes ("suggestionslb"). The other two are not in use yet, but adding
them facilitates implementation in, and getting feedback from, apps and
toolkits.
Also modify the existing check for the window. We were doing an exact
match on "SpellingDialog". Making that case insensitive and limiting to
starts with "spelling" works with the current LO implementation and
removes an implementation detail ("dialog").
introduced logic to identify more UI elements in the spelling
dialog by their accessible ID.
Adjust the GtkBuilder ID (which gets reported as accessible ID as well)
of the drawing area that holds the misspelt text to match the
expectations as mentioned in the commit message above.
[1] 40a2d302eb
Change-Id: I0658de40a47e46a6b2451dfb4ee30d1457b9f9e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176280
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
- Added a new `LevelHdlImpl` method with a `bool bGrabFocus` argument.
- Refactored `LevelHdl` to call `LevelHdlImpl` with `true`.
- Adjusted `SwTokenWindow::SetActiveControl` and `SwTokenWindow::SetForm` to skip `GrabFocus` when the argument is `false`.
- Ensured focus behavior remains unchanged except for the initial "ActivatePage".
Change-Id: If2f43e43f94c3762acd93974550ff0d2d66c6c21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174423
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit dbb054045fae8605794c17aae052a9d588fe33fc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175996
Tested-by: Jenkins
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
The fill contents of a graphic object are lost when saving a pptx.
Change-Id: I055d778d4a92de18dfec59bd27c63a20c08b99f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176208
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit dfd8caa6c49bd33f549a37d6c0244e4cce8f16d8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176224
Reviewed-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Tested-by: Jenkins
* Default is Crop Marks now
* Settings are persistent
Change-Id: If5304c874706345fa943a106044155152c86bc0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176131
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Commit 709b1f3ddb fixes the
root cause of the crash during a dynamic_cast so revert
commit 709b1f3ddb as it was
merely a workaround and is no longer needed.
Change-Id: Ia052913eba7fd4d979054ea6a644f4ff9791277c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176217
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
All calls to get_modal and set_modal are done for weld::Dialog
instances, never for plain instances of/pointers to the weld::Window
base class.
Therefore, drop the methods from weld::Window and add them weld::Dialog
instead.
SalInstanceDialog was already overriding the SalInstanceWindow
implementations of both methods.
For QtInstanceWindow, these were not implemented yet, while
QtInstanceDialog already has implementations.
(If there were a real need, they could be implemented using
QWidget::isModal/QWidget::windowModality and
QWidget::setWindowModality.)
For GTK, move the GtkInstanceWindow::get_modal implementation
to GtkInstanceDialog and call gtk_window_set_modal directly
instead of GtkInstanceWindow::set_modal in
GtkInstanceDialog::set_modal.
Change-Id: I71431347f3bca9571c6fd4b7cf995bb79fb5b11d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176252
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Declare support for Calc's "Sheet" -> "Insert Cells..."
dialog.
This means that native Qt widgets are used for that dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
Change-Id: I73e514785d6e645f3c3a59a154eeb64e2b308418
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176250
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Declare support for this dialog seen in Writer when
taking the following steps:
* start Writer
* insert a table using "Table" -> "Insert Table" -> "Insert"
* "Table" -> "Insert" -> "Rows..."
This means that native Qt widgets are used for that dialog
now when using the qt5 or qt6 VCL plugin and LO gets started with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
This dialog makes use of QtInstanceSpinButton
added in the previous commit.
Change-Id: I0ecdf371278c86ddb8d841b1a95c38c52f53d8d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176249
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Add new class QtInstanceSpinButton that is the
weld::SpinButton implementation using native
widgets. Initially, implement the actual logic
of only some methods, and let the others trigger
an assert for now. (These can be implemented once
needed to support more dialogs.)
Initially, assume that the value is an integer
(which is the case for the "Table" -> "Insert"
-> "Rows" dialog in Writer, for which support
will be declared in an upcoming commit).
However, already use a QDoubleSpinBox
that supports floating point values instead
of QSpinBox (that can only handle integer values)
to prepare for extending the implementation
accordingly later.
In QtBuilder, handle "GtkSpinButton" objects,
create a QDoubleSpinBox for them and evaluate
the "digits" and "adjustment" properties to
set the corresponding values for the
QDoubleSpinBox.
Let QtInstanceBuilder::weld_spin_button
return an instance of the newly added
class.
Change-Id: I0808589a3e6bece749c0ae4541f2419410ea99bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176248
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
As a step to unify and deduplicate this in several places.
Three functional changes added to the new vcl::GetBitmal function:
1. The mask is inverted from transparency to alpha, as done in
VCLUnoHelper::GetBitmap (toolkit/source/helper/vclunohelper.cxx)
since commit 81994cb2b8 (Convert
internal vcl bitmap formats transparency->alpha (II), 2023-07-25).
2. When awt::XBitmap::getMaskDIB returns no mask, use
ReadDIBBitmapEx to also try to read the alpha inside the data
in awt::XBitmap::getDIB, as done in InsertSubMenuItems
(framework/source/fwe/helper/actiontriggerhelper.cxx).
3. As an optimization, query awt::XBitmap for graphic::XGraphic
before all the bit processing.
Change-Id: I686751664a5bd612bda1d446b200a9386b1991b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176185
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
And drop unneeded solar mutex locks, that were used when the menu
implementation was accessed directly.
Change-Id: I06d3d872343fdd6204b4e8bbd8bcec67c17fdbe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176199
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Hyphen length wasn't calculated in single portion lines at shrinking,
because the width of the overhanging line without the hyphen overwrote
the calculated correct line width. This resulted less shrinking, than
needed, also lost hyphen in the PDF export.
Regression from commit 22eac3145c
"tdf#162220 sw smart justify: fix shrinking for single portion lines".
Follow-up to commit 17eaebee27
"tdf#119908 sw smart justify: fix justification by shrinking".
Change-Id: I512e7f1f86f80ff6ea3d0b6a0b0db8255f5d0a60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176207
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
in the case of a failed load m_pDocShell is null and continuing
is pointless.
#0 0x00007efca0f0b157 in SwDocShell::GetView (this=0x0) at sw/inc/docsh.hxx:223
#1 SwXTextDocument::getViewRenderState(SfxViewShell*) () at sw/source/uibase/uno/unotxdoc.cxx:3448
#2 0x00007efcaec1d252 in doc_getCommandValues () at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/allocator.h:174
#3 0x00000000005d8195 in lok::Document::getCommandValues (pCommand=0xb1ba39 ".uno:ViewRenderState", this=<optimized out>)
at include/LibreOfficeKit/LibreOfficeKit.hxx:492
#4 Document::load(std::shared_ptr<ChildSession> const&, std::string const&) () at kit/Kit.cpp:2012
#5 0x00000000005da582 in Document::onLoad(std::string const&, std::string const&, std::string const&) () at kit/Kit.cpp:1227
Change-Id: I5bc1415b06de4aea6a950486840e45773e61b78d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176221
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
https://rzymek.github.io/post/excel-zip64/ claims that it's sufficient
for the version number to be 45 (4.5 - File uses ZIP64 format
extensions) for Excel to read a zip entry's data descriptor as
Zip64, while the Zip APPNOTE seems to require a zip64 extended
information extra field to be present (see 4.3.9.2).
Let's try to use the "version needed to extract" to be able to read
zip files produced by Apache POI Zip64Mode.Always.
Change-Id: I20f10471e3a85eb42d21c0cb08e36e345ef8fc9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176211
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
and
cid#1634481 Use of auto that causes a copy
Change-Id: Ia301cc4ffae4ad451dfafb90c63cc8feb0eb0ec6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176194
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins