Commit Graph
520371 Commits
Author SHA1 Message Date
elioperdreau 368829e5f2 odfstudio: adapt prototypes to upstream API changes
Change-Id: I4504ed441ec4ffba82e1b3ece2279854e042a99a
odfstudio/upstream-sync-build-ok-2026-09-28
2026-09-28 18:24:35 +02:00
elioperdreau 9f2c8403f2 odfstudio: clean up whitespace
Change-Id: I73e4876f845f70e0b02fee14463ff1dd2f614be4
2026-09-16 22:04:05 +02:00
elioperdreau 4d0ef4a077 odfstudio: synchronize with LibreOffice upstream 2026-09-16 22:00:48 +02:00
elioperdreau c2b5ab6b2e odfstudio: add upstream maintenance tools
Change-Id: I352b0b0bf55ba845afd6289250060b7af44a26ee
2026-09-16 21:28:39 +02:00
Mike Kaganski ab5bdc9cdd Use IsTextNode instead of comparison of GetNodeType result
Looks more consistent to me.

Change-Id: Id61cb07ece99766b31713006ad3cc4d46c362791
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12304
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 1c7834da4d12de8458d57eee25e2fe97b5c6ace5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211047
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 20:20:59 +02:00
Mike Kaganski 1eca0c353a Simplify SwFillCursorPos ctor using default initializers
Simplifies code, no functional changes.

Change-Id: I433a3aa697d8bf3056d51894137f783821915970
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12051
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit ce897ee2f106bf890b8e3d431e0e34f48c9d9c65)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211046
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-16 20:20:53 +02:00
Mike Kaganski 121c5f332f Drop SwSpecialPos ctor, and use default initializers instead
Simplifies the code a bit, no functional changes.

Change-Id: I72f71db5e12945d904b8922987bf7d5a4d231481
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12050
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 72bfe9ed3e36faf927a31e235fef3fb91ae52851)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211045
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 20:20:45 +02:00
Christopher Sherlock 5970e72c67 vcl: introduce ViewSubPixelToLogicInt() wrappers to CoordinateMapper
This commit completes the inverse sub-pixel pipeline by adding the
ViewSubPixelToLogicIntX/Y() master wrappers and their corresponding
LogicUnits pipeline stages.

Unit testing revealed that the order of operations in SubPixelToLogic
is mathematically sensitive: the floating-point View distance must
be rounded to an integer (llround) BEFORE any integer offsets
(mnMapOfs or mnOutOffLogic) are subtracted. Shifting the rounding
boundary by applying offsets in floating-point space leads to
off-by-one errors for fractional coordinates near zero-crossing points.

Key changes:
- Added ViewSubPixelToLogicUnitsIntX/Y(): Pipeline stages that round
  scaled distances to tools::Long before stripping the mapping offset.
- Added ViewSubPixelToLogicIntX/Y(): Master wrappers that provide the
  full "Round-then-Shift" journey from View sub-pixels to Absolute
  Logic integers.
- Refactored OutputDevice::SubPixelToLogic() in map.cxx to use these
  new wrappers, successfully encapsulating the manual offset
  arithmetic while maintaining exact legacy rounding behavior.

Change-Id: Icecd9a2f5f75cb5353e6c7d9431be22c0889e968
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203671
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-09-16 19:00:46 +02:00
Christopher Sherlock 82c68a6f63 vcl: simplify PixelToLogic() with ViewToLogic() master wrapper
This commit refactors OutputDevice::PixelToLogic() to utilize the
new ViewToLogicX/Y wrappers from CoordinateMapper.

While theoretically PixelToLogic() should be the exact inverse of
LogicToPixel() (which traverses all the way to Window Space), we
intentionally preserve the historical behavior here. The legacy
code specifically calculated the transition from View Space back
to Absolute Logic Space, skipping the internal window offsets
(mnOutOffOrig).

Key changes:
- Replaced the manual ViewToLogicUnits() scaling and subsequent
  subtraction of the logical offset (GetLogicalXOffset) with the
  encapsulated ViewToLogicX/Y() wrappers.
- Retained the explicit IsMapModeEnabled() early exit to maintain
  exact bug-for-bug compatibility with existing legacy callers
  that may expect this specific coordinate space behavior.

Change-Id: If16d2d764030810037d52304823517f946551507
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203670
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-09-16 18:58:30 +02:00
Michael Weghorn 59935510a2 sc a11y: Use OAccessible in ScAccessibleDocument::getSelectedAccessibleChild
Use more concrete OAccessible instead of the abstract
XAccessible UNO interface for local variable
in ScAccessibleDocument::getSelectedAccessibleChild.

Change-Id: If775e27f4e139f482a3793a60ef30443ba474f62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211009
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 18:38:55 +02:00
Michael Weghorn a8f049bf19 sc a11y: Use OAccessible in ScAccessibleDocument::getAccessibleChild
Use the more concrete OAccessible instead of the
abstract XAccessible UNO interface for the local
variable in ScAccessibleDocument::getAccessibleChild.

Change-Id: I43cf2ed8edf3a8da08aa7319cdf9d01e2bc15f7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210976
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:49 +02:00
Michael Weghorn 1d7ee2a2b9 sc a11y: Use OAccessible in ScAccessibleDocument::getAccessibleAtPoint
Use the more concrete OAccessible instead of the
abstract XAccessible UNO interface.

Change-Id: I2104876188a271db69d739c930a23b935c152af5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210975
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:43 +02:00
Michael Weghorn 53a9d84795 sc a11y: Call OAccessible::getBounds directly
OAccessible implements the XAccessibleContext and
XAccessibleComponent UNO interfaces itself, so just
call the method directly instead of first explicitly
retrieving references to those interfaces from the OAccessible.

Change-Id: I5695880e28bd7061014135790fabb30bb7970cff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210974
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:37 +02:00
Michael Weghorn a5e8197fdd sc a11y: Switch AccessibleDocument::mxTempAcc to OAccessible
Use the more concrete OAccessible type instead
of the abstract XAccessible UNO interface.

Change-Id: I088f65cd79338eca2bfa5893149108f95cde8df3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210973
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 18:38:30 +02:00
Michael Weghorn 4974dac79c sc a11y: Pass OAccessible to ScAccessibleDocument::AddChild
Switch the ScAccessibleDocument::AddChild param from the
abstract XAccessible UNO interface to the more concrete
OAccessible.

Adjusting ScAccessibleDocument::RemoveChild accordingly
will happen separately as it requires some more preparatory
work to make (clear) all callers pass an OAccessible (subclass).

Change-Id: I3ea3cced60895ef5aa022b14ab767ab7beef6797
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210972
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 18:38:23 +02:00
Michael Weghorn 28c78efba7 sc a11y: Use concrete type in ScAccessibleDocument::PreInit
Use a reference to the concrete ScAccessibleEditObject instead
of one to the abstract XAccessible UNO interface.

Change-Id: I4bf93cace1ce7d002de2bd00421fcde17824316a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210971
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:15 +02:00
Michael Weghorn 8c8c17c57f vcl a11y: Use concrete type for AccessibleIconChoiceCtrlEntry::m_xParent
Use the concrete AccessibleIconChoiceCtrl type for that
member as the parent is always of that type.

Drop now redundant method calls and UNO querying to
get the XAccessibleContext and XAccessibleComponent
and XComponent interfaces for the parent, as
AccessibleIconChoiceCtrl implements these interfaces
itself (via its OAccessible base class).

Change-Id: Id33943b0458506542798f7f333fb416820b89ec2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210970
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:08 +02:00
Michael Weghorn c1967a3bb4 vcl a11y: Pass AccessibleIconChoiceCtrl as parent for its entries
The accessible parent of an AccessibleIconChoiceCtrlEntry
is always a AccessibleIconChoiceCtrlEntry.

Pass that concrete type instead of the abstract XAccessible
UNO interface to the AccessibleIconChoiceCtrl ctor to make
that clear.

Change-Id: I31836925ac631922adeb320ff77d84ae915f1432
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210969
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 18:38:01 +02:00
Mike Kaganski 7c2c72d189 tdf#167121 sw: tag the link an index mark covers
A hyperlink whose text an alphabetical index entry covers exported a
link annotation with no tag around it, so PDF/UA checkers reject the
file:

 Link annotation is not nested inside a Link structure element

that is ISO 14289-1 7.18.5. The same happens under a reference mark or
an RDF metadata field.

Each of the three lays its run out as its own portion type, a
SwTextPortion whose only addition is a shading that never reaches an
export. BeginInlineStructureElements listed Text, Lay and Para, so the
run matched no case and got no element at all - not even the Span
carrying its language.

Handle the three with the other text portions.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ie38193f64923cd6a0a3afa509691fb29a007f272
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12104
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 409e0cc615e191a0392ee080717bb84eb61e4724)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211027
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-16 15:56:48 +02:00
Christian Lohmaier 0916bb2e7a update credits
Change-Id: I7b52ec53f3fea03834f4f69f9d93bb01391c6895
2026-09-16 13:51:21 +02:00
Samuel Mehrbrodt 949f78ed90 cool#14390 Cache a chart series' external reference for export
A pie chart whose series pulls from another, unreachable workbook
lost its data on the next save. XclExpFmlaCompImpl::ProcessExternalRangeRef
only caches an external reference's value when mbFromCell is set, and
chart series formulas are configured with mbFromCell false, the same
as names and validation formulas that don't need that cache. A chart
is different: when no other formula in the sheet touches the same
range, this is the only place its value ever gets stored for export.

Cache it for chart formulas too, in both ProcessExternalCellRef and
ProcessExternalRangeRef, leaving the other non-cell formula types
untouched. Add testCool14390_ChartExternalRef, with a trimmed copy of
the reporter's own file, to pin this down.

Signed-off-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Change-Id: I8ad16765cf8ab6ef426f56a5635398b09e2ada95
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10284
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
(cherry picked from commit 57a180d278626b610f4157c05098660516782598)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211028
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-16 13:45:25 +02:00
Christian Lohmaier 534ed00544 Update git submodules
* Update translations from branch 'master'
  to 6f2222cc49bd201e38cbb2db14e04ec575b98ae4
  - update translations for master
    
    and force-fix errors using pocheck
    
    Change-Id: I11dbdccaa593be2456433878ac60167a335ca0dc
2026-09-16 12:56:00 +02:00
Xisco Fauli 679d042d6f fast_float: upgrade to 8.3.0
Downloaded from https://github.com/fastfloat/fast_float/archive/refs/tags/v8.3.0.tar.gz

Change-Id: I1bcfc78f1abebd97c9f55d5a6c2f8ef8ac7cef50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211030
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-16 12:47:21 +02:00
Caolán McNamara 949b19a363 crashtesting: keep a page that pdfium cannot read in the import
reproduce by converting the crashtesting document
bitmapreadaccess_getpixelforn24bittcbgr_segmentation_fault.sample,
which is a pdf despite its name, to odg:

 soffice.bin: sd/source/filter/pdf/sdpdffilter.cxx:102: bool ImportPDF(...):
 Assertion `nPageNumber >= 0 && o3tl::make_unsigned(nPageNumber) < aGraphics.size()' failed.

pdfium cannot read three of the five pages here. Both the page size by
index and the page itself fail, so this isn't our size test being too
strict. The file is fuzzed, mutool reports a broken xref and an
invalid object number, and one MediaBox reads
[ 1612934155079108773 0 594 841 ].

ImportPDFUnloaded dropped each page that it couldn't read, so a five
page pdf became a two page Draw document with nothing to say three
pages were lost. The graphics that remained kept their own pdf page
numbers, which then had gaps, and the last one pointed past the end.

Keep an entry for every page the pdf declares. Such a page takes the
size of the last page that did come through, A4 to start, and warns.
It still carries its own page number, so there are no gaps left for
sd to trip over.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id0d0bde13a2102b4e30cc0dd71edf17031406e1d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5639
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 321ab2f58f62bf3037ee32e1696bacd14c8f06ed)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211020
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 11:36:37 +02:00
Caolán McNamara 6451dfad11 html import: take an unsized image's size from the link update
Don't open the image file during parsing to read its header. The image is
registered as a link, so the frame can start at the HTML default size and get
the real size when the links are updated.

Change-Id: I47b160b883f3bc6bd6de23ac3085df1ef83fcdc3
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10845
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 69bd0e4d6dbcc67f8dd9b63e15356890445081f7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211017
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-16 11:08:08 +02:00
Michael Weghorn 6a023bacb9 Return std::unique_ptr in Application::CreateMessageDialog
The caller of Application::CreateMessageDialog owns the
returned message dialog.

So far, it was returned by a plain weld::MessageDialog*.

Return a unique_ptr instead, to make clear the ownership
semantics. (Also adjust SalInstance::CreateMessageDialog
accordingly, which is called by Application::CreateMessageDialog
and implements the actual logic to create a message dialog.)

Adjust callers where needed.
Most callers were already using a smart pointer for the
returned message dialog anyway.

Change-Id: I7c06bb24b611bd67f5af89800adb13bf22dcc6fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211013
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 10:35:19 +02:00
Tomaž Vajngerl 508dfcabb8 sc: stop over-solving the solver's quadratic subproblem
Each major iteration of the sequential quadratic solver solves a
quadratic subproblem with Frank-Wolfe, where every inner step is
a CoinMP linear solve. The loop ran until the duality gap fell below
a tiny absolute floor, which on harder models meant many inner linear
solves spent driving the gap to a precision the outer loop does not
need: it re-samples and re-solves around the accepted step anyway.

Also stop once the gap has shrunk to a small fraction of its value
on the first inner step. The step is then good enough to accept,
and the outer trust-region loop corrects any remaining error. This
cuts inner linear solves with no loss of solution quality: on the
resource model the solver still reaches the same optimum.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I80d118176840ab6c63ac939f962e8f8d3bb9a3b9
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4924
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit b63997355fee236cded23bc32e813bc412ed8984)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209439
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-16 09:44:20 +02:00
Tomaž Vajngerl 8e0d1c26c5 sc: default the swarm solver to the hybrid algorithm
The swarm solver offers differential evolution, particle swarm,
and the hybrid of the two. On the test models the hybrid reaches
the best  solutions: it keeps the spread that lets the search
escape weak local optima while still converging well, and it stays
feasible on the tightly constrained models where plain differential
evolution does not. Make it the default so a solve that does not
pick an algorithm gets the strongest one. The other two remain
selectable through the Algorithm property.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ib47a51ed4980e03e44b4d757abffa5c8e4824bdc
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4923
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit d699993f78761bf33f31db2ff9f1150e33006e61)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209438
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 09:44:14 +02:00
Tomaž Vajngerl bdf3a86c44 sc: add a hybrid swarm solver alternating the two methods
The swarm solver could run either differential evolution or particle
swarm optimization. Add a third choice that combines them, selected
by the Algorithm property value 2. With the swarm framework in place
the hybrid reuses both engines instead of copying either one.

The hybrid owns one swarm and both engines and alternates them
generation by generation: a particle swarm generation on even counts,
a differential evolution generation that mutates toward the swarm's
best on odd ones. Each generation still costs one fitness evaluation
per particle, the same as either method alone.

Alternating combines the social convergence of particle swarm
optimization with the selection pressure and diversity of
differential evolution. On rugged models with many local optima
it reaches a good solution in less time than particle swarm
optimization alone, and on tightly constrained models it stays
feasible where plain differential evolution does not.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I01cf454a72a75fe2937b73560b699862fdc3779e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4947
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 757b50253891e35fd08ef9147431aed5a41ae002)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209437
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 09:44:07 +02:00
Tomaž Vajngerl 7fb5ef1054 sc: share one swarm framework across the swarm solvers
The particle swarm and differential evolution solvers each carried
their own copy of the same swarm bookkeeping: the particle list, the
global best, the generation counters, the random generator, and the
loop that seeds, restarts, and steps the swarm. Only the per-particle
update differed between them. Two copies had to be kept in step, and
a third method would have meant a third copy.

A Swarm now holds that shared state and runs the per-generation loop,
the initial seeding, and the restart. It folds each particle's
fitness into the personal and global bests and tracks when the
best last moved.

PSOAlgorithm and DEAlgorithm are one-generation engines bound to a
swarm. Each carries only its own per-particle update and asks the
swarm to advance, so the loop lives in one place.

The standalone particle swarm and differential evolution solvers
become thin wrappers that own a swarm and their engine and delegate
to it. This only moves code: the search each solver runs is
unchanged.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I0f94ecf51e94899be4521685ef6a175c6fa8f1dc
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4946
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 1c3fe258c816a52bd2fe20450aa1a426a896c601)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209436
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 09:43:59 +02:00
Tomaž Vajngerl 4b1594cd40 sc: help the swarm solver reach feasible and better solutions
The swarm solver gave up easily on models with many variables or
tight constraints. These changes let it find feasible and better
solutions there, while leaving small models unchanged.

Score an infeasible point by how far it breaks the constraints,
giving the search a slope to follow toward the feasible region. A
strict feasibility test still decides what is reported, so a
nearly-feasible point is never returned as the answer.

Seed the first half of the starting population from the document's
current values, leaving the rest random. A variable often has no
upper bound, so a fully random start would sit far from any
sensible value.

Scale the population with the number of variables, between a floor
and a cap, so high-dimensional models keep enough diversity while
small ones keep their previous size and cost.

Restart from a fresh spread when the search stalls, keeping the best
point found so far. A run that has settled in a local optimum then
spends its remaining time looking elsewhere instead of stopping at
the first stall.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I62b24b8914e67ee4c70adc66d685e6acee065405
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4921
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit b744979728a347d7eda9f11ba2af662e43b125c2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209435
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 09:43:53 +02:00
Michael Weghorn 20c69d51b4 vcl a11y: Stop retrieving XAccessibleContext for OAccessible
OAccessible implements the XAccessibleContext interface itself
and returns a reference to self in its
XAccessible::getAccessibleContext implementation.
Therefore, stop calling XAccessible::getAccessibleContext
in a few places of the VCLXAccessibleBox implementation
to get the accessible context.

Change-Id: Id3b65a58a99029f974df2cd7e613eb3b65f76b47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210968
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:48 +02:00
Michael Weghorn d9bebde44a vcl a11y: Drop commented code in VCLXAccessibleBox::getCurrentValue
It's commented out ever since it was added in

    commit efb23f2998
    Author: Steve Yin <steve_y@apache.org>
    Date:   Mon Nov 25 15:24:55 2013 +0000

        Integrate branch of IAccessible2

Change-Id: Ia75f737762b608fc420959de2ac89588c0b24800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210967
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:40 +02:00
Michael Weghorn e3fb1e2bb5 vcl a11y: Drop redundant call to OAccessible::getAccessibleContext
OAccessible implements the XAccessibleContext interface itself
and returns a reference to self in its
XAccessible::getAccessibleContext implementation.

Drop the superfluous call in
VCLXAccessibleBox::ProcessWindowEvent altogether
and also drop the null check as result of the static_cast
of a non-null pointer is known to be non-null.

Change-Id: I460c61b64cc9c5185b61c479ab4014785cab3c10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210966
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:32 +02:00
Michael Weghorn e0a1759c8d vcl a11y: Make VCLXAccessibleBox::BoxType an enum class
Change-Id: If744c0f105050285646bdbe02a1092dd16da6230
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210965
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 09:25:26 +02:00
Michael Weghorn 0aaf2b7f3a vcl a11y: Switch VCLXAccessibleBox::m_xText to OAccessible
Switch that member from the abstract XAccessible UNO interface
to the more concrete OAccessible.
This makes clear that only subclasses of OAccessible are
used for it and allows further simplification in upcoming commits.

Change-Id: I1f8ab48edbd6290c7a35d8c209f14fb66d2cbbd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210964
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:19 +02:00
Michael Weghorn 6d86cbbbef vcl a11y: Drop local var in VCLXAccessibleComponent::getAccessibleParent
Return the result right away instead of first assigning it
to a local XAccessible variable.

Change-Id: I676ecfb07d5fe5403bc8e111569db7e0c38659d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210937
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:12 +02:00
Michael Weghorn cf3ac4fe15 sc a11y: Simplify ScAccessiblePageHeaderArea::GetBoundingBox
OAccessible implements the XAccessibleContext and
XAccessibleComponent interfaces itself, so there is no
more need to explicitly retrieve/query for those with
previous commit

    Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 12:15:25 2026 +0200

        sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible

in place.

Simplify accordingly.

Change-Id: I024e2a1ba864cbf7c9d9f0cf68802093b026762e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:25:06 +02:00
Michael Weghorn def588c000 sc a11y: Use OAccessible methods directly in ScAccessiblePageHeaderArea
OAccessible implements the XAccessibleContext and
XAccessibleComponent interfaces itself, so there is no
more need to explicitly retrieve/query for those with
previous commit

    Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 12:15:25 2026 +0200

        sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible

in place.

Simplify accordingly.

Change-Id: I6c7e26876c76d9df7dc7f93a2b8ca0690994efa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210935
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:59 +02:00
Michael Weghorn dfa021730f sc a11y: Use OAccessible methods directly in ScAccessibleContextBase::getLocale
OAccessible implements the XAccessibleContext interface
itself, so there is no more need to explicitly retrieve it
with previous commit

    Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 12:15:25 2026 +0200

        sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible

in place.

Simplify accordingly.

Change-Id: Ib845cbc4bc1b3e65e78300ec8242daaddd376bb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210934
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:52 +02:00
Michael Weghorn 48395eb1ee sc a11y: Use OAccessible methods directly in ScAccessibleContextBase::isShowing
OAccessible implements the XAccessibleContext and
XAccessibleComponent interfaces itself, so there is no
more need to explicitly retrieve/query for those with
previous commit

    Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 12:15:25 2026 +0200

        sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible

in place.

Simplify accordingly.

Change-Id: I8eaf74c97e8583f351ef7365660dde01875b42da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210933
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 09:24:45 +02:00
Michael Weghorn 8f9f7f9c7b sc a11y: Switch ScAccessibleContextBase::mxParent to OAccessible
Switch ScAccessibleContextBase::mxParent from the abstract
XAccessible UNO interface to the more concrete OAccessible.

This will also allow further code simplification in an upcoming
commit.

Change-Id: I334f5ffef5214cff20cebcc9527e863128df703f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210932
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:38 +02:00
Michael Weghorn ef6bb28d9c sc a11y: Pass OAccessible to ScAccessibleContextBase::SetParent
Pass the more concrete OAccessible for the parent param instead
of the abstract XAccessible UNO interface, to make clear the
passed parent is always a subclass of OAccessible.

Change-Id: I38c72ac786fddecc1d837259042078be5a4f70e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210931
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:32 +02:00
Michael Weghorn d0ab6076e0 svx a11y: Use OAccessible in AccessibleShape::getAccessibleStateSet
Use AccessibleContextBase::implGetAccessibleParent to get the
more concrete OAccessible instead of the abstract XAccessible
UNO interface for the parent.

Drop the now unnecessary call to XAccessible::getAccessibleContext
to get the XAccessibleContext interface for the parent, as OAccessible
implements that interface itself and returns a reference to self
in its implementation of that method.

Change-Id: I4aaddc7579af45f6283f15c0e2ab2714bca9c8e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210930
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-16 09:24:24 +02:00
Michael Weghorn 07ddbb7066 editeng a11y: Simplify AccessibleContextBase::getLocale
With previous commit

    Change-Id: I570d21fc98dd76bfd198384bf84d1f8407757fab
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Sep 14 11:58:20 2026 +0200

        a11y: Use OAccessible in AccessibleContextBase et al.

in place, there is no more need to get the XAccessibleContext
for the parent in a separate step, as OAccessible
implements that interface itself and returns a reference
to self in its XAccessible::getAccessibleContext implementation.

Drop the now unnecessary call to that method.

Change-Id: I306a3bae3b3df0c2f515394dc7174cbfad790120
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210929
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:17 +02:00
Michael Weghorn 3aba95a607 a11y: Use OAccessible in AccessibleContextBase et al.
Switch from using the abstract XAccessible UNO interface
to using the more concrete OAccessible base class in
editeng's AccessibleContextBase and related classes:

1) extract the AccessibleContextBase:getAccessibleParent
   logic to a new AccessibleContextBase::implGetAccessibleParent
   helper that returns an OAccessible instead of an XAccessible
2) mark AccessibleContextBase:getAccessibleParent
   as final to prevent it from being overriden in any child class
   and ensure the new helper is equivalent, but gives
   the more concrete OAccessible type
3) switch callers of AccessibleContextBase:getAccessibleParent
   to call the new AccessibleContextBase::implGetAccessibleParent
   instead and switch related local variables and class members
   from XAccessible to OAccessible

Change-Id: I570d21fc98dd76bfd198384bf84d1f8407757fab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210928
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-16 09:24:08 +02:00
Xisco Fauli 60771de67f CppunitTest_vcl_pdfexport2: split in two
It already has 120 tests

Change-Id: Ib70821f7039273b2b5311c259d6e8a65f273cf96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210995
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 08:56:58 +02:00
Tomaž Vajngerl d64ee176b7 sc: fix the area for a table reference reached through a name
The earlier change only handled the simplest case of a list validation
that points at a name wrapping a table reference. A name defined as
MyTable[Column] still came up empty, and a table with a header row showed
its values shifted up by one, with the header as the first entry.

Match the name's leading token against a table reference instead of
requiring the whole body to be a single token, so column-qualified
references are handled too. Take the area from the reference the compiler
already resolved, which is the right column without the header and totals
rows, and fall back to the database range with those rows dropped when
the reference is not yet compiled.

Move the table-reference-to-area lookup into one helper shared by the
direct branch and the through-a-name branch.

Add tests for a numeric table with a header and for a column-qualified
reference.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I105fee3a677d5e982403562adc8f9a4e6bb94a25
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5531
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 4c9e6da406be75d90323e1728556a1cd3afbaa09)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210986
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-16 08:56:35 +02:00
Julien Nabet 137f0c8cc6 tdf#108243: semicolon separated fonts substitution pb (Linux/fontconfig)
The pb was that a substitution for the nonexisting font was done and successful
without taking into account a explicitely font provided.
So before calling FindFontSubstitute, test nTokenPos to know if there's
a substitute font.

I started from https://bugs.documentfoundation.org/show_bug.cgi?id=108243#c13
but the root cause was found and a fix proposed by ChatGpt (GPT-5.6 Luna).

I tested the initial odt file provided in the bugtracker it worked.
I also did the same test without substitution font provided, it was ok too
since it was replaced by a Noto font.

Change-Id: I992d1ed5e4ebcf8795718001d17f8afda32e4735
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210680
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-09-16 08:48:51 +02:00
Xisco Fauli dd2838cc25 libfreehand: upgrade to 0.1.4
Generated with:
./autogen.sh
./configure
make dist-xz

Change-Id: I264cad9c09d2ba8667371142612b0740f707356f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211005
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-15 17:33:17 +02:00