summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
109 min.Fix typoAndrea Gelmini
Change-Id: I42884b818969891a993e451d4c23b0925130baf0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183061 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
109 min.Fix typosAndrea Gelmini
Change-Id: Ia38dd2e506e2fbbaa778c717de92ef7c1e3d108f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183060 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
111 min.Fix typoAndrea Gelmini
Change-Id: I2f7dd73ab410c4006a29e31e0cf36565608a4aeb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183104 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
13 hourstdf#151423 allow trackpad or Magic Mouse to behave like a regular mousePatrick Luby
Give both trackpad and Magic Mouse users the option to restore the legacy zoom via Command+swipe gesture. The IgnoreKeysWhenScrollingWithTrackpadOrMagicMouse preference is set to true by default and that disables zooming via swiping. The problem is that while trackpad users are able to zoom via a magnify gesture, the Magic Mouse doesn't have a magnify gesture. Since I have not found a reliable way to distinguish a Magic Mouse from a trackpad, Magic Mouse users have no obvious replacement for the zoom via Command+swipe gesture. Change-Id: Ic2fa5ba153ecb3d7a7cd4711549288b28e6591d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182740 Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
18 hoursnss: upgrade to 3.103Xisco Fauli
Add initialize() method to hash class: in PDFWriterImpl::emitTrailer we need to re-initialize the hash after calling finalize(), otherwise update() inside writeBuffer will fail with Assertion failure: rv == SECSuccess, at sechash.c:140 See https://lists.freedesktop.org/archives/libreoffice/2025-March/093075.html Downloaded from https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_103_RTM/src/nss-3.103-with-nspr-4.35.tar.gz Change-Id: Iebf144be7bce9f45900b427adedc7465e4b2e4e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183075 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
22 hoursIf combobox is UserDraw, then don't bother measuring textCaolán McNamara
the UserItemSize is all that matters in this case. Which then side steps the issue of a sizeable glyph cache in the long lived font and styles comboboxes as it no longer gets filled. cat /proc/<kitbrokerpid>/smaps_rollup |grep Private|awk '{s+=$2} END {print s}' before: 102684 kB after: 100552 kB Change-Id: Ib8a0a149ca49c17c7b1ff47b6b56c52ae28e6eff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183072 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
43 hoursAdd vcl/README.themes.md for themes implementation detailsSahil Gautam
Change-Id: Ia1df363bc0a8d8d23ce3182504c4d0fb9164245c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182447 Reviewed-by: Sahil Gautam <sahil.gautam.extern@allotropia.de> Tested-by: Jenkins
2 daystdf#163989 gtk3 a11y: Set a11y parent for native GTK vcl::Window childMichael Weghorn
When mixing vcl::Window and native GtkWidget, the native GtkWidget's AtkObject is correctly reported as the InterimWindow child e.g. for the text edit of the combobox in the Find toolbar since commit 39e0bdb686baf76a4c54d12cfa66aa9f08db8c3f Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Mar 3 17:42:03 2025 +0100 tdf#163989 vcl a11y: Rework toolbar item window a11y . However, the GtkWidget's AtkObject was not reporting the accessible object of the parent vcl::Window as its parent (but presumably the next GtkWidget in the hierarchy), which resulted in an inconsistent a11y hierarchy: The "a11y object path" top-down is different from the bottom-up one. This inconsistency e.g. caused Accerciser's "Jump to object" feature to not select the correct object in its treeview of the LO a11y hierarchy when clicking on the event source of the "object:text-caret-moved" AT-SPI2 event triggered by typing in the search bar. Event displayed in Accerciser's Event Monitor: 65.7 object:text-caret-moved(2, 0, 0) source: [text | ] application: [application | soffice] When clicking on the event source, the correct area on screen was highlighted and details about the object were displayed in Accerciser's Interface Viewer, but the object wasn't selected in the treeview. Bottom-up a11y object path printed via Accerciser's IPython console: In [2]: obj = acc In [3]: while obj: In [3]: print(f'object: {obj}, index in parent: {obj.get_index_in_parent()}') In [3]: obj = obj.parent In [3]: object: [text | ], index in parent: 0 object: [combo box | ], index in parent: 0 object: [filler | ], index in parent: 0 object: [panel | ], index in parent: 0 object: [viewport | ], index in parent: 0 object: [scroll pane | ], index in parent: 3 object: [root pane | Untitled 1 — LibreOfficeDev Writer 25.8 [f3288f031a2667a8acc7b3c79744fed1db590845]], index in parent: 0 object: [panel | ], index in parent: 1 object: [panel | ], index in parent: 0 object: [frame | Untitled 1 — LibreOfficeDev Writer 25.8 [f3288f031a2667a8acc7b3c79744fed1db590845]], index in parent: 0 object: [application | soffice], index in parent: -1 object: [desktop frame | main], index in parent: -1 This is missing various objects as compared to the top-down path seen when navigating from the top-level application object down to the combobox's text edit in Accerciser's treeview. Fix this by explicitly setting the parent of the GtkWidget's AtkObject to the AtkObject that wraps the XAccessible of the vcl::Window. This makes sure the parent <-> child relationship is now consistent both ways. Bottom-up a11y object path with this commit in place: In [1]: obj = acc In [2]: while obj: In [2]: print(f'object: {obj}, index in parent: {obj.get_index_in_parent()}') In [2]: obj = obj.parent In [2]: object: [text | ], index in parent: 0 object: [combo box | ], index in parent: 0 object: [filler | ], index in parent: 0 object: [panel | ], index in parent: 0 object: [panel | ], index in parent: 0 object: [filler | ], index in parent: 0 object: [panel | ], index in parent: 0 object: [panel | Find Values], index in parent: 1 object: [tool bar | Find], index in parent: 0 object: [panel | ], index in parent: 5 object: [root pane | Untitled 1 — LibreOfficeDev Writer 25.8 [1d0572a62fcbba1a96438f49b737e2b177e6cb8e]], index in parent: 0 object: [panel | ], index in parent: 1 object: [panel | ], index in parent: 0 object: [frame | Untitled 1 — LibreOfficeDev Writer 25.8 [1d0572a62fcbba1a96438f49b737e2b177e6cb8e]], index in parent: 0 object: [application | soffice], index in parent: -1 object: [desktop frame | main], index in parent: -1 This matches the (reversed) top-down object path, and makes Accerciser's "Jump to object" feature work for the scenario described above when using the gtk3 VCL plugin. Change-Id: Ibd18aef3c784d63c75ab29287910c31273939538 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182992 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2 daysRevert extra changes merged with gerrit 181017Jan Rheinländer
Merge 181017 included changes that were not required for the patch, only for reproducing the bug Change-Id: If7284ed822b39d47a64eac751a31699f48ea504e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182999 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2 daysvcl a11y: Call AccessibleIconView ctor directlyMichael Weghorn
No longer use AccessibleFactory for this, which was needed in the past to break a dependency cycle, which is no longer the case since commit 9283da858506fe3b4383e4cfe0506e470a4356f6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Dec 17 12:04:04 2024 +0100 a11y: Merge accessibility module into vcl The // need to be done here to get the vclxwindow later on in the accessible css::uno::Reference<css::awt::XVclWindowPeer> xHoldAlive(GetComponentInterface()); part is also obsolete, since the VCLXWindow is no longer used by the a11y implementation class. Change-Id: I36831850da4934c78a8f7a754bca82a02a50f6ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182988 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2 daysvcl a11y: Call AccessibleListBox ctor directlyMichael Weghorn
No longer use AccessibleFactory for this, which was needed in the past to break a dependency cycle, which is no longer the case since commit 9283da858506fe3b4383e4cfe0506e470a4356f6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Dec 17 12:04:04 2024 +0100 a11y: Merge accessibility module into vcl The // need to be done here to get the vclxwindow later on in the accessible css::uno::Reference< css::awt::XVclWindowPeer > xHoldAlive(GetComponentInterface()); part is also obsolete, since the VCLXWindow is no longer used by the a11y implementation class. Change-Id: I9b6a1a3f000434c2b0d3d856f2ac2ff34ab5ebe0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182987 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
3 daysa11y: Drop unused includesMichael Weghorn
Change-Id: Icbeb1bb55991d27a57640d7314fb090c6a669742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182989 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
3 daystdf#157003 a11y: Replace AccessibleDropDownListBox Java with C++ testMichael Weghorn
Remove the existing Java AccessibleDropDownListBox tests and introduce a new C++/cppunit test that takes a bit of a different approach: Other than commit d2a5b4bc0b8c8d1dd82133719a3ef5cc01b0cbbe Date: Tue Apr 26 16:56:56 2022 +0200 toolkit: convert AccessibleStatusBar test to C++ Just translate the test and add required or handy CppUnit helpers. which basically translated the existing AccessibleStatusBar test as is to C++/cppunit, don't do the same here, but: 1) Move the test from toolkit to vcl, where the a11y implementations for vcl widgets are located since commit 9283da858506fe3b4383e4cfe0506e470a4356f6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Dec 17 12:04:04 2024 +0100 a11y: Merge accessibility module into vcl 2) Instead of starting Writer and then searching for the accessible object of the dropdown listbox in the a11y tree, only create a simple dialog that contains a dropdown listbox (VCL ListBox with WB_DROPDOWN set). This minimizes the complexity/a11y tree to the object of interest. Apart from that, the general logic of what aspects are tested is mostly unchanged, now using the C++ helpers introduced in the above-mentioned d2a5b4bc0b8c8d1dd82133719a3ef5cc01b0cbbe (and later commits) to test the various XAccessible* interfaces. The XAccessibleEventBroadcaster interface is no more explicitly tested, since the XAccessibleEventBroadcasterTester would require an XWindow again. However, the logic is implemented in the VCLXAccessibleComponent subclass used by almost all widgets (vcl::Window subclasses), so not explicitly testing it here shouldn't be a problem. Change-Id: I61bfff515c5e9f7e2d18b9279861c09ceede403e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182986 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
3 daysvcl a11y: Use sal_Int32 in IComboListBoxHelper::GetBoundingRectangleMichael Weghorn
Align the param type with what both, ComboBox::GetBoundingRectangle and ListBox::GetBoundingRectangle have, which get called by the implementation in the only subclass implementation in VCLListBoxHelper::GetBoundingRectangle. Drop unnecessary casting in VCLXAccessibleListItem. Change-Id: I8f8b7c9f355768a05174b753ac28d0dd60374673 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182985 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
3 daysvcl a11y: Use more specific ListBox subclass in VCLXAccessibleTextField ctorMichael Weghorn
Use a ListBox* param instead of having a vcl::Window* param and documentation stating that this is expected to be a ListBox. VCLXAccessibleTextField::implGetText does a cast to ListBox. Change-Id: I9ef6c4cb8fc7c7fa38af79a8aac7b95d984075b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182984 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
3 daystdf#163989 vcl a11y: Rework toolbar item window a11yMichael Weghorn
If a toolbar item has a window (as returned by ToolBox::GetItemWindow), then the toolbar item's accessible (a VCLXAccessibleToolBoxItem) should be reported as the parent of the accessible object for that item window. Reporting the item window's accessible as a child is pretty straightforward and already implemented in The VCLXAccessibleToolBoxItem::getAccessibleChild. Ensuring that the item window's accessible reports the VCLXAccessibleToolBoxItem as its parent and the proper index is more challenging, because it does not match the vcl::Window hierarchy. (There is no vcl::Window for toolbar items, but only for the toolbar itself.) So far, in order to make that work, OToolBoxWindowItem was the XAccessible implementation for toolbar item windows and OToolBoxWindowItemContext was the XAccessibleContext implementation that got returned by OToolBoxWindowItem::getAccessibleContext (via the base class implementation OAccessibleWrapper::getAccessibleContext). Those were subclassing OAccessibleWrapper and OAccessibleContextWrapper in order to report the parent (and index in parent) as needed. One effect of this however is that the gtk3 logic to include native GtkWidgets that are contained in a vcl::Window in the a11y hierarchy, as implemented in commit 305c6fee0be4db38023d9ca5f7915e443e0bc1fc Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Mar 24 11:33:42 2021 +0000 tdf#141197 if we have a sysobj child then include that in the atk hierarchy does not work for that case, because it relies on the accessible to be an XWindow in order to extract the underlying vcl::Window. With OAccessibleWrapper being used, that is not the case. As a consequence, native GTK widgets inside the vcl ToolBox (i.e. non-native toolbar) like the Paragraph Styles or Font Style comboboxes or the combobox in Writer's search toolbar cannot be found in Accerciser's treeview of the LO a11y hierarchy. (There are panels, but the comboboxes inside the panels are missing.) While the logic inside the gtk3 a11y bridge could be extended to cover that case also (by making use of implementation details in OAccessibleWrapper, e.g. getting its OAccessibleWrapper::m_xInnerAccessible), choose another solution that doesn't depend on making use of more implementation details and ports away from OAccessible(Context)Wrapper for the toolbar item windows completely: Introduce Window::SetAccessibleParent that allows to explicitly set an accessible parent for a vcl::Window. If this is done, Window::GetAccessibleParent, used by VCLXAccessibleComponent::getAccessibleParent returns this accessible instead of using the accessible for the vcl::Window returned by vcl::Window::GetAccessibleParentWindow. This ensures that the item window returns the toolbar item as its parent in VCLXAccessibleComponent::getAccessibleParent and the base class implementation in OCommonAccessibleComponent::getAccessibleIndexInParent ensures that the correct child index is also returned. Drop the now unused classes OToolBoxWindowItem and OToolBoxWindowItemContext. With this commit in place, the native GTK widgets inside VCL toolbars now show up in Accerciser's treeview of the LO a11y tree when using the gtk3 VCL plugin as expected. Change-Id: I3b2182ca953056a939670e73687f4568620a4087 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182426 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
3 daystdf#163989 vcl a11y: Don't rely on Window a11y parent being WindowMichael Weghorn
In VCLXAccessibleComponent::implGetBounds, use Window::GetAccessibleParent introduced in commit 5ef30632ede4258f0c45194259567849cc172dab Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Mar 3 17:05:16 2025 +0100 tdf#163989 a11y: Introduce Window::GetAccessibleParent to get the accessible parent of the vcl::Window instead of using vcl::Window::GetAccessibleParentWindow directly. The latter would give an incorrect result if the accessible parent is not a vcl::Window itself. This prepares for upcoming commit Change-Id: I3b2182ca953056a939670e73687f4568620a4087 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Mar 3 17:42:03 2025 +0100 tdf#163989 vcl a11y: Rework toolbar item window a11y Change-Id: Iffa85bd9b6733eeed5357dd4937aac00966724c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182978 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
3 daysvcl a11y: Flatten VCLXAccessibleComponent::implGetBoundsMichael Weghorn
Change-Id: I17936af21d34d56fe02d20a4ebe065a79786f92d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182977 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
5 dayslokit: don't double-buffer combo/list box dropdownsCaolán McNamara
we don't need them and they take up a noticeable amount of dead memory .e.g. before: 57140k, after 56732k for a blank writer document. Change-Id: I50b378989c01e5e2a94e06c8e78a08dfb3829ef8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182928 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
5 daysfix deadlock in SystemDependentDataBuffer::flushAll (tdf#131595 related)Noel Grandin
seen while testing my other patches for this bug Change-Id: I1c14bdfe5ec60915885dd062a7bb81a284459da9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182911 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
7 daysSimplify string definitionHossein
With Unicode literals, the code is now much simpler. This patch also corrects the text, which means 1 2 3 in Arabic. Change-Id: I59a6a3afcddde416f73e74287319750cf4111048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182826 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
7 daysFix typoAndrea Gelmini
Change-Id: I8ea21b5f00d9ae21e4c8f89472c04bb2e3b0d640 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182804 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
7 daysupdate to skia m133Noel Grandin
Change-Id: Id12146bfd28003acc146fc45fdea4d9e4323539e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182778 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
7 daystdf#70102 API cleanup for RTL icon variant code supportJonathan Clark
Removed an unnecessary DIR_LR_TB enum value. Added a missing @since annotation. Change-Id: If27357cb05498abca5a69adcd6e63c25b412f6b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182802 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Tested-by: Jenkins
7 daystdf#147021 Use std::size() instead of SAL_N_ELEMENTS()Nam Bui
Use std::size() in vcl/workben/vcldemo.cxx Change-Id: I7a320b79ee218a32af3a1a5a52bda08fd972ad46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182756 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
8 daysPartial: tdf#156855 update native and LibreOffice dark mode statesPatrick Luby
Updating the dark mode state of everything all at once does not solve all failures to update colors when the light/dark mode changes, but it eliminates enough failures that the UI is now generally readble without restarting LibreOffice. Also, update the application's color mode when the macOS light/dark mode changes while LibreOffice is running. Change-Id: Iffe3ca3789373135f06f7fbe22429cc59438d4f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182484 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins Reviewed-by: Sahil <sahil.gautam.extern@allotropia.de>
8 daystdf#165610 sd: master slide panel is broken with "show large preview"Rashesh
Change-Id: If7d6350ca289ab165f11af71bd1f22dee7be86d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182668 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 756a4a85d0362264e82389d5924c2ded30f25885) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182765 Tested-by: Jenkins
8 daystdf#130857 qt weld: Implement QtInstanceWidget::{g,s}et_margin_*Michael Weghorn
Change-Id: I8b909a133ed87823ba4e362dbb8a25943baa2686 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182762 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
8 daystdf#70102 Code support for RTL variants in icon themesJonathan Clark
UNO commands may optionally rotate or mirror their icons depending on context (usually based on writing direction). This approach is an easy way to provide large numbers of such context-sensitive icons, but suffers from serious drawbacks in certain cases. For example, icons which contain asymmetrical symbols or text will be obviously mirrored, and icon themes which use shading will appear inconsistent next to non-transformed icons from the same theme. This code change lets icon themes provide specialized graphics for the left-right-top-bottom text direction. Such specializations are available for any command which specifies COMMAND_PROPERTY_MIRROR. Direction-specialized versions should be placed in the `cmd/rltb` directory within the icon theme. Localized specializations may also be nested inside that directory. For example, icons in `cmd/rltb/en` will be used for English in RTL context. Change-Id: Ic7a8cf3a6657a171e92123413d1c47e621f1bddd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182761 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Tested-by: Jenkins
8 daystdf#130857 qt weld: Assert type before static_castMichael Weghorn
As Noel Grandin points out in [1], this can help "so we catch issues early and obviously (instead of getting some weird crash later on)". [1] https://gerrit.libreoffice.org/c/core/+/182711 Change-Id: I5e8c9f9bc441f2c60d7a6b78ba52c7027d3fab7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182752 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
8 daystdf#130857 qt weld: Add Q_OBJECT macro to QtHyperlinkLabelMichael Weghorn
This is needed to `qobject_cast` to that class. This prepares for upcoming commit Change-Id: I5e8c9f9bc441f2c60d7a6b78ba52c7027d3fab7d Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Mar 10 13:00:11 2025 -0700 tdf#130857 qt weld: Assert type before static_cast Change-Id: I89b930d4cacbf11ab5e85f627c0caf7aebaf61d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182751 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
9 daystdf#130857 qt weld: Use more specific QWidget*Michael Weghorn
... instead of a pointer to the more generic QObject base class. Change-Id: I09629b746dbd3b04d5b78d5a46695795364e6e0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182711 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
9 daystdf#130857 qt weld: Use map instead of vector for ID -> widget mappingMichael Weghorn
Instead of using a std::vector of a custom WinAndId struct and iterating over all entries in QtBuilder::get_by_name, use a std::unordered_map instead to map between the OUString ID and the QWidget. This requires switching a few method params from std::u16string_view to const OUString&, which is consistent with other WidgetBuilder methods. Change-Id: I597315811f5842238f355f369c694ce0bb59de9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182710 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
9 daystdf#130857 qt weld: Look up menu in vector that has itMichael Weghorn
Other than the widgets created directly in QtBuilder::makeObject, menus (QMenu) are created via WidgetBuilder::handleMenu and inserted into WidgetBuilder::m_aMenus. Therefore, use WidgetBuilder::get_menu in order to retrieve the QMenu from there. This also matches what the VCL implementation does, see SalInstanceBuilder::weld_menu. (QtBuilder::get<QMenu> was seen to return nullptr here in a branch experimenting with adding support for "sfx/ui/tabbarcontents.ui".) Change-Id: I3106882c0135d3358c160fa0e19e7c13d1e81b64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182709 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
9 daysupdate to skia m131Noel Grandin
Change-Id: If300d83a61389d19371d153a399eea10c2d87dd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182739 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
9 daystdf#128186 use non-full screen values for native full screen windowsPatrick Luby
Also, ensure that restore rectangles are in VCL coordinates. Change-Id: I9c5d15b2217ec3804d1a6c365b3e0c71b054c143 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182704 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
9 daysuse more concrete UNO classesNoel Grandin
Change-Id: Id10786bbf7985adbb251224b45f9dabcc84d0a3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
9 daysEmscripten: Pre-cancel synchronous execution of modal dialogsStephan Bergmann
...which would run into Application::Yield -> std::abort, so better live with this hack for now. (The way forward would be to either asyncify relevant dialogs, or move to Qt6 and --enable-emscripten-jspi.) Change-Id: I143747cc32fb163e4908fa42b031e4eaea697d29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182731 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
9 daysResolves: tdf#143909 some gtk im need to see key releaseCaolán McNamara
e.g. GTK_IM_MODULE="gtk-im-context-simple" GDK_BACKEND=x11 and ctrl+shift+u followed by hex digits in writer comments Change-Id: I0da17b8e18b088789cb6359610473da22c9c70af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
11 daysResolves: tdf#160391 test if dark/light mode changed at WM_THEMECHANGEDCaolán McNamara
what docs there are generally mentions WM_SETTINGCHANGE with lParam of ImmersiveColorSet but this seems to be too early for UseDarkMode() that uses ShouldAppsUseDarkMode to always return the right thing. While at WM_THEMECHANGED UseDarkMode() ShouldAppsUseDarkMode seems to be more robust. Change-Id: I0d582b441d0beeadc61d41e6518012fccdcce6e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182673 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
11 daystdf#151423 revert commit b197379e867087413be86bd1a32030b912ecaa8aPatrick Luby
User testing found that scrolling with a Magic Mouse while pressing the Command key only reenables zoooming sporadically so revert commit b197379e867087413be86bd1a32030b912ecaa8a. This revert will disable zooming on a Magic Mouse just like on a trackpad until another heurisic is found to reliably identify a Mouse Magic. Change-Id: I6b4b92bcdea44702385b7db2fe24fb05bfe99df4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182670 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
11 daysFix bug in SalInstanceTreeView::columns_autosize()Jan Rheinländer
SvTreeListBox::getPreferredDimensions() returns widths, not positions Bug can be reproduced by adding a line to BookmarkTable::InsertBookmark() Unit test fails unless patch 180450 is applied as well Change-Id: Iafa9ca02968d4ec3dce95ef5242396c3ce5d4c7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181017 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
12 daysResolves: tdf#165455 fix hover in RTL custom widgets under GTKCaolán McNamara
Change-Id: If8f4e219766a7a17a85fea60e4d7855684e57d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182649 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
12 daystdf#165266 fix conditionals that limit -[NSApp setAppearance:] callsPatrick Luby
Calling -[NSApp setAppearance:] fires an NSNotification even if it is called with the curent appearance as parameter. To reduce the number of NSNotifications, commit 48125efbd7bf370981d48e4a8d0ce7fbaf1857e1 attempted to limit the number of -[NSApp setAppearance:] calls but the conditionals were flipped and that commit ended up blocking -[NSApp setAppearance:] calls once it has already been set to a non-nil value. Also, sync NSView's appearance to NSApp's appearance. Invoking -[NSApp setAppearance:] does immediately update the appearance of each NSWindow's titlebar, but it does not appear to update any NSView's appearance so explicitly sync appearances. Change-Id: I996daa868807cd5e4c8194f80d1f783b9e6e4e63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182654 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
12 daysRelated: tdf#165455 get tooltips working for RTL custom widgets under GTKCaolán McNamara
Change-Id: I0e011b4d8d72c5133297127381ffe5c86e81ec51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182643 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
12 daystdf#162995 gtk4: Add combobox in file dialog after its labelMichael Weghorn
First add the label, then the combobox that labels it. This ensures that the label comes first visually, then the combobox for the gtk4 VCL plugin, as is already the case for gen, gtk3 or qt6. This can be seen e.g. in the "File" -> "Open" dialog where using an LTR locale now results in "Version: [Current version]" instead of "[Current version] Version:". ("[Current version]" here refers to the combobox with the "Current version" entry selected.) Change-Id: Ib814bba460ca84a694029107d4a66a274860b716 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182641 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
12 daystdf#162995 gtk4: Handle file dialog selection changesMichael Weghorn
The GtkFileChooser::selection-changed signal used by the gtk3 VCL plugin no longer exists in GTK 4 and there doesn't seem to be any equivalent new API. In order to still be notified about selection changes in the file dialog, make use of GTK implementation details of the GtkFileChooserDialog to retrieve the GtkColumnView used in the dialog and connect to the GtkSelectionModel::selection-changed signal of its model. With this in place, the "Version" combobox in the file picker triggered via "File" -> "Open" from Writer now has a "Current Version" entry as expected (and seen with gtk3, gen, or qt6) when an ODT file is selected, while the combobox had no entry at all previously when using the gtk4 VCL plugin. (Tested with gtk git main as of commit 739467d16fc465089dcfc4defd5a80dbf1b9d044) Regarding the non-existance of an official GtkFileChooser::selection-changed replacement, see also GNOME forum discussion at [1], which also mentions another workaround: > I ended up implementing the preview by adding atick_callback to the > widget and just checking every frame if the selection changed and then > emitting my own signal. Obviously this is terrible style and goes > against the signal architecture but it will have to do for now, as I > needed the custom preview to display information about a custom > file-type that’s specific to my application. [1] https://discourse.gnome.org/t/gtk4-filechooser-selection-changed-signal-alternative/12180 Change-Id: Ieafea7bead5ed4f419ee21e83679c4834d50fff0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182640 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
12 daystdf#162995 gtk: Initially hide custom file dialog controlsMichael Weghorn
Explicitly set custom file dialog controls to invisible initially, as they are explicitly shown when needed. While this isn't needed for gtk3, where GtkWidget:visible [1] is FALSE by default [1], it is for gtk4, where the property is TRUE by default [2] This addresses the > Currently, too many controls are visible there for gtk4, but that > will be addressed in a separate commit. aspect mentioned in previous commit Change-Id: If351c24010702e374adb816366892d9ed5280d17 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Mar 7 06:10:49 2025 +0100 tdf#162995 gtk4: Show extra controls in file dialog [1] https://docs.gtk.org/gtk3/property.Widget.visible.html [2] https://docs.gtk.org/gtk4/property.Widget.visible.html Change-Id: Ife8bcc97073807b605bee69434a3db60e1967f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182610 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
12 daystdf#162995 gtk4: Show extra controls in file dialogMichael Weghorn
While the custom widgets for the file chooser were created for the gtk4 case as well, they were never added to the dialog because the call to `gtk_file_chooser_set_extra_widget` only happens for the gtk3 VCL plugin. That GTK function is no longer available in GTK 4. For gtk4, use gtk_dialog_get_content_area to get the GtkBox holding the dialog content, and add the GtkBox holding our custom controls to it manually. With this in place, it's now e.g. possible to save a file with password protection by checking the "Save with password" checkbox in the "File" -> "Save As" dialog. Currently, too many controls are visible there for gtk4, but that will be addressed in a separate commit. Change-Id: If351c24010702e374adb816366892d9ed5280d17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182609 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
13 daystdf#161583 vcl,sc,sw: PDF/UA export: fix Contents of Link annotationsMichael Stahl
In ISO 14289-2:2024 the requirement was changed from "shall" to "should": Link annotations should include a Contents entry to enrich information available to assistive technology. There is also now a Well-Tagged PDF (WTPDF) Version 1.0.0, which says: 8.9.2.4.2 Link Link annotations should include a Contents entry to enrich information available to assistive technology. NOTE 1 Link annotations are often accessed out of context; the Contents entry provides optional additional information. The Contents entry is also particularly valuable in the context of link targets that are not intended to be human-readable. EXAMPLE — A link over the text “click here” is improved by a Contents entry to advise the user regarding the link’s target. So adapt PDFWriterImpl::emitLinkAnnotations() to produce "Contents" only if there is some alt text. The sw a11y check will already warn if the alt text/"name" is missing on a hyperlink in a SwTextNode, and a previous commit added a warning if it is missing on a hyperlink in a SwFlyFrameFormat. Contents should in any case not contain the textual representation of the hyperlinks, that was a misunderstanding, but describe the target of the link. This requires adapting numerous unit tests. (regression from commit fa3f04bdd4f73a1b3be70dfb709c44638ef7e3d9) Change-Id: I88a7ae83d17d781115c93152d267ddb57208c200 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182600 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins