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] 9878248c21/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>
...which would not work, as calling constexpr SbxVariable::MakeHashCode on those
vars would no longer be constant expressions
Change-Id: Ib848a6405dc270a1a5b9a92084fa2d063ea37892
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158134
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
These 11 suites depended on the UITest default to not use oneprocess
mode. Explicitly avoid that mode in these suites, because they currently
fail that way. This allows changing the default in the future, so new
suites automatically benefit from the oneprocess mode (it runs faster,
somewhat similar to cppunit).
Change-Id: I8c493ca63310815c1364bb6182c3285a9c7fbd63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158128
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
to only use "m_xSharedConnectionManager".
For this, it required some refactoring but except the removing, logic hasn't been changed.
Change-Id: Iccfe5c45381f31019a0751a61cea6661c88188f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158107
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
cui/source/dialogs/SpellDialog.cxx:2005
aRet[ aRet.size() - 1 ].sText += aLeftOverText;
presumably aRet is empty() here
a) don't bother appending if aLeftOverText is empty()
b) don't crah if aRet is empty() and aLeftOverText is not
Change-Id: Ie9a9585f572d8afb17183b479fb6f2cce5952aa7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158124
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Previously, the shell cursor was put onto a SwGrfNode in the top left
corner, which is invalid, but didn't crash immediately.
With commit b20ca8d951 the cursor is
instead put onto the first SwTextNode in the body, which happens to be
in a table, and the entire table is hidden; this causes an infinite
recursion in SwCursorShell::UpdateCursorPos() because
GetModelPositionForViewPoint() no longer moves it to SwGrfNode.
So try to move the cursor out of a hidden node, which requires an
additional change in SwCursor::IsSelOvr() to allow moving from a node
without a frame to another node without a frame.
Change-Id: Ia33c7b558755f7e8b65ea3ff2c46aea20be577dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158119
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
First comment was last updated with USHORT -> sal_uInt16 in
a2242be9c3 but with the newer commit
68ec95b3f8 there is no remaining sal_uInt16
left, and thus the comment is no longer relevant.
Second comment was added in 1fac87f847,
but with changes in 444c242c51 it is no
longer relevant.
Third comment was also last updated with USHORT -> sal_uInt16 in
a2242be9c3 but with the newer commit
444c242c51 it is no longer relevant.
Change-Id: I9ed383f15a5b403740c0b8bcdd153d04bb1a2b0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158111
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
... if PDF/A is also enabled. Thanks to Peter Wyatt for the example
document.
Change-Id: I2a5951e102ae28a4c998adafe8ab51caa2788e4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158118
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
The skew values of a standard connector can have negative values.
Those are possible in ODF, rendered in LO and produced by dragging the
handles. Only the dialog restricts the metric field to non negative
values. The patch allows negative values now.
Change-Id: I5174dccc1ed0ed8644e0f62a5d599eea4d5cdbaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157700
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Regression from d477fa8ac1 (sw floattable:
unconditionally map <w:tblpPr> to SwFormatFlySplit, 2023-03-17), the
paragraph after the anchor of the floating table in the document lost
its left paragraph margin at a layout level.
Turns out the problem was there earlier, but it was hidden for this
specific document, because we used to map DOCX floating tables to Writer
inline tables in some cases before. The real problem was introduced
earlier, in my 50a1df360c (n#775899 sw:
add FloattableNomargins compat flag, 2012-08-23), even a TODO was added
to point out this will be problematic. The old bugdoc wants to get rid
of margins, because the floating table is already shifting text towards
the right, the new bugdoc wants to keep the original margin as the
paragraph after the anchor is not wrapping.
Fix the problem by reverting the older fix and re-fix the old document
differently. Don't do changes to the paragraph margin: that's not a good
idea. If there is enough anchor text, it'll lead to a visibly bad
paragraph margin anyway. Instead of reducing the paragraph margin,
reduce the width of the fly portion in the paragraphs that intersect
with the floating table. That's reasonly straightforward to do, because
SwTextFormatter::CalcFlyWidth() already has a case when we know we're
intersecting with a floating table and we also know that the floating
table is aligned to the left. In this case we can simply reduce the fly
portion width with the paragraph margin. This keeps the old bugdoc fixed
and fixes the new bugdoc.
It also means that DocumentSettingId::FLOATTABLE_NOMARGINS is now
effectively unused, but that's not yet removed in this change.
Change-Id: Ibaccc4807fd8c11bd45955b76e96cd4a5e55976f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158103
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
When the mouse is captured in
`SwView::InsertGraphicDlg`, temporarily
release it while executing the file dialog,
so the user can use the mouse to interact with
the file dialog.
At least with qt5/qt6/kf5, this would otherwise
not work in the file dialog shown after clicking
on a previously inserted Picture Content Control,
because `QWidget::grabMouse()`'s "other widgets
get no mouse events at all" [1] apparently applies
for the file dialog and other running applications
as well.
[1] https://doc.qt.io/qt-6/qwidget.html#grabMouse
Change-Id: I80a81c57c80debc716a1b111a9c07eef0c005c65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158109
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
avoid doing some extra Invert() operations by creating an AlphaMask
instead of a Bitmap to pass to the BitmapEx constructor.
Change-Id: I1af3a5e65010b346fa0d0c56836d567e51c9b58b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Let `AccessibleTextAttributeHelper::GetIAccessible2TextAttributes`
also report spelling errors as a text attribute, since the
"invalid:" text attribute with a value of "spelling" is specified
for that in the IAccessible2 tex attributes specification [1].
In order to adapt the start/end index for the attribute run,
iterate over all of the text markups that can be retrieved from
the `XAccessibleTextMarkup` interface instead of just deterining
whether the offset itself lies within a range of misspelled text
via `XAccessibleTextMarkup::getTextMarkupAtIndex`.
(This is strongly inspired by how the gtk3 a11y implementation
does it, s. `handle_text_markup_as_run_attribute` in
vcl/unx/gtk3/a11y/atktext.cxx.)
When using the qt6 VCL plugin on Linux, the attribute shows up as
expected in Accerciser and the Orca screen reader announces
"misspelled" when moving the cursor in front of a misspelled
word using the Arrow_Right key.
Announcement by NVDA works once winaccessibility and NVDA
have been switched over to use IAccessible2 text attributes
instead of custom LibreOffice ones.
[1] https://wiki.linuxfoundation.org/accessibility/iaccessible2/textattributes
Change-Id: I54e5bcbb4bef4c73068243f91a3ee69c10326460
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158089
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
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>
This workaround was only applied for Qt < 5.12 and
is no longer needed now that support for Qt < 5.15 has
been dropped in
commit afb4c96d27
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Aug 3 21:30:22 2023 +0200
qt: Drop code for Qt < 5.15
Commit originally adding the workaround:
commit fe2baf9e84
Author: Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>
Date: Tue Dec 3 08:32:58 2019 +0100
Qt5 fix missing XCB_ICCCM_WM_HINT_WINDOW_GROUP
This is the application level equivalent of the Qt5 fix for bug
QTBUG-46626 / commit 0de4b32 ("xcb: fix issue with dialogs hidden
by other windows"), which was broken since Qt 5.4 and is just
fixed since Qt 5.12.
It is needed for some window managers, which don't know about the
WM_CLIENT_LEADER property. Both settings are the same, but just
the latter is set by older Qt5 releases. This probably isn't a
real problem, as GNOME or XFCE would use the gtk VCL plugin, but
since I already wrote the code when debugging tdf#129071, there
is also no reason to drop it (except: more code, more bugs...).
This fix is optional and needs development headers for xcb-icccm,
which can actually be compiled into Qt5. If missing configure will
just print a warning, since it's a runtime requirement and we
explicitly drop the linked Qt version symbol, so the potential
build Qt version won't matter.
Change-Id: Ifc5a8f8a40ee13779a911efb53e8b8b868614d0b
Reviewed-on: https://gerrit.libreoffice.org/84299
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Change-Id: I56b708449cf686f787f55256c76673be604d31e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158102
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
In dbaccess/source/core/dataaccess/SharedConnection.hxx, we got:
35 typedef ::cppu::WeakComponentImplHelper< css::sdbc::XConnection
36 > OSharedConnection_BASE;
37 typedef ::connectivity::OConnectionWrapper OSharedConnection_BASE2;
38
39 class OSharedConnection : public ::cppu::BaseMutex
40 , public OSharedConnection_BASE
41 , public OSharedConnection_BASE2
so first OSharedConnection_BASE ctr is called before OConnectionWrapper ctr
therefore OConnectionWrapper dtr should be called before OSharedConnection_BASE dtr
It doesn't fix the bug but investigating in all this mess, I'd like to fix these things since it may help.
Change-Id: I47255357b4ca02261f31ebf500f3f1ff55642e69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158096
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This would set (and unset) custom configuration based on filenames, but
the suite has no such files anymore, so this can be removed.
Change-Id: I8f1dd40b62adcd71a0e4ae303c5d317943ef438b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158094
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
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>
...similar to 5f2206e3cc "O{U]String copy ctor
should be constexpr", which will again be useful for some upcoming replacements
of OUStringConstExpr with OUString, and making data actually constexpr. (For
example, the
static o3tl::enumarray<INetProtocol, SchemeInfo> const map
in INetURLObject::getSchemeInfo (tools/source/fsys/urlobj.cxx) can actually be
constexpr, but the o3tl::enumarray ctor forwards its SchemeInfo arguments by
forwarding references, so uses an implicitly generated constexpr SchemeInfo move
ctor, which in turn requires constexpr member move ctors. So when the m_sScheme
member will be changed from rtl::OUStringConstExpr to OUString, the OUString
move ctor better be constexpr.)
Change-Id: Icfc5edbb8422919186517667f876ea90bec1be90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158099
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
.uno:InsertFieldCtrl includes all the fields plus "more fields".
While it can be nice to include 1-click access
to the most common fields, there is no need
for 1-click access to the rather large "more fields",
so it has been removed from the tabbed notebookbar ribbons.
Change-Id: I5ebd394106a8d44832adb6dcd598f92e696f48a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158097
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Disable the test on mac because it fails with
Test name: testTdf45949::TestBody
equality assertion failed
- Expected: 2
- Actual : 1
Change-Id: I366eba2db939b25f70a859c6622901c1e0f55718
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158082
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
gerrit_mac fails with
[_RUN_____] testTdf157442::TestBody
Error: a unit test failed, please do one of:
make CppunitTest_sw_uiwriter6 CPPUNITTRACE="lldb --" # for interactive debugging on macOS
make CppunitTest_sw_uiwriter6 VALGRIND=memcheck # for memory checking
You can limit the execution to just one particular test by:
make CppunitTest_sw_uiwriter6 CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params...
so disable it for now on mac
Change-Id: Iaf51987010a976a3a38f264d6b45c8cc6eb7f283
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158079
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>