Age | Commit message (Collapse) | Author | Files | Lines |
|
Was previously changed the other way around in
commit 28c89e58d90ea73513e273db274eb46ff9081c35
Date: Wed Aug 30 15:16:01 2023 +0200
use concrete type for OAccessibleMenuBaseComponent::m_aAccessibleChildren
for no apparent reason.
Change-Id: I0d0c6627134bcef8ac9732cc8a5213ab266afbf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168005
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
|
|
When the text of an editable combobox is changed
(e.g. using the up/down keys), the Orca screen
reader on Linux announces the newly inserted text.
This has been the case for other GTK or Qt
applications for a while, and with recent Orca
commit [1]
commit 3a9e6b8d7b16bf2fc7919868cfd1a16e44422710
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri May 10 10:16:58 2024 +0200
soffice: Use default logic for editable combobox value change
, the same logic is used for LibreOffice as well.
For the gtk3 VCL plugin which has a custom combobox
implementation using native GTK widgets, this generally
works since
commit 9f078ed7b625e86182d64d5ccfbb410cdd38081c
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue May 7 10:04:16 2024 +0200
tdf#160971 gtk3 a11y: Set role for custom editable combobox
However, the qt6 VCL plugin uses the VCL combobox
implementation, and only the actual difference between
the text of the previous and current entry was sent
in the TEXT_CHANGED event, resulting in Orca only
announcing those letters that were added/changed,
e.g. just "ans Narrow" when changing the font in the
Writer formatting toolbar from "Liberation Serif"
to "Liberation Sans Narrow".
This doesn't really make clear what entry is selected.
Align the a11y event with what GTK and Qt do
and set the full old and new entry texts in the event.
To do that, add a new virtual
`VCLXAccessibleTextComponent:PreferFullTextInTextChangedEvent`
that defaults to false to keep the previous behavior as default,
and override it for `VCLXAccessibleEdit` to return true
in the case that the edit is the subedit of a combobox
(the parent has a combobox role).
Use this in `VCLXAccessibleTextComponent::SetText` to
determine whether to notify just of the changed characters
or to send the whole old/new text.
With this in place, Orca also announces the whole new
entry text (e.g. "Liberation Sans Narrow" for the above
example) when using the qt6 VCL plugin.
(It currently additionally announces an extra "Selection
deleted" when switching entries, as the text selection
also changes, but that aspect is to be handled separate
from this change here.)
[1] https://gitlab.gnome.org/GNOME/orca/-/commit/3a9e6b8d7b16bf2fc7919868cfd1a16e44422710
Change-Id: I240aa0ad5ac9585e007d67a8c69e305cf1f38185
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167479
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: Iff3e6af9627aa5d31b00ad48bc6c6ea8d3913fe9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166927
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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
|
|
Change-Id: I92662f0577c0f90ec0dc5eba1b685fbb7ac3da39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165530
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
|
|
Change-Id: I82b7dd9b0cdf379c710870a295c8f33ed9fff681
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165437
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This happened in a 6.3 based branch, no idea how to reproduce it.
Clearly the SvxFontNameBox_Impl is being disposed and in its base class
Window::dispose() when a call to SvxFontNameBox_Impl::CreateAccessible()
happens, which seems very suspicious; try to prevent that.
mergedlo.dll!ImplListBox::InsertEntry(long nPos, const rtl::OUString & rStr) Zeile 2225
unter d:\lo\core\vcl\source\control\imp_listbox.cxx (2225)
mergedlo.dll!ComboBox::InsertEntry(const rtl::OUString & rStr, long nPos) Zeile 886
unter d:\lo\core\vcl\source\control\combobox.cxx (886)
mergedlo.dll!FontNameBox::Fill(const FontList * pList) Zeile 447
unter d:\lo\core\svtools\source\control\ctrlbox.cxx (447)
[Inlineframe] mergedlo.dll!SvxFontNameBox_Impl::Fill(const FontList * pList) Zeile 236
unter d:\lo\core\svx\source\tbxctrls\tbcontrl.cxx (236)
mergedlo.dll!lcl_GetDocFontList(const FontList * * ppFontList, SvxFontNameBox_Impl * pBox) Zeile 1290
unter d:\lo\core\svx\source\tbxctrls\tbcontrl.cxx (1290)
mergedlo.dll!SvxFontNameBox_Impl::FillList() Zeile 1331
unter d:\lo\core\svx\source\tbxctrls\tbcontrl.cxx (1331)
mergedlo.dll!SvxFontNameBox_Impl::CreateAccessible() Zeile 3739
unter d:\lo\core\svx\source\tbxctrls\tbcontrl.cxx (3739)
mergedlo.dll!vcl::Window::GetAccessible(bool bCreate) Zeile 129
unter d:\lo\core\vcl\source\window\accessibility.cxx (129)
acclo.dll!VCLXAccessibleToolBox::getAccessibleChild(long i) Zeile 733
unter d:\lo\core\accessibility\source\standard\vclxaccessibletoolbox.cxx (733)
acclo.dll!VCLXAccessibleToolBox::GetItemWindowAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 784
unter d:\lo\core\accessibility\source\standard\vclxaccessibletoolbox.cxx (784)
acclo.dll!VCLXAccessibleToolBox::GetChildAccessible(const VclWindowEvent & rVclWindowEvent) Zeile 795
unter d:\lo\core\accessibility\source\standard\vclxaccessibletoolbox.cxx (795)
mergedlo.dll!VCLXAccessibleComponent::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 165
unter d:\lo\core\toolkit\source\awt\vclxaccessiblecomponent.cxx (165)
acclo.dll!VCLXAccessibleToolBox::ProcessWindowChildEvent(const VclWindowEvent & rVclWindowEvent) Zeile 657
unter d:\lo\core\accessibility\source\standard\vclxaccessibletoolbox.cxx (657)
mergedlo.dll!VCLXAccessibleComponent::WindowChildEventListener(VclWindowEvent & rEvent) Zeile 129
unter d:\lo\core\toolkit\source\awt\vclxaccessiblecomponent.cxx (129)
mergedlo.dll!VCLXAccessibleComponent::LinkStubWindowChildEventListener(void * instance, VclWindowEvent & data) Zeile 118
unter d:\lo\core\toolkit\source\awt\vclxaccessiblecomponent.cxx (118)
[Inlineframe] mergedlo.dll!Link<VclWindowEvent &,void>::Call(VclWindowEvent &) Zeile 84
unter d:\lo\core\include\tools\link.hxx (84)
mergedlo.dll!vcl::Window::CallEventListeners(VclEventId nEvent, void * pData) Zeile 280
unter d:\lo\core\vcl\source\window\event.cxx (280)
mergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 735
unter d:\lo\core\vcl\source\window\stacking.cxx (735)
mergedlo.dll!vcl::Window::ImplResetReallyVisible() Zeile 747
unter d:\lo\core\vcl\source\window\stacking.cxx (747)
mergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2198
unter d:\lo\core\vcl\source\window\window.cxx (2198)
mergedlo.dll!vcl::Window::Show(bool bVisible, ShowFlags nFlags) Zeile 2176
unter d:\lo\core\vcl\source\window\window.cxx (2176)
[Inlineframe] mergedlo.dll!vcl::Window::Hide() Zeile 925
unter d:\lo\core\include\vcl\window.hxx (925)
mergedlo.dll!vcl::Window::dispose() Zeile 402
unter d:\lo\core\vcl\source\window\window.cxx (402)
mergedlo.dll!Edit::dispose() Zeile 258
unter d:\lo\core\vcl\source\control\edit.cxx (258)
mergedlo.dll!ComboBox::dispose() Zeile 132
unter d:\lo\core\vcl\source\control\combobox.cxx (132)
mergedlo.dll!SvxFontNameBox_Impl::dispose() Zeile 1322
unter d:\lo\core\svx\source\tbxctrls\tbcontrl.cxx (1322)
[Inlineframe] mergedlo.dll!VclPtr<SvxFontNameBox_Impl>::disposeAndClear() Zeile 206
unter d:\lo\core\include\vcl\vclptr.hxx (206)
mergedlo.dll!SvxFontNameToolBoxControl::dispose() Zeile 3309
unter d:\lo\core\svx\source\tbxctrls\tbcontrl.cxx (3309)
mergedlo.dll!framework::ToolBarManager::RemoveControllers() Zeile 651
unter d:\lo\core\framework\source\uielement\toolbarmanager.cxx (651)
mergedlo.dll!framework::ToolBarManager::dispose() Zeile 468
unter d:\lo\core\framework\source\uielement\toolbarmanager.cxx (468)
mergedlo.dll!framework::ToolBarWrapper::dispose() Zeile 105
unter d:\lo\core\framework\source\uielement\toolbarwrapper.cxx (105)
mergedlo.dll!framework::ToolbarLayoutManager::destroyToolbars() Zeile 666
unter d:\lo\core\framework\source\layoutmanager\toolbarlayoutmanager.cxx (666)
mergedlo.dll!framework::ToolbarLayoutManager::reset() Zeile 364
unter d:\lo\core\framework\source\layoutmanager\toolbarlayoutmanager.cxx (364)
mergedlo.dll!framework::LayoutManager::implts_reset(bool bAttached) Zeile 458
unter d:\lo\core\framework\source\layoutmanager\layoutmanager.cxx (458)
mergedlo.dll!framework::LayoutManager::frameAction(const com::sun::star::frame::FrameActionEvent & aEvent) Zeile 2757
unter d:\lo\core\framework\source\layoutmanager\layoutmanager.cxx (2757)
mergedlo.dll!`anonymous namespace'::XFrameImpl::implts_sendFrameActionEvent(const com::sun::star::frame::FrameAction & aAction) Zeile 2952
unter d:\lo\core\framework\source\services\frame.cxx (2952)
mergedlo.dll!`anonymous namespace'::XFrameImpl::setComponent(const com::sun::star::uno::Reference<com::sun::star::awt::XWindow> & xComponentWindow, const com::sun::star::uno::Reference<com::sun::star::frame::XController> & xController) Zeile 1470
unter d:\lo\core\framework\source\services\frame.cxx (1470)
mergedlo.dll!`anonymous namespace'::XFrameImpl::close(unsigned char bDeliverOwnership) Zeile 1701
unter d:\lo\core\framework\source\services\frame.cxx (1701)
mergedlo.dll!framework::pattern::frame::closeIt(const com::sun::star::uno::Reference<com::sun::star::uno::XInterface> & xResource) Zeile 62
unter d:\lo\core\framework\source\inc\pattern\frame.hxx (62)
[Inlineframe] mergedlo.dll!framework::CloseDispatcher::implts_closeFrame() Zeile 492
unter d:\lo\core\framework\source\dispatch\closedispatcher.cxx (492)
Change-Id: Ie05cd05158df58021d0fb4a19e9e38cd35af2426
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164451
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
|
|
In `VCLXAccessibleList::HandleChangedItemList`,
don't just clear the vector of list items, but
dispose them first.
To avoid code duplication, extract a helper method
from `VCLXAccessibleList::disposing` which already
disposes the children since
commit 51de048ae97cbd371457dbc07120e30db9ee4187
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Sep 4 17:19:03 2023 +0200
tdf#157088 a11y: Dispose list items with list
This fixes a similar crash/assert on exit, seen after using the
Navigator in Writer (in particular the combo/listboxes in
there) with the qt6 VCL plugin and the Orca screen reader
running.
stderr showed this:
soffice.bin: .../libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:142: bool (anonymous namespace)::implLookupClient(const AccessibleEventNotifier::TClientId, ClientMap::iterator &): Assertion `rClients.end() != rPos && "AccessibleEventNotifier::implLookupClient: invalid client id " "(did you register your client?)!"' failed.
Aborted
Backtrace:
1 __pthread_kill_implementation pthread_kill.c 44 0x7f0e1a4a816c
2 __pthread_kill_internal pthread_kill.c 78 0x7f0e1a4a81cf
3 __GI_raise raise.c 26 0x7f0e1a45a472
4 __GI_abort abort.c 79 0x7f0e1a4444b2
5 __assert_fail_base assert.c 92 0x7f0e1a4443d5
6 __assert_fail assert.c 101 0x7f0e1a4533a2
7 (anonymous namespace)::implLookupClient accessibleeventnotifier.cxx 140 0x7f0e18ce59ac
8 comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing accessibleeventnotifier.cxx 185 0x7f0e18ce5e68
9 VCLXAccessibleListItem::disposing vclxaccessiblelistitem.cxx 164 0x7f0ddf7d237f
10 cppu::WeakComponentImplHelperBase::dispose implbase.cxx 104 0x7f0e1873f544
11 cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleComponent, com::sun::star::accessibility::XAccessibleEventBroadcaster, com::sun::star::accessibility::XAccessibleText, com::sun::star::lang::XServiceInfo>::dispose compbase.hxx 90 0x7f0ddf7cb7c5
12 cppu::WeakComponentImplHelperBase::release implbase.cxx 79 0x7f0e1873f1fe
13 cppu::PartialWeakComponentImplHelper<com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleComponent, com::sun::star::accessibility::XAccessibleEventBroadcaster, com::sun::star::accessibility::XAccessibleText, com::sun::star::lang::XServiceInfo>::release compbase.hxx 86 0x7f0ddf7cd0c5
14 com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>::~Reference Reference.hxx 114 0x7f0e06bbccbe
15 QtAccessibleWidget::~QtAccessibleWidget QtAccessibleWidget.hxx 39 0x7f0e06bd618d
16 QtAccessibleWidget::~QtAccessibleWidget QtAccessibleWidget.hxx 39 0x7f0e06bd6219
17 QAccessibleCache::deleteInterface qaccessiblecache.cpp 173 0x7f0e05545319
18 QAccessibleCache::~QAccessibleCache qaccessiblecache.cpp 31 0x7f0e0554492a
19 QAccessibleCache::~QAccessibleCache qaccessiblecache.cpp 32 0x7f0e055449b0
20 cleanupAccessibleCache qaccessiblecache.cpp 24 0x7f0e05544896
21 qt_call_post_routines qcoreapplication.cpp 332 0x7f0e05faf826
22 QApplication::~QApplication qapplication.cpp 665 0x7f0e0419e24a
23 QApplication::~QApplication qapplication.cpp 722 0x7f0e0419e55c
24 std::default_delete<QApplication>::operator() unique_ptr.h 99 0x7f0e06c5d63c
25 std::__uniq_ptr_impl<QApplication, std::default_delete<QApplication>>::reset unique_ptr.h 211 0x7f0e06c5df7c
26 std::unique_ptr<QApplication, std::default_delete<QApplication>>::reset unique_ptr.h 509 0x7f0e06c58bfd
27 QtInstance::~QtInstance QtInstance.cxx 305 0x7f0e06c51184
28 QtInstance::~QtInstance QtInstance.cxx 302 0x7f0e06c51279
29 DestroySalInstance salplug.cxx 368 0x7f0e114c0a18
30 DeInitVCL svmain.cxx 625 0x7f0e115c5e7d
31 ImplSVMain svmain.cxx 254 0x7f0e115c4031
32 SVMain svmain.cxx 261 0x7f0e115c5f79
33 soffice_main sofficemain.cxx 94 0x7f0e1a7a4ba3
34 sal_main main.c 51 0x559ce9c67a5d
35 main main.c 49 0x559ce9c67a37
Change-Id: Ic5121645a6920a8ac35154dda1dcfa1974ab9d4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164062
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Just assign to `VCLXAccessibleBox::m_xList` right away.
Change-Id: Id6cd871ccb54cd709ddf3ed6e59b8f3feb8314ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164061
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Just use the `VCLXAccessibleBox::m_xList` member directly
instead of extra local pointer variables referring to the
reference's body.
Change-Id: Ic760d766221df773e8285c927e58ea7419cc7da6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164060
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Add `ToolBox::SetAccessibleName` (and corresponding getter)
to allow explicitly setting an accessible name for a toolbox/toolbar
item with the VCL toolbar implementation.
In the a11y class for a toolbar item, use any
explicitly set name if it's non-empty, otherwise
fall back to the previous logic.
This will be used in an upcoming commit to
take into account the accessible name set in .ui files
and align the VCL ToolBox more with the gtk implementation
using native GtkToolbar and native widgets for the toolbar
items.
Change-Id: Ib0255e2741a7ab2489a857ac120fb87f680fa775
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164033
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Just use `comphelper::OAccessibleTextHelper` directly
where `AccessibleTextHelper_BASE` is a typedef for that.
There are other `AccessibleTextHelper_BASE` typedefs with
a different meaning elsewhere in the codebase, which are left unchanged.
Change-Id: I323a2b103eccfcfc4f726caffa73e586decf6d65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163960
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
So far, the accessible name and the text of the item
were considered to be the same, and fallbacks to still
get something else for the accessible name in case
of no item text (to use the quick help text or the item
window's accessible name instead) were implemented directly in
`VCLXAccessibleToolBoxItem::implGetText`.
However, `VCLXAccessibleToolBoxItem::implGetText` is also
used by the implementations for the methods from the
`XAccessibleText` interface and that one is clearly about
text displayed on screen, so using e.g. the quick help/tooltip
text doesn't make sense then.
Let `VCLXAccessibleToolBoxItem::implGetText` only handle the
actual item text and move the fallbacks to a new helper
method `VCLXAccessibleToolBoxItem::implGetAccessibleName`
instead that is only used when the actual accessible name
is wanted.
Change-Id: Icc394022d036ca619622cee1390e28ab15014be1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163959
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
`VCLXAccessibleToolBoxItem::implGetText` was just calling
`VCLXAccessibleToolBoxItem::GetText`, and both of them
were used from different places.
Just move the implementation to `VCLXAccessibleToolBoxItem::implGetText`
right away, drop `VCLXAccessibleToolBoxItem::implGetText` and adjust
callers to unify this.
Change-Id: I0f4a4652f9e1259826a566d42b4b6998fc8ac7db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163958
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
* Avoid deep nesting by returning non-empty value right away.
* Drop the `if (!sWinText.isEmpty())` before the last assignment.
At this point, `sRet` is already empty, so reassigning an empty
string makes no difference.
Change-Id: Ib17e363f761e3ce09b359cebb1599042a8f6b8bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163956
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
When reviewing all the places sending an `AccessibleEventId::CHILD`
event as described in tdf#159213 comment 8, this here looks
like one where the child might not be set.
Add a corresponding check to avoid sending an invalid event.
Change-Id: I6fea72e8a0619eeec7ac7c9d38dec996ab34752f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163427
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
These checks can all be done in a single if condition
rather than having two nested ones.
(Use `git show -w` to ignore whitespace change.)
Change-Id: Icbaaf45914f4dead9fc27d6e5e69d4cd03ee7393
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163426
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Used in getImplementationName and getSupportedServiceNames
Change-Id: I003db960123c66d4d47b99aec678b156bf4c4d91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161301
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Add reporting for the new CHECKABLE a11y state introduced 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
for `VCLXAccessibleMenuItem`.
`MenuItemData::HasCheck` looks like it already provides
what's needed to say whether an item is checkable, therefore
add a `Menu::IsItemCheckable` that makes use of this and
and a `VCLXAccessibleMenuItem::IsCheckable` that
makes use of that in turn.
Extend `VCLXAccessibleMenuItem::FillAccessibleStateSet` to
use the latter to report the CHECKABLE state accordingly.
Change-Id: Id23196ef2527a71a338102a5143a8bd6fd41db84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160902
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
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>
|
|
`PushButton::Click does not` toggle a `PushButton`
that is a toggle button. Therefore, call
`PushButton::Check` and `PushButton::Toggle` instead
when the acessible "press" action is performed on
a toggle button, which makes this work as expected.
The same is already done in the UITest code, see
`ButtonUIObject::execute`.
The originally rerported issue in tdf#112661 and
tdf#112662 was that there was no action available
for the "Templates" and "Recent Documents" toggle
buttons in the start center via the NSAccessibility
API on macOS at all. By now, the "press" action was
available, but performing the action (e.g. using
the Ctrl+CapsLock+Space keyboard shortcut for
VoiceOver) didn't have any effect.
The same was true when performing the action via
Accerciser using the AT-SPI Action interface when
using the qt6 VCL plugin on Linux.
With this change in place, toggling between
showing the templates and the recently used
documents in the start center works using that
action, just as it does when clicking on one
of the toggle buttons in the UI using the mouse.
For gtk3, which is using native GtkToggleButtons,
this was already working without this change in place.
Change-Id: Ie3f02ec914239e0718ca1bfb4ba701f0831bb16a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158807
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
...in include files. This is a mix of automatic rewriting in include files and
manual fixups (mostly addressing loplugin:redundantfcast) in source files that
include those.
Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I0cf6f675483bddf82e7347b484a874c71963bfd7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156984
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
|
|
Since an active descendant is the UI element with keyboard focus,
only send an `ACTIVE_DESCENDANT_CHANGED` event in `VCLXAccessibleList`
if the listbox/combobox actually has focus, not when the selection
changed otherwise, e.g. because the value was changed programmatically
because it depends on another UI control (like the paper size
in the print dialog depends on the selected printer.
Change-Id: I008e742ccf3b81c70832707b2f3a6551827a0706
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156666
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: I9fe97a8d71fb898c0603ec76f7b86afb19c60654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156572
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
All (top-level) toolbox items have always been
`VCLXAccessibleToolBoxItem` ever since
commit f7da8972336b8ce3e0fb71b0c50464508837a5f3
Author: Jens-Heiner Rechtien <hr@openoffice.org>
Date: Wed Jun 27 14:41:59 2007 +0000
INTEGRATION: CWS a11ysep (1.1.2); FILE ADDED
2007/02/28 07:29:13 fs 1.1.2.4: #i10000#
2006/10/05 08:20:15 fs 1.1.2.3: MANUAL RESYNC m130->m185:
file had been modified in MWS, but moved herein in CWS
2005/09/28 11:35:38 fs 1.1.2.2: manual resync (files have been moved herein from another location): licence change
2005/03/07 08:29:10 fs 1.1.2.1: #i44293# moved implementations herein from toolkit module
, so the dynamic_cast to check whether an item is a
`OToolBoxWindowItem` is unnecessary and misleading
when reading the code.
This is even easier to see now after
commit af08e6c2f46a6d99b2e18fe176c15ec2b6edb2fd
Author: Noel Grandin <noel.grandin@collabora.co.uk>
Date: Wed Aug 30 14:02:11 2023 +0200
use concrete type for ToolBoxItemsMap
`OToolBoxWindowItem`s are only set as children
for the `VCLXAccessibleToolBoxItem`s, s.
`VCLXAccessibleToolBox::getAccessibleChild`.
Also drop now unused
`OToolBoxWindowItem::getIndexInParent` and
`OToolBoxWindowItem::setIndexInParent`.
Change-Id: I7dcef304942ed25b77918f01cf9b679b6be6e23c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156566
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
and avoid some casting
Change-Id: I755caf9ba5a333862d1a89a054359781544930f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156570
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Use a vector of `rtl::Reference<VCLXAccessibleListItem>`
for the children instead of a vector of
`css::uno::Reference<css::accessibility::XAccessible>`
and casting in various places.
Change-Id: I1d0e72a7c844a685d762069002d747cf5e7d02dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156525
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: Ie8d62b769c44ab74a21fadd9ab395fe0f908ee76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156524
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Don't only clear, but also dispose the
list items when the `VCLXAccessibleList`
gets disposed.
Interestingly, there was already a comment
saying
// Dispose all items in the list.
, but that wasn't done so far...
Fixes a crash on exit with the below backtrace
after using the font color toolbox item with
the qt6 VCL plugin and Orca running:
1 __pthread_kill_implementation pthread_kill.c 44 0x7fe2a2ea80fc
2 __pthread_kill_internal pthread_kill.c 78 0x7fe2a2ea815f
3 __GI_raise raise.c 26 0x7fe2a2e5a472
4 __GI_abort abort.c 79 0x7fe2a2e444b2
5 __assert_fail_base assert.c 92 0x7fe2a2e443d5
6 __assert_fail assert.c 101 0x7fe2a2e533a2
7 (anonymous namespace)::implLookupClient accessibleeventnotifier.cxx 140 0x7fe2a21138a4
8 comphelper::AccessibleEventNotifier::revokeClientNotifyDisposing accessibleeventnotifier.cxx 185 0x7fe2a2113bb8
9 VCLXAccessibleListItem::disposing vclxaccessiblelistitem.cxx 164 0x7fe26870cb58
10 cppu::WeakAggComponentImplHelperBase::dispose implbase.cxx 230 0x7fe2a1c755e3
11 cppu::WeakAggComponentImplHelperBase::release implbase.cxx 204 0x7fe2a1c75312
12 cppu::WeakAggComponentImplHelper6<com::sun::star::accessibility::XAccessible, com::sun::star::accessibility::XAccessibleContext, com::sun::star::accessibility::XAccessibleComponent, com::sun::star::accessibility::XAccessibleEventBroadcaster, com::sun::star::accessibility::XAccessibleText, com::sun::star::lang::XServiceInfo>::release compbase6.hxx 142 0x7fe26870fc0c
13 com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible>::~Reference Reference.hxx 114 0x7fe28f2428a7
14 QtAccessibleWidget::~QtAccessibleWidget QtAccessibleWidget.hxx 39 0x7fe28f262cf9
15 QtAccessibleWidget::~QtAccessibleWidget QtAccessibleWidget.hxx 39 0x7fe28f262dd0
16 QAccessibleCache::deleteInterface qaccessiblecache.cpp 173 0x7fe28e0c8e4b
17 QAccessibleCache::~QAccessibleCache qaccessiblecache.cpp 31 0x7fe28e0c845c
18 QAccessibleCache::~QAccessibleCache qaccessiblecache.cpp 32 0x7fe28e0c84e2
19 cleanupAccessibleCache qaccessiblecache.cpp 24 0x7fe28e0c83c8
20 qt_call_post_routines qcoreapplication.cpp 327 0x7fe28e9a4593
21 QApplication::~QApplication qapplication.cpp 663 0x7fe28cf9dff6
22 QApplication::~QApplication qapplication.cpp 717 0x7fe28cf9e2f4
23 std::default_delete<QApplication>::operator() unique_ptr.h 99 0x7fe28f2cf3ae
24 std::__uniq_ptr_impl<QApplication, std::default_delete<QApplication>>::reset unique_ptr.h 211 0x7fe28f2cf7f6
25 std::unique_ptr<QApplication, std::default_delete<QApplication>>::reset unique_ptr.h 509 0x7fe28f2cd72d
26 QtInstance::~QtInstance QtInstance.cxx 273 0x7fe28f2c614f
27 QtInstance::~QtInstance QtInstance.cxx 274 0x7fe28f2c6226
28 DestroySalInstance salplug.cxx 389 0x7fe299a62611
29 DeInitVCL svmain.cxx 600 0x7fe299b41226
30 ImplSVMain svmain.cxx 229 0x7fe299b3f9f7
31 SVMain svmain.cxx 236 0x7fe299b3fa53
32 soffice_main sofficemain.cxx 94 0x7fe2a30a1b5d
33 sal_main main.c 51 0x55c86565c9d4
34 main main.c 49 0x55c86565c9ba
Change-Id: I42ddcf5501ddfb363aeae10a86f1c38251e6793b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156522
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
`VCLXAccessibleList` is the owner of the
`VCLXAccessibleListItem`s held in that vector,
so I see no reason to hold them by weak reference,
which according to the doc in
`udkapi/com/sun/star/uno/XWeak.idl` is to avoid
affecting the lifetime of the objects:
> <p>The sense of weak references is to hold a reference to an object
> without affecting the lifetime of the object. That means that a weak
> reference may become invalid, at any time, if the referenced object dies.
> </p>
Quite the contrary, it is actually responsible for the
lifecycle of the list item a11y objects and should dispose
them when itself gets disposed, which will be added
in a subsequent commit.
Change-Id: I57fe3367f1199cd0c24f006f6e25a1e9c930c154
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156521
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
The text is at least often used for the accessible name of
text controls (e.g. the MultiLineEdit case in tdf#104833).
Therefore, also check whether the a11y name has changed
from the previously remembered one in
`VCLXAccessibleTextComponent::SetText` and send
a NAME_CHANGED event if it has.
This e.g. makes sure that the a11y name for the multi line
edit in the update dialog is updated on Windows
and NVDA properly announces it when it receives focus.
(It now correctly announces "LibreOfficeDev 24.2 is up to date."
instead of the obsolete cached name "Checking...").
Also see how `VCLXAccessibleTextComponent::ProcessWindowEvent`
calls `VCLXAccessibleTextComponent::SetText` when processing
`VclEventId::WindowFrameTitleChanged` and this comment in
`Window::SetText` mentions that `VclEventId::WindowFrameTitleChanged`
is used to notify about a11y name changes:
// #107247# needed for accessibility
// The VclEventId::WindowFrameTitleChanged is (mis)used to notify accessible name changes.
// Therefore a window, which is labeled by this window, must also notify an accessible
// name change.
Change-Id: I2f15fe78324b14c3bbeae943cb87384007e21618
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156411
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Don't rely on the `VCLXWindow` of the control
being a `VCLXEdit`, but use the `Edit` control
directly, as is already done in other methods
of this class.
This is in preparation of using
`VCLXAccessibleEdit` as the a11y class
for `MultiLineEdit` as well, which derives
from `Edit`, but its component interface class,
`VCLXMultiLineEdit` does not derive from `VCLXEdit`.
Already add reporting of the
`AccessibleStateType::MULTI_LINE` state instead of
`AccessibleStateType::SINGLE_LINE` to
`VCLXAccessibleTextComponent::FillAccessibleStateSet`
if the window type is `WindowType::MULTILINEEDIT`.
Add a small helper function,
`VCLXAccessibleEdit::isEditable` to use instead
of `VCLXEdit::isEditable`, which does the same.
Interacting with the single line edit from
the sample dialog in attachment 189287 in tdf#104833
in Accerciser still behaves as expected (and the
text can still be edited when removing the
readonly flag from the control).
Change-Id: I8218db61feb07605f6ea5309f26eebd38312458a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156400
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
It got lost with
commit a3f77a61c03340b79930e89d5c4045d814b93edf
Date: Wed Aug 30 14:43:18 2023 +0200
use concrete type for VCLXAccessibleTabControl::m_aAccessibleChildren
and resulted in a crash when e.g. doing the following
with the qt6 VCL plugin on Linux:
1) open attachment 189287 from tdf#104833
2) "Tools" -> "Macros" -> "Organize Dialogs"
3) select the dialog from the doc
4) select "Edit"
Change-Id: I2c4aea951976738c575943a64d01eaac2766fdd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156343
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
avoid some unnecessary casting
Change-Id: Iaa9ce18d7a0772d894ec8f93e16f4f59ffaae77d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156315
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
avoid some unnecessary casting
Change-Id: Id9e52b0b6dd8dc2cedc8b9cf80c17f1cf4afe502
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156314
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
avoid some unnecessary casting
Change-Id: I2f6ed71fbffbcdfad18ed03dd45c12ea1f52fff6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156291
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
avoid some unnecessary casting
Change-Id: I582144f0654837ac8864679b38c3d2676d1089b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156290
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
look for methods where we don't need to guard access
to the field, because the field is never modified
Change-Id: I62c33cc3f52881557515765d3733c4afc78547aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155836
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to attempt to make it obvious in code what kind of coordinate
system we are dealing with.
The idea is that by doing this, the compile-time type checking
will flush out inconsistencies between different code.
I started with vcl::Window::OutputToAbsoluteScreenPixel
and worked outwards from there.
Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Send a `AccessibleEventId::ROLE_CHANGED` event
when the accessible role of a menu item changes
(s. how `VCLXAccessibleMenuItem::getAccessibleRole`
takes into account `MenuItemBits::RADIOCHECK` and
`MenuItemBits::CHECKABLE` to determine the accessible
role for the underlying menu entry).
This fixes the issue of obsolete values for roles being
used, which was uncovered by the upcoming
Change-Id I1a047864ce8dc1f1bc3056ad00159f7fd5e5b7d3
("vcl gtk3: Introduce AT-SPI2 tests for the GTK3 accessibility layer").
With this in place, the workaround for tdf#155625 in
the upcoming gtk3/AT-SPI tests is no longer necessary
and `make CppunitTest_vcl_gtk3_a11y` with
https://gerrit.libreoffice.org/c/core/+/153069 patch set 11
still passes after dropping the workaround:
diff --git a/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx b/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx
index bbcd263fee0c..762401181bf4 100644
--- a/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx
+++ b/vcl/qa/cppunit/a11y/atspi2/atspi2.cxx
@@ -264,9 +264,6 @@ void Atspi2TestTree::compareObjects(uno::Reference<accessibility::XAccessible> x
* be represented with a round trip. */
const auto nLORole = mapToAtspiRole(xLOContext->getAccessibleRole());
auto nAtspiRole = pAtspiAccessible.getRole();
- // FIXME: workaround for https://bugs.documentfoundation.org/show_bug.cgi?id=155625
- if (nLORole == ATSPI_ROLE_CHECK_MENU_ITEM && nAtspiRole == ATSPI_ROLE_MENU_ITEM)
- nAtspiRole = nLORole;
CPPUNIT_ASSERT_EQUAL(nLORole, nAtspiRole);
/* name (no need to worry about debugging suffixes as AccessibilityTools::nameEquals does, as
* that will also be part of the name sent to ATSPI) */
Change-Id: I0d88a7eda592f5ee9abf368ce1d5feb6611b9971
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154947
Reviewed-by: Colomban Wendling <cwendling@hypra.fr>
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
sometimes it returns a relative position, sometimes an absolute
position.
Rather have two different methods with names that match what
they return.
Change-Id: Ie1e73c6be1c797fd59934c96866d1fef1f972b35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154653
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
I removed the code in ImplDrawItem that added data to them,
because ImplDrawItem was only ever called with bLayout with false,
and removing the bLayout param removed that code.
That removal happened in:
commit f0f973da8560e16cba85d2c9465c3a8c4c0ebbb3
Author: Noel Grandin <noel@peralex.com>
Date: Wed Mar 16 08:49:35 2016 +0200
loplugin:constantparams in vcl/
And that happened because....
I noticed that ImplPaint was only ever called with bLayout==false,
which meant I removed that param and passed bLayout==false to
ImplDrawItem,
in:
commit 911ae0aeca443fb4b5e400ae0f939567b580e443
Author: Noel Grandin <noel@peralex.com>
Date: Fri Feb 26 09:36:26 2016 +0200
loplugin:unuseddefaultparams in /include/vcl
which was because the last call to ImplPaint with bLayout == true
was removed in:
commit a6b9d9a19fb8c5c9f166682f52941aee25b89c94
Author: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Date: Wed May 6 13:00:13 2015 +0900
refactor "TabControl" to use RenderContext
Change-Id: Id234257201726de95e2c10bfacb30670123ca8a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153713
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ifd6d57bb4087e6934075ff9f0931260cb8d09328
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150830
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
`VCLXAccessibleEdit::ProcessWindowEvent` takes care
of sending a `TEXT_CHANGED` event. In the case of
`SVTXAccessibleNumericField`, numeric values are
handled, so send a `VALUE_CHANGED` event in addition.
This makes Orca with the qt6 VCL plugin announce
the new value when e.g. changing the page width
using the arrow up key in the "Format" -> "Page Style"
dialog.
For Accerciser, an additional fix is needed so the
value gets updated there in the interface view when
the a11y object is selected. Pending MR: [1]
[1] https://gitlab.gnome.org/GNOME/accerciser/-/merge_requests/25
Change-Id: Id911f50664df7220bc58204bc3477c5306a1da33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150422
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Rather than using it's superclass XWindowPeer and implicitly relying on it being XVclWindowPeer and casting it everywhere.
Change-Id: Icfb46f3b920d00f4a167a31803a71bbb0368d05c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149894
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to find more locking we can remove
Change-Id: Ief7bc5ec2a1ff31f22a0ad366910b7fcc4725818
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148599
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I380d8ae6dd237c0d09209c71dfdcf7b1ad995fb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146241
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I3b37cd67d6d32001ae6ac72f01ce156aeb93ca7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146240
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ie6b9fd7d825940d090f76b23597c40d8cbbca7c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|