summaryrefslogtreecommitdiff
path: root/vcl/inc
AgeCommit message (Collapse)Author
2024-09-26tdf#160837 win: Move UpdateFrameGeometry to WinSalFrameMichael Weghorn
Turn the previously static helper function UpdateFrameGeometry into a WinSalFrame method. It requires write access to the maGeometry member, which is currently still, but soon no longer public. Change-Id: Ief0dfee6061a5ea4e8ce497f1605b7c46c6e40c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173959 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-26tdf#160837 win: Move SetMaximizedFrameGeometry to WinSalFrameMichael Weghorn
Turn the previously static helper function SetMaximizedFrameGeometry into a WinSalFrame method. It requires write access to the maGeometry member, which is currently still, but soon no longer public. Change-Id: Iceef8a5366e6f4f5bf2163011651ee99ee908b2a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173958 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-26tdf#160837 qt: Move logic for QPaintEvent handling to QtFrameMichael Weghorn
Add a new QtFrame::handlePaintEvent and move the logic from QtWidget::paintEvent to the new method and call the new method in QtWidget instead. This decouples QtFrame and (its friend class) QtWidget a bit more. Change-Id: I974a55d8f967dd85c3dd98e2ac8e28fa53c38c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173953 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-26tdf#160837 qt: Move logic for resize event handling to QtFrameMichael Weghorn
Add a new QtFrame::handleResizeEvent and move the logic from QtWidget::resizeEvent to the new method and call the new method from QtWidget::resizeEvent. This decouples QtFrame and (its friend class) QtWidget a bit more, and also prevents direct access to the (currently public) SalFrame::maGeometry member from QtWidget. Change-Id: I8969687c64b87677836b436b7815298a8e8d5cf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173952 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-26tdf#160837 qt: Move logic for move event handling to QtFrameMichael Weghorn
Add a new QtFrame::handleMoveEvent and move the logic previously duplicated in both, QtMainWindow::moveEvent and QtWidget::moveEvent there, then call the new method from these two. this also prevents direct access to the (currently public) SalFrame::maGeometry member from QtWidget and lets the subclass do it instead. Change-Id: I468802f204d3ac5869d833526286ca8ab349697b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173951 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25tdf#130857 qt weld: Implement QtBuilder::set_responseMichael Weghorn
Implement QtBuilder::set_response to set the given response code for a button: Set the `PROPERTY_VCL_RESPONSE_CODE` property on the QPushButton. `QtInstanceMessageDialog` makes use of that property to return the corresponding response code of the pressed button. (Make `PROPERTY_VCL_RESPONSE_CODE` a static member of `QtInstanceMessageDialog` to make it available outside of the class as well.) This works for buttons in message dialogs. An implementation for other dialogs still needs to be added when adding suppor for these to `QtBuilder` and extending `QtInstanceDialog`/`QtInstanceButton` accordingly. Change-Id: If6e03bfa48b9052016539a25aadf40b599095918 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173931 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25tdf#130857 qt weld: Implement QtBuilder + use it for first msg dialogOmkarAcharekar
This implements an initial QtBuilder, which is used by QtInstanceBuilder to create weld::Widget instances using native Qt widgets. This tries to be close to the VCL implementation (VclBuilder). The selected approach is based on Caolán's suggestion in [1] to rework VclBuilder to have overridable methods for widgets creation. This way, we can have common code for the UI parser but the function for widget creation is different. Qt equivalents for Gtk's widget classes in the .ui files: * GtkMessageDialog -> QMessageBox * GtkBox -> QLayout (can be QVBoxLayout/QHBoxLayout based on property in .ui file) * GtkButtonBox -> QDialogButtonBox * GtkButton -> QPushButton As QMessageBox already comes with a layout and a QDialogButtonBox, don't create new ones, but return the existing ones in QtBuilder::makeObject. This commit implements initial support for the above-mentioned widget types and adds the first message dialog to the list of supported .ui files in QtInstanceBuilder::IsUIFileSupported, so a native QMessageBox is used for it now, unless environment variable SAL_VCL_QT_NO_WELDED_WIDGETS is set when starting LibreOffice. The dialog ("modules/swriter/ui/inforeadonlydialog.ui") gets shown when taking the following steps: * start Writer * type "hello world" * select text * "Insert" -> "Section" * tick the "Protect" checkbox in the "Write Protection" section * close dialog via "Insert" button * try to type in the protected section The dialog can be dismissed using the default "OK" button. (Handling for response codes for buttons is not implemented yet, which will be needed when welding dialogs that have multiple buttons resulting in different behavior depending on what button gets clicked.) This change was originally submitted as a WIP change as part of Omkar Acharekar's Outreachy project "Implement Qt/KDE Frameworks theming using native Qt widgets" (see [2]), then further refined by Michael Weghorn. [1] https://lists.freedesktop.org/archives/libreoffice/2023-December/091288.html [2] https://lists.freedesktop.org/archives/libreoffice/2023-December/091281.html Co-authored-by: Michael Weghorn <m.weghorn@posteo.de> Change-Id: I6dd010a2138c245dc1e6d83dd08123898e9d9048 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161831 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25tdf#130857 VclBuilder: Pass UI dir/root to BuilderBaseMichael Weghorn
Pass the UI file root down to `BuilderBase`, and add a new getter `BuilderBase::getUIFileUrl` to get the URL composed of the UI dir and the UI file passed to the ctor. This is in preparation of moving the `XmlReader` creation out of the `VclBuilder` ctor, so the code can be reused by the upcoming `QtBuilder`. Change the UI directory param from `const OUString&` to `std::u16_string_view` as suggested by the clang plugin. Change-Id: I3f7719e30e55bae3c774da704e642e4227165a76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173827 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-24tdf#163135 eliminate native "secure coding" warningPatrick Luby
Starting in macOS Sonoma, a warning is printed at launch that complains that -[NSApplicationDelegate applicationSupportsSecureRestorableState:] is not implemented so implement that selector. Change-Id: Idfb62c271af5256270361efdd458f2ef9ea4c40b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173882 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>
2024-09-23vcl: mask scale regression in BitmapFastScaleFilterChris Sherlock
Masks are not scaled in the fast scaling filter. The issue occured when migrating to the BitmapFastScaleFilter class - maSize was never set. The size is now calculated in execute() locally. Regression from: commit d246aa574571409046619254292698184c2545a3 date Sun Apr 15 10:14:10 2018 +1000 author Chris Sherlock <chris.sherlock79@gmail.com> vcl: move Bitmap::ImplScaleFast() and Bitmap::ImplScaleInterpolate() Change-Id: I9cc36f609059ae2db9c4cdb169bd5110382cfb21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173766 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-09-21tdf#130857 qt weld: Drop accidently added empty filesMichael Weghorn
I accidently left them as empty files and committed them when extracting a separate commit commit 9b3a2996e710fee11145dcbbe38a6f1e6f646ec8 Author: OmkarAcharekar <omkaracharekar12@gmail.com> Date: Wed Sep 18 09:35:09 2024 +0200 tdf#130857 qt weld: Add QtInstanceBuilder skeleton based on a part of the pending WIP Gerrit change [1]. [1] https://gerrit.libreoffice.org/c/core/+/161831 Change-Id: Ic7e13e4a24ec064a658283ccd43d0e9f656a21fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173708 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-19qt: Use qobject_cast to cast to QtMimeDataMichael Weghorn
Use `qobject_cast` instead of `dynamic_cast` to cast to QtMimeData. Add the `Q_OBJECT` macro to the class, as the the qobject_cast doc [1] says: > Warning: If T isn't declared with the Q_OBJECT macro, this function's > return value is undefined. Change-Id: I5de2d8dbf62ed1293f3660acae44e3b13ab5df71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173660 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-19qt a11y: Destroy QWindow when popup gets hiddenMichael Weghorn
When a popup gets hidden, destroy its associated QWindow. This prevents a "top-level" a11y object being reported when a popup gets shown, then hidden again, e.g. after expanding the Paragraph Style combobox in Writer's Formatting toolbar, then closing it again. Showing the popup results in a QWindow being created that would not implicitly be destroyed when the popup gets hidden again. Due to popups in LO currently not using the Qt::Popup type, but Qt::ToolTip, they are considered for top-level a11y children of the app, see the commit message of Change-Id: I7aff5c435dfa8b6aadcbbedb0d84db19bb86c8ab Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Sep 19 09:15:37 2024 +0200 qt a11y: Defer QWindow creation until frame gets shown for more details. Only delete the QWindow for non-spontaneous hide events, as the QWidget::hideEvent doc [1] says: > Note: A widget receives spontaneous show and hide events when its > mapping status is changed by the window system, e.g. a spontaneous hide > event when the user minimizes the window, and a spontaneous show event > when the window is restored again. After receiving a spontaneous hide > event, a widget is still considered visible in the sense of isVisible(). With this commit in place, after starting Writer, opening the Paragraph Style combobox, then closing it again, only the Writer window is shown as a top-level child of the app in Accerciser when using the qt6 VCL plugin, as expected. Showing the popup again works just fine, as a new QWindow is implicitly created then. [1] https://doc.qt.io/qt-6/qwidget.html#hideEvent Change-Id: Iefa5d05ea128966c4417d53d122a6a0f1178fc00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173657 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-09-18tdf#130857 qt weld: Move logic to find native Qt parent to helperMichael Weghorn
Move the logic to find a QWidget parent mostly introduced in commit 1e2836665a1839f61cd8bfa46c54687f010e7e9d Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Aug 30 18:17:53 2024 +0200 tdf#162696 tdf#130857 qt weld: Get parent via SalInstanceWidget to a helper method, for reuse in `QtInstance::CreateBuilder` in an upcoming commit. Change-Id: Ied41e7f5054f08382668292042f2a9978c6bed91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173593 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-18tdf#130857 qt weld: Add QtInstanceBuilder skeletonOmkarAcharekar
Add new `QtInstanceBuilder` that derives from `weld::Builder` and is meant to use `weld::Widget` implementations using native Qt widgets. Override `SalInstance::CreateBuilder` in `QtInstance` to return an instance of the new `QtInstanceBuilder` for UI files that that one can handle/supports. As of now, `QtInstanceBuilder` doesn't yet implement what's needed, so `QtInstanceBuilder::IsUIFileSupported` currently still always returns `false`, meaning that `SalInstanceBuilder` is still always used in practice. The idea is to implement funcationality needed for a specific UI file/dialog in `QtInstanceBuilder`, then add it to the set of supported UI files in `QtInstanceBuilder::IsUIFileSupported`. This allows looking at one .ui file at a time and only having to implement what is relevant for that particular one, without having to implement the full weld API at once. The use of `QtInstanceBuilder` can completely be disabled by starting LO with environment variable `SAL_VCL_QT_NO_WELDED_WIDGETS` set. This commit is mostly extraced from Omkar Acharekar's WIP Gerrit change [1] (patch set 22) with some further adjustments by Michael Weghorn. Patch set 23 of that WIP Gerrit change demonstrates adding support for a dialog (the "Save Document?" one), but still needs more work. [1] https://gerrit.libreoffice.org/c/core/+/161831 Co-authored-by: Michael Weghorn <m.weghorn@posteo.de> Change-Id: If2d1ea30d43c2c1d84d64e577035489c8e158a7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173592 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-10use more concrete UNO type in vclNoel Grandin
Change-Id: I157109d11b349e1304a3279471d4ab90b65b5841 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-09-05tdf#162359 sw: fix the export of comments as PDF annotationsTibor Nagy
Change-Id: If4a8a1a73c382f496b2c6dd4d52271dc6bc87dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172877 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
2024-08-31tdf#162696 tdf#130857 qt weld: Get parent via SalInstanceWidgetMichael Weghorn
Since only welding for simple message dialogs has been implemented for the Qt based VCL plugins so far, the `weld::Widget*` parent passed to `QtInstance::CreateMessageDialog` is usually not a `QtInstanceWidget`. The initial implementation to get a parent from commit 9e40fc8c9458b937200ea56c96b89113c74b67f5 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Feb 14 10:54:59 2024 +0100 tdf#130857 qt weld: Set msg dialog parent implemented a fallback to use of the currently active window if no native Qt parent is set. That is however not sufficient to reliably set the correct parent for the QMessageBox for the tdf#162696 scenario, where the "Extension" dialog that is the parent and the message box and the message box itself are created shortly after each other, and the extension dialog does not reliably have focus yet when the message box is created, so the start center window would sometimes be set as the parent of the message dialog instead. Adjust the logic to make use of the implementation detail that non-Qt parents are `SalInstanceWidget`s. Retrieve a `QWidget` to use as the parent via the `SalFrame`/`QtFrame` in that case. This makes setting the correct parent work for both, the case described in the commit message of the above-mentioned commit and for the tdf#162696 case, fixing the issue mentioned in tdf#162696#c13: > One small thing I noticed is that after clicking OK on the warning > dialog, the Extensions dialog has to be manually brought into focus. So > it's not layered below the warning dialog during the first installation > action in a session. Change-Id: I4de403a8ed78a649a17f6cabc0e0f5fdecae09c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172686 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-30tdf#162696 qt weld: Destroy QDialog in main threadMichael Weghorn
Besides the obvious cases handled in previous commit Change-Id: Ifa84a038fc56f34958cd732caeb9c436b48b3c75 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Fri Aug 30 10:12:21 2024 +0200 tdf#162696 qt weld: Do GUI things in main thread , the destruction of `QtInstanceDialog::m_pDialog` (that previously implicitly happened due to it being a `std::unique_ptr`) also needs to happen in the main thread. Otherwise, it triggers this assert with a debug Qt build for the tdf#162696 of installing an extension via drag'n'drop into the start center: ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread QThread(0x7f4b14003390). Receiver 'QDialog(0x562e6ba77450)' was created in thread QThread(0x562e69709f60, name = "Qt mainThread")", file /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp, line 551 terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException' Fatal exception: Signal 6 Stack: #0 sal::backtrace_get(unsigned int) at /home/michi/development/git/libreoffice/sal/osl/unx/backtraceapi.cxx:42 #1 (anonymous namespace)::printStack(int) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:289 #2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:330 #3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at /home/michi/development/git/libreoffice/sal/osl/unx/signal.cxx:427 #4 /lib/x86_64-linux-gnu/libc.so.6(+0x3f590) [0x7f4be7455590] #5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 (discriminator 1) #6 raise at ./signal/../sysdeps/posix/raise.c:27 #7 abort at ./stdlib/abort.c:81 #8 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xa1a3d) [0x7f4be70a1a3d] #9 /lib/x86_64-linux-gnu/libstdc++.so.6(+0xb306a) [0x7f4be70b306a] #10 std::unexpected() in /lib/x86_64-linux-gnu/libstdc++.so.6 #11 /home/michi/development/git/qt5/qtbase/lib/libQt6Core.so.6(+0xed562) [0x7f4bd2eed562] #12 QMessageLogger::fatal() const at /home/michi/development/git/qt5/qtbase/src/corelib/global/qlogging.cpp:901 #13 qt_assert_x(char const*, char const*, char const*, int) at /home/michi/development/git/qt5/qtbase/src/corelib/global/qassert.cpp:0 #14 QCoreApplicationPrivate::checkReceiverThread(QObject*) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:0 #15 QApplication::notify(QObject*, QEvent*) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qapplication.cpp:2583 #16 QCoreApplication::notifyInternal2(QObject*, QEvent*) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1170 #17 QCoreApplication::sendEvent(QObject*, QEvent*) at /home/michi/development/git/qt5/qtbase/src/corelib/kernel/qcoreapplication.cpp:1614 #18 QWidgetPrivate::setVisible(bool) at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8415 #19 QDialogPrivate::setVisible(bool) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:832 #20 QMessageBoxPrivate::setVisible(bool) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qmessagebox.cpp:1676 #21 QDialog::setVisible(bool) at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:750 #22 QWidget::hide() at /home/michi/development/git/qt5/qtbase/src/widgets/kernel/qwidget.cpp:8176 #23 QDialog::~QDialog() at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qdialog.cpp:390 #24 QMessageBox::~QMessageBox() at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qmessagebox.cpp:879 #25 QMessageBox::~QMessageBox() at /home/michi/development/git/qt5/qtbase/src/widgets/dialogs/qmessagebox.cpp:878 #26 std::default_delete<QDialog>::operator()(QDialog*) const at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:94 #27 std::unique_ptr<QDialog, std::default_delete<QDialog>>::~unique_ptr() at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:398 #28 QtInstanceDialog::~QtInstanceDialog() at /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtInstanceDialog.hxx:14 #29 QtInstanceMessageDialog::~QtInstanceMessageDialog() at /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtInstanceMessageDialog.hxx:16 #30 QtInstanceMessageDialog::~QtInstanceMessageDialog() at /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtInstanceMessageDialog.hxx:16 #31 QtInstanceMessageDialog::~QtInstanceMessageDialog() at /home/michi/development/git/libreoffice/vcl/inc/qt6/../qt5/QtInstanceMessageDialog.hxx:16 #32 std::default_delete<weld::MessageDialog>::operator()(weld::MessageDialog*) const at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:94 #33 std::__uniq_ptr_impl<weld::MessageDialog, std::default_delete<weld::MessageDialog>>::reset(weld::MessageDialog*) at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:206 #34 std::unique_ptr<weld::MessageDialog, std::default_delete<weld::MessageDialog>>::reset(weld::MessageDialog*) at /usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/bits/unique_ptr.h:504 #35 dp_gui::DialogHelper::installExtensionWarn(std::basic_string_view<char16_t, std::char_traits<char16_t>>) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_dialog2.cxx:379 #36 dp_gui::(anonymous namespace)::ProgressCmdEnv::handle(com::sun::star::uno::Reference<com::sun::star::task::XInteractionRequest> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:477 #37 dp_misc::interactContinuation(com::sun::star::uno::Any const&, com::sun::star::uno::Type const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, bool*, bool*) at /home/michi/development/git/libreoffice/desktop/source/deployment/misc/dp_interact.cxx:114 #38 dp_manager::ExtensionManager::checkInstall(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:1315 #39 dp_manager::ExtensionManager::doChecksForAddExtension(com::sun::star::uno::Reference<com::sun::star::deployment::XPackageManager> const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, com::sun::star::uno::Reference<com::sun::star::deployment::XPackage> const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&, com::sun::star::uno::Reference<com::sun::star::deployment::XPackage>&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:565 #40 dp_manager::ExtensionManager::addExtension(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:655 #41 non-virtual thunk to dp_manager::ExtensionManager::addExtension(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::NamedValue> const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::task::XAbortChannel> const&, com::sun::star::uno::Reference<com::sun::star::ucb::XCommandEnvironment> const&) at /home/michi/development/git/libreoffice/desktop/source/deployment/manager/dp_extensionmanager.cxx:0 #42 dp_gui::ExtensionCmdQueue::Thread::_addExtension(rtl::Reference<dp_gui::(anonymous namespace)::ProgressCmdEnv> const&, rtl::OUString const&, rtl::OUString const&, bool) at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:864 #43 dp_gui::ExtensionCmdQueue::Thread::execute() at /home/michi/development/git/libreoffice/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx:738 #44 salhelper::Thread::run() at /home/michi/development/git/libreoffice/salhelper/source/thread.cxx:39 #45 threadFunc at /home/michi/development/git/libreoffice/include/osl/thread.hxx:190 #46 osl_thread_start_Impl(void*) at /home/michi/development/git/libreoffice/sal/osl/unx/thread.cxx:245 #47 start_thread at ./nptl/pthread_create.c:447 #48 clone3 at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:80 Change-Id: Idb5b20bde8c306ed14efd5467887d55fdf470202 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172643 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-28Emscripten: Support --disable-guiStephan Bergmann
Change-Id: Iab28ee0bb533b0cdabb374c982fbb898bf04aac5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172537 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-08-27vcl: Use cups_option_t** param instead of void**Michael Weghorn
Use `cups_option_t**` for the param type instead of passing the `cups_option_t**` as `void**` and casting to `cups_option_t**` again everywhere it is used. Make the `<unx/cupsmgr.hxx>` include in vcl/unx/generic/printer/ppdparser.cxx depend on `ENABLE_CUPS`, to not require the CUPS header newly included in cupsmgr.hxx otherwise. Change-Id: Iac1362866099496f59101149ca02f1477cbd2b11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172402 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-20Implement Custom Font Collections on pre-Windows 10 systemsMike Kaganski
Commit 68818db0ec0e9c308c8a0772d46af551f439b32c (build a IDWriteFontCollection1 of our FR_PRIVATE fonts, 2022-01-11) used dwrite_3.h, which has API available only starting from Windows 10. For pre-Windows 10 versions, there is a different way to implement this, as explained at https://learn.microsoft.com/en-us/windows/win32/directwrite/custom-font-collections This change implements that more complex way as a fallback, until we bump the baseline. Allows to not fall back to gdi in Skia, like with the original commit, just on older Windows versions. Change-Id: Ieca13e4a04bc72ce877ab9b512c7821d5466cb70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172090 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-19CairoSDPR: Text render needs MultiSalLayout supportArmin Le Grand (Collabora)
Change-Id: I418675012392a9707dc515eb1e05a2689ec902aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172039 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-19SalLayout::InitFont doesn't do anythingCaolán McNamara
there is a MultiSalLayout::InitFont that overrides it, but only forwards InitFont to the first child sub SalLayout, which itself then doesn't do anything. This is possibly the case since: commit 6c436ba09cb35235ce6f4065cf74c9a6ff14a4bd Date: Thu Dec 1 03:33:30 2016 +0200 Kill old Windows layout engines Change-Id: Ic0d347843257d13ee6d6f695488bd053f5a931fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172040 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-18Emscripten: Clean up SolarMutexStephan Bergmann
...before disappearing through the QApplication::exec() hole, or else the SolarMutex would remain locked forever on the application's main thread. This requires changing SalInstance::ReleaseYieldMutexAll() to SalInstance::ReleaseYieldMutex(bool all). (Further recursive locking of the SolarMutex via SolarMutexGuard instances that would be present on the call stack leading up to the call to QApplication::exec() would be released during the stack unwinding, so just undo the one acquiring done in InitVCL, not all of them.) Change-Id: I9ef57abb7da7f840999700e4eaeeefd2da784645 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171956 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-08-18cid#1557699 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1557435 COPY_INSTEAD_OF_MOVE cid#1557307 COPY_INSTEAD_OF_MOVE cid#1557209 COPY_INSTEAD_OF_MOVE cid#1557192 COPY_INSTEAD_OF_MOVE cid#1557184 COPY_INSTEAD_OF_MOVE cid#1557183 COPY_INSTEAD_OF_MOVE cid#1557171 COPY_INSTEAD_OF_MOVE cid#1557150 COPY_INSTEAD_OF_MOVE cid#1557148 COPY_INSTEAD_OF_MOVE cid#1557123 COPY_INSTEAD_OF_MOVE cid#1557118 COPY_INSTEAD_OF_MOVE cid#1557116 COPY_INSTEAD_OF_MOVE cid#1557103 COPY_INSTEAD_OF_MOVE cid#1557078 COPY_INSTEAD_OF_MOVE cid#1557075 COPY_INSTEAD_OF_MOVE cid#1557071 COPY_INSTEAD_OF_MOVE cid#1557070 COPY_INSTEAD_OF_MOVE cid#1557067 COPY_INSTEAD_OF_MOVE cid#1557049 COPY_INSTEAD_OF_MOVE cid#1557046 COPY_INSTEAD_OF_MOVE cid#1557042 COPY_INSTEAD_OF_MOVE cid#1557036 COPY_INSTEAD_OF_MOVE cid#1557030 COPY_INSTEAD_OF_MOVE cid#1557024 COPY_INSTEAD_OF_MOVE cid#1557012 COPY_INSTEAD_OF_MOVE cid#1557009 COPY_INSTEAD_OF_MOVE cid#1557008 COPY_INSTEAD_OF_MOVE cid#1557004 COPY_INSTEAD_OF_MOVE cid#1556999 COPY_INSTEAD_OF_MOVE cid#1556992 COPY_INSTEAD_OF_MOVE cid#1556987 COPY_INSTEAD_OF_MOVE cid#1556984 COPY_INSTEAD_OF_MOVE cid#1556981 COPY_INSTEAD_OF_MOVE Change-Id: Id2687aa282f4e2d4b8053b73c7aa1a74a9516b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-17Support for non-AA text on WindowsMike Kaganski
In commit 3ecd8f19a91ed7141304a2080fb11612b5ff30b3 (vcl cairo text renderer: support non-AA text, 2018-07-26) and its follow-up commit e6538f5bdd876911ea30f84a6512c03908e620fd (tdf#118966 vcl: add a flag to determine if AA of fonts is used from the system, 2018-07-28), non-antialiased text got supported in bitmap export using cairo. This change makes that support available on Windiws, including Skia. Change-Id: I1fae726539347f826e2d62246d35315e7954cf83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171967 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-08-16Keep SessionManagerInhibitor disabled for EmscriptenStephan Bergmann
...after 2f6f717073084b17e9be80e32a87200bacd1b74c "qt: Drop X11 condition for session/screensaver inhibition" caused > em++: warning: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/argon2/libargon2.a: archive is missing an index; Use emar when creating libraries to ensure an index is created [-Wemcc] > em++: warning: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/argon2/libargon2.a: adding index [-Wemcc] > wasm-ld: error: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/instdir/program/libvclplug_qt5lo.a(QtFrame.o): undefined symbol: SessionManagerInhibitor::inhibit(bool, std::__2::basic_string_view<char16_t, std::__2::char_traits<char16_t>>, ApplicationInhibitFlags, unsigned int, char const*) > wasm-ld: error: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/instdir/program/libvclplug_qt5lo.a(QtFrame.o): undefined symbol: SessionManagerInhibitor::inhibit(bool, std::__2::basic_string_view<char16_t, std::__2::char_traits<char16_t>>, ApplicationInhibitFlags, unsigned int, char const*) > em++: error: '/home/tdf/lode/emsdk/upstream/bin/wasm-ld @/tmp/emscripten_3x0hflai.rsp.utf-8' failed (returned 1) > make[1]: *** [/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_wasm/desktop/Executable_soffice_bin.mk:10: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/instdir/program/soffice.html] Error 1 (<https://ci.libreoffice.org/job/lo_daily_tb_linux_wasm/800/>). Most likely its implementation would not work on Emscripten, anyway. Change-Id: Ie7a643a8326df8c90645526930af21d54847a3ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171941 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-16cid#1557618 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1557535 COPY_INSTEAD_OF_MOVE cid#1557520 COPY_INSTEAD_OF_MOVE cid#1557513 COPY_INSTEAD_OF_MOVE cid#1557503 COPY_INSTEAD_OF_MOVE cid#1557487 COPY_INSTEAD_OF_MOVE cid#1557483 COPY_INSTEAD_OF_MOVE cid#1557479 COPY_INSTEAD_OF_MOVE cid#1557474 COPY_INSTEAD_OF_MOVE cid#1557461 COPY_INSTEAD_OF_MOVE cid#1557446 COPY_INSTEAD_OF_MOVE cid#1557445 COPY_INSTEAD_OF_MOVE cid#1557441 COPY_INSTEAD_OF_MOVE cid#1557435 COPY_INSTEAD_OF_MOVE cid#1557433 COPY_INSTEAD_OF_MOVE cid#1557429 COPY_INSTEAD_OF_MOVE cid#1557375 COPY_INSTEAD_OF_MOVE cid#1557372 COPY_INSTEAD_OF_MOVE cid#1557356 COPY_INSTEAD_OF_MOVE cid#1557350 COPY_INSTEAD_OF_MOVE cid#1557344 COPY_INSTEAD_OF_MOVE cid#1557339 COPY_INSTEAD_OF_MOVE cid#1557332 COPY_INSTEAD_OF_MOVE cid#1557330 COPY_INSTEAD_OF_MOVE cid#1557328 COPY_INSTEAD_OF_MOVE cid#1557323 COPY_INSTEAD_OF_MOVE cid#1557315 COPY_INSTEAD_OF_MOVE cid#1557313 COPY_INSTEAD_OF_MOVE cid#1557304 COPY_INSTEAD_OF_MOVE cid#1557297 COPY_INSTEAD_OF_MOVE cid#1557291 COPY_INSTEAD_OF_MOVE cid#1557290 COPY_INSTEAD_OF_MOVE cid#1557271 COPY_INSTEAD_OF_MOVE cid#1557266 COPY_INSTEAD_OF_MOVE cid#1557262 COPY_INSTEAD_OF_MOVE cid#1557259 COPY_INSTEAD_OF_MOVE cid#1557246 COPY_INSTEAD_OF_MOVE cid#1557242 COPY_INSTEAD_OF_MOVE cid#1557241 COPY_INSTEAD_OF_MOVE cid#1557236 COPY_INSTEAD_OF_MOVE cid#1557228 COPY_INSTEAD_OF_MOVE cid#1557225 COPY_INSTEAD_OF_MOVE cid#1557221 COPY_INSTEAD_OF_MOVE cid#1557217 COPY_INSTEAD_OF_MOVE cid#1557213 COPY_INSTEAD_OF_MOVE cid#1557211 COPY_INSTEAD_OF_MOVE cid#1557209 COPY_INSTEAD_OF_MOVE cid#1557205 COPY_INSTEAD_OF_MOVE cid#1557204 COPY_INSTEAD_OF_MOVE cid#1557193 COPY_INSTEAD_OF_MOVE cid#1556082 COPY_INSTEAD_OF_MOVE Change-Id: I07f195a79a69d4bac0d14317854efc88d6fe94d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171927 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-15qt: Drop X11 condition for session/screensaver inhibitionMichael Weghorn
The DBus based session/sreenlock inhibition work on Wayland just fine, and in a quick test with the qt6 VCL plugin on Plasma 5 Wayland on Debian testing, the screen saver is inhibited as expected and doesn't start while an Impress presentation is running. The code in `QtFrame::StartPresentation` being guarded by a `CHECK_ANY_QT_USING_X11` at first looks like this was all X11-only code. It already worked just fine on Wayland before that commit however, as it's a build time check only, and X11 is enabled by default at build time, and the code would run just fine on Wayland then with a null X11 Display. Drop the `CHECK_ANY_QT_USING_X11` (build-time) condition altogether, now that `USING_X11` is no more required after Change-Id: Ic46c3f18151340a5ea6c0b62a82c957fd1cd6484 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Thu Aug 15 10:13:27 2024 +0200 vcl: Allow DBus-based session inhibition without requiring X11 Move the X11-specific code into the `#if CHECK_QT5_USING_X11` block and call the overload that doesn't require an X11 Display otherwise. Change-Id: Idee0564d136e59ce54945670dee26df0cfc64d85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171896 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-15vcl: Allow DBus-based session inhibition without requiring X11Michael Weghorn
So far, building `SessionManagerInhibitor` code was conditional on `USING_X11`. Besides direct X11 API calls, it uses DBus calls to inhibit lockscreen, power management, etc. The DBus based ways don't depend on X11 at all. Therefore, build the `SessionManagerInhibitor`code on relevant platforms unless the GUI feature is disabled altogether, and make only the X11 specific code conditional on `USING_X11` in addition. Move the non-X11 specific code from the existing `SessionManagerInhibitor::inhibit` to a new overloaded version that doesn't require an (X11) `Display` param. This builds successfully in an `--enable-gui --without-x` build. Change-Id: Ic46c3f18151340a5ea6c0b62a82c957fd1cd6484 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171895 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-15vcl: Drop MATE <= 1.10 session inhibit supportMichael Weghorn
This was added in: commit 68570131013cfcf29f4c934a727053c2903e35b1 Author: Andrzej Hunt <andrzej@ahunt.org> Date: Tue Oct 20 17:24:44 2015 +0200 Add org.mate.SessionManager support This is valid for Mate <= 1.10 (As of writing, 1.10 is the current stable release - so we'll have to keep shipping this for quite a few years to come.) Change-Id: I4d1f81c50923148e710eac22f5428b2a1c41f0e9 As the commit message and code comments say, MATE >= 1.12 also uses the "org.gnome.SessionManager" interface (which is still supported), so drop the "org.mate.SessionManager" one only needed for older versions. MATE 1.12 was released on 2015-11-05, which is long enough ago by now. [1] https://mate-desktop.org/blog/2015-11-05-mate-1-12-released/ Change-Id: I062261c6396b35be1a0f452826f8ee2c545f4906 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171893 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-14qt: Remove "5" from render backend nameMichael Weghorn
The previously named "qtsvp5" and "qt5" render backends are used for both, qt5 and qt6 since the qt6 VCL plugin exists, so drop "5" from the name. Change-Id: Ia97eb14d9229bf33d40a6a383d7656f9467ad460 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171854 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-08-14UBSan SAL_USE_VCLPLUGIN=qt5 needs SvpGraphicsBackend RTTIStephan Bergmann
...as it leaks out of Library_vcl into Library_vcplug_qt5 via GenPspGraphics::m_pBackend in vcl/inc/unx/genpspgraphics.h, included from vcl/qt5/QtInstance_Print.cxx Change-Id: Id89217f1eef346b70a7f9269c2dc76e28b78ca69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171835 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
2024-08-11speed up menu construction at app startupNoel Grandin
we spend a lot of time constructing menus, mostly because we trigger events for every tiny change to a menu item Change-Id: I8f81e406b577c27c9f4bcfe23bf644d751bb5d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-08-07tdf#130857 qt weld: Implement newly added 'escape_ui_str'Michael Weghorn
Implement actual Qt-specific handling in `weld::QtInstanceWidget::escape_ui_str`, newly added in commit ee749f4b43fea3b666c9c3613b232bc8fecf73fa Date: Tue Aug 6 16:47:30 2024 +0200 add polymorph function for VCL/ui specific string escaping For a sample use, see also commit fb56e1e284925937eff4386a7e3655c0f3182640 Date: Wed Jul 31 22:25:01 2024 +0200 tdf#161909: Escape filepaths for password dialog. (See also `vclToQtStringWithAccelerator`, but which would result in the accelerator character '~' to be preserved/converted as an accelerator, which is unintended here.) While at it, also fix a typo in the doc. Change-Id: Ic557a1aa8c6b46257a231627d817f1f7e1d101cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171586 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-07add polymorph function for VCL/ui specific string escapingMoritz Duge
Change-Id: Ie896a1050158acc85f66b8705812e5f6b9717070 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171509 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-08-07cool#9704 calc jsdialog autofilter send disabled entry informationJaume Pujantell
Added the code necessary to disable already filtered entries on jsdialog autofilter, like it is done on desktop UI. Change-Id: I095b7fe0054efcaff2717d05a2ab7bd1d8248b29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171246 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 2815d11bb608a933e14b799cc802825423426d28) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171530 Tested-by: Jenkins
2024-08-07tdf#130857 qt weld: Implement {s,g}et_tooltip_textMichael Weghorn
Change-Id: I02ab861a9e82840c62bbb61ba53a699881519796 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171560 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-07tdf#130857 qt weld: Implement focus-related methodsMichael Weghorn
Change-Id: I064ff205ceb9d008667cf3a3a6e73047ea5ca3e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171556 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-07tdf#130857 qt weld: Implement QtInstanceWidget::{g,s}et_sensitiveMichael Weghorn
In a quick test, this makes the "More" button in the dialog from the tdf#162351 use case to become insensitive (i.e. greyed out) as expected with this additional local change applied for testing: diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 07891f773cfd..ad06210c8149 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -509,6 +509,7 @@ void OSQLMessageBox::impl_addDetailsButton() m_xDialog->add_button(GetStandardText(StandardButtonType::More), RET_MORE); m_xMoreButton.reset(m_xDialog->weld_widget_for_response(RET_MORE)); m_xMoreButton->connect_clicked(LINK(this, OSQLMessageBox, ButtonClickHdl)); + m_xMoreButton->set_sensitive(false); } } Change-Id: I0b7a21364eddb707435a796c54b274ff438f8063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171553 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-07tdf#162351 tdf#130857 qt weld: Handle button clickMichael Weghorn
In `QtInstanceButton`, connect the `QPushButton::clicked` signal with a newly introduced slot that calls `signal_clicked` from the `weld::Button` base class, which calls the click handler. With this in place, clicking the "More" button in the dialog shown when following the steps from tdf#162351 now actually results in an "Error Details" dialog with more information to show up. Change-Id: I6df43af3ad3bf35b94e712aaaf0158bd7ab57907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171552 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-07 tdf#162351 tdf#130857 qt weld: Implement weld_widget_for_responseMichael Weghorn
... for `QtInstanceMessageDialog`. This fixes the crash reported in tdf#162351 due to a nullptr deref in `OSQLMessageBox::impl_addDetailsButton` that was seen with the base class implementation `QtInstanceDialog::weld_widget_for_response` that just returns nullptr. Clicking the "More" button in that dialog doesn't yet show the corresponding dialog, but that will be implemenated separately. Change-Id: I8cd4fac4fd57be993dba1713bb2e19860dfc334b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171551 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-07tdf#162351 tdf#130857 qt weld: Extract helper function to get buttonMichael Weghorn
... for response code. The new helper method `QtInstanceMessageDialog::buttonForResponseCode` will be reused elsewhere in an upcoming commit. Change-Id: Ie7ee065fb68f936b79ac96ba70dc85ffa18c9859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171550 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-07tdf#162351 tdf#130857 qt weld: Add basic QtInstanceButtonMichael Weghorn
Add a very basic native Qt implementation for `weld::Button`. It currently doesn't really implement many methods and just triggers an assert when they get called. Change-Id: I7a15266e978ca3bb030c847822a82d8d58c4c189 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171549 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-08-05CairoSDPR: direct text rendering using CairoArmin Le Grand (Collabora)
I have added basic support for the text primitives (TextSimplePortionPrimitive2D) to the SDPR Cairo renderer. It can now basically render Text using a fallback to the already existing CairoTextRender. NOTE: This is not yet complete, but for discussion. Change-Id: I9b0c7b6bb4892905576593ef4e2b4071c7663c63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171429 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-08-04Resolves: tdf#154959 label printers no longer rotateCaolán McNamara
a) partly revert this piece of: commit 598ff4e2433a419a432fd54ed5dac560663ec107 loplugin:constantparam in vcl b) fix the thinko mismatch of "true" for bSwaped detected by that plugin Change-Id: I2d31a969538d1cfa8d22a089fa61fdaa5454cc0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171449 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-02tdf#162259: correctly handle font width on WindowsMike Kaganski
Unlike other platforms, on Windows, the font width is not relative to font height, but to average width of font's glyphs. This is mentioned in LogicalFontInstance::GetScale. 1. In VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D, when calculating the correction for width / height (introduced in commit cc3663bbaed4f65d64154e5f9abb51a5f622f710, 2024-04-20), the already applied X scale is now calculated using unscaled font's width. 2. Commit 8557ea84c9336ba8061246f1f46ddb6e02f413a1 (Exclude getHScale from DirectWrite font rendering, 2024-04-08) was effectively reverted, because I was wrong assuming that the code there was unnecessary. 3. Commit 2092df2a9044f1c2ae4379f48a3201e5867575a8 (tdf#161154: pass "scaling is done externally" information down the stack, 2024-05-18) was also reverted. Change-Id: I8cff39b67a6efd380f7807f5655f401bdb62cc3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171382 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-08-02tdf#155447 a11y: Introduce weld::Widget::get_accessible_id()Michael Weghorn
This will be used in an upcoming commit to implement reporting of the accessible ID for `WeldEditView`. For Qt 6, this uses the API introduced in qtbase commit [1] commit b8b7c58402740204da72e1b1f4ea7321b7bfa540 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Jul 15 16:53:58 2024 +0200 a11y: Add property for QWidget's accessible ID For GTK 4, there is currently no corresponding API; issue [2] suggests to add it. [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=b8b7c58402740204da72e1b1f4ea7321b7bfa540 [2] https://gitlab.gnome.org/GNOME/gtk/-/issues/6870 Change-Id: I9bf38b3c2d6d0cf627ac4288695dcc1137c3d120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171319 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-07-25tdf#143148 Use pragma once instead of include guardsAshok
Change-Id: I4d29ac20dc56b32d394beada19f7f1d8f99d22ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170985 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>