Commit Graph
3188 Commits
Author SHA1 Message Date
Andrea Gelmini a486bdeef2 Fix typos
Change-Id: Ieb4e85c582ae37b6d83411b5e76303453bf8ea35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210570
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 16:25:21 +02:00
Noel Grandin 7b0729cd8b UpdateAllLinks pParent parameter is always nullptr
Change-Id: I67b9bc9cb235d66ffb4eef1d6a01535664b30bc7
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10464
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 178ec8504f2fe78725c2f9bff78f1db698b8fca3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210286
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-31 15:56:24 +02:00
Andrea Gelmini e949f09e53 Fix typos
Change-Id: I8cf2dcb6fc2c04791a1ccbebe307a24b203ac9dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210186
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-29 15:27:57 +02:00
Andrea Gelmini 51d7299b23 Fix typos
Change-Id: Ibb0284476740872705aa8efd7371ab5bb9169bfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210185
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 13:32:06 +02:00
Krunal Baraskar ff95e14a30 tdf#121759 Add Enable toggle to Insert Header/Footer dialog
Implemented the fix suggested in comment#33 of tdf#99296

Added a new "Enable" checkbox (checkBTN_ENABLE_HF) to
headerfootercontent.ui, placed left of the "Preset" line.

Added ToggleEnableHdl in scuitphfedit.cxx to dynamically disable/gray
menu options when disabled.

Updated "FillItemSet" to utilize a purely boolean toggle.

The changes below were made using AI assistance for code review (Claude Opus 5).

Dropped editeng/ulspitem.hxx, nothing references SvxULSpaceItem.

Used ScResId(STR_HF_ENABLE_HEADER / _FOOTER) instead of string
concatenation.

Removed the SID_HFEDIT disabling in GetStatePageStyle, as on/off is now
set inside the dialog.

Removed m_bHeaderOn, m_bFooterOn and GetPageOnFromPageStyleSet, left
unreachable by the above.

Removed the on/off branching in ExecutePageStyle, as ScHFEditActiveDlg
re-derives the shared left/right setting itself.

Restored two internal-child entry blocks on the font combos that a Glade
re-save had dropped.

Change-Id: I59a56ee74f74375a58fcaad38dae626e071ca5f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203405
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-08-27 11:19:39 +02:00
Andrea Gelmini 9259836322 Fix typos
Change-Id: I20b02e9fa926e80dc67140f9817b9c5f7577a66c

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209789
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-25 15:04:47 +02:00
Caolán McNamara 744b0e2a99 sc: take std::unique_ptr<ScRangeData> in ScRangeName::insert
insert always took ownership of the raw pointer, so make that
visible in the signature and drop the manual delete branches
the callers no longer need

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iaf52cee659c297190d75e70c15a667bd6209d1a2
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9245
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 8ba26c1cf0cc930973dd29e13fe2ccb1fe5c4311)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209454
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-21 16:26:22 +02:00
Noel Grandin 37d0bc1d77 return by ref from ScDocument::GetRangeName
to make it obvious that it never returns nullptr

Change-Id: I8218f921583c49fcbd57a1693716317423a9febe
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/941
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 8a63916739a316a9432b47862d2212c1e689f9cf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209451
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-21 16:26:06 +02:00
Samuel Mehrbrodt c3dffb8998 cool#15924 Snapshot other sheets' formulas before deleting a tab
Deleting a sheet and undoing it left formulas on other sheets that
referred to it as #REF!, instead of restoring the original reference.

The undo snapshot taken before the delete only copied the deleted
tab's own content, so the code that restores formulas on undo had
nothing to restore other tabs' formulas from. Copy their formula
cells into the snapshot too, and add a test for it.

Signed-off-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Change-Id: I606e9dc8fce271546d7c1947c25f60bc71eaf465
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9147
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
(cherry picked from commit c06f2c46c9d4bdafe2f16296622da42f39a5ef58)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209392
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-20 18:32:06 +02:00
Julien Nabet 01df62abe0 Related tdf#150928: replace character set by encoding (sc/part 2)
Change-Id: I0e934158eb9defb01b678628cf6e34a595e21980
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209093
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-14 22:00:32 +02:00
Andrea Gelmini ee6217297c Fix typo
Change-Id: Ibc72f59f4434bfbc35d7727d27b3a14d3bbf9d6a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209035
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-08 12:38:14 +02:00
Julien Nabet 781638feb0 tdf#169591: in case of RTL_TEXTENCODING_UCS2, we need to know endianness
+ endianness must be remembered when it was present in the csv.

(I took example on 509ab788ba
tdf#82254 - Don't remove UTF-8 BOM from CSV when saving file
except QA test. I don't know how to do it)

Change-Id: I5043fa20c44e2e08bb43fbae0838b5d3d2f46575
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208981
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-07 10:28:05 +02:00
Caolán McNamara ad9e26606f sc: fold hasExternalContentLinks into one hasUpdatableLinks predicate
At this point every link that can be in the list is already either
one of the things specifically checked for, or is an obscure corner
case that if it does start to appear in the list should be checked.

So collapse this to its simpler reality.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6103819c5f93f7d32caa6a47e0f147db2de744c8
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/7236
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7532
(cherry picked from commit ebe9aa73a61045e47d22eddbe454ada2c3dfca21)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208772
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-29 12:54:35 +02:00
Caolán McNamara ced55a8844 sc: gather the external-link checks into one HasExternalLinks
merge the various individual link checks into one HasExternalLinks
check.

Keep the DocumentLinkManager hasDdeLinks special case, and change
the other to be hasExternalContentLinks

ScDocument::HasAreaLinks is only called when we're asking about
HasExternalLinks so fold that in and bring some of the sprawling crazy
under control

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6cf35d7ef7ae1c53ad9e87e0b36849ded4ae8323
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/7235
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7381
(cherry picked from commit f15965091e84bb5d51a7e4809089d493f74f2c10)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208771
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-29 12:54:15 +02:00
Caolán McNamara b8831b8cbc register calc XATTR_FILLBITMAP URLs as SvBaseLinks via SdrObject ItemChange
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I977cd234b2be9d792b1762bd6f943b2361b586c3
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3508
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit b08bffeeeba27e0e10664e5f4cbd9c16ca567ae3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208574
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-25 01:48:06 +02:00
Caolán McNamara 4aba7e41c1 put calc external data mappings under link update control
register each mapping as a LinkManager link, so its refresh goes through
the same update control as sheet links and area links. Wait until after
the infobar-controlled update mode is known to update.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6710d4bdf3de6e002365d75c911b69076a054da8
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/7058
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit b72d760465c857eb5dd10cdc45b107c49bb0caec)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208319
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-21 08:59:06 +02:00
Caolán McNamara 95045fb7d5 put links in form imagecontrols under link management
Change-Id: I265f889bcfdcf1b214cde02e9e5799081ec6aa42
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2396
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 01a314d398a497e01d0b9e4b575f3b7c842b8622)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206343
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-14 13:26:15 +02:00
Tomaž Vajngerl 3c95eed2ba sc: promote UI-typed array formulas to dynamic-array masters
When the user types a formula that returns an array (UNIQUE,
TRANSPOSE, a range plus a range, ...) and presses Enter, the
cell now becomes a dynamic-array master. The array result
spills into the empty cells to the right and below the typed
cell. The user no longer has to press Ctrl+Shift+Enter to get
array behaviour.

Formulas loaded from a file and formulas created from a macro
keep their old single-value behaviour, so existing documents
are not affected.

A new per-cell bit, mbAutoDynamicArrayEligible, marks a cell
as allowed to promote. The view code sets it on freshly typed
formulas. The importers and the macro entry path leave it off.

When such a cell first calculates, the formula tokens are
walked in execution order to ask the question: does this
formula produce an array result? If yes, the cell switches to
dynamic-array master mode before the calculation runs, so the
array result is kept and the cells to the right and below get
filled in.

The walk tracks whether the value sitting on the stack at each
step is an array or a scalar:

 - Pushing a multi-cell range or an inline matrix puts an
   array on the stack.
 - An operator like + or * keeps the result an array if any
   operand was an array.
 - A function known to return an array (UNIQUE, TRANSPOSE,
   MMULT, SEQUENCE, ...) puts an array on the stack. Other
   functions reduce to a scalar.
 - Branching functions like IF, CHOOSE, IFERROR and LET do
   not fit this simple model, so the walk gives up and the
   cell stays a plain single-cell formula.

A formula that begins with the @ implicit-intersection
operator (=@UNIQUE(...)) opts out of promotion. Cells that
are part of a formula group share a single compiled formula
and stay single-cell so the group is not broken.

Ctrl+Shift+Enter still produces a classic static array master.
The shortcut now routes straight to the matrix-entry code, so
the auto-detect described above does not interfere.

The formula compiler has an optimization that rewrites a
multi-cell range as a single-cell pick when the formula sits
in a single-cell context. For example =A1:A4 typed in row 2
becomes =A2 before evaluation. That is the long-standing
implicit-intersection rule.

For typed input the optimization has to be off, otherwise the
multi-cell range disappears from the formula before the walk
can see it. The optimization stays in place everywhere else,
and the engine still applies implicit intersection at run
time when the cell remains a plain single-cell formula.

XLSX export

XLSX marks a dynamic-array master with cm="1" on the cell.
The exporter used to fall back to "matrix master plus a
dynamic-array function" when the explicit flag was missing.
The fallback is now removed. Every cell that should export as
dynamic carries the flag explicitly, set by the importer or
by the UI entry path.

One trade-off: a Ctrl+Shift+Enter (CSE) array of a dynamic-
array function imported from an XLSX file that has no cm="1"
marker no longer round-trips as dynamic. The cell flag is now
the single source of truth.

Tests

Tests cover the array-intent walk for =MINVERSE(...), ={1;2},
={1;2}+3, ={1;2}+{3;4}, ={1;2}+A1, =ABS({-1;-2}), =A1:A2,
=A2:A5+B2:B5, a long chain of binary additions over the same
range, a range times a scalar, =IF(...) with array branches,
and =SUM(...) over a range as the scalar case.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Icb4b5e108634cd1529ac829cb34865c56ed8ec02
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4684
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit c3d67d3ec81621c385744fac7fd7a722084a122f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207219
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-08 20:58:41 +02:00
Mike Kaganski 197c836739 Set modified flag and register undo for InsertThreadedComment
Calc's .uno:InsertThreadedComment slot mutated the note model directly
(GetOrCreateNote, SetText, SetThreadedCommentData, KitCommentNotify) and
never set the document-modified flag, so SFX did not broadcast
.uno:ModifiedStatus. The handler also did not register undo, so the
insert could not be rolled back. The same handler dropped the
SvtUserOptions fallback when the Author arg was passed but empty (the
ternary checked has-arg, not non-empty-value), letting the author land
as "Unknown Author" instead of the per-view WOPI UserFriendlyName.

Mirror ScDocFunc::ReplaceNote: a new InsertThreadedCommentOperation
runs inside ScDocShellModificator, releases any existing note (rescuing
its ScNoteData and a clone of its threaded payload), creates the new
note, builds the threaded payload plus the person-list entry, registers
ScUndoReplaceNote, and does the necessary finalizing calls. The author
resolution now uses the default-then-fallback chain so an empty Author
arg still routes through SvtUserOptions before the catch-all.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I42304b9467e8b290316b0fa8ba3c80c8fc0d9c35
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4142
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit d0935091c608f7184d00669b85f98e5b4b5fe1b4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207111
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-23 09:55:02 +02:00
Karthik ebc96c15ff sc: When inserting a table if exists, reuse the existing DBData
If a DBData already exists on a selected range, instead of creating a
new DBData and overlaying it ontop of the existing DBData, reuse the
existing DBData to create a table.

Change-Id: I3bfbe911b3cf4720b6228e55ed94f2948261d8e2
Signed-off-by: Karthik <karthik.godha@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4200
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit efcbdb4567e12532c935be682081106470c74373)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206997
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-20 00:31:02 +02:00
Tomaž Vajngerl 4a903f85b8 sc: add mbDynamicArrayMaster and gate matrix auto-resize on it
Introduce a per-cell bit on ScFormulaCell that marks a matrix master
as dynamic. A matrix master with the flag set recomputes its range
at interpret time so the result grows or shrinks with the source
data. A matrix master without the flag is a static array master and
keeps its declared range frozen.

SetDynamicArrayMaster(true) on a plain single-cell formula promotes
the cell to a 1x1 matrix master so the first interpret expands it
through the auto-resize gate. Callers that opt a NONE cell into the
dynamic-array path only have to flip the one flag.

ScFormulaCell::InterpretTail uses the flag as the single opt-in for
the auto-resize path. The path fires when the cell has the dynamic
flag, or when the cell is currently in spill state and needs to
re-check on the next interpret. Static masters entered through
ScDocFunc::EnterMatrix or ScDocument::InsertMatrixFormula keep the
flag false so their declared range is the user's intent and never
changes underneath them.

InsertMatrixFormula and EnterMatrix grow a new bDynamicArrayMaster
parameter so callers can choose. The existing spill tests opt in
to keep their auto-resize behaviour. The two contraction tests in
uicalc2 entered their matrix masters with Ctrl+Shift+Enter, which
no longer drives auto-resize, so insertArrayToCell grows an opt-in
bDynamicArrayMaster parameter and those two tests pass true to
flip the master into the dynamic gate after entry.

The paste path in cliputil.cxx re-creates a matrix master at the
destination via ScDocFunc::EnterMatrix. The call now reads the
source cell's dynamic-array flag and passes it on, so a dynamic
master pasted to a new location stays a dynamic master and the
auto-resize gate keeps firing.

Importers (XLSX cm, ODS coext:spill) and the UI entry path will
set the flag in the follow-up commits.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ie6fbf6972aa796f3833b726ea0184fc34ed92a3d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4173
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 006b0c6577c4e35087595cb92b629757c8c4d166)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206674
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-16 09:14:51 +02:00
Caolán McNamara 23ea1663b7 put calc background images under link control
Change-Id: I5adbbaf7e4860732dad2375dcbee541198ef6fab
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2393
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 6ebc3fb5db211b6c9de96dcf3ba14b6b7f37c203)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206342
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-11 21:42:21 +02:00
Michael Weghorn f26084217a weld: Move weld::Button to own header/Rename weld.hxx
In the past, weld.hxx used to contain the class
definitions for weld::Widget and all subclasses.

By now, weld::Widget and almost all subclasses have
been moved to separate headers, to make it easier
to keep the overview and to avoid having to
recompile ~all UI code when one class changes.

By now, only weld::Button is left in weld.hxx.
Rename the header to Button.hxx.
Drop weld.hxx includes and instead add Button.hxx
includes (or weld::Button forward declarations) where
weld::Button is used.
(Don't simply replace all weld.hxx includes with
Button.hxx ones, since many of them were for the
use of other widgets that have since been moved
to their own headers.)

Add further includes where needed now that the
(direct or transitive) includes of weld.hxx were removed.

Change-Id: I8ea6201446a418d5e38b46337059dcd517ee29d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-05 07:58:07 +02:00
Michael Weghorn 911a89ddeb weld: Move weld::WaitObject to own header/source
Move the class out of weld.hxx into its own header and
source file, in order to make it easier to keep an overview
and to avoid having to recompile ~all UI code when the class
is modified.

Change-Id: I91bae842e5b18a83db45de12150c21f75e537fb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205900
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-06-03 23:19:30 +02:00
Tomaž Vajngerl a3431fcd7b sc: Restore expanded matrix tracking on Undo of a delete op.
Deleting the master cell of an expanded matrix tore the matrix
down and dropped the master from the tracking set. After Undo the
cells came back but the tracking did not, so a subsequent blocker
write into a reference cell didn't collapse the matrix to #SPILL!.

The delete operations now capture every tracked master position
that falls inside the deleted range and hand it to the Undo class
ScUndoDeleteContents. When Undo happens, after restoring the cells,
the captured positions are re-marked in the expanded matrix
tracking set.

+ Added test which reflects this scenario

Change-Id: I85d2d6e804214be5c0ca630288989b3605a809b0
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3012
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 46eef59b28e6f10377de0d2203c7b224be862c40)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205923
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-03 11:25:50 +02:00
Tomaž Vajngerl 8ac88ed7ef sc: Allow editing matrix master cells - the whole matrix is replaced
Pressing Delete or typing a value into the master cell of a
multi-cell matrix used to refuse this with a pop-up error message.
Now both gestures replace the whole matrix: Delete clears it,
typing puts the new value at the master and the reference cells
are removed. The matrix is torn down before the write so no
reference cells are left orphaned.

DeleteContentOperation expands a single-cell mark on a master
to the full matrix range before its editable check, so the
protection check no longer sees a fragment. Single cell writes go
through a new demolish-matrix-master helper before writing,
wrapped in a list action so undo rolls the whole gesture back
together.

Change-Id: Ie61f30f32a028ed358e6cd208e1580665a81b615
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3007
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 839e3e00f4262b7fad163c14f164524307657dd2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205918
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 20:15:56 +02:00
Tomaž Vajngerl 122631d799 sc: Allow editing matrix reference cells - matrix collapses to #SPILL!
Typing into a cell covered by an expanded matrix (TRANSPOSE,
SEQUENCE, UNIQUE, ...) used to show an pop-up message that part of
an array can not be changed. Now the input is accepted. The typed
value lands in the cell, becoming a blocker, and the matrix master
collapses to #SPILL!. Multi-cell edits and edits to the master cell
still hit the matrix protection.

Track every multi-cell matrix master at creation so spill resolution
finds it when a blocker appears inside its declared range, and let
the runtime spill check fire on conventional matrix formulas in this
code path to recover from a blocker.

Change-Id: I658c0a432a9aaab5668e474b6af537eedd1f6e1d
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3006
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit e68735089715e37982a49286ed39486241c79cae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205917
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 20:15:49 +02:00
Xisco Fauli 8a91868e21 drop JSDialog machinery
It's no longer needed and not used internally

Change-Id: Iecb0d1055fd6c61d0c34ffb8afc670ab9d5fe899
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205908
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-02 20:15:18 +02:00
Tomaž Vajngerl a891c07792 sc: support Undo/Redo for dynamic array spill state
Undo/Redo of operations that restore a blocker inside a previously
expanded dynamic array, or that clear a blocker outside one, didn't
reconcile the matrix master's spill state. The master listens to
its inputs but not to its own declared output range, so the matrix
would stay expanded over a restored blocker (or stay #SPILL! after
a redo that cleared the blocker).

Track expanded dynamic array origins in maExpandedDynamicArrays.
Extend ResolveSpilledOutputs with an inverse pass that walks the
set, detects a foreign cell inside the declared range via the new
HasMatrixBlocker helper, drops the reference cells, collapses the
master back to 1x1, and re-interprets so the runtime spill check
re-raises #SPILL!.

Invoke spill reconciliation from ScUndoDeleteContents and
ScUndoSetCell on both Undo and Redo so it reconciles the data
change.

Added common test cases:
- formula expansion gets blocked by a blocker, blocker is removed,
  formula output expands, undo this, redo this
- formula expansion gets blocked by a blocker, data is changed so
  the blocker doesn't block anymore and the formula output is
  expanded, undo this, redo this

Change-Id: Idae7d7cc3bc7abc7016a847d3768cde21d1d0b3c
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2650
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 98859b6eb4c89d3b7833ab27eafc0cd8320308f0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205757
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-27 21:24:18 +02:00
Xisco Fauli 49dcd18dcb loplugin:unusedmethods in sc/
Change-Id: Ifa1611c968b46d65ef73008826ba3514f8c8cd18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205718
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-05-26 17:08:28 +02:00
Tomaž Vajngerl 50e2176ab5 sc: Auto-expand and contract dynamic array formulas
Grow or shrink a matrix formula's declared dimensions to match its
interpreted result size. With this, clearing a blocker lets the
array spill across its full range; shrinking the source data
removes the stale trailing cells. Blocking an already-expanded
array collapses it back to the origin with #SPILL!.

Deferred resize queue: inserting or deleting cells inline from
Interpret (or during grid-repaint iteration) would invalidate the
caller's iterator. Queue resizes in the document and drain them
from safe points, guarded by a MatrixResizeGuard helper around
each cell-iteration scope.

Change-Id: I74376427e707fd84c36034fe6a64105e4a5f74fa
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1817
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 76b6825e4d237869cb32889b250277be693a2c5f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205686
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 16:30:27 +02:00
Tomaž Vajngerl 47040461df sc: Wire array formula spill detection into the calc pipeline
Detect a blocked spill at interpretation time. When a 1x1-declared
matrix formula that uses a dynamic-array function produces a result
larger than its declared dimensions, check the expansion area for
blocking cells and set FormulaError::Spill if any are found.

Track spilled formula cells at document level - spilled formulas
only listen to their dependency range, not to cells in their
(blocked) spill area, so they aren't notified when a blocker is
cleared. ScDocShell::ResolveSpilledOutputs (renamed) is called
from the Set*/Delete*/Move* cell operations to re-check spilled
cells after any user edit that might have freed a blocker.

Without auto-expand yet: a formula that loses its blocker
re-interprets to NONE and shows its scalar upper-left. The
matrix does not grow to fill the range in this commit.

Change-Id: Ief252a47e5625f72ef6fe52d3bd0afae2d1ee768
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1816
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit ea20a2c90a264b34a930a5d4bb1118be7ed4836e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205685
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 16:30:14 +02:00
Tomaž Vajngerl bf9eaed6da sc: Use #SPILL! error if the pivot table output is blocked
Replace the error message dialog with the same #SPILL! mechanism
used for array formulas when the pivot table output is blocked.
The pivot table configuration is still applied, but the output
cell shows #SPILL! error until the blocking cells are cleared.

Also includes:
- Auto resolve spilled pivot tables after delete, cut, move, paste
- Add sc::UndoSpillPivotTable, so when undoing we can recover back
to the spill error and delete the pivot table output (if present)
- Skip spill check during import to preserve cached output

Change-Id: Icf7d89c088b9d8a9d255945aa6235c91f602d4a9
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1750
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 94299df72efeddb3d5af31396f5008300d66a90d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205683
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-25 16:29:19 +02:00
Tomaž Vajngerl afb8e74358 sc: Move ScDocFunc::DeleteCells to DeleteCellsOperation
Pure refactoring.

Change-Id: I4f72b2e6ec0a2f170081ff1500d48cdf3525be66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201781
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202122
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 4dfc4beee2e436df7e1eccea264da2124178755d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205615
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 22:38:19 +02:00
Tomaž Vajngerl 3f11a1abd0 sc: remove DataPilotUpdateOperation for ReplacePivotTableOperation
DataPilotUpdateOperation was delegating when certain conditions
were met to other pivot table operations and when the conditions
didn't apply, it used a unique kind of replace pivot table
operation. This isn't ideal (especially the delegation part), so
this change creates a new operation ReplacePivotTableOperation,
which has the replace logic. Then the DataPilotUpdateOperation is
completely removed. The delegation logic is now moved back into
ScDBDocFunc::DataPilotUpdate method. This is a much leaner solution
than it was before.

This should be pure refactoring only.

Change-Id: I102bc93e1ade0e315cd918499d83733bb475e1e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201698
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202118
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 8f4d3dd386f2d9b5129c69497543aa0fdaa247ec)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205607
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 22:37:56 +02:00
Tomaž Vajngerl f40226e3d5 sc: Add syncing for draw objects (shapes, charts, images)
Draw objects need to be synced between the default view and sheet
views. As there are no direct operations to do so and a lot of
handling is delegated to the svx module, we have to make sure to
delegate any shape change to the default view first. Then the sync
code can sync all actions to the sheet views, as is already the case
when we sync operations.

This also handles undo / redo by adding sync calls in ScUndoDraw,
which is responsible for undo/redo of draw objects.

Change-Id: I6f34acbaa4e6de798d3d71fb95476a584c143741
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201625
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202108
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit cac9860739ede08691ad2442a8f33761cd85266b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205544
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 16:38:04 +02:00
Tomaž Vajngerl e2cafc6b91 sc: Move ScDBDocFunc::DoSubTotals to SubTotalsOperation
Inserts subtotal rows into a data range (Data > Subtotals).

Pure refactoring, no behavior change.

Change-Id: If3599467bbf4433e00291402441042d181462ee2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201509
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202101
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205537
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 16:37:22 +02:00
Tomaž Vajngerl 187515213c sc: Move ScDocFunc::InsertNameList to InsertNameListOperation
Used for inserting named ranges.

Sheet -> Named Ranges and Expressions -> Define...

Pure refactoring, no behavior change.

Change-Id: Ic700e086553a6217eac28eb96063edd496301ea6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201508
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202100
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit dd84f18a7e26082ad9b0789b968f832372ad21e8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205536
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 16:37:16 +02:00
Tomaž Vajngerl 447eabd60b sc: Move ScDocFunc::MergeCells to MergeCellsOperation
Merges a range of cells into one cell.

Pure refactoring, no behavior change.

Change-Id: Ib471ad366f6cc2dec70d23d4e2deb31feaad6476
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201507
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202099
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 1b94a4b5c9bab659c225de2094c042e9d309c78e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205535
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 16:37:11 +02:00
Tomaž Vajngerl 4edcfd4edf sc: Move ScDocFunc::MoveBlock to MoveBlockOperation
Moves a block of cells from source range to destination position.

Pure refactoring, no behavior change.

Change-Id: Ib238c40a13fb5006d2c5827685a6b6bd86c21926
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201474
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202098
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit afe8e54bc60224bfce0bafa718650e92159455c0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205534
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 16:37:06 +02:00
Tomaž Vajngerl 8b99c40d30 sc: Move ScDocFunc::ReplaceNote to ReplaceNoteTextOperation
Replace note used to set or replace the note text for an address.

Pure refactoring, no behavior change.

Change-Id: Ibe4b5c7d54d9a596550adf06dc4456677ef0cd3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201473
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202097
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 75387f8368c5eae1d518b5f4f35587b341d0a215)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205533
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-24 16:37:01 +02:00
Noel Grandin 1d8cf993df reduce Sc*Ref*Token virtual calls
similar to
  commit f47fc9a67f16a3da1e5cbcc8b821682298ec90b3
  reduce ScRefListToken virtual calls

Push the Get/Set-Ref*() methods down to the only subclasses
that actually use it.

Change-Id: Idf56c7c1fc2340438add93e11a549824461b80a8
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1243
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 003c0007c13e443fe4e520d1b70586266abf7811)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205579
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-05-23 21:47:06 +02:00
Noel Grandin af6e41b327 reduce virtual calling in Sc*Ref*Token
similar to
  commit f47fc9a67f16a3da1e5cbcc8b821682298ec90b3
  reduce ScRefListToken virtual calls

Push the GetIndex() method down to the only subclasses
that actually use it.
And take the chance to rename them to something more meaningful.

Introduce an inbetween ScExternalToken class to represent
tokens that have an external file id.

Change-Id: If45e87a5bb66aeb1c65d82121b430b886b53f20b
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/955
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 7705899fa7bca501f331070f7969374fcf5f52e9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205576
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-05-23 13:14:34 +02:00
Noel Grandin 0bad6cbf40 reduce virtual calling in String*Token
similar to
  commit f47fc9a67f16a3da1e5cbcc8b821682298ec90b3
  reduce ScRefListToken virtual calls

Push the GetString() methods down to the only subclasses
that actually use it.

We change the inheritance hierarchy a little here
-class FORMULA_DLLPUBLIC FormulaStringOpToken final : public FormulaByteToken
+class FORMULA_DLLPUBLIC FormulaStringOpToken final : public FormulaStringToken
because FormulaStringOpToken and FormulaStringToken share
a type svString which makes it hard to decide which subclass we
are handling.
So now we can check for GetType() == svString and then
cast to FormulaStringToken safely.

Change-Id: I3f087d65a2297b2d8fb5213e81987e0001bc1c62
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1152
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 8710f98c1565b1d8ecbbbec743b29bcbb38c5ce2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205569
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-05-23 09:01:44 +02:00
Tomaž Vajngerl 8cb752768a sc: Move pivot table methods to Operation framework
Extract RemovePivotTable, CreatePivotTable, UpdatePivotTable
and DataPilotUpdate from ScDBDocFunc and create Operation
subclasses. The common functions are put into header file
PivotTableOperationCommon.hxx, so we avoid duplication.

Pure refactoring, no behavior change.

Change-Id: I94b50ef0698ceb809607d16265a6f3cbf03913d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201472
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202096
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit c1966c49f77ab4cba053dcbe35b424a983b16ef6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205532
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-23 00:08:26 +02:00
Tomaž Vajngerl 69a243ee03 sc: Move all sparkline methods to Operation framework
Extract the 7 sparkline ScDocFunc methods into Operation
subclasses.

Pure refactoring, no behavior change.

Change-Id: Id714721d0d852889b135c700da3327cf75ad641f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201457
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202095
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 28efca2b83b88983ccce02e81f442bbf3fa834d7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205531
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-23 00:08:16 +02:00
Tomaž Vajngerl c449c59e11 sc: Remove sheet view unsync tracking
The unsync tracking was introduced to mark a sheet view as unsynced
when we didn't properly support syncing, so the user could recreate
the sheet view themselves. Now we have converted the most basic
functions to properly sync, and if there is a case when something
doesn't sync we should consider it a bug. This makes the unsync
tracking unneeded so it was removed.

Change-Id: Ic3391620bddcbdc2608623c0d23db0c8abab8fd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201456
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202094
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit c92d5a32da6a850059531f650f12ef9c701d9b2b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205530
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-23 00:08:07 +02:00
Noel Grandin 9cfdd6b430 reduce virtual calling in ScFormulaDoubleRefToken
similar to
  commit f47fc9a67f16a3da1e5cbcc8b821682298ec90b3
  reduce ScRefListToken virtual calls

Push the GetDoubleRef() methods down to the only subclasses
that actually use it.
Which means we can return a ref instead of a pointer,
since we now never return nullptr.

Change-Id: I4dfce551e985fe20db00d3a0694ed99f20f87731
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1050
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 9aab43b4e3a68cd833eddfdd11086f03e55f2c1a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205508
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-05-22 20:28:02 +02:00
Xisco Fauli b96ce8d100 sc: fix warning C6011: Dereferencing NULL pointer 'pBase'
E: /jenkins/workspace/lo_tb_master_win_analyze/sc/source/ui/docshell/documentlinkmgr.cxx(159): error C2220: the following warning is treated as an error
E: \jenkins\workspace\lo_tb_master_win_analyze\sc\source\ui\docshell\documentlinkmgr.cxx(154) : warning C6011: Dereferencing NULL pointer 'pBase'. : Lines: 140, 141, 144, 145, 147, 148, 150, 152, 154
Change-Id: I962cc713700d186ee6e5f81b0d455aaead4dc6c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205555
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-22 16:03:47 +02:00
Tomaž Vajngerl d05a7ae4d3 sc: Introduce ConvertFormulaToValueOperation, moving code from ScDocFunc
Pure refactoring only.

Converts the formula to computed value (i.e. =A1+B1 converted to 3).

Change-Id: Ia6a0cad4afafac709a2f99c09a7ee3024d0c7195
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201331
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202086
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 65fce95267c98d355741fc073790f5d0cf92d98c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205434
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-22 11:50:22 +02:00