Commit graph

495069 commits

Author SHA1 Message Date
Mike Kaganski
089398e514 Return double from OutputDevice::GetTextArray
And introduce GetTextWidth / GetTextHeight variants returning double.
It allows to avoid premature rounding.

At least in one case - testTdf145111_anchor_in_Fontwork - it allowed
to make the test DPI-independent (at least in my testing on Windows,
using 125, 150, and 175% UI scaling).

Change-Id: I973d2c729ec6bb7114b4f99b9027f1ead7c1d061
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166237
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-20 08:53:26 +02:00
Noel Grandin
7b1405689d reduce the number of drawing primitives we create in OverlaySelection
and flatten it a little

Change-Id: I3377f832658c504a2541c6994f7386adad06b0e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166321
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-20 07:42:08 +02:00
Cor Nouws
7c2ed9919d tdf#160601 add expert option for default slides per row in slide sorter
Change-Id: Ib122ad0fce8159c1ceb092bcc65a59ba1ad23bc9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166174
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2024-04-20 00:34:46 +02:00
Justin Luth
3b7ffa204c tdf#140616 ApplyParagraphMarkFormatToNumbering: including highlight
I was concerned that I might override highlights
set in numbering.xml but in that case
    pFormat && pFormat->hasItem(RES_CHRATR_HIGHLIGHT)
so pCleanSet no longer hasItem.
(see num3n.docx and TestDoc_highlight2.docx)
Note: must use Word 2010+ to see numbering.xml highlights!!

This is strictly a visual thing. Unit testing has traditionally
used magic tile rendering x,y positions to check the color,
which seems completely untrustworthy.

Change-Id: I026252f127107e4782d08f72bfd5e2a412142111
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166303
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2024-04-20 00:18:17 +02:00
zeph
55b0ddf119 tdf#143123 Port ChartInDraw / ChartInWriter examples to Python
Ported two more SDK examples ChartInDraw and ChartInWriter from Java to
Python.
ChartInCalc and helper classes which contain additional helper methods
were ported in a previous patch.

Change-Id: Idffa0c07282dfc2c0f09ec5a9959f1db34a1d9a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165088
Tested-by: Jenkins
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2024-04-19 22:18:25 +02:00
Noel Grandin
9b1bba2f96 tdf#160706 speed up loading conditional formatting rule in XLS (4)
speed up the matching of duplicates in CellAttributeHelper by using
std::set and partial sorting by name

Takes my time from 33s to 6s

Change-Id: I06376c1e253981cb5a3020142d24fa5776513d4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166262
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-19 22:10:11 +02:00
Stephan Bergmann
038c198312 Embind: Clarify need for emscripten::internal::raw_destructor specializations
...which are needed at compile time (the emscripten::class_<T> ctor always
records the address of emscripten::internal::raw_destructor<T>, even in cases
where it never calls it; and raw_destructor internally calls delete, but the
dtor of the UNO interface types is protected) but not at runtime (as those UNO
interface types are only accessed through css::uno::Reference smart pointers)

Change-Id: I09e4f258f8dfc0fc53c0fe7210c7f709d86be176
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166304
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-19 21:38:50 +02:00
Noel Grandin
b209d17236 mpReqFontName is potentially pointing to freed memory
since we assign it from a temporary OString.

No idea why this hasn't caused a problem already.

Change-Id: I5480fb2ab5d1e07212ad804f99223946abf5a6c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166297
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-19 21:27:11 +02:00
Noel Grandin
598ff4e243 loplugin:constantparam in vcl
Change-Id: Ifab93e642773bcbf3801cee36bf3db66446febec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166295
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-19 21:27:01 +02:00
Noel Grandin
c04c38f484 loplugin:constantparam
Change-Id: I58e31ffdfc87a15e82bce54afd47ff3906159707
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166293
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-19 21:26:52 +02:00
Noel Grandin
99c857afda loplugin:unusedfields
Change-Id: I43b7a553177bbbdeebe37f7d7e63dfcb2ae70778
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166292
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-19 21:26:43 +02:00
Stephan Bergmann
78c613d7df Emscripten: Drop unused, deprecated EXPORTED_RUNTIME_METHODS
Linking Executable/soffice.html kept warning about

> warning: JS library symbol '$allocateUTF8' is deprecated. Please open a bug if you have a continuing need for this symbol [-Wdeprecated]
> warning: deprecated item in EXPORTED_RUNTIME_METHODS: printErr use err instead.
> em++: warning: warnings in JS library compilation [-Wjs-compiler]

printErr had been introduced in f090004c5f "WASM
adapt link and debug flags" and allocateUTF8 had been introduced in
ce60a3dd4d "Add LOKit functions and whitelist
export for it to WASM", but in both cases no code seems to ever have made use of
either of those two methods, before or after.

Change-Id: I1e81ca6ddad748d91653f709c272328cc8f2b679
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166296
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-19 21:21:24 +02:00
Stephan Bergmann
1c81f63e91 Embind: Consistently represent empty interface references as JS null
The existing code had two issues:  For one, e.g. calling a function that
returned a null interface reference mapped that to JS null, while querying an
object for a non-supported interface via `new css.uno.X...(y)` mapped that to
an "empty" JS object instead.  (So checking for a non-null reference needed to
be done as either `x !=== null` or as `x.is()`, depending on context.)  And for
another, while calling $is() on a non-"empty" object worked fine, it failed on
such an "empty" object (as the Embind internals of that object lacked the $$
property).

So change the querying mechanism from the `new css.uno.X...(y)` constructor to a
`css.uno.X....query(y)` function call syntax, which now returns JS null when
querying for a non-supported interface.  (And drop the broken $is method.)

Change-Id: I8fa488ab2892423f2a461d9b72db47e1d4df3b8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166255
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-19 21:20:59 +02:00
Stephan Bergmann
41706fcd96 Embind: Don't expose special XInterface methods to JS client code
Change-Id: I8592466b96406a1658d0a5a1b961142f862a9e4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166290
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-19 21:20:41 +02:00
Caolán McNamara
2e50b3850b add --enable-hardening-flags to enable compiler hardening flags
distros typically have their own set via C[XX]FLAGS, so make
this an optional argument

some notes on the options:

-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=2
https://www.redhat.com/en/blog/enhance-application-security-fortifysource
(I see Fedora has recently bumped to to 3 since Jan 2024
https://fedoraproject.org/wiki/Changes/Add_FORTIFY_SOURCE%3D3_to_distribution_build_flags
but here use 2 for now instead)

-Wp,-D_GLIBCXX_ASSERTIONS
https://fedoraproject.org/wiki/Changes/HardeningFlags28

-fstack-protector-strong
(We already apply this by default)

-fstack-clash-protection
https://fedoraproject.org/wiki/Changes/HardeningFlags28

-fcf-protection
https://fedoraproject.org/wiki/Changes/HardeningFlags28
https://cgit.freedesktop.org/libreoffice/core/commit/?id=af55dc3891f7950d392175004b2090cb0e54828e

and record the compiler flags in debuginfo
-grecord-gcc-switches

Change-Id: Ib05387bad8324b188bd4ed0ee327d6a7cf83973b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163312
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 33483058f6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166289
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-19 21:01:53 +02:00
Noel Grandin
5c6cdc5d5a loplugin:unusedfields update for new clang AST nodes
Change-Id: Icc47093ab13123e9cb2866434796c7d6e8eb38d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166291
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-19 20:32:18 +02:00
Michael Stahl
0c7ae3bd96 tdf#156146 tdf#159903 sw: add unit tests
Unfortunately the actual computed margins are not stored in text
formatting data structures so are only available directly from
SwTextMargin.

Change-Id: Ia7ce5e148194a55b5d9874ed112aaa977ed16c7b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166258
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-04-19 18:12:33 +02:00
Miklos Vajna
4ffe06a818 cool#8789 sc lok: fix copy for multi-selections
Select A1+A3 in Calc, copy, try to paste in B1, nothing happens.

This is because lok::Document::getSelectionTypeAndText() for a Calc
document ends up in ScViewFunc::CopyToTransferable(), which only handles
the SC_MARK_SIMPLE* cases.

Fix the problem by implementing support for SC_MARK_MULTI, similar to
what ScCellShell::ExecuteEdit() does in the SID_COPY case, which also
calls CopyToClip().

Keep the test highlevel as the Calc shell doesn't seem to have an easy
function to do the same as the Ctrl-click on a cell without duplicating
lots of code in the testcase.

Change-Id: I641d9db95ca391a4f39d96aeeb33422129262288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166279
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-04-19 17:14:37 +02:00
Justin Luth
78bd5e2523 xlsx export: fix corrupt file for Excel: protectedRange must have sqref
Excel refuses to open a file if there is no sqref specified
<protectedRanges>
  <protectedRange name="corruptFile"/>
</protectedRanges>

In this case, import failed to import sqref="10:131".
A follow-up commit avoids exporting these shorthand ranges.

I don't see much point in trying to create a unit test for this.
(I assume protectedRange is simply round-tripped
because I doubt LO has working support for protectedRanges.)

commit 9cee6a4563
Author: Eike Rathke on Thu Mar 20 10:16:50 2014 +0100
    added ScEnhancedProtection to ScTableProtection

Change-Id: I97ef1ee801898bdcace067d62890c4ce0e7cf1d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166265
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Justin Luth <jluth@mail.com>
2024-04-19 14:21:13 +02:00
Justin Luth
4a120f4f55 tdf#140616 writerfilter: recognize style rPr under pPr
Although it is completely NOT normal to put any rPr's
in the style's pPr (since they normally just go
into a stand-alone rPr), MSO is able to read and apply
those - while LO just ignored them (as misplaced properties).

It seems harmless to me to import it this way as well.

make CppunitTest_sw_ooxmlexport14 \
    CPPUNIT_TEST_NAME=testHighlightEdit_numbering

Change-Id: Ie4a6c4c91a8214f40e34dc58c47b0bb9381bac1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166189
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-04-19 14:20:58 +02:00
Andrea Gelmini
91bdf6c3ad Fix typo
Change-Id: Ia0262b3424eb6f05020e48dd0a497e27cfd10ad8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166282
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-04-19 12:17:26 +02:00
Andrea Gelmini
558990c0f0 Fix typo
Change-Id: Icff58bb1e1c0f409003cb3a97a10182fa4ded41a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166283
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-04-19 12:17:05 +02:00
Andrea Gelmini
7f95972026 Fix typo
Change-Id: I0f745fa74b0de96df7d2b887fca460d32faf77e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166281
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-04-19 12:16:49 +02:00
Andrea Gelmini
6fe1b4af87 Fix typo
Change-Id: I00f6c7696b9b2cdb6f1ac0ae71774795f48daf91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166285
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-04-19 12:16:30 +02:00
Andrea Gelmini
c526c04873 Remove exec bits on docx file
Change-Id: I69a9fb310e640b68ca4a9987b8b4a8b7cbd744c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166286
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-04-19 12:16:09 +02:00
Andrea Gelmini
e99a2fc119 Fix typo
Change-Id: I8b7aa192fbdc5269b0da527dc2aeb2d535f1f0d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166284
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-04-19 12:15:52 +02:00
Michael Stahl
1b2a6b9829 tdf#159903 xmloff: ODF import: fix bug in margin compatibility override
The check for the property being set was wrong: the state in a parent
style may be DIRECT_VALUE but a derived style may have a list style set,
which effectively overrides the ParaLeftMargin and ParaFirstLineIndent.

Fix this so that the compatibility override only happens when required.

(regression from commit 7cf5faec6f)

Change-Id: I6c8ca493df946afcb48a63c01c132620bcd7b390
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166257
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-04-19 10:49:40 +02:00
Noel Grandin
2f3b47ec80 rename rStyleIdx -> gnStyleIdx
to make it obvious we are dealing with nasty global state here

Change-Id: I7f2193600a6459c3a5cd51fece8151ac46aebe7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166242
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-19 10:16:19 +02:00
Balazs Varga
8df17c3401 tdf#160711 - sc fix XLOOKUP function search for empty cell
Make XLOOKUP function able to search for empty cells.

Change-Id: Iefa71b938fe658a59d52e0bf605dbef7a62742c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166263
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-04-19 09:19:37 +02:00
Xisco Fauli
01479c742f tdf#160721: nothing is displayed in case of wrong 'in' reference
Change-Id: I746ec8a12dba7832241693dac7f20788a2fa85bb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166267
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-04-19 09:08:25 +02:00
Kira Tubo
e75899a259 tdf#158451 - sw unit test - FILEOPEN DOCX crash
Unit text checks if DOCX file crashes when opened. Document contains grouped
shapes that is anchored "As character".

Change-Id: I7df17de0e1f1bf252593548883ba7959f2002023
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165776
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-04-19 09:08:14 +02:00
Mike Kaganski
2c2c155b37 Add a unit test for commit 3f0220f18a
(Handle empty range properly, 2024-04-18)

Change-Id: Ifea60ace8ff864ef092e6a62177d5926ceb60de3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166278
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-19 08:59:17 +02:00
Stephan Bergmann
495dddd2f5 Adapt to Clang 19 trunk isUnnamedBitfield -> isUnnamedBitField rename
<github.com/llvm/llvm-project/commit/3d56ea05b6c746a7144f643bef2ebd599f605b8b>
"[clang][NFC] Fix FieldDecl::isUnnamedBitfield() capitalization"

Change-Id: I198e19c00774ba111a441be2afe0b2a992cd6f0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166268
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-19 07:47:03 +02:00
Mike Kaganski
2642643ec0 tdf#160622: Let SalLayout::GetBoundRect return basegfx::B2DRectangle
This avoids premature rounding in TextLayouterDevice::getTextBoundRect.
The box in D2DWriteTextOutRenderer::performRender needs to be expanded
to allow room for the line width (which now will be guaranteed on all
sides; previously, the rounding could happen to give no room on some
side, even prior to commit 8962141a12).
Fixes some lines partially cut off in smaller text (or zoomed out).

Change-Id: I07335136021f894cf045363b4d736bfab06c64d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166236
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-19 05:31:51 +02:00
Mike Kaganski
58e79c4394 tdf#160700: Avoid both bookmark-start and bookmark-end at the same index
There is a special handling of CrossRefBookmark, which has no end position
in the document model, but must span the whole paragraph, and end position
is generated explicitly.

Since commit 1d7ce42148 (tdf#159438: when
there's no frame, close previous bookmark first, 2024-01-30), end marks
of an index are sorted before start marks of the same index, with the
expectation that start / end marks represent non-empty span. Dun in case
of empty paragraphs with a CrossRefBookmark, both start and end mark were
emitted into the same index, and the new sorting resulted in the wrong
order of the elements.

Fix this by checking if the start index is less than node end, and don't
handle CrossRefBookmark specially, if the check is negative. This writes
a single text:bookmark, instead of a text:bookmark-start, followed by a
text:bookmark-end.

Change-Id: I533c4f7814edddc3cf24b1213490f251d60b2273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166266
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-19 05:23:38 +02:00
Mike Kaganski
edef46e82e tdf#160717: fix ex handling
Same as in commit e275726861
(tdf#160593: make sure to use current element's font size for em unit,
2024-04-18) for em.

Change-Id: Id9003c0426a6b373456da1aa1550f7ff07f766a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166235
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-19 05:18:50 +02:00
Stephan Bergmann
75fe059974 Embind: throwUnoException from JS
(If throwUnoException directly took a css::uno::Any argument, JS client code
would need to create one with `new Module.uno_Any(...)` and call .delete() on
it, but there is no place where it could call .delete(), so make
throwUnoException take two arguments instead and assemble the css::uno::Any on
the C++ side.)

Change-Id: Iae4ae6af804354d5cf752115e272b79d61427440
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166253
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-18 22:16:33 +02:00
Miklos Vajna
4322ec8f8f CppunitTest_sw_uibase_docvw: turn on set_non_application_font_use
Similar to commit dc4d7500c9 (Fix
CppunitTest_sd_import_tests-smartart non_application_font_use,
2023-10-23), though this didn't find anything.

Change-Id: I775e984410c1e25fb1ae09a9ddfa09793a4f9bb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166231
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-04-18 21:51:08 +02:00
Mike Kaganski
3f0220f18a Handle empty range properly
Since commit 690526f95e
(Generalize basegfx::fround for templated return type, 2024-04-14),
an assertion could fail for certain case, like

include/o3tl/unit_conversion.hxx:75: sal_Int64 o3tl::detail::MulDiv(I,
sal_Int64, sal_Int64) [I = long]: Assertion `isBetween(n,
(SAL_MIN_INT64 + d / 2) / m, (SAL_MAX_INT64 - d / 2) / m)'

The problem was unchecked case of empty B2DRange.

Change-Id: Ice9125ea557b73a7fabf64bc1ad9368f503ad525
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166101
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-18 21:28:16 +02:00
Stephan Bergmann
edfe8adcec Embind: call decrementExceptionRefcount upon catching
The note at
<https://emscripten.org/docs/porting/exceptions.html#handling-c-exceptions-from-javascript>
is a bit vague whether decrementExceptionRefcount would only be needed for
Wasm-based (-fwasm-exceptions) exceptions, or also for the JS-based
(-fexceptions) ones that we currently use.  (But it does state clearly that for
the latter we need to manually call incrementExceptionRefcount first.)

Change-Id: I7714935607c990385f68730d02e367e70fa0ea03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166250
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-18 20:58:50 +02:00
Caolán McNamara
fbaeeee7ac crashtesting: crash on export of forum-mso-en4-470772.xlsx to xlsx
similar fix as:

commit 1d5630c5de
Date:   Tue Apr 16 15:21:49 2024 +0900

    pivot: add checks that prevent reading out of vector bounds

Change-Id: I190da7586cff9c7e8dd4011ad61e68abba6ecd53
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166240
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-18 20:24:51 +02:00
Mike Kaganski
86a8a3a43b tdf#160594: Use the recommended fallback of 0.5em for ex in font-size
This fixes the error of identical treatment of em and ex in font-size,
which violated https://drafts.csswg.org/css-values-4/#font-relative-length.
The fix uses the fallback of 0.5em for ex, similar to the code used in
SvgNumber::solveNonPercentage. A follow-up should implement the correct
use of "x-height of the first available font".

Change-Id: Id9d581994e158d629d9752299ad93ac7e9fe4cad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166234
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-18 18:21:15 +02:00
Mike Kaganski
e275726861 tdf#160593: make sure to use current element's font size for em unit
According to https://drafts.csswg.org/css-values-4/#font-relative-length
em is "equal to the computed value of the font-size property of the element
on which it is used". This means, that for an element that defines its own
font-size, attributes like 'dy' using em refer to the new font-size, not to
inherited font-size.

Change-Id: Ie5a013df99a68edddf466e4c0ee5311f6219fcb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166233
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-18 18:21:09 +02:00
Balazs Varga
d7214aba95 tdf#160517 - chart odf: import/export formatted chart titles
(main, sub, axis titles) texts properly to/from odf format.

Fix odf export of formatted chart titles. The exported data structure
will look like:

<chart:title svg:x="3.304cm" svg:y="0.285cm" chart:style-name="ch2">
    <text:p>
        <text:span text:style-name="T1">This</text:span>
        <text:span text:style-name="T2"> is</text:span>
        .
        .
        .
        <text:span text:style-name="T3">3</text:span>
        <text:span text:style-name="T2"> a </text:span>
    </text:p>
</chart:title>

Fix import of formatted chart titles. Put the properties and related texts
into the chart2::XFormattedString2 uno objects.

Follow-up commit of:
55e9a27afd
Related: tdf#39052 - chart ooxml: export formatted chart titles

4f994cec38
tdf#39052 - Chart: make characters formatable in editable chart textshapes

--
TODO: chart data point / dataseries labels are handled differently
since those are not editable objects, but that is a completily different
issue.
--

Change-Id: I1842f2c69c132bdf578bb2d354f451cc9d49c63c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166122
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Jenkins
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2024-04-18 18:07:57 +02:00
Xisco Fauli
176406a07e svgio: factor out common code
Change-Id: Ib86f04364593546f53419b37d35469c561561aa1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166188
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-04-18 17:24:10 +02:00
Stephan Bergmann
830ec75f2f Embind: We no longer need interface FromAny ctor
...now that we have uno_Any get() since 8428368d79
"Improve Embing'ing of UNO Any somewhat"

Change-Id: I06572e1ca152117c5c93a1552e50b1399af84780
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166244
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-18 17:13:28 +02:00
Olivier Hallot
191d7d251d Update git submodules
* Update helpcontent2 from branch 'master'
  to 7e29cad08d812997ae5053444c86edf1c8c971d4
  - Use svg icons in Help page
    
    Change-Id: I1418d54df7393321e79706d4885af50e6fdea59b
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166249
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2024-04-18 16:39:18 +02:00
Olivier Hallot
c8f2cca985 Update git submodules
* Update helpcontent2 from branch 'master'
  to 9e32990654d9b4ad397f6e0d21973483b1bf47f9
  - tdf#86427 automatic label detection explanation
    
    + refactor a warning and cross-link between option pages and guide.
    
    Change-Id: I0f337c4999d41a96355422540da4d173f02b5a21
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166252
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2024-04-18 16:38:36 +02:00
jucasaca
7edca7dc74 tdf#158056 Connect to MS Access .mdb files by mean of ACE.OLEDB.12.0 provider
* Modify the code so that all connections to MS Access files, both .mdb
and .accdb are made with the provider "Microsoft.ACE.OLEDB.12.0".
* Remove all references to the "Microsoft.Jet.OLEDB.4.0" provider to clean
up the code.
* Leave only one entry "Microsoft Access" in the Connection Wizard, which
would work for .mdb and .accdb files.
* Remove the entry "Microsoft Access 2007" from the Connection Wizard,
since it is no longer needed.

Change-Id: If523712d071199d61e0c994b35291d3a69246ad1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165756
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-18 16:19:04 +02:00
Noel Grandin
e1268721d4 tdf#160706 speed up loading conditional formatting rule in XLS (3)
the comment when calling MakeCellStyleSheet does not match the
implementation, so make the implementation match the comment.
i.e. if there is an existing stylesheet with that name, just return it.

Reduces load time for me from 47s to 33s

Change-Id: If1bd08baf8515933b87c075d9eef04bc0a125357
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166241
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-18 15:42:01 +02:00