summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2024-10-07tdf#130857 qt a11y weld: Handle "accepts-tab" text view propertyMichael Weghorn
Evaluate the "accepts-tab" GtkTextView property [1] and set the `tabChangesFocus` QPlainTextEdit property based on that, so tab moves focus to the next control when "accepts-tab" is set to false in a "GtkTextView" object in a .ui file, like the ones where this property was newly set in previous commit Change-Id: I4bbecfc3f967b83768319e68ea3fb1f89b4c5014 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Oct 7 08:10:56 2024 +0200 a11y: Leave accessible description text view on simple tab key (They're not yet supported by QtInstanceBuilder yet, but once they are, that will work as expected.) [1] https://docs.gtk.org/gtk3/property.TextView.accepts-tab.html [2] https://doc.qt.io/qt-6/qplaintextedit.html#tabChangesFocus-prop Change-Id: Ib1d33f37016a2601aa9ab9c370c9076dbae5bed3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174570 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-07vcl: use correct var prefixes in BitmapScaleConvolutionFilterChris Sherlock
Change-Id: Idca191a21ef63a707d9c5230dad8c97552757c06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173206 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-06Update to skia m116Noel Grandin
The sort comparison patch seems to have been upstreamed. Lots of patches needed to be redone. Followed the skia release notes in replacing calls to SkCanvas::flush and SkSurface::flushAndSubmit. Change-Id: I13179565b95cc0720b4548cd4baecc5adacc7133 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174554 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-10-06increase fuzzing max lengthsCaolán McNamara
Change-Id: Ia1f1abfece4667baad4036d9bedb36d07e8212ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174565 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-06cid#1608598 silence Overflowed constantCaolán McNamara
and cid#1607946 Overflowed constant cid#1608526 Overflowed integer argument cid#1608611 Overflowed integer argument Change-Id: Iec21df2f3d7dc8fba3872c6a70466ae12026a49d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174557 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-05increase max rtf len allowedCaolán McNamara
Change-Id: Ifae0795de882d833865ba973cf8098c8b59b8eb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174541 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-05cid#1607727 silence Overflowed constantCaolán McNamara
Change-Id: I0bbd29231158379c9c7986033ce052b7f149ddc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174536 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-10-05cid#1620556: UNINIT_CTOR in textviewJulien Nabet
Change-Id: I0e13c8c189211a97161c1eef5a0ad12e48817564 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174533 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2024-10-05Use good old string literals in assertXPath and friendsMike Kaganski
These are only sent to an external API expecting char*-like strings, or for comparison. Having every assertXPath having three of _[ou]str is too much syntactic noise, making the unit tests almost unreadable. Change-Id: Ic004a36ea75e7bfe0b96f405c40f926a957b51cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174416 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-10-05tdf#130857 qt a11y weld: Convert accelerator for labelsMichael Weghorn
Convert the accelerator from GTK to Qt convention for labels as well, to not display a literal "_", but use the next letter as the accelerator. For Qt, a literal "&" would still be displayed if no buddy is actually set, i.e. there is no related widget that can receive keyboard focus when the accelerator key is pressed together with Alt. Setting buddies was implemented in previous commit Change-Id: Iba1e766c0f2c5162beb5b938c134afab0dac68b7 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 22:56:05 2024 +0200 tdf#130857 qt a11y weld: Set "buddy" (mnemonic widget) . Together with the above commit, this commit makes the "Alt Text" label in the "Alt Text" dialog (cui/ui/objecttitledescdialog.ui) show up as expected with qt6 in a WIP branch that declares that .ui file as supported in QtInstanceBuilder::IsUIFileSupported, while it was previously shown as "_Alt Text". Change-Id: Ief58dfc6864da9043766eec4eec36da44ae7017b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174511 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-05tdf#130857 qt a11y weld: Set "buddy" (mnemonic widget)Michael Weghorn
Based on previous commits Change-Id: I878eec7be5e82fac3e1b944d7fed7bf6711744ce Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 22:04:08 2024 +0200 tdf#130857 VclBuilder: Move mnemonic-widget bookkeeping to base class and Change-Id: I32c922f91e5e1d06c003e6d26a4342cbb98942e1 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 22:18:17 2024 +0200 tdf#130857 VclBuilder: Extract setMnemonicWidget helper + call from base , implement handling for mnemonic widgets for labels for native Qt widgets in QtBuilder: * call BuilderBase::extractMnemonicWidget when processing a "GtkLabel" object, in the same way that VclBuilder does that. * implement actually setting the mnemonic widget by calling QLabel::setBuddy [1] in QtBuilder::setMnemonicWidget to set the "buddy" (mnemonic widget) This makes Orca in a WIP branch to support a native qt6 "Alt Text" dialog announce the label text as well when the corresponding QLineEdit/QPlainTextEdit receives focus, as setting the buddy also ensures that the accessible labelledy-by/label-for relations get reported on the AT-SPI layer, see also commit 09789838bbbe57d207a66532b38cbba67ec59d70 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 21:39:44 2024 +0200 tdf#119931: cui a11y: Specify mnenomic-widget in "Alt Text" dialog which describes the scenario a bit more for the gtk3 variant. [1] https://doc.qt.io/qt-6/qlabel.html#setBuddy Change-Id: Iba1e766c0f2c5162beb5b938c134afab0dac68b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174510 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-05tdf#130857 VclBuilder: Extract setMnemonicWidget helper + call from baseMichael Weghorn
Instead of iterating over the map of mnemonic widgets in the VclBuilder ctor, split the logic: Add a new purely virtual WidgetBuilder::setMnemonicWidget method to the base class that passes the IDs of a single pair of label + the corresponding mnemonic widget as params, and let WidgetBuilder::processUIFile call the method once for every pair in the map. Implement that for VclBuilder (by moving the remaining logic for that previously in the ctor) to the new override VclBuilder::setMnemonicWidget and add a dummy implementation for QtBuilder that only triggers a warning for now. Change-Id: I32c922f91e5e1d06c003e6d26a4342cbb98942e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174509 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-05tdf#130857 VclBuilder: Move mnemonic-widget bookkeeping to base classMichael Weghorn
Move the `m_aMnemonicWidgetMaps` member and related struct and typedef from VclBuilder's `m_pVclParserState` to the base class BuilderBase's `m_pParserState` and also move the VclBuilder::extractMnemonicWidget method to the base class, so the logic can later be reused by QtBuilder. Add a new getter BuilderBase::getMnemonicWidgetMaps to get access and use that in VclBuilder instead. At least for now, VclBuilder::extractMnemonicWidget still explicitly needs to be called by VclBuilder (and other subclasses) when encountering a "GtkLabel" object for the mnemonic widget relationship to be added to the map in the base class. Change-Id: I878eec7be5e82fac3e1b944d7fed7bf6711744ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174508 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-05tdf#130857 qt weld: Add a QtInstanceTextViewMichael Weghorn
Add a native Qt implementation for weld::TextView QtInstanceTextView, that uses a QPlainTextEdit, and let QtInstanceBuilder use it when it encounters a "GtkTextView" object in a .ui file. Implement methods which are probably the most relevant ones. For now, trigger an assert in case any of the not yet implemented methods gets called. None of the .ui files currently marked as supported by QtInstanceBuilder uses this new class yet, but it will be needed to support more in the future, e.g. for cui/uiconfig/ui/objecttitledescdialog.ui. With this commit in place, adding that file to the set of supported ones in QtInstanceBuilder::IsUIFileSupported makes the dialog somehow show up as a native Qt dialog with the qt6 VCL plugin when e.g. selecting a QR code in an existing document, then opening the context menu and choosing "Alt Text", but there are various issues that still need to be fixed before it can actually be claimed as working/supported. Change-Id: Id7217d4a8a86f953d8b289c8a09cb8d1e2040bf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174495 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-05tdf#130857 qt weld: Add basic handling for "GtkScrolledWindow"Michael Weghorn
Create a QScrollArea when encountering a "GtkScrolledWindow" object in a .ui file. This commit does not yet implement an actual Qt-native weld::ScrolledWindow, i.e. QtInstanceBuilder::weld_scrolled_window currently still triggeres an assert. This will help to support cui/uiconfig/ui/objecttitledescdialog.ui, which has a GtkScrolledWindow, but SvxObjectTitleDescDialog doesn't explicitly interact with it, so this basic implementation is sufficient for a start. Change-Id: I80d2565e57809be0cc3ae452359d0d1b827e46f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174494 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-05tdf#130857 qt weld: Add QtInstanceEntryMichael Weghorn
Add a native Qt implementation for weld::Entry, QtInstanceEntry, that uses a QLineEdit, and let QtInstanceBuilder use it when it encounters a "GtkEntry" object in a .ui file. Implement the most straightforward and probably most relevant methods, and trigger an assert in case one of the not yet implemented methods gets called for now. These can be implemented when adding support for .ui files whose dialogs make use of these features. None of the .ui files currently marked as supported by QtInstanceBuilder uses this new class yet, but it will be needed to support more in the future. Change-Id: I56e26fe22b1cc0cb7d61cfd1503991273957e23f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174489 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-05tdf#130857 qt weld: Show help when help button clickedMichael Weghorn
Add special handling for the "Help" button in QtInstanceDialog::handleButtonClick: Don't close the dialog with the corresponding response code, but instead request help, by calling Help::Start with the widget's help ID and QtInstanceWidget as parameters. Together with the previous commit Change-Id: I274886d8045b31ccbc92f586e2ead20ff7407d15 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 14:41:29 2024 +0200 tdf#130857 qt weld: Handle help ID that implemented setting/getting the help ID for a QtInstanceWidget, this makes the "Axes" (online) help page show up when pressing the "Help" button in the "Insert Axes..." dialog when using the qt6 VCL plugin, which is using a native QDialog by default since Change-Id: I15901f83192ba33ddc5c5eb779be680f26cb6b55 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 10:53:28 2024 +0200 tdf#130857 qt weld: Declare support for chart "Insert Axes" dialog (See that commit's commit message for how to trigger the dialog.) See also Dialog::ResponseHdl for the VCL variant, which also has a corresponding special handling for the button with response code RET_HELP. Change-Id: I81e682822defec7a1e58d5a1b3b3eadc3f0040c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174482 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-05tdf#130857 qt weld: Handle help IDMichael Weghorn
Implement handling for the help ID by using a new property PROPERTY_HELP_ID that is set on the QtInstanceWidget's QWidget. Implement QtInstanceWidget::set_help_id and QtInstanceWidget::get_help_id accordingly. For setting the ID, introduce and use a static helper method QtInstanceWidget::setHelpId and use that in QtBuilder::makeObject to set the help ID based on help root and widget ID, in line with what is done at the end of VclBuilder::makeObject for the vcl::Window-based builder. Change-Id: I274886d8045b31ccbc92f586e2ead20ff7407d15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174481 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-05qt: Add SolarMutexGuard in QtInstance::CreateFrame etc.Michael Weghorn
These methods call QtInstance::RunInMainThread, so must hold the solar mutex, see the call to DBG_TESTSOLARMUTEX(); at the very beginning of that method. (I've seen QtInstance::CreateFrame getting called without the mutex held in a WIP branch to add support for the "Help" button for native (welded) Qt dialogs.) Change-Id: I46adb708a84c031d63d94768c7600cbf3940ad21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174480 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-05tdf#130857 qt weld: Move button clicked logic to QtInstanceDialogMichael Weghorn
Move the logic to close the dialog with the corresponding respone code when a button gets clicked from an anonymous lambda function in QtBuilder::tweakInsertedChild to a new static helper method in QtInstanceButton: QtInstanceDialog::handleButtonClick This is in preparation of adding special handling for the "Help" button in an upcoming commit, which - unlike other buttons - should not just close the dialog with a corresponding response code. Change-Id: Idfd08d90df930a25437f99a609a38804bf80bff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174479 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-05tdf#130857 qt a11y weld: Apply ATK/a11y propertiesMichael Weghorn
Set accessible name and description on the QWidget as specified in the .ui file. This e.g. makes Orca announce the a11y description of the checkboxes in the "Insert" -> "Axes" dialog newly supported by QtInstanceBuilder since Change-Id: I15901f83192ba33ddc5c5eb779be680f26cb6b55 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 10:53:28 2024 +0200 tdf#130857 qt weld: Declare support for chart "Insert Axes" dialog Change-Id: I403139577e6a932bb92da851dabd3cb994453083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174468 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-05tdf#130857 qt weld: Convert GTK to Qt accelerator/mnemonicMichael Weghorn
When setting the checkbox text, don't pass the string as is, but convert to Qt's convention for the accelerator, using "&" instead of "_", using the existing helper function. This addresses the following issue mentioned in previous commit Change-Id: I15901f83192ba33ddc5c5eb779be680f26cb6b55 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 10:53:28 2024 +0200 tdf#130857 qt weld: Declare support for chart "Insert Axes" dialog > Mnemonic underlines for the checkboxes are currently > not the way they're meant to be, but that's a different > issue that will be addressed in a separate commit. Change-Id: I7b86adf396297de8de9b28fcb7e46c3428893c48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174467 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-05tdf#130857 qt weld: Declare support for chart "Insert Axes" dialogMichael Weghorn
Add the .ui file for the "Insert Axes" chart dialog to the list of .ui files supported by QtInstanceBuilder. Now that Change-Id: Ie917a501466bad8821fc3e7f5049db7c1a56995f Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Oct 4 10:38:32 2024 +0200 tdf#130857 qt weld: Create QGroupBox for "GtkFrame" added support for "GtkFrame", all widget types used by that dialog are handled by QtBuilder. This dialog can be seen as follows: * start Calc * "Insert" -> "Chart", confirm with "Finish" button * "Insert" -> "Axes" (while the chart is still selected) X and Y axes are shown/hidden as expected according to whether the corresponding checkboxes are ticked or unticked before closing the dialog using "OK". Mnemonic underlines for the checkboxes are currently not the way they're meant to be, but that's a different issue that will be addressed in a separate commit. Change-Id: I15901f83192ba33ddc5c5eb779be680f26cb6b55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174466 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-05tdf#130857 qt weld: Create QGroupBox for "GtkFrame"Michael Weghorn
Handle "GtkFrame" objects from .ui files and create a QGroupBox [1] for them. While there's also a QFrame class in Qt, QGroupBox seems more suitable, as it allows setting a title, while QFrame doesn't. Add special handling for the label child of the "GtkFrame". Quoting from the GtkFrame doc [2]: > The GtkFrame implementation of the GtkBuildable interface supports > placing a child in the label position by specifying “label” as the > “type” attribute of a <child> element. A normal content child can be > specified without specifying a <child> type attribute. Example for a frame label in chart2/uiconfig/ui/insertaxisdlg.ui: <child type="label"> <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label" translatable="yes" context="insertaxisdlg|label1">Axes</property> <attributes> <attribute name="weight" value="bold"/> </attributes> </object> </child> In order to set the label's text as the text for the QGroupBox, identify that label child in QtBuilder::tweakInsertedChild, take over its text as the QGroupBox title, and mark the label for deletion, as it's no longer needed, since the QGroupBox handles its title itself from then on. [1] https://doc.qt.io/qt-6/qgroupbox.html [2] https://docs.gtk.org/gtk4/class.Frame.html Change-Id: Ie917a501466bad8821fc3e7f5049db7c1a56995f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174465 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-04vcl: Merge ImpTextView into TextViewMichael Weghorn
The only thing that ImpTextView had were the class members, and then all access to these was done from TextView using `mpImpl->`. Move the class members from ImpTextView directly into TextView and drop ImpTextView. Change-Id: I9fd6ebbdc497b87e2440d3d6a810b7c24488430b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174461 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-04tdf#163225 vcl: Erase listbox bg when redrawing on mouse moveMichael Weghorn
Somehow, moving the listbox invalidation code from ImplWin::PreNotify to ListBox::PreNotify in commit fd7cb42f7d17d03e4fac6d8c5f1d6c7c49a36fc6 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Feb 14 16:16:30 2023 +0100 tdf#153520 vcl: Align listbox invalidation with mouseover check triggered rendering artifacts for the tdf#163225 listbox example. It seems that the previous rendering operation apparently seems a pixel or so off from the current one and as the InvalidateFlags::NoErase flag gets passed, what was drawn previously is not erased. Don't pass that flag any more to ensure that the background is properly erased, which fixes the rendering artifacts. The flag's docmentation says: /** The invalidated area is painted with the background color/pattern. */ NoErase = 0x0004, Dropping the flag doesn't negatively affect drawing a listbox that has an explicit background color set in my tests, s. modified sample document attachment 196871 in tdf#163225 . Stop passing that flag in ListBox::StateChanged, too. Change-Id: Ibcacbed01888449db062f84b4782feb9de69851c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174438 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-03Revert "tdf#163213: do not show OpenType features if the font has "morx" table"Julien Nabet
Reason: regression See https://bugs.documentfoundation.org/show_bug.cgi?id=163213#c14 This reverts commit 0679a5cee16ae96c0d11e7d4fc1e59fb0f9cc591. Change-Id: Ib1392e2ad44577f69e6197bad8ae79791f072086 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174435 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2024-10-03cid#1608220 Data race conditionNoel Grandin
Change-Id: I7ff30128d663ca3524dc95ef99ef8c64dd158643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174429 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-03cid#1606585 Data race conditionNoel Grandin
and cid#1606993 Data race condition Change-Id: I291829f0b59fc228ad3f305f280f7f58aae0d40b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174428 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-10-03tdf#163047 sc: fix more pages on a single sheet printing functionTibor Nagy
issue caused by commit I5e494a0714e398221bee00744d7e25c419a41df7 "tdf#155218 sc: fix different page orientation in print dialog". Change-Id: I0b6f645dc77af83b132a415570e5dfca4a5abddf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174404 Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de> Tested-by: Jenkins
2024-10-02tdf#130857 qt weld: Add QtInstanceCheckButtonMichael Weghorn
Add a QtInstanceCheckButton as the native Qt implementation for a weld::CheckButton. This uses a QCheckBox. Handle the "GtkCheckButton" object type from .ui files in QtBuilder. This will e.g. be needed for the "Insert" -> "Axes..." dialog seen in Calc after a chart has been inserted and double-clicked -- once further remaining aspects needed to be able to support that dialog has been implemented and it will be enabled in QtInstanceBuilder::IsUIFileSupported. The handling for the "inconsistent" state is mostly based on the the VCL implementation, see SalInstanceCheckButton::set_inconsistent etc. QtInstanceCheckButton::QtInstanceCheckButton::set_label_wrap remains unimplemented for now and triggers an assert, can be implemented when adding support for a dialog that actually makes use of it. Change-Id: I1e43ba25a23312534ee7cc0e650cd6e7aae20000 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174398 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-02tdf#130857 qt weld: Add new layout to parent layoutMichael Weghorn
Similar to the way it's already done for widgets a few lines above, also add a newly created layout to the parent layout (if the parent is a layout). This makes the case where a QLayout is inside a QLayout (e.g. a "GtkBox" inside a "GtkBox" in the .ui file) work, where previously, the inner layout wouldn't be added to the hierarchy, and thus not be displayed in the dialog. Quoting from the QLayout::addItem doc [1]: > This function is not usually called in application code. To add a widget > to a layout, use the addWidget() function; to add a child layout, use > the addLayout() function provided by the relevant QLayout subclass. Therefore, cast to QBoxLayout, the only QLayout type used so far and call QBoxLayout::addLayout to add the child layout. (This might have to be extended when using e.g. QGridLayout in the future as well.) This will e.g. be needed for the "Tools" -> "Word count" dialog in Writer or the "Insert" -> "Axes..." dialog seen in Calc when a chart is selected -- once further remaining aspects needed to be able to support those have been implemented and they'll be enabled in QtInstanceBuilder::IsUIFileSupported. Change-Id: I518b9a33be1db419737a80aee44d93b2a7be1094 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174397 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-02tdf#163000 don't add any fonts with an 'hvgl' font tablePatrick Luby
macOS Sequoia added a new PingFangUI.ttc font file which contains all of the PingFang font families. However, any fonts loaded from this font file result in the following failures: - Skia renders font with wrong glyphs - Export to PDF contain a damaged embedded font Despite the fact that the fonts in this new font file have a TrueType font type, they are missing a 'glyf' font table and, instead, have a new, undefined 'hvgl' font table. See the following link for more details about the new 'hvgl' font table: https://gitlab.freedesktop.org/freetype/freetype/-/issues/1281 Change-Id: I18170b1b226de86f79402ad0e45df8620c693f83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174305 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Reviewed-by: خالد حسني <khaled@libreoffice.org>
2024-10-02tdf#130857 qt weld: Move runAsync logic to QtInstanceDialogMichael Weghorn
Refactor the handling for running a QtInstanceMessageDialog asynchronously, and reuse the logic for the QtInstanceDialog base class: Move implementations for both QtInstanceMessageDialog::runAsync methods and the involved class members from QtInstanceMessageDialog to QtInstanceDialog. Split the previous logic from QtInstanceMessageDialog::dialogFinished into two methods: * move most of the logic as is to a new virtual slot in the base class, QtInstanceDialog::dialogFinished * override the base class implementation to get the response code from the actually clicked button via the PROPERTY_VCL_RESPONSE_CODE property set on that button, and call the base class method with that one. For QtInstanceDialog, there's no QDialog::clickedButton method that could be used to retrieve the clicked button, but it's also not needed there, because there a slot connected to the QAbstractButton::clicked signal that triggers closing the dialog, and passes the proper response code of the corresponding button already, see commit 08b55df5c9e42c1ccb78a156261811875629342a Author: Michael Weghorn <m.weghorn@posteo.de> Date: Sat Sep 28 00:32:15 2024 +0200 tdf#130857 qt weld: Close dialog on button click With this commit in place, QtInstanceDialog can now also be run asynchronously, instead of the QtInstanceDialog::runAsync methods just returning true without doing anything. This will be needed e.g. when adding support for the "Tools" -> "Word Count" dialog in Writer. Change-Id: I4edb9443cb11d1dc831a18f708cdbdd67c239aa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174374 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-02tdf#130857 qt weld: Let QtInstancDialog subclass QObjectMichael Weghorn
... and add the Q_OBJECT macro, in preparation of moving some logic from the QtInstanceMessageDialog subclass to QtInstanceDialog for reuse. Change-Id: Iaf76ae3efb352dd04d15716174818e8a902a16cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174373 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-02tdf#130857 qt weld: Add initial QtInstanceLabel implementationMichael Weghorn
Add a new QtInstanceLabel class as the native Qt weld::Label implementation and implement the straightforward and most important methods, and let the less common ones trigger an assert for now. Implement QtInstanceBuilder::weld_label to return an instance of QtInstanceLabel. This will e.g. be needed when adding support for the "Tools" -> "Word Count" dialog in Writer in the future, once more missing aspects have been implemented. Change-Id: I911bd68ad641b15883a0c6aa0707fd590fc05f96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174366 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-10-01tdf#160202 - Don't extend selection over two wordsAndreas Heinisch
Don't extend the selection over two separate string in the BASIC editor. Probably, the BreakIteratorImpl::nextWord needs to be corrected which could lead to unwanted side effects. Change-Id: I0e980006cca672fb63216dc860c12a7004bfd759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173900 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> Tested-by: Jenkins
2024-10-01tdf#160837 qt a11y: Don't report window role for non-top-levelMichael Weghorn
Quoting from offapi/com/sun/star/accessibility/AccessibleRole.idl, AccessibleRole::Frame is for: > A top level window with a title bar, border, menu bar, etc. > It is often used as the primary window for an application. However, the FRAME role also gets used for frames that are not actually top-levels at least with the Qt-based VCL plugins, where there is an object of role FRAME as a child of the actual top-level for e.g. the Writer main window. (The actual top-level is a QtMainWindow.) That frame contains the window content starting right below the (native) menu bar. Mapping the AccessibleRole::FRAME a11y role to the Qt equivalent QAccessible::Window would result in window-relative positions reported via AT-SPI to be relative to that frame, instead of the actual top-level, s. the implementation in qtbase's AtSpiAdaptor::translateFromScreenCoordinates [1] which calculates the relative position to the first top-level in its a11y hierarchy. This resulted in Accerciser's highlighting of the currently selected object to be too far up, as the "window-relative position" was missing the menu bar height in the y coordinate when window-relative positions are used, which is the case on Wayland, s.a. the commit message of commit a499874d9c0685d79b629b4bb246394b6b15691a Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Sep 26 18:22:12 2024 +0200 tdf#160837 qt: Rely on toolkit for frame positions, drop menubar hack for more background. To fix this, prevent reporting an invalid top-level window role for frames that are not actually top-levels: When mapping AccessibleRole::FRAME to a corresponding Qt a11y role, take into account whether the frame still has another (real) top-level window as a parent. This makes the highlighted area in Accerciser become correct when using LO with the qt6 VCL plugin and Accerciser with ACCERCISER_WINDOW_MANAGER=kwin in a KDE Plasma Wayland session. The same would generally make sense for AccessibleRole::DIALOG. However, there that would currently result in the additional semantics of this being a dialog (not another kind of top-level window) getting lost when doing so. As dialogs usually don't have a separate menu bar, at least the incorrect reporting of window-relative positions is less relevant. Leave dialog unchanged for now, maybe reconsider later as needed. Ultimately, using native Qt widgets for dialogs (see tdf#130857) should presumably fix the underlying problem of the extra frame on VCL side being used altogether. [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/gui/accessible/linux/atspiadaptor.cpp?id=da4a6cf78ff42a4f69c2775997ff174ef647f3f3#n2401 Change-Id: I5ae066bd996f042b370b067a30213d3a1045480e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174350 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-10-01loplugin:constantparamNoel Grandin
Change-Id: I81c9647ec7166ba429f6f58e3bd86b3a5ee4848f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-01loplugin:singlevalfieldsNoel Grandin
Change-Id: I8f844c40dcb48737d95a3004cd7e8c730656d955 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174299 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-01loplugin:unusedmethodsNoel Grandin
Change-Id: I121a0e1323df7b6669f496ad63d771df8f76b429 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174297 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-09-30tdf#163213: do not show OpenType features if the font has "morx" tableJulien Nabet
Change-Id: I589419f7ffe3db01848e711021c2efd1de07692b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174294 Reviewed-by: خالد حسني <khaled@libreoffice.org> Tested-by: Jenkins
2024-09-30cid#1608502 Overflowed constantCaolán McNamara
and cid#1607222 Overflowed constant Change-Id: If145bae8d05470173d1af6e7f540f8f40d7ab8b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174208 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-09-30cool#9992 lok doc sign: convert the certificate chooser dialog to asyncMiklos Vajna
1) Move the try-catch around assing a signature inside the block that already got the response from the certificate chooser, it's unlikely that choosing the certificate (and not yet signing) would fail. 2) Convert the dialog to async and allow it to be a jsdialog. 3) Hide not relevant widgets for LOK: we have a single signing certificate, so the search entry is not useful. The refresh button has an unclear purpose, as it was initially added in commit fb9874231fb242b4a6a7d1ce097e66dd4ed8f32e (Caching Certificates in the CertificateChooser dialog session-wise, 2023-08-26), but later commit efe414c4a88fde0e2ee1d4016010f21fbd6d01d7 (Don't reuse CertificateChooser instances, 2024-02-07) disabled this chaching. In any case, the certificate won't change during the lifetime of a single LOK view, so hide that as well. 4) Invoke the inner certificate viewer in an async way, too. Change-Id: Ibf618ea7632cf801d1d9180b9aa7dd193c45ffda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174215 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2024-09-30Revert "Fall back to old bootstrap.ini [Win32] section, for backwards ↵Stephan Bergmann
compatibility" This reverts commit ebd3f0971b843527ed493a35b2303c8c15b94109. Conflicts: desktop/win32/source/loader.cxx vcl/win/window/salframe.cxx Reason for revert: This fallback functionality was documented as deprecated at <https://wiki.documentfoundation.org/index.php?title=ReleaseNotes/24.8&oldid=738731> "fundamental.override.ini", to "be removed in a later version", which is happening now for LO 25.2. Change-Id: I40a1800f6a05fc7fd7188917083b269ce6a9f1d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163394 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-09-30vcl: flatten BitmapReadAccess functionsChris Sherlock
Change-Id: Ib18aeca38270192364a12b6496223b0cce476b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173205 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-30vcl: flatten BitmapPopArtFilter::execute()Chris Sherlock
Change-Id: Icfbf2e625fb01f336c0c5eec8553b24922376680 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173204 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-30tdf#130857 qt a11y weld: Set GtkBuilder ID as widget's accessible IDMichael Weghorn
Set the GtkBuilder ID specified in .ui files as the accessible ID for the QWidget created for the object, in line with what happens for other implementations as well. This is basically the equivalent of commit c64b823b74cbd3063d6e87643bd68ea5343b2f54 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Tue Jul 16 13:57:41 2024 +0200 tdf#155447 qt a11y: Report accessible ID for the case where native Qt widgets are used instead of vcl::Window. Other than QWidget, QLayout is not part of the a11y hierarchy of an application, so there's nothing to do for these. This e.g. makes Accerciser show an accessible ID of "LicenseDialog" for the "Help" -> "License Information" dialog. The accessible ID set this way currently isn't reported on the AT-SPI level for QMessageBox (e.g. the "Save Document?" dialog) however. Suggested upstream change to make that work as well: [1] [1] https://codereview.qt-project.org/c/qt/qtbase/+/594390 Change-Id: I50e8ca6f8bea628df5a80d101c4a0a7bfded9c19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174158 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-30tdf#130857 qt weld: Set dialog title and modalityMichael Weghorn
If the "title" or "modal" properties are set, set the dialog title/modality for the QDialog accordingly. This makes the "Help" -> "License Information" dialog show the "Licensing and Legal information" title for the native Qt dialog as well, which gets used by default for the Qt-based VCL plugins since commit 178430733b0687a0f9334dda9a66e9b58ec8e7b0 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Sat Sep 28 00:43:21 2024 +0200 tdf#130857 qt weld: Declare support for "License Information" dialog Change-Id: I5c89eef04967d6d456474600f860dca19a6009e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174154 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-29tdf#163000 don't add any fonts in the system "reserved fonts" folderPatrick Luby
macOS Sequoia added a new PingFangUI.ttc font file which contains all of the PingFang font families. However, any fonts loaded from this font file result in the following failures: - Skia renders font with wrong glyphs - Export to PDF contain a damaged embedded font macOS Sequoia still has separate, downloadable Type 3 bitmap fonts for the PingFang font family so ignore any fonts in the PingFangUI.ttc font file and, just to be safe, ignore any other font files in the system "reserved fonts" folder that may be added in the future. Change-Id: I8a025c8b6d84a661b173aa7d6d5b261c92452b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174160 Reviewed-by: Jonathan Clark <jonathan@libreoffice.org> Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins