summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2024-11-07tdf#130857 qt weld: Don't set negative min width/heightMichael Weghorn
While gtk_widget_set_size_request supports -1 for the width/height as a special value to unset the requested minimum width/height [1], Qt doesn't, and warns when this gets passed. Therefore, ensure not to use negative values. [1] https://docs.gtk.org/gtk3/method.Widget.set_size_request.html Change-Id: I4ad6a3fa149138bcfdfeede1f2dc1bdfc5425e2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176178 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-07tdf#130857 qt weld: Take SolarMutex in QtInstanceLinkButton::linkActivatedMichael Weghorn
Apparently the expectation is that the SolarMutex is held when calling weld::signal_activate_link. At least, not doing so would trigger an assert when clicking a hyperlink in the "Help" -> "Show Tip of the Day" dialog when using the qt6 VCL plugin started with SAL_VCL_QT_USE_WELDED_WIDGETS=1 set: 1 __pthread_kill_implementation pthread_kill.c 44 0x7f083869de5c 2 __pthread_kill_internal pthread_kill.c 78 0x7f083869debf 3 __GI_raise raise.c 26 0x7f0838649c82 4 __GI_abort abort.c 79 0x7f08386324f0 5 __assert_fail_base assert.c 94 0x7f0838632418 6 __assert_fail assert.c 103 0x7f0838642592 7 ImplDbgTestSolarMutex dbggui.cxx 35 0x7f082fa2dd3e 8 DbgTestSolarMutex debug.cxx 54 0x7f0837b2bec0 9 vcl::WindowOutputDevice::AcquireGraphics window.cxx 822 0x7f082f306276 10 OutputDevice::IsNativeControlSupported nativecontrols.cxx 139 0x7f082f584492 11 vcl::Window::IsNativeControlSupported window3.cxx 77 0x7f082f2fd8b9 12 Dialog::ImplInitSettings dialog.cxx 524 0x7f082f167189 13 Dialog::ImplInitDialog dialog.cxx 495 0x7f082f167086 14 Dialog::Dialog dialog.cxx 586 0x7f082f167d92 15 MessageDialog::MessageDialog layout.cxx 2521 0x7f082f1df4a6 16 VclPtr<MessageDialog>::Create<vcl::Window *&, long&> vclptr.hxx 129 0x7f082f0e8fa6 17 VclBuilder::makeObject builder.cxx 1605 0x7f082f0c5326 18 VclBuilder::insertObject builder.cxx 2454 0x7f082f0d09eb 19 WidgetBuilder<vcl::Window, VclPtr<vcl::Window>>::handleObject widgetbuilder.hxx 213 0x7f082f145937 20 WidgetBuilder<vcl::Window, VclPtr<vcl::Window>>::handleChild widgetbuilder.hxx 107 0x7f082f0f13ce 21 WidgetBuilder<vcl::Window, VclPtr<vcl::Window>>::processUIFile widgetbuilder.hxx 49 0x7f082f0e1b78 22 VclBuilder::VclBuilder builder.cxx 520 0x7f082f0ba596 23 SalInstanceBuilder::SalInstanceBuilder salvtables.cxx 7088 0x7f082fa7b318 24 std::make_unique<SalInstanceBuilder, vcl::Window *&, rtl::OUString const&, rtl::OUString const&> unique_ptr.h 1077 0x7f082fa99ef9 25 SalInstance::CreateBuilder salvtables.cxx 7470 0x7f082fa7f468 26 QtInstance::CreateBuilder QtInstance.cxx 843 0x7f08254e89e5 27 non-virtual thunk to QtInstance::CreateBuilder(weld::Widget *, rtl::OUString const&, rtl::OUString const&) 0x7f08254e8a4c 28 Application::CreateBuilder builder.cxx 198 0x7f082f0b7f02 29 weld::MessageDialogController::MessageDialogController weldutils.cxx 65 0x7f082fb52635 30 (anonymous namespace)::HelpManualMessage::HelpManualMessage sfxhelp.cxx 958 0x7f0834939fb0 31 SfxHelp::Start_Impl sfxhelp.cxx 1283 0x7f08349369ec 32 SfxHelp::Start sfxhelp.cxx 642 0x7f08349389fe 33 TipOfTheDayDialog::OnLinkClick tipofthedaydlg.cxx 261 0x7f07b37ebb64 34 TipOfTheDayDialog::LinkStubOnLinkClick tipofthedaydlg.cxx 251 0x7f07b37eb99d 35 Link<weld::LinkButton&, bool>::Call link.hxx 111 0x7f082552dc26 36 weld::LinkButton::signal_activate_link weld.hxx 1688 0x7f082552d95c 37 QtInstanceLinkButton::linkActivated QtInstanceLinkButton.cxx 58 0x7f082552ba6d 38 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QtInstanceLinkButton:: *)(QString const&)>::call(void (QtInstanceLinkButton:: *)(QString const&), QtInstanceLinkButton *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 127 0x7f082552e074 39 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QtInstanceLinkButton:: *)(QString const&)>::call(void (QtInstanceLinkButton:: *)(QString const&), QtInstanceLinkButton *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QtInstanceLinkButton:: *)(QString const&)>::call(void (QtInstanceLinkButton:: *)(QString const&), QtInstanceLinkButton *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 65 0x7f082552df99 40 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QtInstanceLinkButton:: *)(QString const&)>::call qobjectdefs_impl.h 126 0x7f082552ded3 41 QtPrivate::FunctionPointer<void (QtInstanceLinkButton:: *)(QString const&)>::call<QtPrivate::List<QString const&>, void> qobjectdefs_impl.h 174 0x7f082552de4d 42 QtPrivate::QCallableObject<void (QtInstanceLinkButton:: *)(QString const&), QtPrivate::List<QString const&>, void>::impl qobjectdefs_impl.h 545 0x7f082552dd76 43 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 461 0x7f082465ab72 44 doActivate<false> qobject.cpp 4127 0x7f0824718ee4 45 QMetaObject::activate qobject.cpp 4187 0x7f082470eb83 46 QLabel::linkActivated moc_qlabel.cpp 386 0x7f08228ddb72 47 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QLabel:: *)(QString const&)>::call(void (QLabel:: *)(QString const&), QLabel *, void * *)::{lambda()#1}::operator()() const qobjectdefs_impl.h 127 0x7f08228e29a8 48 QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QLabel:: *)(QString const&)>::call(void (QLabel:: *)(QString const&), QLabel *, void * *)::{lambda()#1}>(void * *, QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QLabel:: *)(QString const&)>::call(void (QLabel:: *)(QString const&), QLabel *, void * *)::{lambda()#1}&&) qobjectdefs_impl.h 65 0x7f08228e291d 49 QtPrivate::FunctorCall<std::integer_sequence<unsigned long, 0ul>, QtPrivate::List<QString const&>, void, void (QLabel:: *)(QString const&)>::call qobjectdefs_impl.h 126 0x7f08228e28d7 50 QtPrivate::FunctionPointer<void (QLabel:: *)(QString const&)>::call<QtPrivate::List<QString const&>, void> qobjectdefs_impl.h 174 0x7f08228e2841 51 QtPrivate::QCallableObject<void (QLabel:: *)(QString const&), QtPrivate::List<QString const&>, void>::impl qobjectdefs_impl.h 545 0x7f08228e276b 52 QtPrivate::QSlotObjectBase::call qobjectdefs_impl.h 461 0x7f082465ab72 53 doActivate<false> qobject.cpp 4127 0x7f0824718ee4 54 QMetaObject::activate qobject.cpp 4187 0x7f082470eb83 55 QWidgetTextControl::linkActivated moc_qwidgettextcontrol_p.cpp 806 0x7f0822a5a415 56 QWidgetTextControlPrivate::activateLinkUnderCursor qwidgettextcontrol.cpp 2962 0x7f0822a544c1 57 QWidgetTextControlPrivate::keyPressEvent qwidgettextcontrol.cpp 1242 0x7f0822a50454 58 QWidgetTextControl::processEvent qwidgettextcontrol.cpp 1024 0x7f0822a4f23b 59 QWidgetTextControl::processEvent qwidgettextcontrol.cpp 984 0x7f0822a4f0c1 60 QLabelPrivate::sendControlEvent qlabel.cpp 1557 0x7f08228db3c4 61 QLabel::keyPressEvent qlabel.cpp 912 0x7f08228db7fe [...] Change-Id: I20f11ff2e7c00e65098bd7fb39afefdc4a622138 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176175 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-07tdf#130857 qt weld: Declare support for "Tip of the Day" dialogMichael Weghorn
Add .ui file for the dialog that can be triggered via "Help" -> "Show Tip of the Day" to the list of supported .ui files. This means that native Qt widgets are used for that dialog now when LO gets started with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. This dialog makes use of the QtInstanceDrawingArea logic implemented in previous commits. Change-Id: Id252e38e2eb9265276457ab64d582f71d628e369 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176174 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-07tdf#130857 qt weld: Implement simple drawing in QtInstanceDrawingAreaMichael Weghorn
Implement simple drawing in QtInstanceDrawingArea by handling the QEvent::Resize and QEvent::Paint events for the QLabel widget. While the QLabel does not emit any signals when these events occur, it's possible to handle them by setting an event filter using QObject::installEventFilter [1]. Install QtInstanceDrawingArea as an event filter for its label, and implement handling of the Resize and Paint event in QtInstanceDrawingArea::eventFilter: On the QEvent::Resize event, adjust the output size of the output device and call the `weld::Widget::m_aSizeAllocateHdl` handler. (See also GtkInstanceDrawingArea::signal_size_allocate and SalInstanceDrawingArea::ResizeHdl to see what the gtk3 and VCL implementations do.) On the QEvent::Paint event, trigger drawing on the output device via the weld::DrawingArea::m_aDrawHdl handler, and get a QPixmap for what's painted on the output device and set that QPixmap for the label if it has changed. With this in place, the GtkDrawingArea in the "Help" -> "Show Tip of the Day" dialog displays the image as expected, and gets updated when moving to the next tip, once support for that dialog has been declared, which will be done in an upcoming commit. For more complex cases, a more performant solution might become necessary and can be investigated once support for these is implemented. For the "Tip of the Day" dialog, the `aRect` passed in QtInstanceDrawingArea::handlePaintEvent is irrelevant as CuiGraphicPreviewWindow::Paint doesn't make use of the passed rectangle. (This might also have to be reconsidered/adjusted in case a dialog actually making use of the rectangle doesn't work as expected.) [1] https://doc.qt.io/qt-6/qobject.html#installEventFilter Change-Id: I651e00043fac04a4c77aae921e6397e8d97cc69c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176173 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-07tdf#130857 qt weld: Implement QtInstanceWidget::{g,s}et_size_requestMichael Weghorn
As described at [1], gtk_widget_set_size_request sets the minimum size. Therefore, get/set the QWidget::minimumSize property [2] for the QtInstanceWidget implementation using a native QWidget. [1] https://docs.gtk.org/gtk3/method.Widget.set_size_request.html [2] https://doc.qt.io/qt-6/qwidget.html#minimumSize-prop Change-Id: I38b9d02b81ed209b2acc94c2b9b015f32c6eec79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176172 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-07tdf#130857 qt weld: Add QtInstanceDrawingArea basicsMichael Weghorn
Add a new QtInstanceDrawingArea class as the weld::DrawingArea implementation using native Qt widgets. Initially only add the "basic structure" (most of the actual functionality of drawing will be added separately): * Add the QtInstanceDrawingArea class with most methods currently still unimplemented and triggering an assert when they get called. * Add a `ScopedVclPtrInstance<VirtualDevice> m_xDevice` member and return that in `QtInstanceDrawingArea::get_ref_device`, as the gtk3 implementation (GtkInstanceDrawingArea) does. * Let QtBuilder::makeObject create a QLabel for a "GtkDrawingArea" object for now. That label will hold a pixmap (which should be sufficient for simple cases at least). * Let QtInstanceBuilder::weld_drawing_area return an instance of the new class. Change-Id: I5d509ccd9f5a7a826a166958af4a92ff01cc0225 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176171 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-07tdf#130857 qt weld: Support "GtkSeparator"Michael Weghorn
Handle "GtkSeparator" objects in .ui files: Create a QFrame and, depending on the orientation set a shape of either QFrame::HLine ("QFrame draws a horizontal line that frames nothing (useful as separator)") or QFrame::VLine ("QFrame draws a vertical line that frames nothing (useful as separator)") [1]. This will be used e.g. in the "Help" -> "Show Tip of the Day" dialog. [1] https://doc.qt.io/qt-6/qframe.html#Shape-enum Change-Id: I41e69dd211cbb69cb7b23cc54640cd1fad655efc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176165 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-07[API CHANGE] a11y: Switch AccessibleRelationType to enumMichael Weghorn
Switch css::accessibility::AccessibleRelationType from integer constants to an enum. This provides more type safety and improves the debugging experience, e.g. GDB now prints com::sun::star::accessibility::AccessibleRelationType::AccessibleRelationType_CONTENT_FLOWS_TO instead of just "2" when printing the value of a corresponding variable, so it's no longer necessary to manually look up what constant has that integer value to know what relation this refers to. offapi/com/sun/star/accessibility/AccessibleRelationType.idl had this comment: > <p>We are using constants instead of a more typesafe enum. The reason > for this is that IDL enums may not be extended. Therefore, in order to > include future extensions to the set of roles we have to use constants > here.</p> However, the a11y UNO API is internal (not published), so that shouldn't be a concern. Change-Id: I44a7d56cb085dc24effb24fcd34bb222b78ef4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176153 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-07a11y tests: Map DESCRIBED_BY relation type to AT-SPIMichael Weghorn
Change-Id: I9d0122459cf0a90ce1c49c6bdc07b24ff93bc417 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176152 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-06tdf#158943 Libreoffice Theme Part 3: Qt Color CustomizationSahil Gautam
Enable UI color customization in QT via the use of custom palettes and custom style objects for the application, and the native widgets like the menus and the menubar. Menubar in `kf6` doesn't follow the set palette's colors anymore, maybe some update from kde/qt (something to look into). Works fine for `kf5`. ticket: https://bugs.kde.org/show_bug.cgi?id=493550 Change-Id: Ibedd6d66b8ea2855e049a85b3d51ea7e933b5c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168901 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
2024-11-06Libreoffice Theme Part 1.0: Make registry colors accessible from VCLSahil Gautam
Enable UI color customization via an extension. This patch doesn't include any UI changes as that needs to be discussed with the community first (ticket: https://bugs.documentfoundation.org/show_bug.cgi?id=163620) Part 1.0 (this change) is responsible for loading all the ThemeColors from the registry into a `static ThemeColors` object, which then is accessed in various VCL_PLUGINS as a source for the application colors. The user now has to go to the registry (expert configuration), and enable the theme by setting "LibreofficeTheme" to "true". It can also be enabled via an extension (demonstrated in the Theme Template). `testGetViewRenderState` changes to "Dark" scheme which is not present. Changes in this patch don't allow that and use 'Automatic' as the fallback. This caused the unit test to fail. So the test was changed to have "Dark" scheme before changing to it. Theme Template: https://github.com/printfdebugging/libreoffice-theme-template Project Report: https://printfdebugging.in/libreoffice/01-themes-gsoc-2024/ Change-Id: I5193d4d34fcd2f4c5d6f124a871bd5c7f14e95a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168016 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-11-06tdf#130857 qt weld: Add layout/widget for extra msg dialog controlsMichael Weghorn
weld::MessageDialog::weld_message_area needs to return a weld::Container that can be used to insert additional controls into a message dialog. In order to implement this for QtInstanceMessageDialog, insert an additional widget with a QVBoxLayout layout into the QMessageBox layout, and return that one. In order to ensure that the extra controls are inserted in between the labels holding the text in the message dialog and the button box, make use of the known implementation detail that Qt's QMessageBox uses QGridLayout for its layout (see QMessageBoxPrivate::setupLayout in qtbase [1]), find where the last label is positioned, shift everything after the last label down by one row in the grid layout, then insert the extra widget in the now empty row. If QMessageBox internals ever change to use a different layout,..., then this will have to be adjusted in the future, but it works fine in my tests with both, Qt 5.15 and current qtbase dev (as of commit 4c0b45553862d3eff35906d02ea5e2afd9252bbd). This will be needed e.g. by the "LibreOfficDev Help Not Installed" dialog that shows up when pressing F1 in a build not including the local help. [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/dialogs/qmessagebox.cpp?id=4c0b45553862d3eff35906d02ea5e2afd9252bbd#n290 Change-Id: I2153add5145a4655800ca89f8e943610014b1021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176091 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-06tdf#130857 qt weld: Implement QtInstanceContainer::moveMichael Weghorn
As documented in include/vcl/weld.hxx, the new parent can be null, in which case the widget is only removed from the current container. In that case, mark the widget for deletion, as there's no more parent that owns the widget and would take care of deleting it when getting deleted itself. Change-Id: I1b3374683629a841f5101098b967cc5cf75d4f69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176090 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-06tdf#130857 qt weld: Implement QtInstanceWidget::weld_parentMichael Weghorn
Change-Id: Ie26a40badb891f17b26b9e9202709a3edb909a05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176089 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-06tdf#130857 qt weld: Assert in unimplemented QtInstanceContainer methodsMichael Weghorn
This way, implementations needed by any dialog that will be declared as supported in the future will become clear, rather than going unnoticed, with the functionality not working as expected. Change-Id: I27eba58c829586fff5566cc88983013429ca0b68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176088 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-06tdf#130857 qt weld: Implement QtInstanceBuilder::weld_containerMichael Weghorn
Create a QtInstanceContainer, passing the layout's parent widget in the ctor. See also preparatory commit commit bf42162fc50d0c6f8e567d8765f8b14b96d7cc50 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Mon Nov 4 19:06:15 2024 +0100 tdf#130857 qt weld: Add extra QWidget parents for layouts to ensure that layouts actually have an associated QWidget parent. Change-Id: Id95e1649d6a8b38eb2b685dc85b486920537d8ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176087 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-06tdf#95239 sw: fix wrong order of PDF ToC, if headings put in text framesLászló Németh
PDF outlines (called also as PDF bookmarks or ToC) contained headings in the wrong order if they were placed in a text frame: Heading 2 (frame) ... 2 Heading 3 (frame) ... 2 Heading 1 ........... 1 Now PDF export didn't list text frame headings only at the start of the ToC, but in their correct position and hierarchy, based on the page and vertical position of the headings: Heading 1 ................ 1 Heading 2 (frame) ...... 2 Heading 3 (frame) ... 2 This is useful for the recently implemented inline headings, where e.g. APA Style Heading 4 and Heading 5 are there in text frames anchored as characters, see tdf#48459. Extend PDFium test environment for bookmarks, and add tdf#131728 DOCX and an APA Style .fodt unit tests. Note: if the higher headings are only in text frames, but not the lower ones, only the order corrected, but not the full hierarchy, yet. This is a follow-up to commit d87cf67f8f3346a1e380383917a3a4552fd9248e "tdf#131728 sw inline heading: fix missing/broken DOCX export", commit a1dcbd1d1ce6071d48bb5df26d7839aeb21b75a8 "tdf#48459 sw inline heading: add Inline Heading frame style" and commit 49765a9e7be41d4908729ff7d838755276b244cb "tdf#48459 tdf#131728 sw inline heading: new frame style: fix DOCX export". Change-Id: I87dffb9244d8aea553c98bf16c70955bb9b732d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176050 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
2024-11-06win: Prefer integers instead of strings for OS version comparisonMichael Weghorn
* Add a WinOSVersionInfo struct holding the major and minor version and build number for a Windows release. * Extract a static WinSalInstance::getWinOSVersionInfo from WinSalInstance::getOSVersion that returns a corresponding version info. * Adjust the local getOSVersionString helper to take integers for major and minor version instead of an "NT version" string that is a dot-separated version number containing both of these. * Use WinSalInstance::getWinOSVersionInfo in ImplDrawNativeControl to compare the major version + build number to identify Windows 11 instead of relying on WinSalInstance::getOSVersion to return a string starting with "Windows 11". Change-Id: I6fe727c1c0f928c03216e406cdb1b7735c1ab3ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176059 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-06cid#1556442 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1607753 COPY_INSTEAD_OF_MOVE cid#1554790 COPY_INSTEAD_OF_MOVE cid#1556463 COPY_INSTEAD_OF_MOVE cid#1554838 COPY_INSTEAD_OF_MOVE cid#1556231 COPY_INSTEAD_OF_MOVE cid#1556878 COPY_INSTEAD_OF_MOVE cid#1554913 COPY_INSTEAD_OF_MOVE cid#1558064 COPY_INSTEAD_OF_MOVE cid#1557043 COPY_INSTEAD_OF_MOVE cid#1556985 COPY_INSTEAD_OF_MOVE cid#1556766 COPY_INSTEAD_OF_MOVE cid#1557351 COPY_INSTEAD_OF_MOVE cid#1554863 COPY_INSTEAD_OF_MOVE cid#1556764 COPY_INSTEAD_OF_MOVE cid#1556279 COPY_INSTEAD_OF_MOVE cid#1555970 COPY_INSTEAD_OF_MOVE cid#1556942 COPY_INSTEAD_OF_MOVE cid#1557964 COPY_INSTEAD_OF_MOVE cid#1555166 COPY_INSTEAD_OF_MOVE cid#1556496 COPY_INSTEAD_OF_MOVE cid#1557175 COPY_INSTEAD_OF_MOVE cid#1558054 COPY_INSTEAD_OF_MOVE cid#1557392 COPY_INSTEAD_OF_MOVE cid#1557850 COPY_INSTEAD_OF_MOVE cid#1555118 COPY_INSTEAD_OF_MOVE cid#1557131 COPY_INSTEAD_OF_MOVE cid#1556614 COPY_INSTEAD_OF_MOVE cid#1609650 COPY_INSTEAD_OF_MOVE cid#1555114 COPY_INSTEAD_OF_MOVE cid#1555241 COPY_INSTEAD_OF_MOVE cid#1555442 COPY_INSTEAD_OF_MOVE cid#1556473 COPY_INSTEAD_OF_MOVE cid#1557654 COPY_INSTEAD_OF_MOVE cid#1554689 COPY_INSTEAD_OF_MOVE cid#1556316 COPY_INSTEAD_OF_MOVE cid#1557929 COPY_INSTEAD_OF_MOVE cid#1554807 COPY_INSTEAD_OF_MOVE cid#1554858 COPY_INSTEAD_OF_MOVE cid#1555103 COPY_INSTEAD_OF_MOVE cid#1555517 COPY_INSTEAD_OF_MOVE cid#1556424 COPY_INSTEAD_OF_MOVE cid#1557252 COPY_INSTEAD_OF_MOVE cid#1557566 COPY_INSTEAD_OF_MOVE cid#1608020 COPY_INSTEAD_OF_MOVE cid#1557742 COPY_INSTEAD_OF_MOVE cid#1555884 COPY_INSTEAD_OF_MOVE cid#1554809 COPY_INSTEAD_OF_MOVE cid#1555336 COPY_INSTEAD_OF_MOVE cid#1555173 COPY_INSTEAD_OF_MOVE cid#1556067 COPY_INSTEAD_OF_MOVE cid#1557040 COPY_INSTEAD_OF_MOVE cid#1556235 COPY_INSTEAD_OF_MOVE cid#1557366 COPY_INSTEAD_OF_MOVE cid#1555910 COPY_INSTEAD_OF_MOVE cid#1556716 COPY_INSTEAD_OF_MOVE cid#1558022 COPY_INSTEAD_OF_MOVE cid#1555769 COPY_INSTEAD_OF_MOVE cid#1555940 COPY_INSTEAD_OF_MOVE cid#1557077 COPY_INSTEAD_OF_MOVE cid#1555270 COPY_INSTEAD_OF_MOVE cid#1555660 COPY_INSTEAD_OF_MOVE cid#1556302 COPY_INSTEAD_OF_MOVE cid#1555678 COPY_INSTEAD_OF_MOVE cid#1556538 COPY_INSTEAD_OF_MOVE cid#1557689 COPY_INSTEAD_OF_MOVE cid#1555009 COPY_INSTEAD_OF_MOVE cid#1555433 COPY_INSTEAD_OF_MOVE cid#1555671 COPY_INSTEAD_OF_MOVE cid#1555255 COPY_INSTEAD_OF_MOVE cid#1557681 COPY_INSTEAD_OF_MOVE cid#1557512 COPY_INSTEAD_OF_MOVE cid#1554958 COPY_INSTEAD_OF_MOVE cid#1555758 COPY_INSTEAD_OF_MOVE cid#1555597 COPY_INSTEAD_OF_MOVE cid#1558040 COPY_INSTEAD_OF_MOVE cid#1556476 COPY_INSTEAD_OF_MOVE cid#1557646 COPY_INSTEAD_OF_MOVE cid#1557950 COPY_INSTEAD_OF_MOVE cid#1557019 COPY_INSTEAD_OF_MOVE cid#1557885 COPY_INSTEAD_OF_MOVE cid#1556402 COPY_INSTEAD_OF_MOVE cid#1557906 COPY_INSTEAD_OF_MOVE cid#1556619 COPY_INSTEAD_OF_MOVE cid#1554683 COPY_INSTEAD_OF_MOVE cid#1556549 COPY_INSTEAD_OF_MOVE cid#1554747 COPY_INSTEAD_OF_MOVE cid#1554929 COPY_INSTEAD_OF_MOVE cid#1555362 COPY_INSTEAD_OF_MOVE cid#1557053 COPY_INSTEAD_OF_MOVE cid#1557891 COPY_INSTEAD_OF_MOVE cid#1555043 COPY_INSTEAD_OF_MOVE cid#1555107 COPY_INSTEAD_OF_MOVE cid#1557203 COPY_INSTEAD_OF_MOVE cid#1556728 COPY_INSTEAD_OF_MOVE cid#1557773 COPY_INSTEAD_OF_MOVE cid#1556845 COPY_INSTEAD_OF_MOVE Change-Id: I001fb67e597b096e992fd8a0cd6f3ec577767c33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176098 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-11-06loplugin:passstuffbyref in vclNoel Grandin
Change-Id: Id152f7321bb81ecb17b31775277d1466ccd91ab4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176108 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-11-06tdf#163731 Style names cropped in Stylist in Writer's SidebarNoel Grandin
regression from commit 7f42f031ed1b9f374f3fcba9c814dc5862492026 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Oct 10 09:39:14 2024 +0200 tdf#100894 speed up style tree creation Change-Id: I94f7f3edd4dc31a2a86ddd73a79f276d6c30509c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176107 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-06Related: tdf#163730 Release the object in separate threadMike Kaganski
Using a local build having both commits 9f53d40fd19b22fe1bdbf64e8ce751cf53f4f517 "Related: tdf#163730 Avoid deadlock", 2024-11-02, and 3015db08c9a8a1b29af1018044955c905c9015aa "Related: tdf#163730 Avoid potential deadlock", 2024-11-03, I got another deadlock (unfortunately, I didn't copy call stacks), where main thread, holding soler mutex, called CWinClipboard::setContents, and that tried to lock solar mutex in CMtaOleClipboard::run thread, which released the m_foreignContent data. This change releases m_foreignContent in a separate thread, which has no dependencies, and so its wait wouldn't block other threads. Change-Id: If4c486e6f3ba9201c4c9c6991992e38929ab3b81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176047 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-05tdf#130857 qt weld: Add extra QWidget parents for layoutsMichael Weghorn
For "GtkBox" and "GtkGrid" objects in .ui files, don't just create the corresponding QLayout objects, but create an extra QWidget object and set the layout for that widget, i.e. use that QWidget as the parent. While this generally wouldn't be needed to properly layout/handle things in Qt, having an associated QWidget for the "GtkBox" and "GtkGrid" children is needed in order to be able to create a corresponding weld::Container (QtInstanceContainer) for these, which derives from weld::Widget. QLayout itself doesn't have the methods required to implement weld::Widget, e.g. can't be hidden or shown. Therefore, create a QWidget for these in addition, except for special cases like the top-level layout in a dialog or the dialog's button box. For QGroupBox (created for "GtkFrame" objects), this now means that the direct child is no more necessarily a layout. Just setting a QWidget as a child wouldn't suffice for proper layouting. Therefore, explicitly create a layout for parent widgets that don't have a layout set yet. Adjust QtBuilder::applyPackingProperties accordingly as well. Now, there's no more use case to call QtBuilder::applyGridPackingProperties with a QLayout for the current child. Get the corresponding QWidget parent (if there is one) before calling the method instead, and switch the param from QObject* to QWidget* to simplify the method. Having an extra widget might have the side-effect that extra spacing/margins might be used. If that turns out to be a problem, these can presumably explicitly be reduced (e.g. set to 0 for the relevant objects) as needed later. At least the 19 dialogs currently listed as supported in QtInstanceBuilder::IsUIFileSupported still look OK to me in a quick test with this commit in place. Actually making use of the newly added widgets to implement more of the QtInstanceContainer logic will be done in separate commits. Change-Id: I3d3600ddfc7883239177aafed57629c107cbdf5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176033 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-05tdf#130857 qt weld: Declare support for password dialogMichael Weghorn
Add .ui file for the password that can be triggered via "File" -> "Properties" -> "Security" -> "Protect..." in Writer. This means that native Qt widgets are used for that dialog now when LO gets started with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. Change-Id: I106444178cd89b0f37b97bb528a144652fbb2567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176019 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-05tdf#130857 qt weld: Implement QtInstanceEntry::set_message_typeMichael Weghorn
For weld::EntryMessageType::Warning and weld::EntryMessageType::Error, set a warning/error icon from the icon theme at the end of the entry using QLineEdit::addAction. The GTK implementation (GtkInstanceEntry::set_message_type) also does this. That one also sets a background color, which the Qt implementation doesn't do for now. This method is used e.g. by the "File" -> "Properties" -> "Security" -> "Protect..." dialog in Writer, which will be declared as supported in an upcoming commit. Change-Id: I96b81e28faf82f17e33195cfa981c82522f59b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176018 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-05tdf#130857 qt weld: Make opt-in for nowMichael Weghorn
Except for the simple message dialogs created in QtInstance::CreateMessageDialog, disable the use of native Qt dialogs by default for now, and only use those if the user explicitly opts in to use them by setting the SAL_VCL_QT_USE_WELDED_WIDGETS environment variable. While those dialogs declared as supported in QtInstanceBuilder::IsUIFileSupported are meant to be fully functional, they are only a small subset of all LO dialogs and not all properties for widgets are evaluated by QtBuilder at this point in time (e.g. not all spacing, margins, text formatting properties,...). Therefore, default to VclBuilder again for now in order to have a more consistent visual appearance for dialogs with the Qt-based VCL plugins. This can be reconsidered in the future, but at least for 25.2, sticking to VclBuilder by default seems reasonable to me. Change-Id: I7b275d3d3759093a6680327faeb3b86d7c623cea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176013 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-04pdf: move encryption methods into PDFEncryptor filesTomaž Vajngerl
Moving more PDF encryption implementation into common encryption files. This will make it easier to add new encryption later on as the code will be in one place. Change-Id: Id40c2f876a2e92bb8db27024a0e251befc5059e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176030 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04pdf: move EncHashTransporter into own filesTomaž Vajngerl
Also rename to EncryptionHashTransporter. Change-Id: I20f984af4428e1182c77dbce4343d69c106063a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176029 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04pdf: move some encryption code into PDFEncryptor classTomaž Vajngerl
Refactored the code to make encryption easier to change. Change-Id: I24b831781d4acd6329838dbf2468e9df6efad41e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176028 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04pdf: Don't emit metadata for /Info, allow XMP for PDF >= 1.4Tomaž Vajngerl
Metadata written to /Info dictionary is deprecated in PDF 2.0 with the exception of /CreateDate and /ModDate, so don't write it if we are writing to PDF 2.0. Instead of this allow to write the XMP metadata all the way back to PDF 1.4 (when it was added to the specs). Change-Id: I33e29d7d52e96d34e973032d7d8b42d876282dcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176026 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-11-04pdf: add m_nPDFA_Version to simplify PDF/A versionsTomaž Vajngerl
We have a bool for each PDFA version, which is inflexible when checking if the feature is supported in a range of versions so this adds a version number which simplifies checks a bit. Change-Id: If162e305766baa61278872297c9ab1eb41cb57d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176025 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-11-04pdf: move encrypt code into emitEncrypt, add PDFStructureWriterTomaž Vajngerl
Move the encryption code into emitEncrypt and rewrite that with the newly introduced PDFStructureWriter, which is now responsible to write the PDF basic structure elements into a string buffer. The PDFStructureWriter will be extended with new features when there is demand. Change-Id: I4f4099886860b72b4f1866b19a8afb7cc8fb4ea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176024 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2024-11-04pdf: initial PDF 2.0 and PDF/A-4 supportTomaž Vajngerl
Added PDF 2.0 and PDF/A-4 version to enums. Write the PDF 2.0 support for the file headers. Add the identical considitons as for the PDF/A-4 as they were for PDF/A-3. Change-Id: Iccf5afbf09c4cd0cd1ae7122c860e8cbefe3a6fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176023 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-11-04Add experimental support for Emscripten JSPIStephan Bergmann
...which I've seen fundamentally working when building with recent emsdk against recent Qt6 trunk (and including <https://github.com/qt/qtbase/pull/108> "Update the check for WebAssembly JSPI support") and running on recent Chrome (with JSPI enabled under <chrome://flags/>) Change-Id: I98c11c5ee7e95b135ddc33c95c95752055ecd4c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176031 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-11-04new loplugin:staticconstexprNoel Grandin
Change-Id: Ida1996dfffa106bf95fd064e8191b8033b4002f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-04Simplify a bitMike Kaganski
Change-Id: I5c6110cc26e8fb20066374dc235677f07e79ce1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175977 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-03tdf#145538: Use range based for loopsMelvinYG
Change-Id: I1865d2fab8d29bfbc81b10a9497b47c5c94f1af9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175186 Reviewed-by: Hossein <hossein@libreoffice.org> Tested-by: Jenkins
2024-11-03Related: tdf#163730 Avoid potential deadlockMike Kaganski
Similar to commit 43e5118496ae0c9b8f81a54574874eda7d439dbb (Related: tdf#163730 Avoid deadlock, 2024-11-03). I haven't seen this scenario myself, but seems likely to be possible. Change-Id: Ie6bb69e7ebe12a69e4dabee9103de32611235807 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175971 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-02Related: tdf#163730 Avoid deadlockMike Kaganski
Seen locally, with main thread querying clipboard state: vclplug_winlo.dll!std::unique_lock<std::mutex>::unique_lock<std::mutex>(std::mutex & _Mtx) Line 145 vclplug_winlo.dll!CWinClipboard::getContents() Line 109 vcllo.dll!TransferableDataHelper::CreateFromClipboard(const com::sun::star::uno::Reference<com::sun::star::datatransfer::clipboard::XClipboard> & rClipboard) Line 2162 vcllo.dll!TransferableDataHelper::CreateFromSystemClipboard(vcl::Window * pWindow) Line 2188 swlo.dll!SwBaseShell::StateClpbrd(SfxItemSet & rSet) Line 602 swlo.dll!SfxStubSwBaseShellStateClpbrd(SfxShell * pShell, SfxItemSet & rSet) Line 2220 sfxlo.dll!SfxDispatcher::FillState_(const SfxSlotServer & rSvr, SfxItemSet & rState, const SfxSlot * pRealSlot) Line 1726 sfxlo.dll!SfxBindings::Update_Impl(SfxStateCache & rCache) Line 267 sfxlo.dll!SfxBindings::NextJob_Impl(const Timer * pTimer) Line 1280 sfxlo.dll!SfxBindings::NextJob(Timer * pTimer) Line 1225 sfxlo.dll!SfxBindings::LinkStubNextJob(void * instance, Timer * data) Line 1220 vcllo.dll!Link<Timer *,void>::Call(Timer * data) Line 111 vcllo.dll!Timer::Invoke() Line 75 vcllo.dll!Scheduler::CallbackTaskScheduling() Line 509 vcllo.dll!SalTimer::CallCallback() Line 53 vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer() Line 169 vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 525 vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 581 vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 385 vcllo.dll!Application::Yield() Line 473 vcCMtaOleClipboard::runllo.dll!Application::Execute() Line 361 sofficeapp.dll!desktop::Desktop::Main() Line 1679 CMtaOleClipboard::clipboardChangeNotifier thread holding CWinClipboard's mutex in handleClipboardContentChanged, and waiting for the destruction of IDataObject released from m_foreignContent (which was redirected to CMtaOleClipboard::run thread): vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::release(IDataObject * ptr) Line 235 vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::~COMReference<IDataObject>() Line 163 vclplug_winlo.dll!CAPNDataObject::~CAPNDataObject() Line 97 vclplug_winlo.dll!CAPNDataObject::`scalar deleting destructor'(unsigned int) vclplug_winlo.dll!CAPNDataObject::Release() Line 137 vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::release(IDataObject * ptr) Line 235 vclplug_winlo.dll!sal::systools::COMReference<IDataObject>::~COMReference<IDataObject>() Line 163 vclplug_winlo.dll!CDOTransferable::~CDOTransferable() vclplug_winlo.dll!CDOTransferable::`scalar deleting destructor'(unsigned int) cppuhelper3MSC.dll!cppu::OWeakObject::release() Line 230 vclplug_winlo.dll!cppu::WeakImplHelper<com::sun::star::datatransfer::XTransferable>::release() Line 115 vclplug_winlo.dll!com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable>::clear() Line 234 vclplug_winlo.dll!CWinClipboard::handleClipboardContentChanged() Line 291 vclplug_winlo.dll!CWinClipboard::onClipboardContentChanged() Line 385 vclplug_winlo.dll!CMtaOleClipboard::clipboardChangedNotifierThreadProc(void * pParam) Line 721 and CMtaOleClipboard::run thread waiting for CWinClipboard's mutex in CWinClipboard::onReleaseDataObject: vclplug_winlo.dll!std::_Mutex_base::lock() Line 52 vclplug_winlo.dll!std::unique_lock<std::mutex>::unique_lock<std::mutex>(std::mutex & _Mtx) Line 145 vclplug_winlo.dll!CWinClipboard::onReleaseDataObject(CXNotifyingDataObject & theCaller) Line 362 vclplug_winlo.dll!CXNotifyingDataObject::Release() Line 75 ole32.dll!CClipDataObject::Release() Line 960 combase.dll!... rpcrt4.dll!Invoke() rpcrt4.dll!Ndr64StubWorker(void *,void *,struct _RPC_MESSAGE *,struct _MIDL_SERVER_INFO_ *,long (*const *)(void),struct _MIDL_SYNTAX_INFO *,unsigned long *) rpcrt4.dll!NdrStubCall3() combase.dll!... user32.dll!UserCallWinProcCheckWow(struct _ACTIVATION_CONTEXT *,__int64 (*)(struct tagWND *,unsigned int,unsigned __int64,__int64),struct HWND__ *,enum _WM_VALUE,unsigned __int64,__int64,void *,int) user32.dll!DispatchMessageWorker() vclplug_winlo.dll!CMtaOleClipboard::run() Line 655 vclplug_winlo.dll!CMtaOleClipboard::oleThreadProc(void * pParam) Line 673 Caused by changes in commit 2e0664015255ffc0f76a11a9cb254564b34de496 (tdf#148647: make sure to update own content on Win clipboard change, 2024-07-14). Change-Id: I26d35726f3d3f650a2db2ac63709ed820a60fc4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175956 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-02tdf#36709 Add loext:text-indent supporting font-relative unitsJonathan Clark
This change adds an ODF font-relative first-line indent paragraph style attribute as a LibreOffice extension. The corresponding ODF standard change is tracked by OFFICE-4165. This change only implements what is minimally necessary to serialize, deserialize, and check for ODF files containing this attribute. Further changes are necessary. * Added cssLength to schema, which is equivalent to length but also allows ic and em as units. * Added loext:text-indent to schema as a paragraph style attribute. This attribute is equivalent to fo:text-indent, but accepts cssLength instead of length. * Added XML_TYPE_UNIT_MEASURE to the ODF parser, which currently accepts only the font-relative measures and forces fallback in other cases. * Added loext:text-indent to the ODF parser. This attribute accepts font-relative metrics, and will behave as an import-only alias for fo:text-indent in other cases. * Updated SvxFirstLineIndentItem to handle unit-denominated measures. * Added proof-of-concept indentation handler to Writer. This implementation is incomplete and temporary, and will be revised in future changes. Change-Id: I7eb5c7382093cb18a9b0afbf93dacb34ba1d35ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175941 Tested-by: Jenkins Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-11-01tdf#130857 qt weld: Actually set link button URI as URIMichael Weghorn
Fix copy paste error: Take the value for the "uri" property whose existence was just checked, not the "label" one again as a few lines above. Change-Id: I1bf1251c14ba9dbda2b2f4ea73d35b612f4d0bb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175888 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2024-11-01Drop GraphicFilter's bUseConfigMike Kaganski
It controlled how the FilterConfigCache initialized, and also how the unused aFilterPath was initialized. The FilterConfigCache is reused, when there are other instances of GraphicFilter - so that means, that the "bUseConfig" flag doesn't necessarily mean that the initialization will happen as intended: the existing instance could have been initialized using the other value. Avoid this indeterministic behavior, and always use the config, except in fuzzing. The VCL tests, that could possibly once depend on that, now use config, so this is not an issue - and that means testing the same thing as used in the working code, not something different. Change-Id: I6555dc47328b362e020138cf454f5ede7f39d063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175894 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-01Merge ImplInit into ctorMike Kaganski
Change-Id: I41ef9a3660cbb897074ec2bb2f234706d8b68de1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175893 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-11-01tdf#163486: PVS: Identical branchesBogdan Buzea
V1037 Two or more case-branches perform the same actions. Check lines: 7998, 8001 Change-Id: I9ecb950ff3201265678816e42f1e7976112b7557 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175305 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-31tdf#163486: PVS: Initial and final values of the iterator are the sameXisco Fauli
Since commit 4a4602ad7513262a6c0423f17b42791a852b7e23 Author: Michael Meeks <michael.meeks@collabora.com> Date: Fri Mar 10 10:36:22 2023 +0000 lok: add trimMemory capability, and expand dumpState to caches V625 Consider inspecting the 'for' operator. Initial and final values of the iterator are the same. Change-Id: I9ddd2593ace4234f720a6561b0dcbd85dbc18ef2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175880 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2024-10-31cid#1607569 silence Overflowed return valueCaolán McNamara
and cid#1607406 Overflowed return value Change-Id: Ia7917f9046382c25232415b7eb1de3b60071957a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175838 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-31tdf#163457 CairoSDPR: Need to apply 'damage' to gtkArmin Le Grand (allotropia)
If a CairoSDPR does directly render to a Window the changes do not get reliably visualized due to the Cairo backend and gtk/QT usage being dependent of being told what 'damage' is done to refresh the window accordingly. The VCLCairoBackend is doing that, but without reach from the outside. Note that this is a rare case, in fact the 1st one discovered where a CairoSDPR is painting to a Window directly, see comments in the task. Even this occasion should not do that - showing the Comments in Calc on the Overlay would be major to just painting to the Window roughly. There are other possible workarounds (also see comments in the task), but just adding to be able to set the needed 'damage' in case target is a Window is simplest and potentially the fastest way to do this. Since usage of CairoSDPR is bound to use GetSystemGfxData anyways it is okay to react there and call a method ApplyFullDamage that exists on Graphics when the flag USE_HEADLESS_CODE is active. That forwards to the CairoCommon being responsible for that Window and does the minimal necessary to apply 'damage' to the full Window. This is done when constructing the CairoSDPR, thus from the timing that incarnation can then paint anything and it seems that at the next occasion something can handle the callback from gtk all is painted. If that should change it may get necessary to separate the usage of ApplyFullDamage from GetSystemGfxData, but works as intended for now. Change-Id: I5442f3413e43418954da29a18d66dea27e25e655 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175794 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-10-31convert KernArray from sal_Int32 to doubleNoel Grandin
which allows us to eliminate a bunch of rounding at various layers, and consequently maintain a lot more precision Change-Id: I911dedd7c041c1d67396c082e5695346ea689acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-31Fix typoAndrea Gelmini
Change-Id: If3d4810cb2a5770b5432c398a3785d8bdcf19ff6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175829 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-30tdf#163582: Fix scrolling distance increasing geometrically.Marc Mondesir
New scroll distance was previous distance multiplied by speed factor, but distance was not reset to base values when mouse not moved (or outside app window on some platforms), resulting in continuous multiply amplification. Break out base scroll values to separate variables to prevent multiply feedback. Add comments to help future code maintenance. Change-Id: If11baff3b25521abce7436b44aaf8e6a19e54f45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175657 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>