summaryrefslogtreecommitdiff
path: root/vcl/qt5
AgeCommit message (Collapse)Author
2021-12-22tdf#131467 Qt set default position on first resizeJan-Marek Glogowski
Setting the position in Show() is too late, because LO will try to set the mouse pointer to the default button, if configured. That obviously needs the window position. And also take the menubar offset into account. Change-Id: Ia280539c082ff6f675966869fb6643a41a17d696 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127154 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit ca28826a087245686d7fca3ffc8ca1f03307924d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127185 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-21Qt use asChild for pointer positioningJan-Marek Glogowski
.. and refactor some variable names. Change-Id: I7d31a7a377f614bdd78f8d09852a2eda0cc47442 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127153 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit e63fe68fb1d0915b64fdf63f7fa6eed866fa3a0d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127173 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-19Qt set QPainter AntiAlias hint from SalGraphicsArmin Le Grand (Allotropia)
Change-Id: I1a9e6014ead24b6edff1dbb41b70c809204d01cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125549 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-19tdf#137924 qt (>=5.14): Use proper DPI without requiring window handleMichael Weghorn
For Qt >= 5.14, don't require a window handle to retrieve the screen and then the associated DPI value from that one, but directly use 'QWidget::screen' (introduced in QT 5.14) to retrieve the screen. Previously, no DPI values would be set in case there was no window handle. This makes UI scaling work without having to manually set 'SAL_FORCEDPI' on Wayland. While various UI elements (like e.g. the "Help" -> "About LibreOffice" still look quite broken with the qt5 and kf5 VCL plugins in a Plasma Wayland session (at least on my Debian testing with Qt 5.15.2 and Plasma 5.23), they look OK when using the qt6 VCL plugin with a custom build of qtbase and qtwayland from Qt's "dev" git branches. Change-Id: I5feae46ed86a8b7d3cf92d4a973f7a0f9a9f95de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125507 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-11-18Qt implement QtFont::GetGlyphOutlineArmin Le Grand (Allotropia)
Fixes FontWork with QFont based rendering. Change-Id: I294fe89d2753b6e82a559ff847b44126f9ea3bfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125500 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-17Qt resolve native winId() on demandJan-Marek Glogowski
As for gtk3 in commit ac9789dbb36f45dcc1caf7dd2951353b1574c8ea ("tdf#139609 avoid fetching unnecessary xid under gtk3"). Change-Id: I82b2c22437e5ab957706c25fcc118b28abb07242 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125395 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2021-11-17Qt refactor SystemEnvData setupJan-Marek Glogowski
Change-Id: I900d1079c9a832a9b5170e58ce4e7a8b81d7d01b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125393 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2021-11-11qt (>=5.14): Don't create native window for QWidget in QtFrame::screenMichael Weghorn
For Qt >= 5.14, directly use 'QWidget::screen' (added in Qt 5.14) to retrieve the screen that the widget is on, rather than first retrieving a window handle, which forces a platform-native window to be created. Due to QTBUG-75766 [1], forcing the creation of native windows also leads to mouseMoveEvents not being reliably emitted by Qt, s. commit 0e3c3b842e14b9646d3697cf1266be21359e0f13 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Sat May 11 21:31:33 2019 +0200 tdf#122293 qt5: Use "alien widgets" by default on Wayland for more details. The behaviour described in tdf#122293 started showing up again after commit b00a68a8e19370e106cd76258a3c1825f43613ee Date: Sun Oct 31 02:33:46 2021 +0200 tdf#145363 Qt reparent modal dialogs on show but that just seems to have been a side-effect of 'QWidget::screen' now being called in different ways than previously. [1] https://bugreports.qt.io/browse/QTBUG-75766 Change-Id: Ic11923cef5e704c09494f96b19157372a869ae40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124997 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-11-10tdf#145508 Qt NONE-frames should still be windowsJan-Marek Glogowski
This drops the newly "&& (nStyle != SalFrameStyleFlags::NONE))" introduced in the regressing commit e4abf879f4a24258bcc560eb58ca78b147768d46 ("tdf#145363 Qt popups actually are windows"). A GtkBox based UI snippet, like vcl/uiconfig/ui/combobox.ui, IMHO shoulden't be represented as a Qt::Window, but a Qt::Widget. But there is no real way to identify it, so lets keep the old, working code. Change-Id: Ic41ff15ab651b422ee95c906cac67e37be8d8a65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124958 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-05tdf#144994 QtInstance::CreateMenu needs SolarMutexMichael Weghorn
It can be called from extensions (as is the case e.g. for LanguageTool, s. tdf#144994 comment 19; assertion is hit after clicking around in the menu a bit) and 'RunInMainThread' requires that the SolarMutex is held. Change-Id: I282ef6a21e60b636abb27aeba332ae3a634ce680 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124750 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-11-01Qt picker: implement XAsynchronousExecutableDialogJan-Marek Glogowski
FWIW: most places still call FileDialogHelper::Execute instead of StartExecuteModal. I tested with "Insert >> Text from File...". Change-Id: I303cc89c97c8fc17015ab7831e6a324ef16a6a0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124512 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-01Prepare for removal of non-const operator[] from Sequence in vclMike Kaganski
Change-Id: I65f411affcf0340c054d09426483d57c530edb0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124411 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-31tdf#145363 Qt reparent modal dialogs on showJan-Marek Glogowski
Simply said, one can't have two modal dialogs open at the same parent in Qt. All modal windows must open as a stack, each parented to the previous one. This is kind of logical. Unexpectedly Qt totally breaks, if you open two modal dialogs on the same window. This happens, because the existing paragraph style dialog and the "sub" "list style" dialog are both children of their Writer window. I'm not sure the additionally introduced QWidget-based parent handling is strictly needed. It seems Ok. So for every visibility and modality change, we reparent the Qt widget, either on top of the modal stack or restore the original LO-based parent. The LO hierachy is never changed! Change-Id: Id209c9aa67774440089dc50a6648ac293950087a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124500 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-10-31tdf#145363 Qt popups actually are windowsJan-Marek Glogowski
An other patch in the whole Qt popup handling saga. At this point it mainly exists as a prerequisite for the real tdf#145363 fix. I just wanted to keep it separate. Maybe it also helps Qt Wayland. Change-Id: Ib76e9919398bdd5fa7d6239ddb126859f0c0edbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124525 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-10-31Qt de-obfuscate the aWinFlags assignmentJan-Marek Glogowski
The aWinFlags assignement is an obfuscated case statement, so this explicitly defaults to Qt::Widget and drops the whole or'ing. Change-Id: If6ac1817d1e600a174c1308a3bad0af5f3f9c30b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124524 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-10-22qt: Adapt log area: "vcl.qt5" -> "vcl.qt"Michael Weghorn
And also: "vcl.opengl.qt5" -> "vcl.opengl.qt" Change-Id: I86f8a34cb8c1303a81ffbf40c801ba628f3fa0d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124065 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-10-22Rename SystemEnvData::Toolkit::{Qt5 -> Qt}Michael Weghorn
It's used for the qt6 VCL plugin as well. Change-Id: I3f57258c2c8e3c12532d79b44f24105a30590675 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124064 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-10-15Remove non-const Sequence::begin()/end() in internal codeMike Kaganski
... to avoid hidden cost of multiple COW checks, because they call getArray() internally. This obsoletes [loplugin:sequenceloop]. Also rename toNonConstRange to asNonConstRange, to reflect that the result is a view of the sequence, not an independent object. TODO: also drop non-const operator[], but introduce operator[] in SequenceRange. Change-Id: Idd5fd7a3400fe65274d2a6343025e2ef8911635d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123518 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-08vcl: test PhysicalFontCollection and move to vcl::font namespaceChris Sherlock
- tested PhysicalFontCollection, noted odd behaviour with search names and normalization - moved PhysicalFontCollection.hxx to vcl/inc/font - moved PhysicalFontCollection into vcl::font namespace Note that I needed to regenerate the pch file otherwise errors were generated. Change-Id: Ifa0c7b871c40687bd15002565d2f7a3e408218f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122036 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-05vcl: test PhysicalFontFace and move to vcl::font namespaceChris Sherlock
- moved PhysicalFontFace.hxx to vcl/inc/font - added PhysicalFontFace to vcl::font namespace - had to regenerate precompiled_vcl.hxx - tested PhysicalFontFace, with some extensive tests for IsBetterMatch() Change-Id: I860022ac244f8a827f6f9cb7ed9018c5d9c328cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121970 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-29qt: Use actual major Qt version number in toolkit IDMichael Weghorn
This makes the qt6 VCL plugin actually show up as such instead of "qt5" in "Help" -> "About LibreOffice". Change-Id: I33804dc779c7f2692be260353dda2edc86ea8544 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122809 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-29qt6: Add a qt6 VCL pluginMichael Weghorn
This adds a new "qt6" VCL plugin based on Qt 6. Building the plugin is enabled by autogen option '--enable-qt6' (and optionally setting 'QT6DIR' as needed). Use the 'SAL_USE_VCLPLUGIN=qt6' environment variable before running LO to select this VCL plugin. Taking qt6 into account at all relevant places certainly still requires follow-up changes, but this builds and runs with a self-compiled qtbase from the 'dev' git branch as of commit 3ce0672143d2eb3c3809f82998a4d71c5800d77a. I didn't see anything obviously broken in a quick run, but didn't test much. This reuses and shares the qt5 VCL plugin code; the qt6 headers and sources for now just '#include' the qt5 ones. Version checks are used for the code places that need different handling to be built against Qt 6. The build system parts in this commit were mostly done by copying the qt5 equivalents, then adapting as needed. Some notes on things I came across while porting to qt6: 1) At least in my self-compiled Qt versions, 'moc' (the meta-object compiler) is located in the 'libexec' subdirectory in 'QT6DIR', while the Qt 5 equivalent is located in the "bin" subdirectory of 'QT5DIR', so the configure.ac check uses the former. 2) moc does not process classes from the included headers. Since the headers in 'vcl/inc/qt6' just '#include' the ones from 'vcl/inc/qt5', running moc on the qt6 headers doesn't work, so moc is currently run on the qt5 headers for qt6 as well (s. 'vcl/CustomTarget_qt6_moc.mk'). That will have to be adapted in case the qt6 VCL plugin uses "own" headers instead of just including the qt5 ones at some point. 3) QX11Extras has been removed from Qt 6. [1] says: > Changes to Qt X11 Extras > > The QX11Info class has been removed. > > Clients that still rely on the functionality can include the private > header <QtGui/private/qtx11extras_p.h> as a stopgap solution. To enable > private headers use QT += core-private with qmake, or add a project > dependency to Qt::CorePrivate with CMake. I didn't take any closer look, just dropped the use of QtX11Extras for qt6 for now. 4) XCB_ICCCM is no longer needed. It is only used in qt5 to workaround a Qt bug fixed in Qt 5.12, s. commit fe2baf9e84e0ca9aeaa683e37076f57fa3f38dca Author: Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> Date: Tue Dec 3 08:32:58 2019 +0100 Qt5 fix missing XCB_ICCCM_WM_HINT_WINDOW_GROUP 5) X11-specific code is still used for key modifier handling. Therefore, still check for the XCB headers when 'USING_X11' is set in configure.ac, and use a 'QT6_USING_X11' define (as qt5 uses 'QT5_USING_X11'). 6) There's currently no Qt 6 video sink for GStreamer. As of today, qt-gstreamer is unmaintained and there is no Qt 6 version. The project's README [2] says: > 0. Maintenance Notice > --------------------- > > This code is unmaintained. You can use it at your own risk. > > If you want to integrate video display in your QML-based UI, > you should consider using 'qmlglsink', from gst-plugins-good. > This is a well supported video sink that uses the generic > gstreamer-gl stack and is in many ways superior to 'qtquick2videosink' > that is provided by qt-gstreamer. You can use this code as an example: > https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/qt/qmlsink > > If you are not interested in using QML in your UI, then you > may use one of the other elements provided by this module > (see below). If you do that, it would be helpful to let us > know that this code is still useful to you. We may consider > adding these elements in one of the core gstreamer modules. > > If you are here for the Qt-style bindings, I'm sorry to disappoint you. > The alternative is to use the C API, or the GStreamermm C++ API. > Qt-style bindings are cool, but unfortunately they are very hard > to maintain because they are written by hand. If you are interested > in continuing this project, you are welcome to implement a > generator for them, probably based on GObject-Introspection. > I am happy to provide directions if you want to pursue such a thing. Therefore, the Qt video sink handling is qt5-only and the corresponding handling for GOBJECT (used for the GStreamer video sink handling) was not taken over for qt6. This presumably means that video playback in Impress presentations does not work when using qt6 with they Qt Wayland plugin, s. tdf#125219 for the corresponding bug for qt5/kf5. (I did not build the qtwayland module to actually test this, though. Video playback with the Qt xcb plugin in a Wayland session works.) [1] https://doc-snapshots.qt.io/qt6-dev/extras-changes-qt6.html [2] https://cgit.freedesktop.org/gstreamer/qt-gstreamer/tree/README Change-Id: Ib105ccfb2c3630ec5d5403793a3cd9ba31d85bdf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122808 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-29qt5: Drop "5" from VCLPLUG_QT5_{IMPLEMENTATION,PUBLIC} definesMichael Weghorn
Rename those to no more include the Qt version number, since they will be used for the upcoming qt6 VCL plugin as well. Change-Id: I49bf362b830e07193dca03524e0d6001d0d191a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122807 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-29qt5: Rename sources + headers according to new class namesMichael Weghorn
This renames the source and header files according to the new class names without a "5" in them, as mentioned in Change-Id: Idf422f82ca9dafbb70e9a64de9c8cfc4cc8c0909 (qt5: Remove "5" from class names in qt5 VCL plugin): > Renaming the headers and source files will be done > in a separate commit to make tracking git history easier. Change-Id: If955e77c8ba508d0a2e01e3a9df1be6dc04c4e4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122806 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-29qt5: Remove "5" from class names in qt5 VCL pluginMichael Weghorn
Rename classes for the qt5 VCL plugin to no longer contain the Qt version number "5" in them, e.g. "Qt5Widget" -> "QtWidget". Also, adapt some variable names and comments accordingly. The code will be used for an upcoming qt6 VCL plugin as well, so a "Qt" prefix fits better than a "Qt5" one. Renaming the headers and source files will be done in a separate commit to make tracking git history easier. Change-Id: Idf422f82ca9dafbb70e9a64de9c8cfc4cc8c0909 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122805 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-29qt5/kf5: Drop 'qt5/' prefix from includesMichael Weghorn
'vcl/inc/qt5' is in the include path for the qt5 and kf5 VCL plugins, so there's no need for this (and it's not used in the other places, either). Change-Id: I1de3afd4399869e318dba2e7786711e65ef83c62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122803 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-27vcl: move FontSelectPattern to own file and into vcl::font namespaceChris Sherlock
Change-Id: I2f01a8e67c52ece9b434777203aa9fbc9ac8be02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122613 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2021-09-24qt5: Avoid calling QApplication::fontMetricsMichael Weghorn
It's deprecated in Qt 6. Change-Id: Idd7e93627a0c13b89b1a271c859ce29d01e55ce2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122556 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-24qt5: Don't use deprecated QStyleOptionProgressBarV2 typedefMichael Weghorn
'QStyleOptionProgressBarV2' is just a typedef for 'QStyleOptionProgressBar' in Qt 5 and has been removed in Qt 6. Change-Id: I7ee63d0ebe6b035b6048e54a94c98ca54942a7d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122555 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-24qt5: Replace use of deprecated QDesktopWidget in Qt5SystemMichael Weghorn
Change-Id: Id6ba8dfcf2f966f0e2e224990dec0309cd4d27d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122551 Tested-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-24qt5: Port Qt5Frame away from deprecated QDesktopWidgetMichael Weghorn
Most of QDesktopWidget's methods were deprecated in Qt 5.11 and QDesktopWidget was removed in Qt 6. Since 'QScreen *QGuiApplication::screenAt(const QPoint &point)' was only introduced in 5.10, keep using 'QDesktopWidget::screenNumber' for older Qt versions. Change-Id: I915fda0ea00b018945974ad82c1927a5fac99145 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122548 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-21qt5 a11y: Implement Qt5AccessibleWidget::is{Column,Row}SelectedMichael Weghorn
Change-Id: I2abfbc69a422a56dc07afd76f0c7a8ead1891830 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122398 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-21qt5 a11y: Implement QAccessibleTableCellInterfaceMichael Weghorn
Let 'Qt5AccessibleWidget' derive from 'QAccessibleTableCellInterface' and implement the most important methods. This is e.g. one of the steps needed to make Orca announce the focused cell in Calc. Since there's no specific XInterface for table cells make use of the fact that a table cell's parent is a table and query information from there, similar to how the following commit does for winaccessibility: commit 97a88e30e2e084ab860635ff4e0a03442d8a12af Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Sep 8 14:37:53 2021 +0100 tdf#100086 tdf#124832 wina11y: Implement IAccessibleTableCell Change-Id: I160bc04f3e4fcf7b77723540aba6945b8fdf36ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122395 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-21qt5 a11y: Drop Qt5AccessibleWidget::{text,value}InterfaceMichael Weghorn
They're unused and at first glance look like they might be overriding the non-virtual methods from 'QAccessibleInterface' with the same name that do something more useful (calling 'interface_cast' with the corresponding 'QAccessible::InterfaceType' param). Change-Id: I9258a5f9386f9a7d23bb35cfa33e55a169eb753e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122394 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-21vcl: add sal/config.h in preparation for patchChris Sherlock
The convention is that we need to add sal/config.h to the start of files. This patch is created in preparation of a patch I have queued to test and move PhysicalFontFace to vcl::font namespace. Change-Id: I15dd24d7f01e077d407ac192a0413d796517eb72 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122228 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-10tdf#144412 Qt5 reset m_nModKeyCode on key inputJan-Marek Glogowski
Switching the input direction on Ctrl + L/R-Shift is actually no bug but a feature. It is triggered on key release, so it can be distinguished from / doesn't interfere with shortcut handling. That's what should happen. So trying to implement that behaviour correctly and seeing the appearingly wrong modifier events for gtk3, I found gtk3 resets the frames persistent mnModKeyCode for key input events, which also seems to fix the problem for qt5. Some additional discussion is also in tdf#103158. Regression from commit 862fdb98ca271b60a831cd5420fd16d5f9c1c747 ("tdf#143298 Qt5 send SalEvent::KeyModChange events"). Change-Id: Iafcd1db7abcdf078001ca0602ae6e374f2a169ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121858 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-09-06clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I51f4e8affac41023110042b534a915f096ccd0c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121692 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04tdf#144289 invert / disable default OpenGL supportJan-Marek Glogowski
... and as a result drop setting a default in SalSvpInstance. This is also more consistent: now you must explicitly implement CreateOpenGLContext() and set "m_bSupportsOpenGL = true". Change-Id: I591580bf134907213b8308e0843c278d2f470ed3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121632 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-08-26tdf#144037 Qt5 just close popup with mouse outsideJan-Marek Glogowski
How hard could it be to close a popup window when losing focus or clicking outside of it (AKA tdf#143114 problem 3)? At least with Qt it feels like solving an NP problem... So don't always force-close the popup window if clicked anywhere on it. Seems to be consistent with gen and gtk3. Change-Id: Ia1c231c0b51a55bec2c587feffcf14bb4b4cee55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121093 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-08-26tdf#144008 Qt5/Kf5 create frames in the GUI threadJan-Marek Glogowski
There was a 50% chance my pick would have been correct... ok, just half-true, as in hindsight, I should have preferred the secure variant using RunInMain to start with. I thought I could use some templated class functions to get rid of all the copy and paste, but that looked even more ugly. P.S. if you wonder - like myself - about the code formatting in Qt5Instance::CreateFrame: that if from clang-format. Change-Id: I3a6b0c12c9d71ad8e777ed82526d1515a249832c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121091 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-08-20New loplugin:unusedcapturedefaultStephan Bergmann
In sc/qa/unit/ucalc_formula.cxx, dropping the capture-default from the lExpectedinF lambda revealed that MSVC in C++17 mode (i.e., when building without --with-latest-c++) requires ROW_RANGE (a local const int variable from the enclosing TestFormula::testTdf97369) to be captured, even though all uses of that variable within the lambda body are constant expressions. That is still true at least for the latest Visual Studio 2019 version 16.11.1. (This is not an issue for the lExpectedinH and lExpectedinI lambdas a few lines further down, as they, in addition to using that ROW_RANGE, also use the local const double variables SHIFT1 and SHIFT2, whose uses are not constant expressions, so they are implicitly captured and loplugin:unusedcapturedefault does not suggest dropping those lambdas' capture-defaults in the first place.) Change-Id: Iee7efb485187cbe8eba6a2d470afca4993eb1816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120693 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-20tdf#143957 Qt5 always create an OpenGLContextJan-Marek Glogowski
Nothing checks the result and a lot of code just uses it. Change-Id: I1a672e98d42673fd684538ead831622f6a14e9f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120761 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-08-16Drop tools::Rectangle::getX/getY, which are just duplicates of Left/TopMike Kaganski
The change allowed to simplify many places where previously this API was used, to avoid inefficient calculations (e.g., moving rectangle keeping its size, and then immediately changing the size). Change-Id: Ica2dc594d91cae83e2c2740c1f4fb23f44998916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120461 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-05vcl::KeyCode::GetName doesn't need a specific vcl::WindowCaolán McNamara
any will do Change-Id: Ice1875d9b9e1cd46ecbc6e306c77768dc0b07dbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120029 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-03Pass context and resource string down to boost::locale separatelyNoel Grandin
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: I2a24a123a64b762fd0741c45eaca3ad4bdd5580d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-01Fix typosAndrea Gelmini
Change-Id: Ib48f6c8e0424e6843d2b3a7b3558d1d8714a80ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119792 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-07-30tdf#143580 Qt5 don't use Qt::Popup for FLOAT winsJan-Marek Glogowski
Main problem is, that Qt::Popup grabs the focus and therefore generates a focus-out event for the combobox, which then closes the just shown popup window. The grab happens inside QWidget private code and there is no way around it. But instead of "faking" Qt::Tooltip, this uses Qt::Widget with additional flags. Regression from commit 7e6fee830116823b9cd8e46d6962df4ea2bc1ea6 ("Qt5 fix Qt::Popup window handling"). Change-Id: Ia1f8e33d98f7ec36cf1ebc350886121dfaadd658 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119691 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-07-28qt5 a11y: Implement Qt5AccessibleWidget::minimumStepSizeMichael Weghorn
This makes use of the newly introduced XAccessibleValue::getMinimumIncrement method, s. Change-Id: Ie148a4e1cedbdbb5964f8565c81611d3480465cb, "Add XAccessibleValue::getMinimumIncrement method". With this in place, Accerciser now shows the correct "Minimum increment" and the exact decimal value instead of a rounded integer value for FormattedFields, s. note in commit message for Change-Id: I8af326c2d24c1801147a56ea2e2a886ab42ac634 "a11y: Expose FormattedField as spinbox" for more details. Change-Id: Ia9d07552197357c81ae8ea3b62e2de07e82148bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119597 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-07-22tdf#143493 Qt5 key modifier events don't have textJan-Marek Glogowski
Regression from commit 862fdb98ca271b60a831cd5420fd16d5f9c1c747 ("tdf#143298 Qt5 send SalEvent::KeyModChange events"). Change-Id: I6981af06e3a73dee45ed10416f5d3b17b860a73b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119375 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-07-22qt5 a11y: Always query the XAccessibleContext for a11y interfacesMichael Weghorn
The accessibility interfaces are implemented by the object implementing 'XAccessibilityContext' which is often the same as the 'XAccessible' (in which case the corresponding 'XAccessible::getAccessibleContext()' call just returns a reference to self), but it doesn't have to be that way. From offapi/com/sun/star/modules.idl: > /** UNO Accessibility API > > <p>This modules contains the basic interfaces of the UAA (UNO > Accessibility API). Services that describe how these interfaces are > implemented can be found in other modules. The services in this module > describe only what every accessible object has to support.</p> > > <p>Making a class accessible starts by supporting the > ::com::sun::star::accessibility::XAccessible interface. > This interface's only method returns the actual accessibility object, an > instance of ::com::sun::star::accessibility::XAccessibleContext. > These two interfaces may be implemented by the same class in which case > a call to ::com::sun::star::accessibility::XAccessible getAccessible() > returns the same object that is > called. Alternatively the implementation of the > ::com::sun::star::accessibility::XAccessibleContext > interface can be done by another class. This makes it possible to put > all accessibility implementations into their own library which has only > to be loaded when necessary.</p> > > <p>Note that all other interfaces have to be implemented by the same > class that implements the > ::com::sun::star::accessibility::XAccessibleContext > interface. Note also that there is no way back from an accessibility > object to the object from which it has been obtained by means of the > UAA. If you need such a back-link you have to provide one on your > own.</p> > */ > module accessibility {}; This e.g. makes Accerciser show the correct values of the "URL" and "Text" controls in Writer's "Insert" -> "Hyperlink" dialog. Change-Id: I909b1fdf5e1e7ca50db5d5191ae69cb558a49dc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119364 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>