summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-08-30gtk4: connect the zoom and rotate gestures for gtk4Caolán McNamara
Change-Id: I9aec166cadcd7ae961ffbc390e0cddf9d8535a20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139030 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-30tdf#149956 Rework toolbar image flippingMaxim Monastirsky
An unified code, covering both vcl and weld cases. For SidebarToolBox, the controller is created before items are inserted, so we listen for item insert event to set initially correct state. Change-Id: I3841f21883104b4d3f8541c97ec7fa5fc0bec575 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139022 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-30tdf#149741 tdf#149956 Make flipping work also in the sidebarMaxim Monastirsky
- Reset the icon each time, as there seems to be no easy way to retrieve the existing icon from a gtk widget in order to mirror it, like we used to do for vcl. Similar approach is currently taken in ToolboxButtonColorUpdaterBase::Update. - Store the flipping state also in GtkInstanceToolbar, similar to vcl's ToolBox. This seems to be the easiest way to make flipping not break on icon theme change, covering all 4 cases (ToolBarManager, SidebarToolBox, ToolbarUnoDispatcher, GenericToolbarController), w/o too involved changes in each. This might benefit from some refactoring later on, but should be good enough for now. - One unsolved problem is the appearance of flipped icons with svg themes, as the regular variant is handed to gtk directly, whereas the flipped one is loaded by us, resulting with a different (blurry) look. Change-Id: I48c16827b46fb75fd798a041851af6e2648ae8fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139021 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-30tdf#149956 Remove previous vcl only solutionMaxim Monastirsky
Change-Id: Id67b75856a230e175ccc6328ec0838c78589191b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139020 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2022-08-29crashtesting: various checkGlyphsEqual assertsCaolán McNamara
since: commit b9f0caad5d9e628f82d5148dfc7d2436d32817e2 Date: Tue Aug 23 04:13:28 2022 +0200 tdf#66819: Disable ligatures with character spacing add the item causing the differing SalLayoutFlags::DisableLigatures mode to the key Change-Id: I4589c0430a781ca55a7479d2af446f3b5e22025b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139000 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-29Don't position dialogs relative to other dialogsSamuel Mehrbrodt
When calling setPosSize on a dialog, and there are other dialogs on top of it, the dialog was positioned relative to its parent dialog. Fix this, so that dialogs are always positioned relative to the main window (if there is one). Revert of/Follow up to 8750c812c9b808ee980f7e0ce0e6ce91e75e1424 Change-Id: I69f189865b118f9bc20077d48591fbd9e83b014f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138994 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-08-29Prevent rounding down fontheights depending on display resolution for macOSThorsten Wagner
Change-Id: Ifb0ba848de3613e49237fd1e4b4739915154f355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138744 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-08-28ofz#50729 Integer-overflowCaolán McNamara
Change-Id: I9713130c6d621a4c5cc45a861170ae336a600bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138950 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-28ofz#50674 reduce limit while fuzzingCaolán McNamara
Change-Id: I1eeb4147f6c0c56c05450291c922bcd04017881a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138947 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-28Adjust button text colors for macOS Big SurThorsten Wagner
Change-Id: I1bbdcc97d65afbebce0b2d2e7530f156aa037315 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138799 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-08-27VBA: make debugging of VBA tests much easierHannah Meeks
When basic fails it displays a MessageBox - which is immediately cancelled. With this we can easily see what it would have said. Change-Id: Icd0719caa87ede4217fa9731671e36f380cba702 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137897 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-27vcl: Don’t leak hb_set_tKhaled Hosny
Looks like I have a habit of never destroying these. Change-Id: I58e77908c68553222e34600aafb6fee186000a0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138893 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-08-27gtk: Fix gtk4 build after f2bd19f672023 and e6bed4293814dMichael Weghorn
Other than their gtk3 counterparts, the gtk4 variants of `gtk_gesture_zoom_new` and `gtk_gesture_rotate_new` don't take any `GtkWidget*` param any more: In file included from .../libreoffice//vcl/unx/gtk4/gtkframe.cxx:12: .../libreoffice//vcl/unx/gtk4/../gtk3/gtkframe.cxx: In member function ‘void GtkSalFrame::InitCommon()’: .../libreoffice//vcl/unx/gtk4/../gtk3/gtkframe.cxx:1025:42: error: too many arguments to function ‘GtkGesture* gtk_gesture_zoom_new()’ 1025 | m_pZoomGesture = gtk_gesture_zoom_new(GTK_WIDGET(pEventWidget)); | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/gtk-4.0/gtk/gtk.h:145, from .../libreoffice//vcl/unx/gtk4/transferableprovider.hxx:14, from .../libreoffice//vcl/unx/gtk4/gtkframe.cxx:10: /usr/include/gtk-4.0/gtk/gtkgesturezoom.h:46:14: note: declared here 46 | GtkGesture * gtk_gesture_zoom_new (void); | ^~~~~~~~~~~~~~~~~~~~ .../libreoffice//vcl/unx/gtk4/../gtk3/gtkframe.cxx:1034:46: error: too many arguments to function ‘GtkGesture* gtk_gesture_rotate_new()’ 1034 | m_pRotateGesture = gtk_gesture_rotate_new(GTK_WIDGET(pEventWidget)); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/gtk-4.0/gtk/gtk.h:141: /usr/include/gtk-4.0/gtk/gtkgesturerotate.h:46:14: note: declared here 46 | GtkGesture * gtk_gesture_rotate_new (void); | ^~~~~~~~~~~~~~~~~~~~~~ make[1]: *** [.../libreoffice//solenv/gbuild/LinkTarget.mk:334: /home/michi/development/git/libreoffice/workdir/CxxObject/vcl/unx/gtk4/gtkframe.o] Error 1 make: *** [Makefile:289: build] Error 2 Change-Id: Ia2f0f76b6353c34baef9fd6adcafe4af07bec543 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138888 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-26bump scrtf input len some moreCaolán McNamara
Change-Id: I3690f2ec60eed58bba149c322e92b39cf2f8ba32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138887 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26vcl: implement touchpad rotate gesture support on gtk backendPovilas Kanapickas
This change is enough to support both touchpad and touchscreen gestures, but currently GDK_TOUCH_MASK is not enabled, so only touchpad gestures are supported. Change-Id: Ia36b64cd891321d3a5420ea81dca236c936d9af3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138790 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26vcl: implement touchpad zoom gesture support on gtk backendPovilas Kanapickas
Note that this does not support touchscreen gestures. Enabling support for touchscreen gestures requires enabling GDK_TOUCH_MASK which has higher regression potential for touchscreen users, so it has not been done yet. Change-Id: I1baab36804230484394e638bf8bfb8c7a7ddabe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138789 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26qt a11y: Set the (un)selected child in selection add/remove eventMichael Weghorn
Qt itself sets the child index when sending `QAccessible::SelectionAdd` or `QAccessible::SelectionRemove` events for its own widgets and the handling in its AT-SPI adapter assumes that this is the case, so do so here as well. Work around QTBUG-105988 [1] by using the `QAccessibleEvent` ctor that takes a `QObject*` instead of the one that takes the `QAccesibleInterface*`, since calling `QAccessibleEvent::setChild` in the event object would otherwise break things. When used in combination with the suggested Qt changes to send AT-SPI `SelectionChanged` events for these event types and `QAccessible::SelectionWithin` [2] [3], the suggested Qt changes to add support for the AT-SPI selection interface [4] [5] and a corresponding LibreOffice demo change [6] that implements the suggested `QAccessibleSelectionInterface`, this makes Orca announce selected Calc cells for the qt6 VCL plugin. [1] https://bugreports.qt.io/browse/QTBUG-105988 [2] https://codereview.qt-project.org/c/qt/qtbase/+/429146 [3] https://codereview.qt-project.org/c/qt/qtbase/+/429147 [4] https://codereview.qt-project.org/c/qt/qtbase/+/428566 [5] https://codereview.qt-project.org/c/qt/qtbase/+/428567 [6] https://gerrit.libreoffice.org/c/core/+/138750 Change-Id: Id1cd28aa8cab208d7713ddd46ede5a7acd73334a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138882 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-26crashtesting: only warn about outsize scretch valueCaolán McNamara
ooo60911-3.odt renders fine with todays freetype and cairo, if there are similar problems elsewhere, better to cut off in CairoTextRender::DrawTextLayout instead Change-Id: I39ed574d441d929f307ca72290a52d2dc41f8356 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138878 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26freetype 2.9 was relesed in Jan 2018, drop workaround for <= 2.8Caolán McNamara
Change-Id: Iaf95faa15d56e8f26ed57cb4744b039a18223c5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138877 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26improve ImplSubPixelToLogic sanity checkCaolán McNamara
Change-Id: Iae8620e3ef4f989555e0014459fcd8f152db843b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138872 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26retain precision until the endCaolán McNamara
Change-Id: I1986bb5a5d9445ae4efaa54f0a65a35a0a5d5335 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138855 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26cid#1509211 silence Explicit null dereferencedCaolán McNamara
Change-Id: I5f1c1d061a59b3edaa62b988fcbbc8dd6be0093b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138860 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26keep nXOffset as doubleCaolán McNamara
Change-Id: I5a67af97c04e74fed8aa457261c4a7dd9ae79c17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138854 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26aAdjOffset is derived from a DevicePoint, so keep it as a DevicePointCaolán McNamara
Change-Id: Id05963df6ab96ecfdc28c4463415e61b796f8fe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138852 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26vcl: implement rotate gesture infrastructurePovilas Kanapickas
This change implements internal infrastructure to pass rotate gestures from low-level sources to the consuming GUI widgets. The API follows the established begin-update-update-...-end event convention that is used on various platforms. The API should be enough to support bouth touchpad and touchscreen gestures, as long as the underlying low-level source exposes enough information. The hardware drivers usually expose touchpad gestures already recognized whereas touchscreen gestures come as a set of moving touchpoints and application needs to figure out their meaning itself. Many toolkits recognize both and offer a unified higher-level interface that can be used by us. Change-Id: Iae667b3248d6f78bfb1eef755af6bc996432b6a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138788 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-26vcl: implement zoom gesture infrastructurePovilas Kanapickas
This change implements internal infrastructure to pass zoom gestures from low-level sources to the consuming GUI widgets. The API follows the established begin-update-update-...-end event convention that is used on various platforms. The API should be enough to support bouth touchpad and touchscreen gestures, as long as the underlying low-level source exposes enough information. The hardware drivers usually expose touchpad gestures already recognized whereas touchscreen gestures come as a set of moving touchpoints and application needs to figure out their meaning itself. Many toolkits recognize both and offer a unified higher-level interface that can be used by us. Change-Id: I529afcc60459455616de0145fe20077a4dcf3983 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138787 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-26Removed duplicated includeAndrea Gelmini
Change-Id: I6852fe11a142d13c71e111b3e4747cd1ca0850b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138856 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2022-08-26FeatureCollector: Drop redundant checkKhaled Hosny
HarfBuzz handles this for us, and it more future-proof this way. Change-Id: Ia8a65f0363a05c74a718a1a9f7d6df6c84373f46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138853 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-08-26aStartPt is derived from a DevicePoint, so keep it as a DevicePointCaolán McNamara
Change-Id: I85f4275593fe491bf5ba06d334312881367ceacf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138851 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26nWidth is set from newWidth which is DeviceCoordinateCaolán McNamara
Change-Id: I9d28fa57847b71383baa4b48d51a176017c0132f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138849 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-26automatically set TextRenderModeForResolutionIndependentLayout if we scaleCaolán McNamara
Always render glyphs with a mode suitable for rendering of resolution-independent layout positions if we scale the text positions. The idea being to typically continue to use the system defaults for font settings for UI elements, but where we are rendering into application canvases where there's a mapmode set then automatically use a good mode to render that. Change-Id: I0e5857e377da72ae1a2ede1d88d6408819fc9200 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138324 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-25FeatureCollector: Fix parameter code for named parametersKhaled Hosny
The code are 1-indexed (since 0 means disabled). Change-Id: I1d4ed80ba91191645305aadbbbb2d621116c5d36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138842 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-08-25qt a11y: Forward text selection change event as suchMichael Weghorn
Change-Id: I7e208d964c5b5badb0a3ea3a19c3ca3cc7fa4ff4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138838 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-25tdf#150561: Page dimension don't match paper format in Print PreviewJulien Nabet
...like claiming 210x148 to be A4 Page size may have changed so sync mePaper with it Change-Id: I7d7329bbacfb2f0bd56e495b7390eedebecee02c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138736 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-25tdf#150507 reenable slight hinting for cairo with ResolutionIndependentLayoutCaolán McNamara
it was disabled because of: tdf#150145 text appears to have a row of pixels cropped out which seems to be the same issue as https://gitlab.freedesktop.org/cairo/cairo/-/issues/390 reenable, drop CAIRO_HINT_METRICS_OFF and emulate a proposed solution of https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/235 by hacking in a route to disable CAIRO_ROUND_GLYPH_POS_ON Change-Id: I3c9f982c9737b84fe0ee6b645f507e1226807d60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138810 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-25qt a11y: Work around Qt ignoring ActiveDescendantChanged eventsMichael Weghorn
While Qt has a `QAccessible::ActiveDescendantChanged` event type, events of that type are just ignored in Qt's AT-SPI adapter [1]. Work around that by sending a "focused" event for the child instead, for which handling inside Qt has been added in [2]. While adding support for properly handling `QAccessible::ActiveDescendantChanged` in Qt might be worth looking into at some point, this appears to work just fine for now and e.g. makes Orca announce the focused cell in Calc when moving between cells using the keyboard in the qt6 VCL plugin. [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=0131dbd2f95449c09758208d8b190c9238a5c46a#n1121 [2] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=f3509565480107c2587212f7d55cc5f92facc417 Change-Id: I809695de427b6438d37a5a4840044e7ca3d4cd08 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138809 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-25vcl: test removeMnemonicsFromString()Chris Sherlock
Change-Id: Id0a84fb5cb9fa2f6f286ffeab1e1baea641d677a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138728 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-25vcl: rename GetNonMnemonicString() and make it standalone functionChris Sherlock
Renamed GetNonMnemonicString() to removeMnemonicFromString() Change-Id: I272714f97bb6d9174360631c18c4fd9bb485698e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138103 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-25FeatureCollector: Detect ENUM features in OpenType fontsKhaled Hosny
A bit heavy handed, but the only way to detect the number of alternates a feature has is to get the maximum number of alternates for all lookups in all glyphs of this feature, which is what this code does. Additionally, for cvXX features, parameter names from the font are used when available. Change-Id: Ib7f7ea5e5288b47b03dac8703668ca6c4007f517 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138749 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-25FeatureCollector: Get feature labels for ssXX/cvXX features from the fontKhaled Hosny
If the font provides feature labels for ssXX/cvXX features, fetch and use them. Switches also to using the UI language not locale for finding labels as the UI language is what controls the UI localization. Change-Id: Ic7eeae9df25692e7f2924b2db65905666999c904 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138748 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-25FeatureCollector: SimplifyKhaled Hosny
We are not using the script or language information for anything, so we can use HarfBuzz API to query the GSUB/GPOS tables directly. Change-Id: Ie68c51a1662494ba33ec192edb78afa0d8added4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138745 Tested-by: خالد حسني <khaled@aliftype.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-25use DevicePoint and SubPixelToLogic to return to source coord systemCaolán McNamara
Change-Id: I1aeae6270feb6cb0a44b7850e1b3143e68ae780f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138770 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-25retain accuracy when we have subpixels and convert back to Logic unitsCaolán McNamara
Change-Id: If5a8624c1150919cc66f7b7d635edf112b480523 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138738 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-24qt a11y: Remember associated QObject also for non-QtXAcccessible caseMichael Weghorn
This is similar to what Change-Id Ic890a387ff016e889f25dba70c82d0d81ae7a9e3 ("qt a11y: Remember and reuse existing QObject for XAccessible") does to avoid creating another `QtXAccessible` for an `XAccessible` if one has been created earlier. However, there is an additional case that needs to be covered to avoid creating multiple `QObjects` for a single `XAccessible`: `QtAccessibleWidget::customFactory` not only gets called by explicitly calling `QAccessible::queryAccessibleInterface` from within LibreOffice code, but the Qt library itself also calls this method, in which case no entry associating the `XAccessible` with its `QObject` had been inserted into the map handled by our `QtAccessibleRegistry` previously. This would result in a "new" `QtXAccessible` object being created later when a `QObject` would be needed for that `XAccessible`, rather than using the `QtWidget` that is the actual `QObject` associated with the object. Prevent that from happening by inserting an entry into the map for this case as well. With this and two Accerciser fixes [1] [2] in place, jumping to bookmarks in Accerciser's treeview of the LO a11y hierarchy now generally works with the qt6 VCL plugin. It previously failed due to the fact that a new object was created and navigating the tree up to the root application object from the bookmarked object would then fail. The fact that there were two objects could be seen e.g. by using the following commands in Accerciser's IPython console with the root "soffice.bin" application a11y object selected in the treeview after starting Calc: In [25]: acc[1][0][0].get_parent().path Out[25]: '/org/a11y/atspi/accessible/2147483672' In [26]: acc[1][0].path Out[26]: '/org/a11y/atspi/accessible/2147483648' -> Two different IDs/paths for what should be the same object. (The parent of the first child of the object at tree path 1,0 should be the object itself, but here it wasn't.) With this change in place, this now works as expected: In [28]: acc[1][0][0].get_parent().path Out[28]: '/org/a11y/atspi/accessible/2147483648' In [29]: acc[1][0].path Out[29]: '/org/a11y/atspi/accessible/2147483648' Together with Change-Id Ic890a387ff016e889f25dba70c82d0d81ae7a9e3 ("qt a11y: Remember and reuse existing QObject for XAccessible"), this also addresses the remaining issue mentioned in commit 99640693d28ca11b31a1d3855e104d2d8c5122d7 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Aug 3 16:49:48 2022 +0200 > Note however that this change alone is not yet sufficient > for a window to actually be returned for any arbitrary a11y > object deeper down the hierarchy. This is because > walking up the a11y hierarchy currently results in new > Qt a11y objects being created for the parents instead of > using existing ones, and the newly created ones lack > the association to the widgets. > (This works in a WIP branch that remembers/caches > a11y objects, but that needs some additional work before > it can be merged.) Note that there are still cases where navigation to bookmarks in Accerciser's tree view doesn't work (reliably), but those would need to be looked at separately and might not be specific to the qt6 VCL plugin. (At least I have come across such cases with gtk3 as well.) [1] https://gitlab.gnome.org/GNOME/accerciser/-/commit/c2a3e9f1eb1fcd6eb059f1f2fe6e629b86521335 [2] https://gitlab.gnome.org/GNOME/accerciser/-/commit/a092dc933985fafd5b1e2cc3374c7bbc0fb2d12e Change-Id: I02262014a45a4b024cdc1bbd385da8a35a2c304a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138764 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-24qt a11y: Remember and reuse existing QObject for XAccessibleMichael Weghorn
Previously, a new `QtXAccessible` object was created for an `XAccessible` each time before `QAccessible::queryAccessibleInterface` was called, which is not only unnecessary but also causes various issues, e.g. it breaks walking the a11y hierarchy upwards (i.e. from children to parents), since a new object is created for the parent. This introduces `QtAccessibleRegistry` that keeps a mapping between the `XAccessible` and the associated `QObject`. That mapping is used to reuse already created objects instead of creating new ones for the same `XAccessible`. The entry for an `XAccessible` is removed again from the map in `QtAccessibleWidget::invalidate`, which gets called when the `XAccessible` gets disposed, s. `QtAccessibleEventListener::disposing`. With this in place, Orca now also nicely announces only the text of the push buttons themselves in the "Save Document?" dialog when switching between the buttons using the Tab key, rather than announcing the whole widget hierarchy every time (probably because creating a new object every time prevented Orca from recognizing that the previously selected pushbutton and the newly selected one are siblings, i.e. have the same parent object.) Change-Id: Ic890a387ff016e889f25dba70c82d0d81ae7a9e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138757 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-08-24rename DeviceFontWidth/DeviceFontHeight to DeviceSubPixelCaolán McNamara
Change-Id: I5378169e2c1d4d15fa160c3c2d2a130556dc80b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138747 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-24move & rename height relevant function near & similar to its width equivalentCaolán McNamara
Change-Id: Icab3c11d6968efbbdb0f9f7f1dfeba2709e22a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138746 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-08-24tools: rename Rectangle::Justify() to Rectangle::Normalize()Chris Sherlock
Jusify() normalizes the rectangle so both the Width and Height are positive, without changing the location of the rectangle. It ensures that the x and y coordinates will be moved to the top left of the rectangle. The name is strange, so renaming Justify() to Normalize(). Change-Id: Idbf163e65e52a798e38f785b8961b8042cf0cf2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137379 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-08-23tdf#150555: Skia seems to fail with Windows 8/8.1Julien Nabet
See https://bugs.documentfoundation.org/show_bug.cgi?id=150555#c7 Change-Id: I7c2f0a30b3d8cc3c5c528690087a42423fba68a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138743 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-08-23tdf#127423: Allow disabling default features in Font Features dialogKhaled Hosny
In OpenType fonts we have no way if detecting what features are on by default and what not (short of hard-coding this, since HarfBuzz has no API of giving us this information, and it is also not a fixed set per-font, depends also on the text being shaped). The dialog currently does not differentiate between a disabled feature and unset feature. To make this distinction, feature value is now signed and negative value means the feature is unset (i.e. the default is used), and the checkbox is now a try state one to reflect this. Change-Id: Iba5d13f02610e7b761677acc19872788c72afde1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138729 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>