Commit Graph
516520 Commits
Author SHA1 Message Date
Muhammad Naeem 5c812142b2 tdf#143148: Use pragma once instead of include guards
- 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
2026-05-02 13:12:13 +02:00
AsmatZahra-code 13fe616b01 tdf#143148 use pragma once in drawinglayer headers
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
2026-05-01 22:56:57 +02:00
Adolfo Jayme Barrientos 2416599d27 Update git submodules
* 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
2026-05-01 14:58:10 +02:00
Yoon6 563c496dd4 tdf#145538 Use range-based for loops in sc column
Replace index-based loops with C++ range-based for loops
to improve readability and reduce indexing errors.

Change-Id: I6a1f102df3fe321f0de2d649efdbec327d27a879
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203829
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-05-01 11:54:30 +02:00
Muhammad Naeem d21d87868d tdf#150518 Replace Close with Cancel for cancel-action sparkline dialogs
Align button labels with cancel semantics in Sparkline

Change-Id: Ic325987e86abf002a43ac94b7b326707c13a3b3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204383
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-05-01 11:09:32 +02:00
Rene Engelhard 6de3d9c13d Revert "remove unneeded check for md4c-html"
Now needed since 6e28f612c2

This reverts commit fa4721b739.

Change-Id: Ib9a10200e6b2a8f0e66e39946aea476f2f0515e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204622
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: René Engelhard <rene@debian.org>
2026-05-01 09:55:34 +02:00
Xisco Fauli eb7a5a8135 md4c: fix build with 0.5.2 or older
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
2026-05-01 00:10:59 +02:00
Adolfo Jayme Barrientos 9ab4e14b44 Capitalize your initialisms
Change-Id: I144d90daffcac560677d1553205612091d4806e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204552
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2026-04-30 22:39:28 +02:00
Michael Meeks be1915d07b editeng: don't preserve escapement attribute on paragraph break.
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>
2026-04-30 19:18:01 +02:00
Neil Roberts 67326438c6 jsuno: Fix the source header comments
I forgot to update the project name when cherry picking the jsuno code.

Change-Id: I2e2a58e514f605da00e12e598790bc45c9814e0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204612
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-30 18:45:27 +02:00
Miklos Vajna 732618bf6a cool#15451 sw interdependent redlines: fix creating a format on top of ...
... 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>
2026-04-30 17:17:00 +02:00
Jonathan Clark 03259a4b3f tdf#155557 sw: Fix underline width calculation for portions with kashida
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
2026-04-30 15:56:36 +02:00
Julien Nabet de4e1bd6f5 Related tdf#171889: remove remnant SpellingAndGrammarDialog in sc
Change-Id: I55dcbd4c61f6f4d276c5881b4607a2df47c91a07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204608
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-04-30 15:07:05 +02:00
Mohit Marathe a75b311ce4 cool#14749 sd: fix opaque paragraph animation layers in PPTX slideshow
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>
2026-04-30 14:37:06 +02:00
Ujjawal Kumar aaa496b503 xlsx: sanitize defined names containing true or false as name
Change-Id: I31c643a93520b77a814ca6f9509b003103c78dde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201674
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 3c6651199b9648a4d6a827f0fef16fe0f5d16594)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204598
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 13:57:51 +02:00
Ujjawal Kumar 2bd83eee36 ooxml: Avoid writing xdr:twoCellAnchor when no graphic exists
Bug document: fdo84640-1.xls

The above document contains anchored graphics elements on sheet2 with
no actual graphic in it and when exported to xlsx the xdr:twoCellAnchor gets
exported with no graphic inside it and excel throws an recovery error.

Change-Id: I8072351b4ef3c016b39fbca81cb0c5439108d95f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200325
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit bf5ffdeb64fd6270ab58955896725262381c7980)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204597
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 13:57:31 +02:00
Neil Roberts e3c8723ed6 tdf#125485 Throw exception if user inserts textfield.URL in Writer
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
2026-04-30 13:28:57 +02:00
Hossein 65f1b7351d tdf#169711 Enable headless mode on macOS builds
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>
2026-04-30 13:12:52 +02:00
Khaled Hosny 4c3c87e79d tdf#171869 vcl: restore Type1 PFB conversion for CFF fonts
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
2026-04-30 13:09:15 +02:00
Ujjawal Kumar 966a95db83 sc: Add unit test for export of anchors containing no graphic.
Patch: https://gerrit.libreoffice.org/c/core/+/200325
Change-Id: I1bca535ba211b36f2990eb56c950a0f0064c31b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200904
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201655
(cherry picked from commit 406f0b0811fe799e09b1c61d8a2ee5bf84a7e28d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204596
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-04-30 12:55:02 +02:00
Ujjawal Kumar 02fddd1105 Change data type from tools::Long to appropriate data types in md import
Change-Id: I36185a0d423ffb1ce18d8a0b7139b2c55197b54e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201590
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 2a9e17b75acc53e2ddd9b54bf1de0f991be968ca)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204595
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 12:54:46 +02:00
Xisco Fauli 85baadc11d related tdf#137308: remove unused InflateZstd
If needed, this patch can be revered later on

Change-Id: I83ce659bbd0070fd3f42e2961e9cf8a11db8dc40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204594
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 12:30:31 +02:00
CassieLX f388c16060 tdf#156916 Signature line uses dark icon with dark theme (KDE Plasma)
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>
2026-04-30 10:53:21 +02:00
Ujjawal Kumar 6e28f612c2 tdf#171481 sc: Add paste special support for markdown
Removed the heuristic detection of markdown.

Now users have to explicitly choose markdown
under paste special to paste markdown content.

Change-Id: I20adc584603fc282e6f2fe8759a5bdf3c14a5585
Signed-off-by: Ujjawal Kumar <ujjawal.kumarchouhan@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203110
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 10:41:56 +02:00
Neil Roberts 7fa1f52d5c scripting: Add a CppUnitTest for the QuickJS script provider
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>
2026-04-30 10:40:21 +02:00
Neil Roberts b93ce63504 jsuno: Throw an exception instead of asserting when missing arguments
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
2026-04-30 10:40:06 +02:00
Neil Roberts d1936ddbc5 testuno: Move the JavaScript source to an external file
This makes it a bit easier to edit.

Change-Id: I56b715bf1beeb31f0a8d133a44447c8f8ce4ee0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204301
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-30 10:39:53 +02:00
Rene Engelhard 17b18f35b2 add --with-system-quickjs
and use ENABLE_QUICKJS instead of the QUICKJS BUILD_TYPE profile in Repository*mk

Change-Id: I0120352bd2f2a0c2eb8d6a00441c74a30c990879
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203285
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-30 10:39:37 +02:00
Neil Roberts 1d324602ba Add an XBrowseNode implementation for QuickJS
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>
2026-04-30 10:39:18 +02:00
Stephan Bergmann 6b31c63ec7 QuickJS-based JS UNO support
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>
2026-04-30 10:38:54 +02:00
Neil Roberts be90e52d93 singleprov: Implement the “Creatable” action
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
2026-04-30 10:38:18 +02:00
Neil Roberts b3b982d733 singleprov: Implement “Editable” with the system default app
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>
2026-04-30 10:38:01 +02:00
Neil Roberts e5900bee28 scripting: Add script provider helpers for files with single macros
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>
2026-04-30 10:36:31 +02:00
Neil Roberts 7b2006f800 Download and build QuickJS as a static library
Builds QuickJS 0.14.0 as a static library. It is guarded by the configure
option --enable-quickjs/--disable-quickjs which is disabled by default
but enabled for Jenkins builds.

Downloaded from https://github.com/quickjs-ng/quickjs/releases/download/v0.14.0/quickjs-amalgam.zip

Change-Id: I8a62f27fef85c5d45feefb1e479a4dc24cc857a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203217
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
2026-04-30 10:35:48 +02:00
Asad Tauqeer 3bd54de6c8 tdf#145538 use range-based for in baside2b.cxx
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>
2026-04-30 09:56:58 +02:00
Furkan Ahmet Kara 5a6cca88b0 tdf#143148: Use pragma once instead of include guards
Change-Id: I42d3276416227ff2e1acfe22b111cdfed65d2938
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204589
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-04-30 09:23:44 +02:00
Asad Tauqeer 7133be045f tdf#153294 Use std::find_if in autocdlg.cxx
Replaced for loop with std::find_if in OfaAutocorrReplacePage::NewEntry

Change-Id: Ib7cef11e0b661883e6875045daa9d57483dd3e08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204571
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-04-30 08:57:50 +02:00
Asad Tauqeer f5d20ca5e4 tdf#153294 Use std::find_if in autocdlg.cxx
Replaced for loop with std::find_if in OfaAutocorrReplacePage::DeleteEntry

Change-Id: I008e1e8d270933a8fb6ba2c3e85e39aab20427ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204580
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-04-30 08:56:19 +02:00
Xisco Fauli cfd3309a5d loplugin:unusedmethods
Check existing ones that can be removed

Change-Id: I6ee6fc1772c620ac5d12fea915681b094b7c3bfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204583
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-30 08:54:45 +02:00
Michael Weghorn 40eed4ae1b svx: Mark ColorIconView::getColor as const
Change-Id: I3108b0451cfdd995b7fa2bc17ae23ecc3437aadb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204588
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-30 07:01:20 +02:00
Michael Weghorn c312b016a6 svx: Pass ColorWindow::SelectValueSetEntry param by ref
Change-Id: Id4c1777d0f78848dcc85e28d85140d2525fdacb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204587
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-30 07:01:06 +02:00
Michael Weghorn f60a45e669 svx: Pass ColorWindow::GetSelectEntryColor param by ref
Change-Id: Id6adaf542025c9ba8e4236a30364f150a26cbc4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204586
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-30 07:00:59 +02:00
Neil Roberts ab871d3af9 [API CHANGE] rtl/string: Add startsWith/endsWith for a single character
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
2026-04-30 06:33:28 +02:00
Jakub Trzebiatowski 323b77a6ca tdf#171784 sw: Implement undo for renaming table
Change-Id: I6557346ea3361c58c0f6696f3418aab64d538397
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204327
Tested-by: Jenkins
Reviewed-by: Jakub Trzebiatowski <ubap.dev@gmail.com>
2026-04-29 23:18:37 +02:00
Karthik 18d0b58804 tdf#171762: Font's charset property is never used
<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>
2026-04-29 22:11:20 +02:00
Balazs Varga 73a0abc944 Table Styles: Remove leftover defaulttablestyles.cxx
The file was deleted in the original commit (Change-Id:
Ic6aee371a29c8983deb70bce9c4085a47cfa1a66) which moved table style
generation from the OOXML filter to core, but the deletion was lost
during cherry-pick from distro/collabora/co-26.04 to main.

Change-Id: Ie9081ac6d2af93088c2b36482745eb99431cf60e
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/219
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Balázs Varga <balazs.varga@collabora.com>
(cherry picked from commit c609cd989933319883115b6fb1c8591137c7677c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204569
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-29 21:59:56 +02:00
Balazs Varga 1882c2017f Table Styles: Add resolveOOXMLColor() for correct tint resolution
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
2026-04-29 21:59:49 +02:00
Ujjawal Kumar 059978b7a5 XLSX: Ensure 3D references for global named ranges.
Bug document: fdo30900-1.ods

The above document when exported to xlsx does not have
sheet reference for global named ranges due to which
excel fails to load the doc.

Change-Id: Id61b28d031fa7aa23253d2105c5538ec1b389947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201458
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201654
(cherry picked from commit b93aaa35f87804a3f494c6e6b0184a4f80dfe823)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204516
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-04-29 21:59:30 +02:00
Ujjawal Kumar 5642a697af sc: Ensure proper table name matching when quoting table references
Follow-up patch of https://gerrit.libreoffice.org/c/core/+/200908

This prevents incorrect replacements such as matching "Sheet1" inside
"ASheet1!A1" or "_Sheet1!A1"

Change-Id: Iab150e0f15f0b459d36789982ca55595c0766669
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201431
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201561
(cherry picked from commit 768724c278ecac32c64be2e9e6cbab47633433fe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204515
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-29 21:59:23 +02:00
Ujjawal Kumar fcd434ea9e Generate warning when clamping invalid from-to positions
Follow-up patch of https://gerrit.libreoffice.org/c/core/+/201059

Change-Id: I79520a96f991a12999a9bdd993b8786784ebfc34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201426
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201563
(cherry picked from commit a17762062cc07143bfc957d542a175173a4bbcbe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204514
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-04-29 21:59:17 +02:00