summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-01-21tdf#87605 Add new words to technical dictionaryShardul Vikram Singh
Change-Id: I88e178a31a1539ef5632c2425b0f7fdd73d344fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180478 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins
2025-01-21avoid some casting in WinSalBitmapNoel Grandin
Change-Id: I0f18baf52131f229edb5be4bab723e954ba36cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180532 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2025-01-21tdf#160084 Simplify comparison with zero when using basegfx::fTools::lessbruh
Change-Id: Ide5fff5ad3ad7322fc5955eb06ad14da83451abf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180482 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-01-21pass by reference to GoEndOfSection/GoStartOfSectionNoel Grandin
instead of pointer, since we always de-ref the pointer Change-Id: I0193f77f9019fe5e57a6d56765917bb6c1f3f560 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-01-21dont store wrong bitcount in WinSalBitmapNoel Grandin
There is no point in lying to ourselves and saving a different bitcount from the one that is actually reported. This code dates back to "initial import" so no idea why it tries to do this. Change-Id: Ia5a88d28c85436b67b0225dbc81d83e74a1d3218 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180524 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-01-21remove assert looking for new compatibilityMode DOCXJustin Luth
Sadly, there is a document in our crash-testing corpus that says version 16 (last edited by LO 6.3.5 in 2020...) which is certainly a bogus value in this case. Change-Id: I55c6c7085151fb1acaab036f01ed44cf317c42f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180527 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2025-01-20Update git submodulesOlivier Hallot
* Update helpcontent2 from branch 'master' to 5bac4054249848f5d28b225507149f8107ebeaca - tdf#164180 Print option for "custom pages per sheet" Change-Id: I237f66609549214568c2c79330351ce64c254ec3 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/180522 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Jenkins
2025-01-20Simplify a bitMike Kaganski
No need to skip the loop explicitly when there's no element in the container. No need to take integers (the elements in the container) by reference. Change-Id: I15f7ccdeaafaa5a766ae36b31e49f41daebf86b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180518 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-01-20cool#10630 doc electronic sign: unselect & reject reselectMiklos Vajna
Insert a signature line, move/resize the selected shape, finish signing, the signature line is still selected and you can still move/resize it. This was working for the desktop visual signing which SfxViewShell::GetSignPDFCertificate() returned an XCertificate, but not for electronic signing, which is a separate branch in SfxObjectShell::ExecFile_Impl(). Fix the problem by deselecting the shape even in the desktop case and the moving this cleanup code to a new ResetSignatureSelection() and calling that in the electronic sign case, too. SdrMarkView::UnmarkAllObj() is private to sfx2/, so go via UNO to do the same. Change-Id: I52c89c4aea0203f8624bd801a900186211541dc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-01-20fnNds is deadNoel Grandin
ever since commit f761e0aee58fe152b69daaa0e4b9697ad4f0e038 Author: Noel Grandin <noelgrandin@gmail.com> Date: Tue Oct 11 10:45:31 2022 +0200 use more SwPosition::Assign Change-Id: I4eadbf3cc7dfb8cba6fb778e551cf016355ac337 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180481 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2025-01-20pass param by reference in GoNext/GoPreviousNoel Grandin
to enforce that they are never nullptr Change-Id: I973dcc143b5334c3060a0f815474e569deae4c27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180459 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ash@collabora.com>
2025-01-20jsdialog: scroll to row before useSzymon Kłos
If we first select lat row, then try to select some top row in LOK -> we will not get correct result for popup menu as the coordinates will be negative and we will also fail on assertion. We need to scroll row to be visible first Change-Id: Ib8a76eff093817fe7e3a777aa8cecf1246fae25f (cherry picked from commit 62b81789a7c16925c4b15692e40b1da6badb73d1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180509 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2025-01-20tdf#164722: fix the "contains conditional format" conditionMike Kaganski
In commit a06a44c3b342648139e7fa0ff850a4176df60538 (one more fix for fdo#58686, 2012-12-25), the code was adjusted for possible nullptrs in the conditional format list. The new bContainsExistingCondFormat variable meant "there is at least one non-nullptr element in list", and was used as a condition for deciding which dialog to show (and the pre-existing bContainsCondFormat variable was used to decide if iterating the list is necessary). But the two similar variables resulted in confusion; eventually, in commit 2b5915da481990fd6ea272104215d82b6fbf5dbb (tdf#60573 Conditional formatting does not allow scrolling, 2015-05-12), bContainsCondFormat was misused in a condition to show the dialog. Commit c492de66a077f3a2a960209b0b8b278b3901f361 (tdf#160149: save and restore the whole set of tab's conditional formats, 2024-03-17), nullptrs became possible in one more scenario (which is OK), but that uncovered the wrong variable use here. To avoid further confusion, merge the two variables into one, i.e. update bContainsCondFormat in the loop over the list - so that we only have one "contains conditional format" variable with up-to-date information. Change-Id: I567dc97551fba748bf6f2242d4650442f4753cc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180507 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2025-01-20tdf#164622 - SVG: fix broken cropped svg files at metafile exportBalazs Varga
For creating metafile, there mask polygon from MaskPrimitive2D needs to be closed. Otherwise later during the metafile export the we will skipp the rendering of the last points of the polylines. SVG clipping paths: "A clipping path is a set of closed vector path that may consist of an arbitrary number of straight and curved segments." Change-Id: I21487a81b904ec7ec5c6bd2a89b7539aeb86d606 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180278 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Tested-by: Jenkins
2025-01-20LOK: Use OOXML 2010+ formatAron Budea
Change-Id: Ic2deac5602293cfcd1a1a73774dab94b2c4c970a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180458 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 6f7e5f6c26a212c3fdbff3b97522d05a5ab896cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180500 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Jenkins
2025-01-20Make checking alternative views more strict.Gökay Şatır
Remove unnecessary -1 checks. Remove nLastNonEditorView, we don't use a view if it is in edit mode. We are more picky now. Don't check for alternative views when the render state is empty. It shouldn't be empty but when switching to/from other modes, it is empty. Change-Id: I2df4442d77bdddc4ce219a423f70527716245720 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180498 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2025-01-20tdf#164685 Cleanup SfxItemSetFixedrafaelhlima
Cleanup of class SfxItemSetFixed as described in the bug ticket. Change-Id: I0704ab45624217a8d00a942e0e8d6d6276934306 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180255 Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Tested-by: Jenkins
2025-01-20tdf#164640 List bullets formatting changedNoel Grandin
revert part of commit 76319347a83aecee7a423a614d67287182b31b00 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Oct 21 09:26:31 2024 +0200 set stylesheet parent at creation time Change-Id: Iabbfabc1412af54b76c0ac04d2e887a15a4cbbad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180499 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-01-20Make Programmatic Names typesafeNoel Grandin
by creating a wrapper class, to make it obvious in the code what kind of name we are dealing with. The new class is in sw/inc/names.hxx Change-Id: Ifb3e598d497f098cf1fce71b87c5e0da9f8a7151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180406 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2025-01-20Add wrongly formatted files to excludelistStephan Bergmann
Change-Id: I2c7e7a6ed5ec89b9de875a4fac8cb82849acc2d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180497 Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> Tested-by: Jenkins
2025-01-20sw: HTML import: apply hard formatting at insert position ...Michael Stahl
... even if the paragraph style contains the same item, but with a different value. Surprisingly, SfxItemSet::Differentiate() doesn't actually compare if the items in the 2 sets have the same value, just that 2 items with the same WhichId exist. Also, apply paragraph attributes, except list and breaks and other ones. (follow-up to commit f45d2fa85ba89eb7d71b51c3324f5938509b3201) Change-Id: I1e11705f63c1f059e2f5baa658238f2d62f6c66c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180422 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2025-01-20svx: prefix members of SdrVirtObjMiklos Vajna
See tdf#94879 for motivation. Change-Id: I58815855425a02c18fbc59b4c002b9bc128955e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180495 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2025-01-20vcl: move variables closer to first use in BitmapColorizeFilterChris Sherlock
Change-Id: I3f08511689a2118713f2b75436459501e51ed893 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173702 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-20__coverity_tainted_data_sanitize__ is deprecatedCaolán McNamara
Change-Id: I333fa67d7f9a8369405c39873760bba1ae2a2c7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180491 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2025-01-20drop coverity std::optional workaroundCaolán McNamara
Change-Id: Ie1b61fc4a8a8219e9ba3d4c8f77c27b8c725407e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180490 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-01-20drop coverity workaroundCaolán McNamara
Change-Id: I6085b9af2cc16114f61ba06fdeece601add50885 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180489 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-01-20tidy lambda capturesCaolán McNamara
Change-Id: Ifb0a815cdf93e18a5ad10ef4cfb2b772f5032df2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180488 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2025-01-20cid#1399255 Uncaught exceptionCaolán McNamara
and cid#1399255 Uncaught exception Change-Id: I4a8d416ad5acd8bac747cc764ebd3d4cc749ce0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-01-20cpdb: Don't use possibly deleted PPDKeyMichael Weghorn
The PPDParser ctor taking a const `std::vector<PPDKey*>&` param calls PPDParser::insertKey for each of the inserted keys, which does m_aKeys[ pKey->getKey() ] = std::move(pKey); for the std::unique_ptr `pKey` that owns the PPDKey. If multiple keys use the same OUString PPDKey::m_aKey, that means that reassigning `m_aKeys[pKey->getKey()]` will result in the std::unique_ptr that was previously assigned to be deleted, i.e. the pointer in the vector that was passed to the ctor also becomes invalid. Therefore, don't use the `keys` variable any more after passing it to the ctor in CPDManager::createCPDParser. Instead, use an explicit std::map to maintain a mapping of the OUString key that identifies the PPDKey and the OUString that can be used to retrieve its PPDValue and iterate over that map instead of the (potentially invalid) vector after creating the PPDParser. This should fix the crash seen with the WIP CPDB change as mentioned in [1], once that change has been rebased onto this commit. Without this, a PPDKey* element in `keys` was seen to point to invalid data when debugging, after the PPDParser ctor was called. This was with a dummy printer for which a "Brother DCP-9020CDW for CUPS" PPD was assigned and cpdb-text-frontend would print these translations (relevant 2 that are mapped to the same translation and would therefore be mapped to a PPDValue using the same `m_aKey` with [1] are marked with an arrow): > get-all-translations dummy-brother-dcp9020cdw CUPS 'OPT#print-scaling#auto' : 'Automatic' 'OPT#print-quality' : 'Print Quality' 'GRP#Color' : 'Color' 'OPT#multiple-document-handling' : 'Multiple Document Handling' 'OPT#job-sheets#standard' : 'Standard' -> 'OPT#finishings-col' : 'Finishings' 'OPT#output-bin#face-down' : 'Face Down' 'OPT#job-hold-until#indefinite' : 'Released' 'OPT#page-ranges' : 'Page Ranges' 'OPT#sides#one-sided' : 'Off' 'OPT#job-hold-until#day-time' : 'Daytime' 'OPT#job-hold-until#night' : 'Night' 'OPT#print-color-mode' : 'Print Color Mode' 'OPT#job-hold-until#no-hold' : 'No Hold' 'OPT#job-hold-until#weekend' : 'Weekend' 'OPT#printer-resolution' : 'Print Resolution' 'OPT#print-color-mode#color' : 'Color' 'OPT#job-sheets#none' : 'None' 'GRP#Scaling' : 'Scaling' 'OPT#multiple-document-handling#separate-documents-uncollated-copies' : 'Separate Documents Uncollated Copies' 'GRP#Ouput Quality' : 'Ouput Quality' 'OPT#print-scaling' : 'Print Scaling' 'OPT#job-name' : 'Title' 'OPT#orientation-requested#5' : 'Reverse Landscape' 'GRP#Page Management' : 'Page Management' 'OPT#print-quality#4' : 'Normal' 'OPT#job-hold-until#evening' : 'Evening' 'OPT#copies' : 'Copies' 'OPT#number-up' : 'Number-Up' 'OPT#orientation-requested#6' : 'Reverse Portrait' 'OPT#media-source' : 'Media Source' 'OPT#media-type' : 'Media Type' 'OPT#print-scaling#fit' : 'Fit' 'OPT#print-scaling#fill' : 'Fill' 'OPT#job-priority' : 'Job Priority' 'OPT#print-scaling#auto-fit' : 'Auto-fit' 'GRP#Copies' : 'Copies' 'OPT#print-scaling#none' : 'None' 'OPT#page-delivery' : 'Page Delivery' 'OPT#orientation-requested' : 'Orientation' 'OPT#job-hold-until' : 'Hold Until' 'OPT#sides' : '2-Sided Printing' 'OPT#print-color-mode#monochrome' : 'Monochrome' 'OPT#job-hold-until#second-shift' : 'Second Shift' 'OPT#job-hold-until#third-shift' : 'Third Shift' 'OPT#job-sheets' : 'Banner Page' 'GRP#Job Management' : 'Job Management' 'OPT#sides#two-sided-long-edge' : 'On (Portrait)' -> 'OPT#finishings' : 'Finishings' 'GRP#Finishings' : 'Finishings' 'OPT#output-bin' : 'Output Tray' 'OPT#sides#two-sided-short-edge' : 'On (Landscape)' 'OPT#multiple-document-handling#separate-documents-collated-copies' : 'Separate Documents Collated Copies' 'GRP#Media' : 'Media' 'OPT#orientation-requested#4' : 'Landscape' 'OPT#orientation-requested#3' : 'Portrait' The fact that 2 different CUPS/IPP options are currently not mapped to `PPDKey`s with different string keys in the current version of the Gerrit change [1] when the (CUPS-provided) translation is the same for both options might still be problematic when it comes to supporting all PPD/IPP options, but that's a different story. [1] https://gerrit.libreoffice.org/c/core/+/169617/comments/a7d83fb1_ea8dd50e Change-Id: I7c48f03c752f458c55f516340f2c0a48d7305ff7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180083 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-20doctheme: add LibreOffice theme file to LO share folderTomaž Vajngerl
Change-Id: Ifa38b69739d82d1f2efdfca58a2e0d6f9ff69008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180416 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-01-20doctheme: Add document themes folder as a config. pathTomaž Vajngerl
Currently the document themes are hardcoded and the new ones will be only used in the current document. This is the first of the series to make document theme user defined and stored in the user and shared folders (just like other resources). This change adds the configuration of the folder which will be used to search for the document themes. By default the folders are located in the user and shared profile folders. Change-Id: I1388983804d012cd7f8575dfc96830451821f56e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180379 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-01-20tools: moved function to create the color from string to toolsTomaž Vajngerl
Will be needed again in a follow up commit. Change-Id: Idbe2f540f9c3fb974f7dadf62dc099a0791bb0c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180378 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2025-01-20remove code duplication - conversion hex char to valueTomaž Vajngerl
We use the same funciton all over the place, so create a common function in o3tl and use that in all instances where we duplicated the code. Change-Id: I74091fbbde8c2ba8c7e4ab30194ab53e2a338e52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180372 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-01-19tdf#130857 qt weld: Delete unused image label objectMichael Weghorn
QLabel objects created for "GtkImage" objects in .ui file that are used to set button images are not displayed by themselves, so unconditionally mark them for deletion once the image data has been taken over to the button. (See also use of `aImagesToBeRemoved` in the VclBuilder ctor for how images used for button images are deleted there.) This is also no problem if the image is used for multiple buttons inside of the dialog because QtBuilder::deleteObject calls QObject::deleteLater, i.e. doesn't delete the object immediately, but schedules it for deletion once control returns to the event loop, so reusing it is still safe until then. Deleting the QLabel object only if it has no parent isn't sufficient, because even labels created for "GtkImage" objects that are top-levels within the corresponding dialog (or other .ui file) still have the dialog's parent widget set as the parent. Without this commit, a copy paste icon would be shown on the left hand side of the Writer window after opening and closing the "Help" -> "About LibreOffice" dialog (which has a button that has such an icon set. Change-Id: I40aaaa1af700b4ab0adfdc7a1c04103dfcab7c52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180469 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-19tdf#130857 qt weld: Signal when toggle button gets toggledMichael Weghorn
Change-Id: Ia44a203a56a2b560a995446da2dd1c48a736bf60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180467 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-19tdf#130857 qt weld: Support QtInstanceToggleButton::set_inconsistent(false)Michael Weghorn
While QCheckBox supports an "inconsistent" state (see QCheckBox::tristate), I don't see that for QToolButton/QAbstractButton. Therefore, keep triggering an assert when trying to enable the indeterminate state (and reconsider what to do whenever encountering that example while working on support for more dialogs in the future). However, explicitly *disabling* the inconsistent state is fine: Don't do anything in that case. This gets called by the subclass, weld::Toggleable::set_state when setting the toggle button to checked or unchecked. [1] https://doc.qt.io/qt-6/qcheckbox.html#tristate-prop Change-Id: I4cb1475a4b5e3295ada7ed18dcbfcbf24baa53e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180466 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-19tdf#130857 qt weld: Set GtkButton props for ToggleButtonMichael Weghorn
The GTK 3 GtkToggleButton [1] subclasses GtkButton [2]. Therefore, let QtBuilder apply the GtkButton properties for the QToolButton created for a "GtkToggleButton" object in a .ui file as well. This e.g. ensures that the icons for the toggle buttons in the "File" -> "Templates" -> "Manage Templates" dialog are set in a WIP branch where support for that dialog using native Qt widgets is declared. [1] https://docs.gtk.org/gtk3/class.ToggleButton.html [2] https://docs.gtk.org/gtk3/class.Button.html Change-Id: I1efedea116a799b8bc41fa81a27585af65893220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180465 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-19tdf#130857 templatedlg.ui: Don't use "pack-type end"Michael Weghorn
Don't use the "pack-type" property with a value of "end" to reverse the order of GtkBox children, but use the default (of "start") and set the indices for the "packing" properties of the children in the usual order, which is more straighforward. The "pack-type" GtkBox property no longer exists in GTK 4 (see [1]; `Convert3To4` in vcl/unx/gtk4/convert3to4.cxx currently has special handling for it for the "GtkBox" case to revert the order) and I also think it makes more sense to "normalize" the .ui files than implementing such a special handling in QtBuilder. Adjusting this in glade and resaving the .ui file also results in the GtkBox children to be defined in visual order, which ensures that the (focus) order is correct in Qt as it (by default) is based on the order in which widgets are created. (The "File" -> "Templates" -> "Manage Templates" dialog is not yet supported by QtInstanceBuilder, just noticed this while experimenting in a WIP branch.) [1] https://discourse.gnome.org/t/gtk4-replacement-for-pack-type/5574 Change-Id: I1633fc05da68a7ccce36e17d13d0d654f4e6145b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180463 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-19tdf#130857 qt weld: Evaluate entry's placeholder textMichael Weghorn
Evaluate the GtkEntry "placeholder-text" property [1] when processing "GtkEntry" objects in .ui files. This gets used e.g. in the (not yet supported) "File" -> "Templates" -> "Manage Templates" dialog for the "Search..." entry. [1] https://docs.gtk.org/gtk3/property.Entry.placeholder-text.html Change-Id: Ic5d85199da4511bfc6758a77079f3b4c6c2aa7bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180462 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-19tdf#130857 qt weld: Set GtkButton props for MenuButtonMichael Weghorn
The GTK 3 GtkMenuButton [1] subclasses GtkButton [2]. Therefore, let QtBuilder apply the GtkButton properties for the QToolButton created for a "GtkMenuButton" object in a .ui file as well. This e.g. ensures that the menu button in the "File" -> "Templates" -> "Manage Templates" dialog gets the "Manage" label in a WIP branch where support for that dialog using native Qt widgets is declared. [1] https://docs.gtk.org/gtk3/class.MenuButton.html [2] https://docs.gtk.org/gtk3/class.Button.html Change-Id: I3f2e7b701776476a6677d2bb324ffbdd4956f471 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180461 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2025-01-19tdf#130857 qt weld: Extract helper method to set menu button propsMichael Weghorn
Change-Id: I5f23f3e5734cee99ed54c9082fe9cbb3d9b54f0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180460 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-01-19tdf#145759 Use symbolic constants instead of magic numerical constantsbruh
Change-Id: Ie8c1c37d4d5385b4f85714116e5e94709419ee66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180477 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2025-01-19document RasterOp a littleNoel Grandin
Change-Id: If0a13b7e76684b12cd68566429ca0c6a285fc989 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180468 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-01-19ScriptForge (SF_Calc new Intersect() methodJean-Pierre Ledure
The calc.Intersect(range1, range2) method computes the common area as a string which is a sub-range of both input ranges. It returns an empty string when the sub-range is empty. Potential use case: customizing a popup or context menu depending on the presence of the selected cell in a given area. In addition, the A1Style() method returns the sheetname in the output string only when it is an explicit argument. Changes are applicable both for Basic and Python scripts. They require an update of the user documentation. Change-Id: I920fc8bee6dace9ceed263a0570b4c0197bc8cb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180479 Reviewed-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins
2025-01-19tdf#145614 Convert #define to enumbruh
Change-Id: I146b65cc931dfc3ce2785ccb5c921e6385fbb4a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180015 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-01-19Use CComPtr and its method to create instance by prog idMike Kaganski
Also CComVariant can be created directly from CComPtr, acquiring its reference as needed. Change-Id: I0dda0687eca5eefd8d3b7266f895d485f145eea4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180447 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2025-01-19Use EXTENDED_MAX_PATH for consistencyMike Kaganski
... instead of literal 32767 or duplicating constants. Change-Id: I43d7bba2fa2dc74ae65b23f54fb7765f95084895 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180464 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-01-19Use IID_PPV_ARGS in COM calls to avoid C-style castMike Kaganski
Change-Id: I071ed5e3ae95877f2f0954f6fca63d011871d49d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180449 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-01-19Use IID_PPV_ARGS and CComPtr to simplifyMike Kaganski
IID_PPV_ARGS allows to avoid reinterpret_casts (and also explicit auto-deducible IIDs). Also, there always was a mismatch between the type of mWebBrowser2 (which is IWebBrowser2) and the queried IID in CSOActiveX::SetClientSite (which was IID_IWebBrowser, instead of the correct IID_IWebBrowser2). Looks like in practice it wasn't a problem, but now it's consistent. Use of CComPtr in CSOActiveX::Load allows to release the pointer correctly (previously, the call to Release was missing). Change-Id: I29d672052780a36465f6143106c22fa2c90dab5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180448 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-01-19tdf#151423 use the same modifier keys during a scrolling sessionPatrick Luby
Revert commit f5ef5eafdf70a36edd5129147502a9c74df89456 as it completely disabled the ability to zoom on mice with limited support for gestures such as the Apple Magic Mouse by pressing pressing the Command key while scrolling. So try a different approach and use the modifier keys that were pressed when the current scrolling session was started for the entire scrolling session. Unfortunately, session state changes such as a scrolling session began or ended are not fired when scrolling with a regular mouse scrollwheel so use a significant pause between scrolling events as a rough indicator that a new scrolling session has begun. Change-Id: I898d7f0d3e28ad0436fcb75504f9efb6bf9cdb7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180451 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomacdev@gmail.com>