summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk3
AgeCommit message (Collapse)AuthorFilesLines
15 hours[API CHANGE] a11y: Use XAccessible for relation targetsMichael Weghorn1-3/+2
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
5 daysgtk3 a11y: Set a11y relations for custom combobox implMichael Weghorn1-0/+15
As described in more detail in the previous commit Change-Id: If5faf77c5f82836c376c04bb6e4e42ce5a3023a2 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Apr 18 14:02:25 2024 +0200 tdf#159910 gtk3 a11y: Keep a11y props for combobox , the gtk3 VCL plugin uses a custom combobox implementation rather than the stock GtkComboBox. Similar to how the above commit makes sure that accessible role, name and description set for the stock GtkComboBox are also set in the custom implementation, do the same for the accessible relations as well, by taking over the relations from the GtkComboBox to the toggle button of the custom implementation as well. One particularly relevant relation in practice is `ATK_RELATION_LABELLED_BY`, because the target set via that relation is what screen readers tend to announce when a combobox receives focus and doesn't have an accessible name set for itself. With this change in place, the Orca screen reader announces the corresponding label e.g. in the "Format" -> "Character" dialog in Writer, tab "Font Effects", so e.g. "Overlining:, combobox" is announced by Orca when the combobox for setting the value for the overlining receives focus, rather than just saying "combobox", which wouldn't make clear to the user what this combobox is for. (This also matches what Orca already does for the qt6 VCL plugin.) This change only takes over the relations set for the combobox itself. Usually, relations are set both ways (e.g. the target of the `ATK_RELATION_LABELLED_BY` relation would itself have an `ATK_RELATION_LABEL_FOR` relation with the combobox as a target). If necessary, this solution could be extended to also iterate over all the target objects and check whether they have relations with the combobox as a target and set corresponding relations to the toggle button as well (or instead). Change-Id: I05e39ef5606ffa49ca7673039de3e1aa74fc8649 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166259 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
5 daystdf#159910 gtk3 a11y: Keep a11y props for comboboxMichael Weghorn1-0/+12
Due to various issues with GtkComboBox, the gtk3 VCL plugin does not use the original GtkComboBox, but a custom implementation, originally introduced in commit bc0e0f633b05c4f91b6695488fc9e5c127507ba5 Date: Thu Apr 9 11:41:00 2020 +0100 tdf#131120 use a replacement for GtkComboBox (See full commit message for more details and reasons.) This means that the accessible role, name and description from the .ui file are not set automatically for the GtkToggleButton widget that acts as the combobox instead and receives keyboard focus. In order to make these available for AT, explicitly take these over from the original GtkComboBox. With this in place, the Orca screen reader now e.g. properly announces the comboboxes in Writer's Navigator as "Navigate By, combobox" and "Active window, combobox" (similar to how it already does for the qt6 VCL plugin), rather than just saying "toggle button, not pressed", which didn't give any hint to the user what the currently focused UI element is about and how to interact with it. Also set a default a11y role of combo-box in the replacement's .ui file. (The role from the GtkComboBox's AtkObject should always override that in practice, though.) Change-Id: If5faf77c5f82836c376c04bb6e4e42ce5a3023a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166248 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
6 daysloplugin:constantparam in vclNoel Grandin1-3/+1
Change-Id: Ifab93e642773bcbf3801cee36bf3db66446febec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166295 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
8 daysDrop FRound, and use generalized basegfx::froundMike Kaganski1-1/+2
Change-Id: I7447e649dc3ef4e51242f69c7486a3e84e103d2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166159 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-31Resolves: tdf#154072 no effect when clicking some dropdown buttonsCaolán McNamara1-5/+17
when toolbar overflows. A problem since: commit b534ee2e972711af2dbaadf2190813054adda902 Date: Tue Nov 22 11:33:23 2022 +0000 Resolves: tdf#152155 use gtk's knowledge of relative widget positions rather than effectively emulate it poorly Change-Id: I18c08e43e9c0b642f2a30b5114d6f0a53f18a331 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165595 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-31Resolves: tdf#152438 constrain popups from MenuButtons with toplevel parentCaolán McNamara1-37/+40
if the toplevel parent is the application window, then under wayland constrain the popup within the toplevel window, but allow it to escape if the parent isn't the application, e.g. a dialog Change-Id: I8d5c423a2c8e034464f110e51df04dee587f40dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165590 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-30Resolves: tdf#159498 Items in Template Manager dropdown should be left-alignedCaolán McNamara1-1/+2
Change-Id: I72d32793814b28b7452be701f0732dbd9dbbcb37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165559 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2024-03-29Resolves: tdf#160028 Type to select currency in dropdown does not work for gtkCaolán McNamara1-0/+30
LibreOffice embeds RTL/LTR direction markers in currency strings, which defeats the default gtk search mechanism, so switch in our one instead. Change-Id: Ia118f8c8e27103c21955683f8a2fd3c17c2b2098 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165557 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-03-24Avoid -Werror,-Wcast-function-type-mismatchStephan Bergmann15-47/+67
Change-Id: I12014c46bf4a22232c8739166effc42756e97dce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165252 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-03-23Harmonization of warning and error colorsHeiko Tietze2-6/+3
* hard-coded colors from infobar moved to settings * weld::LabelType::Warning and ::Error uses these colors * gtk3 native configuration removed Change-Id: Ia80584e9267b8385f7f6b25322f5a85a2570af68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165161 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-03-21tdf#93352 Fix horizontal swiping and scrolling when using an RTL UIPatrick Luby1-0/+5
Starting with commit bfa21ce5fa08f2c634ccb6162914be55aef9f3c2, horizontal swiping in Calc moved in the wrong direction scrollbars were drawn mirrored. So, revert parts of commit bfa21ce5fa08f2c634ccb6162914be55aef9f3c2 so that we are using Calc's previous "negative scrollbar range" implementation for RTL UIs, but only for horizontal scrollbars since vertical scrollbars are the same in LTR and RTL UIs. Also, always disable RTL for scrollbars. Enabling RTL causes the following bugs when clicking or dragging the mouse in scrollbars in Calc's RTL UI: - Click or drag events get mirrored so you must click or drag in unexpected locations to move the scrollbar thumb in the desired direction - Repeatedly dragging the scrollbar thumb leftward can only move no highter than the R, S, or T columns Note: even though RTL is always disabled for Calc scrollbars, the arrows must still be swapped in vcl's ScrollBar class. Change-Id: I85aac94ffaf7df2eeb251a3ff150cc0363b5d770 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164959 Reviewed-by: Stéphane Guillou <stephane.guillou@libreoffice.org> Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-03-06Breeze scrollbars clipped, allocated space not wide/tall enoughCaolán McNamara1-7/+13
https: //github.com/flathub/org.libreoffice.LibreOffice/issues/247 Change-Id: If04d4dd8b9608fc7c3a10bf36bad287cf183c2d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164461 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-06elide some OString temporariesNoel Grandin1-2/+2
Change-Id: I2ecb6af11c95605c84e935b850fe94a1831a1497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163043 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski2-3/+3
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-15Add missing g_free in salnativewidgets-gtk + reorder ones in cpdmgr (vcl)Julien Nabet1-0/+1
Change-Id: I2608a2fe238d124f3a158438e8219fbc63f750d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162126 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-01-15Replace deprecated "gdk_cursor_unref" by "g_object_unref"Julien Nabet1-1/+1
Change-Id: I593f5d8f0775e07e67cce66432bab52723f3afff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162116 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-15Fix location of an g_object_unref in vcl/glomenuJulien Nabet1-1/+1
Change-Id: Icef8e74867758c815e1a55ae0906dead9b70ae6d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162115 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-13Add missing g_object_unref (vcl/gtksalmenu)Julien Nabet1-1/+5
Change-Id: I07db3d7a03da94b53ad49188c229c134dc2f663c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162017 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-13Add missing g_bytes_unref in GtkSalMenu::AddMenuBarButtonJulien Nabet1-0/+1
Change-Id: I00b8a73cfe02abc561ddf67c0e6e4ad612c27422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162018 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-13Add missing g_object_thaw_notify before an early return (vcl/gtkinst)Julien Nabet1-0/+3
Change-Id: I3ba4bfd9a302e03dd25e4635dfbb0a41d265349e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162015 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-13Add missing gdk_event_free (vcl/gtkinst)Julien Nabet1-0/+16
Change-Id: I8bef4c3303f8f2fd89c1cf7cec35536c38d9d4d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162014 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-13Add missing g_list_free in GtkInstanceComboBox ctrJulien Nabet1-0/+1
Change-Id: I1cb70afb229036209c635e52c9b22f619025f368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162016 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-13Add missing gtk_tree_path_free (vcl/gtkinst)Julien Nabet1-0/+2
Change-Id: If178d41cd65cce3d07357fadb532059cc4d1c1a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161983 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-20comment re GTK 2.34 should be 3.24Caolán McNamara1-2/+2
Change-Id: I9acc070e6983f7f5e72120029fa968f0f15306e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161079 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-19tdf#123864 gtk3 a11y: Consider states when mapping BUTTON_DROPDOWNMichael Weghorn3-6/+10
Take the checkable state into account when mapping the `AccessibleRole::BUTTON_DROPDOWN` role. There is no direct ATK equivalent for `AccessibleRole::BUTTON_DROPDOWN`. Don't always use ATK_ROLE_PUSH_BUTTON, but use ATK_ROLE_TOGGLE_BUTTON when the button is CHECKABLE, i.e. it can be toggled. With this in place, Orca now announces the state of the underline button (on/off) when using the gtk3 VCL plugin. Related Orca source code that requires the toggle button role: [1] The state is not announced when using the qt6 VCL plugin yet, and Qt currently doesn't have a toggle button role, so that would have to be added there first to do something similar there. For gtk4, mapping could probably be done similarly, but more is missing for Orca to announce things in custom widgets (e.g. event handling), so leave that for later. [1] https://gitlab.gnome.org/GNOME/orca/-/blob/b80bb951a651f5f12a5ddfb2a5b1c151568d045b/src/orca/scripts/apps/soffice/speech_generator.py#L177 Change-Id: If69e08d2e4939cc709d44e89cc2fd1d01691a70b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160904 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-12-19cid#1557601 COPY_INSTEAD_OF_MOVECaolán McNamara2-4/+3
and cid#1546498 COPY_INSTEAD_OF_MOVE cid#1546384 COPY_INSTEAD_OF_MOVE cid#1546376 COPY_INSTEAD_OF_MOVE cid#1546374 COPY_INSTEAD_OF_MOVE cid#1546373 COPY_INSTEAD_OF_MOVE cid#1546368 COPY_INSTEAD_OF_MOVE cid#1546365 COPY_INSTEAD_OF_MOVE cid#1546356 COPY_INSTEAD_OF_MOVE cid#1546340 COPY_INSTEAD_OF_MOVE cid#1546266 COPY_INSTEAD_OF_MOVE cid#1546236 COPY_INSTEAD_OF_MOVE cid#1546188 COPY_INSTEAD_OF_MOVE cid#1546178 COPY_INSTEAD_OF_MOVE cid#1546166 COPY_INSTEAD_OF_MOVE cid#1546156 COPY_INSTEAD_OF_MOVE cid#1546144 COPY_INSTEAD_OF_MOVE cid#1546143 COPY_INSTEAD_OF_MOVE cid#1546100 COPY_INSTEAD_OF_MOVE cid#1546078 COPY_INSTEAD_OF_MOVE cid#1546041 COPY_INSTEAD_OF_MOVE cid#1546036 COPY_INSTEAD_OF_MOVE cid#1546033 COPY_INSTEAD_OF_MOVE Change-Id: Ib3586d93198992e206baf5c2de5a663d5574aa3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160979 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-19gtk3 a11y: Drop dead debug codeMichael Weghorn1-129/+0
Change-Id: I84ce9541c5d67416498bc5a36f0125c4110ffce1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160900 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-12-10cid#1546281 COPY_INSTEAD_OF_MOVECaolán McNamara1-2/+1
and cid#1546278 COPY_INSTEAD_OF_MOVE cid#1546276 COPY_INSTEAD_OF_MOVE cid#1546247 COPY_INSTEAD_OF_MOVE cid#1546244 COPY_INSTEAD_OF_MOVE cid#1546243 COPY_INSTEAD_OF_MOVE cid#1546220 COPY_INSTEAD_OF_MOVE cid#1546209 COPY_INSTEAD_OF_MOVE cid#1546207 COPY_INSTEAD_OF_MOVE cid#1546206 COPY_INSTEAD_OF_MOVE cid#1546205 COPY_INSTEAD_OF_MOVE cid#1546197 COPY_INSTEAD_OF_MOVE cid#1546180 COPY_INSTEAD_OF_MOVE cid#1546172 COPY_INSTEAD_OF_MOVE cid#1546165 COPY_INSTEAD_OF_MOVE cid#1546164 COPY_INSTEAD_OF_MOVE cid#1546158 COPY_INSTEAD_OF_MOVE cid#1546151 COPY_INSTEAD_OF_MOVE cid#1546135 COPY_INSTEAD_OF_MOVE cid#1546132 COPY_INSTEAD_OF_MOVE cid#1546129 COPY_INSTEAD_OF_MOVE cid#1546128 COPY_INSTEAD_OF_MOVE cid#1546122 COPY_INSTEAD_OF_MOVE cid#1546117 COPY_INSTEAD_OF_MOVE cid#1546113 COPY_INSTEAD_OF_MOVE cid#1546106 COPY_INSTEAD_OF_MOVE cid#1546099 COPY_INSTEAD_OF_MOVE cid#1546091 COPY_INSTEAD_OF_MOVE cid#1546085 COPY_INSTEAD_OF_MOVE cid#1546069 COPY_INSTEAD_OF_MOVE cid#1546063 COPY_INSTEAD_OF_MOVE cid#1546062 COPY_INSTEAD_OF_MOVE cid#1546058 COPY_INSTEAD_OF_MOVE cid#1546056 COPY_INSTEAD_OF_MOVE cid#1546051 COPY_INSTEAD_OF_MOVE cid#1546040 COPY_INSTEAD_OF_MOVE cid#1546030 COPY_INSTEAD_OF_MOVE cid#1546028 COPY_INSTEAD_OF_MOVE cid#1546015 COPY_INSTEAD_OF_MOVE cid#1546001 COPY_INSTEAD_OF_MOVE Change-Id: Ib954c92a300fc323b29f27880fdf8bc46ed98862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160520 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-07tdf#157432 Expert config: Allow filtering by changed valuesSamuel Mehrbrodt1-2/+16
Change-Id: Ib8bbb7fc9e8014a9367278f3fa640f53af46dd2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159986 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2023-12-06tdf#148986 Support XF86Forward / XF86Back key eventsGabor Kelemen1-0/+4
Multimedia keys found on certain presentation clicker devices. Not added to the Customize dialog, as that was not yet asked for. As I have no access to a MAC, did not add support for that in vcl. Inspiration for code taken from commit ca74511985981444dbd72ade7244484c131e36a7 Change-Id: I417e6ba7e79c5f6e774a56ba747803a156d5f50f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160255 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-12-03cid#1546503 Using invalid iteratorCaolán McNamara1-6/+18
and: cid#1546480 Using invalid iterator cid#1546479 Using invalid iterator cid#1546454 Using invalid iterator cid#1546419 Using invalid iterator cid#1546410 Using invalid iterator cid#1546150 Using invalid iterator cid#1546039 Using invalid iterator cid#1545831 Using invalid iterator cid#1545736 Using invalid iterator cid#1545701 Using invalid iterator cid#1545630 Using invalid iterator cid#1545381 Using invalid iterator Change-Id: I9e151b623f751ee1e982b5da0011ff08ab0ad5e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160270 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-29Extended loplugin:ostr: vclStephan Bergmann1-1/+1
Change-Id: Ia9e958deec9716e38381a027451d5ee821efe23d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160095 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-20c++20: use std::erase(_if) instead of std::remove(_if)+erase (vcl)Julien Nabet1-2/+2
Change-Id: Ie9bb9ce20f27162bcb7d7d25dcad99107675e2be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159709 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-20vcl gtk3 : no need to use ClearableMutexGuard instead of GuardArnaud VERSINI1-4/+4
Change-Id: I3dc75125fa89f6b584d4caa1a950e0ec9a461fc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159347 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-19Extended loplugin:ostr: vclStephan Bergmann1-1/+1
Change-Id: I2a9d5383d1831d8bf61e5280d66556d71fccae52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159666 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-14tdf#123864 a11y: Add new AccessibleStateType::CHECKABLEMichael Weghorn1-0/+1
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>
2023-11-07tdf#135236 gtk3 a11y: Restore AtkObject's focus_eventMichael Weghorn1-0/+2
After commit 14e6a810e14e28ab82fe65d66e604ce562016845 Date: Mon Aug 15 13:14:08 2022 +0100 fix "invalid class cast from 'OOoAtkObj' to 'GtkWidgetAccessible'" , Orca with the gtk3 VCL plugin was no longer announcing focus (and content) for the "Not in dictionary" text edit in Writer's spelling dialog ("Tools" -> "Spelling") when moving the focus there e.g. using the Tab key. Make it work again by restoring the `focus_event` function from `AtkObject`, similar to how commit f0827c392641b45647241b3a22e24a95e2b595e3 Date: Fri Aug 19 16:13:04 2022 +0100 Resolves: tdf#150496 we want the AtkObject get_parent function GtkAccessible overrode it, but we expect the AtkObject implementation did for the `get_parent` function to fix the announcement of Writer paragraphs after the above-mentioned commit. The other functions that `gtk_widget_accessible_class_init` overrides [1] are already explicitly set to the wrapper ones (s. the lines above the ones added in this commit), so don't need additional changes. [1] https://gitlab.gnome.org/GNOME/gtk/-/blob/c47425c62efb99be8cd2f0eea651dda76a99ba04/gtk/a11y/gtkwidgetaccessible.c#L542-557 Change-Id: Iae3b47f7fa7fe5ca90acb045a077cf0af52dd7fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158990 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-11-07tdf#152155 vcl: fix gtk popup listbox positions on sidebarLászló Németh1-1/+5
It was fixed only on Wayland previously. Follow-up to commit 15cdee0d846854b50dd04626b73499bef9305e00 "Resolves: tdf#152155 use gtk's knowledge of relative widget positions". Change-Id: I7a8b17189b319146142a2193ec4b5ec41e2c2d27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159020 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2023-10-30tdf#157518: vcl: Introduce vcl control LevelBarSarper Akdemir1-0/+29
Introduces LevelBar that shares implementation with Progress(Bar). LevelBar is to be as a level indicator, e.g. password strength level. Currently with native backends for gtk and Windows. Currently, except on gtk - the colors of the bar at different levels are hardcoded and not dependent on any kind of themeing. On Windows it follows the styling of progress bar of type "Meter" according to the uxguide: https://learn.microsoft.com/en-us/windows/win32/uxguide/progress-bars#meters Change-Id: Id772cda23615e9582463bf589e4674fd4588c864 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157826 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-10-28tdf#135586 a11y: Add a new BLOCK_QUOTE a11y roleMichael Weghorn1-0/+2
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>
2023-10-24gtk3 a11y: Take current type into account when setting new valueMichael Weghorn1-1/+17
This is the gtk3 variant of Change-Id I8674fc37798491fd0b57543acb491edbd4a5a056 qt a11y: Take current type into account when setting new value See that change's commit message for more details. Change-Id: I597220253fa0ca61252706915ad009b8846bbd42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158383 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-21Resolves: tdf#157849 gtk_spin_button_update callback can delete widgetCaolán McNamara1-0/+11
so later GtkInstanceEditable::signal_activate is on deleted widget Change-Id: I9bb9848b4554792db11fc7b0e2d3491a94975b3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158262 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-14Add NUMBERSIGN key handler.Gökay Şatır1-0/+2
German keyboard layout has number sign key. Users can print number sign without using modification keys. So this key can be assigned a shortcut. Subscript is assigned to CTRL + NUMBERSIGN. Below PR is used as reference when adding the new key handler: https://gerrit.libreoffice.org/c/core/+/86713 Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I340dc47764e9200d2477f8db740a629f62f48004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 1db8f6d484b884301a7d3673f4d05478e28cd853) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-10-10gtk3 a11y: Drop unnecessary check before loopingMichael Weghorn1-51/+48
If `nTextMarkupCount` is <= 0 here, the loop condition isn't met, so the body is never entered anyway, so no need to check this explicitly. Drop the extra nesting level. (Use `git show -w` to ignore whitespace change.) Change-Id: Ib472da039d7b0a02ae3206b350c3feb6d42b914b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157759 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-09-29Drop some newly obsolete __cplusplus version checksStephan Bergmann1-4/+2
...after 1eef07805021b7ca26a1a8894809b6d995747ba1 "Bump baseline to C++20". Which revealed that at least for VS 2019 16.11.30 (but not for at least VS 2022 17.7.4), in /clr mode (e.g., when compiling cli_ure/source/climaker/climaker_app.cxx), the -std:c++20 is effectively ignored, and compilation of such source files failed with > include\rtl/string.hxx(191): error C2955: 'rtl::OStringLiteral': use of class template requires template argument list > include\rtl/string.hxx(88): note: see declaration of 'rtl::OStringLiteral' > include\rtl/string.hxx(191): error C7592: a non-type template-parameter of type 'rtl::OStringLiteral' requires at least '/std:c++20' > include\rtl/string.hxx(397): error C2955: 'rtl::OStringLiteral': use of class template requires template argument list > include\rtl/string.hxx(88): note: see declaration of 'rtl::OStringLiteral' etc. To work around that, keep the 27d1f3ac016d77d3c907cebedca558308f366855 "O[U]String literals (unusable for now, C++20 only)" functionality disabled when compiling /clr sources (i.e., where _MANAGED is defined) for that old compiler. Change-Id: If62ceef5f8e55a828b880f197111fe387e4953fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157205 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-23tdf#157168 GtkSpinButton ignores out-of-range value instead of limitingCaolán McNamara1-12/+1
(to range) Change-Id: Ib25276ccea18b45756ac2769cb00cb9d7db0c400 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157174 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-28Related: tdf#144906 unset g_DragSource if drag end callback never calledCaolán McNamara1-0/+3
a scenario I can reproduce with alt+f4 while dragging from the navigator Change-Id: I7123602e036fbe15e0ae8f9a7e1d5fc7483dc6c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156182 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-08-23tdf#146619 Remove unused includes from vcl/incGabor Kelemen1-0/+2
Change-Id: I8fbe02547d5045cfdb5021720b10ddd10106209a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155750 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-08-16Resolves: tdf#156751 add "Special Character..." to GtkEntry context menusCaolán McNamara1-25/+56
translation exists so doesn't require additional translation Change-Id: Ibc5df15b9b8442307195d79c862c69e0506c4057 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155733 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>