- Convert include guards to #pragma once in salhelper, starmath, tools, ucb, and o3tl.
- Kept changes minimal to a small cross-module batch as requested by the easyHack guidance.
- Verified with: container=1 make -j4 o3tl.build salhelper.build starmath.build tools.build ucb.build
Change-Id: Ic047061433985e12be41bdb6463ac4c8e8969ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204555
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Replace include guards with #pragma once in drawinglayer headers
under attribute/, geometry/, processor2d/, processor3d/, tools/.
Change-Id: Ib638a2602ecb60d62dafb556f480b0955c33858c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204556
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
* Update helpcontent2 from branch 'master'
to 57501eae0af8abefc89d62131353041d8c21a3ae
- This should not be a warning
Change-Id: I813858e91e74be69d015005eb146da666bc63efe
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/204629
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Jenkins
md4c was upgraded to 0.5.3 in
commit 82820cf5e8
Author: Ujjawal Kumar <ujjawal.kumarchouhan@collabora.com>
Date: Mon Apr 20 22:48:40 2026 +0530
md4c: Upgrade to 0.5.3
This version fixes https://github.com/mity/md4c/issues/276
which was changing the expected result of testTdf169884_import_crash
Since that test is just about an import crash and there
is no easy way to check the md4c version inside LibreOffice,
simplify the test to just check the number of paragraphs.
In the end, it's still checking the document doesn't crash
at import time
Change-Id: If669c6d5f8f2b88e53fe280ab51e88e5eadec129
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204616
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This fixes a particuarly annoying habit of a trailing superscript
ordinal suffix getting dragged into the next bullet and causing
the unwary user weird small fonts, and non-aligned bullets.
Nail only the most obvious case, leaving multi-line superscript
in-place, and ignoring other attributes.
Include unit test.
Change-Id: I9ba5009ed17377e5c2f24c9edb74c3a1c1393cd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199203
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 03ed94560aaa20070708b265d3a551c862718bc3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204606
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
... format-on-delete
Enable track changes, delete a sentence, select the deleted text, format
the selection as bold, then format as italics: the delete redline is
lost.
What happens is that we first have a format-on-delete redline. But then
we try to insert a new format redline for italic, Writer doesn't know
how to combine this new format redline with the existing
format-on-delete redline, so it deletes the old redline by default.
Fix the problem by not creating the new redline in this case. This works
because the format redline needs to deal with the old format and the new
format. If you apply a new formatting, the old format doesn't change and
the new format goes to the model. This means that not creating the new
redline preserves the old delete redline and accept/reject works
correctly, too.
Regression from commit eef0dfed81
(tdf#166319 sw interdependent redlines: add UI to create format inside
insert, 2025-06-12), previously simply no format redline was created, so
the delete redline wasn't lost.
(cherry picked from commit bd7f20bdf7d1e66ab13c46074c0482ccab6d6867)
Change-Id: Ia81b748fd5095bc9141117197edac9d21d95f834
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1697
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit bb3e131ce43d5dbba2d0edebf2ce248182798c80)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204605
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Writer has a special code path for underlines that span font changes.
This special code path did not handle kashida justification, and would
draw underlines that were too short to connect to the following portion.
Change-Id: I31ff2c3a1cea0e7e4339a0533e568e421c20d52d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204604
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
changeBackground only handled SdrRectanglePrimitive2D, but PPTX
text boxes produce ObjectInfoPrimitive2D wrapping
SdrCustomShapePrimitive2D. The type check never matched, so
fill polypolygons were never hidden, making paragraph layer
bitmaps fully opaque.
Remove the type check in changeBackground so it unconditionally
decomposes all primitives. Add BufferedDecompositionPrimitive2D
handling to changePolyPolys so it can recurse through
SdrCustomShapePrimitive2D to reach the fill polypolygons,
mirroring the pattern already used by findTextBlock.
Signed-off-by: Mohit Marathe <mohit.marathe@collabora.com>
Change-Id: I102b2482b0d7fc5dfdd645bcd4f9ff6aa680b3ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202733
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 12505af8f4b1903b2633ecdd9163179f908d7da2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204610
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
com.sun.star.text.textfield.URL doesn’t work with Writer documents. It
ends up creating a text field that only works with editeng and then when
a user tries to insert it into a document it throws a confusing
IllegalArgumentException because the attach method is expecting an
SvxUnoTextRange but it is given an SwXTextRange. This patch makes it
catch that situation and throw a replacement exception with a more
helpful message giving an indication to the developer about the right
way to add links.
Change-Id: If1fe29e3ab6270256351cd263a4461620e4b5426
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201148
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
As now headless mode is possible on macOS, let's enable it in the distro
configs, so that final builds make use of this option.
Change-Id: I5c46775c597bced62a84b3f018d14305f3caa634
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200535
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
The way we were creating OpenType fonts with CFF table didn’t work with
CID-keyed CFF fonts. Fixing this is none trivial, so revert to the old
code for now.
This reverts (parts of) the following commits:
commit 32d8af4816c800cd3ca7833701ec8c637bdb98b1 (cff-bk2)
Author: Khaled Hosny <khaled@aliftype.com>
Date: Wed Apr 29 23:00:47 2026 +0300
tdf#171869 vcl: embed CFF fonts as bare CFF via composite path
commit 9e32f505ff
Author: Khaled Hosny <khaled@aliftype.com>
Date: Sun Apr 12 19:29:09 2026 +0200
vcl: Drop now unused FontType::TYPE1_PFB
commit 7848190884
Author: Khaled Hosny <khaled@aliftype.com>
Date: Sun Apr 12 19:24:29 2026 +0200
vcl: Drop now unused ConvertCFFfontToType1
commit d9a6a3f7f0
Author: Khaled Hosny <khaled@aliftype.com>
Date: Sun Apr 12 18:46:43 2026 +0200
vcl: embed fonts with CFF table as OpenType fonts
Change-Id: I648e674451bf3db10a2957c2da69bdd6d654a87f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204592
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
I recreated the SVG files because the color information was incorrect. I used minify from the Debian repos, but the files are still not very small—though they are sufficient for this purpose; at least no data is lost.
Change-Id: Ifb164cfdf9f53b6e6bb74621ce3a24b391ac02d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204591
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tests that it correctly reads the filesystem to find files, the
Creatable and Editable properties work and that it can execute a script.
Change-Id: I613cf539f256c1ba464fa523f431fcf6e95da5f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204519
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Previously the functions that have required arguments were checking that
the right number of arguments were passed with an assert. On debug
builds this would cause LibreOffice to just crash when an argument was
missing. You might think that the length parameter to JS_NewCFunction
would make QuickJS itself check that enough arguments were passed, but
instead that just makes sure that the array passed to the C function has
enough space for that many arguments.
This patch replaces those checks with an exception on failure.
Change-Id: Ief0f48bca684dd2b4379711ab7650edd548ceef4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204302
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
Adds an XBrowseNode implementation for JavaScript scripts using the
QuickJS bindings so that JS files can be found and executed from the
macro organizer. Unlike in Python macros, the entire source file becomes
a single macro instead of trying to find function definitions in the
source.
Change-Id: I73d0c6e6fc6bb7ffd4f6164d1f1887d03bfdfe62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203219
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Somewhat loosely based on <https://github.com/allotropia/zetajs>.
Main part that is still missing from this WIP commit is implementing UNO objects
in JS. (And there are a number of TODOs throughout, mostly regarding error
handling.)
===
Comments from Neil Roberts:
This patch was cherry-picked from
1cd8ad398b38763cb3578f1305a28e7774163714 in Collabora’s repo. The
following changes were made in order to get it to pass the CI:
* The unit test has been modified to continue using embindtest instead
of testuno.
* The name of the external library is quickjs instead of qjs because a
different patch is used to add the external QuickJS package.
* The asserts on argc that were captured in the lambda function have been
moved outside of the lambda function in order to avoid having an unused
capture on release builds. The argc parameter has then been marked as
[[maybe_unused]].
* The constructors for JSClassDef have been changed to consistently use
{ } brace initialisers because otherwise it fails to build on macOS.
===
Change-Id: I8810e43fe5f3e4b1a53a654070fe87e95f51231a
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/190
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203963
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
This makes the create button enabled for script providers based on
SingleScriptProvider. When the button is pressed the SingleScriptFactory
is queried to get an example script to fill the new macro with and then
the file is created.
This is based on the code for the Python script provider in tdf#56289.
Change-Id: I11a6782e55ba775afed6b62f24ae0d11c347e529
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203283
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
The Editable property is now advertised on script providers based on
SingleScriptProvider. Once invoked, the system default application for
the script will be opened using SystemShellExecute.
On Windows, the default app is queried via AssocQueryStringW and then
passed to the SingleScriptFactory to check if it looks like an
interpreter for the given language. If so, the script is opened in
Notepad instead to avoid just executing the script.
This is based on the code for the Python script provider in tdf#56289.
Change-Id: Ia89ddbdd92b4d76c3a4ce133ffcf9b6d7a9f1e27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203282
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Adds a set of helpers to implement a script provider where the script
files are the entire macro. The provider only needs to make a subclass
of the abstract SingleScriptFactory class to provide the filename
extension, language name and a method to convert the contents of a file
to an XScript. The parts about handling file browsing and reading the
file contents are in the shared helper code.
This is based on the script provider from Luno.
Change-Id: Id39f3a07e887898650b0d77ec493011fb5acc858
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203216
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
BreakPointList lacked begin()/end(), so add forwarders to its
underlying std::vector. Then convert two index-based loops in
BreakPointWindow::Paint and BreakPointWindow::FindBreakPoint
to use range-based for.
Change-Id: I1b6426913c76607a3300c6b4e435a281026e6a34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204481
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
A lot of places in the code are calling OUString::endsWith with a string
containing a single character. Similar to lastIndexOf, this patch
provides overloads to the two methods to have an optimised version for
the case when there is only one character.
It would be kind of nice if the compiler could handle this optimisation
itself, but it’s unlikely to work because the string version of endsWith
ends up calling rtl_ustr_shortenedCompare_WithLength which isn’t inline
and is defined outside of a header.
The main incentive to do this is to make it easier to change calls to
lastIndexOf that should really be endsWith, as in tdf#171853.
Change-Id: Iaba5a7db3211eb12b0a83f441c0a81e664da6eea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204363
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
<w:font> element contains a child element <w:charset>, which denotes
the font's charset value, `<w:charset w:val="02"/>` indicates that its
a symbol font. This value is properly imported and stored in the
FontEntry.
But when processing the text runs, we do not use the charset property
of the font.
Change-Id: If791c52a3a3678be47a158b8e763d38e339b03fc
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1388
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 9fce988742260ef35024a6f4af60e662ef01eb55)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204570
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Follow-up to 92d78c3fa385f794b63cf6b328b41222f9e4c8b2
(Table Styles: Move Calc table style generation from OOXML filter to core).
ComplexColor::applyTransformations() applies LumMod and LumOff as
two separate RGB-HSL-RGB round-trips, which can produce off-by-one
color values due to intermediate uint8 rounding. The OOXML filter's
Color::getColor() avoided this by staying in HSL between the two
transforms.
Add ColorSet::resolveOOXMLColor() which collects LumMod and LumOff
from the ComplexColor transforms and applies them in a single
ApplyLumModOff() call.
Also fixes the ComplexColor transform scale in TableStyleGenerator
from 100'000 (OOXML scale) to 10'000 (ComplexColor convention),
matching what the oox filter's createComplexColor() produces.
Change-Id: Id0173f44ffa3663893e3012d7aefbeabbe264241
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/232
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit b44399314130a10698a18ffdab482a68bfdcff1a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204568
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins