tabview.hxx included drawview.hxx for a std::unique_ptr<ScDrawView> member
and an accessor that returns the raw pointer. Neither needs the complete
type, and the destructor of ScTabView is already out of line. The include
dragged svx/fmview.hxx, svx/view3d.hxx, svx/svdview.hxx and the rest of the
svx view class chain into the 200 translation units that include the view
shell headers.
tabvwsh.hxx and tabview.hxx now include the small headers they used through
that chain, and the files that call into the draw view include drawview.hxx
themselves.
clang -ftime-trace says around 2% of the module build time saved here.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I198b19e74f6ad56090b987880a063dc9ee677cda
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12683
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit a7fd69666ea5fb4d26dfad0d286f6c1f3bcd3144)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211884
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
+ convert datetime to ISO format
Result:
<!-- Doc.Information -->
<!-- Printed: by Firstname Lastname on 2026-10-01T21:31:34,817333179 -->
For the change of lcl_AddStamp, I used GPT 5.6 Luna.
Change-Id: Ia73e9c00f17653aa5ab491c4bbc1d3d933105836
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211696
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
ScTokenArray only uses ScDocument through references, so the header needs
a forward declaration. The rtl::Reference<ScSheetLimits> member with the
defaulted copy constructor still needs the small sheetlimits.hxx. This
removes document.hxx from the 15 translation units that reached it only
through tokenarray.hxx, about one second of compile time each.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ie467d7297f7b02ed474114e7840e0ec52f1624aa
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12679
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 3c5d299ff6f767841bd8a781ca3ca200a8f12d2e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211315
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Copying a sheet to a position at or before its source left the
relative sheet references in the copy pointing at the wrong
sheets, one or two places too far to the right. CopyTab moves the
source index by one when the new sheet is inserted before it, and
AdjustRelativeTabRefs received that moved index. The offsets in
the cloned formulas still count from the position that the source
had before the insert.
Pass the source position from before the insert instead, which is
the same one that CopyTab already gives to the range name copy.
This follows "sc: Fix backward reference when copying a sheet"
(Ie32d0ceac34525ccaf13aed8fb9630ae42d4225e), which fixed copies
placed after the source.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I063818265e0d56498bc9e09f04f85d3f5191b4d2
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13662
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 2539d0afe0d68409f5e43b2d92c4d85b697566cd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211515
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
The reverted commit changed the way references are handled when
copying sheets in order to mimic how Excel behaves.
However, LibreOffice behaves differently (tested back to
LibreOffice 3.3) so the change might break the workflow of
many users (https://xkcd.com/1172/)
The proper way to address this would be by adding a new
config option, so users can choose how LibreOffice behaves,
but that needs to be implemented in a different patch.
This reverts commit 5cefed66bc.
Change-Id: I16636e80de52328ef4c89a11da899b9e33b6aa00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211421
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
document.hxx included drwlayer.hxx, and with it svx/fmmodel.hxx,
svx/svdmodel.hxx, svx/svdundo.hxx, svx/xtable.hxx and editeng/outliner.hxx,
in all 700 translation units that use ScDocument. The only place in the
header that needed the complete type was the inline destructor of
sc::DrawUndoGuard, which now lives in documen9.cxx next to
ScDocument::BeginDrawUndo. The ScObjectHandling enumeration, used as a
default argument of SetLayoutRTL, moves to types.hxx so that both headers
can see it.
The files that used the drawing layer or the svx model classes through this
include now include drwlayer.hxx themselves, and a few headers that relied
on the same chain for TranslateId, Idle or SvStream get the header or
forward declaration they need.
clang -ftime-trace suggests this is 6% of the sc build time.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Id723c46ef0c881428ab1d9a2e9a642713a92e79e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12681
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 3e8fd8cd92ff57aaef5ba9d4b71933700ee3f83b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211316
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Since cb884d1bdf matrix cells ignored the document's AutoCalculate
setting. This caused them to recalculate on cell access while normal
formulas waited for a recalc.
Exempting only follow-up cells does not work either. They can read a
stale matrix from the origin and clear their dirty flag.
Drop the exemption entirely. F9 enables AutoCalculate, so ScMatRef
recalculates the origin when needed.
Change-Id: Ie7e9c05d7a74f92672180c64f0b154f03babdfa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211287
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
Mark a table with Data - Define Range and the option "Contains
column labels", and export with File - Export as PDF and Tagged PDF
on. Every cell of the range comes out the same:
<</Type/StructElem/S/TD /P 7 0 R /Pg 1 0 R /K[9 0 R ]>>
so nothing in the file marks the row that names the columns.
The label cells are TH now:
<</Type/StructElem/S/TH /P 7 0 R /Pg 1 0 R /A <</O/Table/Scope/Column>> /K[9 0 R ]>>
A range sorted left to right holds its labels in the first column and
gets /Scope/Row there. A range Calc defines itself for a sort or an
AutoFilter counts the same, on the header row it guessed.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I5f4d3ec709f330604d518e1bf0c89c1655b18816
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12657
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 8a524317421379ba257fcfba04f63f06da7cdcc1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211174
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Export a two-sheet spreadsheet with File - Export as PDF and a page
range that leaves out the second sheet's first page - "1;3" where
that sheet spans pages 2 and 3. The file gets one bookmark where it
should get two, the second sheet having none. Switch Tagged PDF on as
well and it also carries one Worksheet element, holding both sheets:
5 0 obj<</Type/StructElem/S/Worksheet/P 4 0 R/Pg 1 0 R/K[6 0 R 22 0 R]>>
where 6 is the first sheet's table and 22 the second sheet's.
The per-sheet work ran on
nRenderer == nTabStart || bIsFirstPage
but the renderer index is the page's own index in the document and a
page outside the range is never rendered at all, so a sheet whose
first page is left out never reaches it. It asks whether the sheet
changed since the last rendered page now.
Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I158feb5ca4a6f4501e6dfdf5234c8fdf75b8ee40
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12571
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 49e441a059f98d703ce2bddd5b0eabf80b7144aa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211173
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
=@'file:///source.ods'#Sheet1.B:B showed the first cell of the
column and not the one in the formula's own row. ScSingleValue
leaves an external range on the stack unchanged, and Interpret ends
with it on the matrix path, so the result became the top left
element of a matrix over the whole range.
A sheet local range takes a position dependent implicit intersection
in both places, with DoubleRefToPosSingleRef. An external range now
does the same through PopExternalDoubleRefPushSingleRef, which reads
the position from ScCompiler::ExternalDoubleRefToPosSingleRef.
Where the position does not intersect the range nothing changes,
so an unresolved link keeps its own error instead of turning into
a #VALUE!, as testExternalRefUnresolved expects. The external and
the sheet local case still differ there (TODO).
Follow-up of commit: I3baf826177fbeeb4616f407d653f1457a2fbfa8f
(sc: don't build a JumpMatrix for an entire external column)
Change-Id: I68cc88b5bb533cfcd19537be6705e8a64834af64
Signed-off-by: Balazs Varga <balazs.varga@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12614
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 596a329b2f0e888047069b442f4da507a0c668f8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211105
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
A file with XLOOKUP over entire external columns did not finish
loading. ConvertMatrixParameters turns a scalar Value parameter into
a matrix, and an external reference comes back at its full MAXROW+1
height, so every formula cell ran the function body over a 1048576
row JumpMatrix. It is not XLOOKUP only, every function with a
ForceArray parameter somewhere goes through that conversion, VLOOKUP
and MATCH among them.
The svDoubleRef case takes a position dependent implicit
intersection outside array context, and leaves the token for the
function that pops it to resolve with DoubleRefToPosSingleRef. No
function does that for an external reference, so svExternalDoubleRef
now resolves it, from the shape of the range.
DoubleRefToPosSingleRefScalarCase cannot do it, because it asks
whether the formula position lies within the range, which means
nothing across two documents.
Also in array context, where the JumpMatrix stays, an entire column
or row is trimmed to the data area first, like the svDoubleRef case
does with ScDocument::ShrinkToDataArea. The new
ScExternalRefManager::shrinkToDataArea asks the source document when
it is already loaded, and the cached ranges otherwise. Trimming on
its own does not help, because the JumpMatrix only shrinks to the
data extent and the body still runs once per row.
Change-Id: I3baf826177fbeeb4616f407d653f1457a2fbfa8f
Signed-off-by: Balazs Varga <balazs.varga@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12613
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 504cb9b329a5a4ce4f4c6ec53bde99c5e8c3de0c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211104
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Switch the method param to the XModel3 interface
from the very basic XInterface type. This drops
the need to explicitly cast/query to avoid
ambiguity in the callers where the passed object
multi-inherits the XInterface interface/base class.
This also prepares for switching the return type
of SfxObjectShell::GetBaseModel to a reference of
the concrete SfxBaseModel in an upcoming commit (without
introducing ambiguity due to multi-inheritance from
XInterface in places using only an XInterface
reference).
Change-Id: I97e060136b02f3eb1e652cff4021e57a85677e19
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211052
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
As Eike indicated in https://bugs.documentfoundation.org/show_bug.cgi?id=146404#c4
COLOR format codes are preserved in ods/fods format.
The pb was the missing map back.
Indeed, we had the mapping for [COLOR<something>] => Color value (eg: "ffaa16")
but not the reverse mapping Color value => [COLOR<something>]
Eike had provided the right code pointer in xmlnumfi.cxx.
First, I thought using PaletteManager but this one is in svx and svx shouldn't be used in xmloff
(dependency pb).
Then I used ChatGpt (GPT-5.6 Luna) and it pointed the right process.
It just consisted to use a similar callback system (DECL_LINK, IMPL_LINK, LINK) of GetUserDefinedColor.
In addition, by testing all this, I noticed that maList in XColorList::GetIndexOfColor was empty.
So I added the Load call in case mbListDirty is true.
Change-Id: I0ef6b5901f2e4c757e88994412dbf79a13100ffd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210518
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
as part of the process of merging the Outliner code into the normal EditEngine paths.
So instead of keeping a bunch of information "on the side" and then having to merge information
from multiple sources, it all lives where it logically belongs.
Also take the chance to rename the depth/getdepth/setdepth
fields and methods to NumberingDepth, which makes the purpose
more obvious.
Change-Id: I314673ee1b9efa14f178ac34a122995a554cd788
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10551
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 284bbe0af12b96844976f30bb35ade3a327ea76d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210503
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
A table's totals row exported even when the table had no header, or
when its only content was a plain number wrongly declared as a text
label. Excel rejected both cases and repaired the file on open.
Only export a totals row when the table has a header and a column
actually shows a real label or total. Otherwise leave the row as
plain data, matching what Excel itself does when it repairs such a
file.
Signed-off-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Change-Id: I6dc84680780805d8cfe666d681a62a9a907605d2
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10367
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit cfb01061aec26a218dcd1e4b5cccad395d2a5489)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210453
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
A # spilled range travels as a matrix that carries the range it was
read from, so a plain cell can reduce it to the value of the row it
lines up with. Every operator dropped that range on the way through
GetMatrix and PushMatrix, so =A1#% on a master spilling 1, 2 and 3
came out as 0.01 instead of the row-aligned 0.02.
The range is now noted when a matrix operand that carries one is
popped, and put back on a result of the same shape - those are the
only way in and out. The note only lasts for one token, and two
operands with different ranges cancel it. Functions don't get it,
because something like SORT is free to move the values around.
The values of such a result are the operator's own, not the cells'.
So ScMatrixRangeToken now answers the two questions separately: the
range says where the values sit, and a second flag says whether the
values are still the ones the cells hold.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ie4851dcc208f20220f07cd75a691aee88cfdc5ac
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10158
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit a393976584be143df7cb40623f31322e46889756)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210301
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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>
We have added various workarounds for ScPatternAttr use after free
issues since:
commit 2e1f9da8a6
Date: Sat Dec 23 15:52:06 2023 +0100
Decouple ScPatternAttr from SfxItemPool
separated ScPatternAttr from SfxItemPool.
Prior to that an ScPatternAttr was an SfxPoolItem held in the doc's
SfxItemPool which kept every item alive for the document's whole
lifetime, so any raw const ScPatternAttr* was basically safe.
The various workarounds for the new behaviour were:
commit dca19993a4c732e95b9a47e1abdcaad6efbeebe9
Date: Sat Jan 6 14:40:28 2024 +0100
tdf#159042: crash after changing cell style (if direct formatting done)
commit 19437715eb415fe2c40b8b40dbe04ddca28f9a35
Date: Thu Sep 12 12:06:28 2024 +0100
null pattern deref seen in ScViewData::SetEditEngine
commit e384f2e8de9603ee65a3edc6dcb50b07116ee4fc
Date: Mon Mar 10 14:45:22 2025 +0000
crashtesting: crash on reimport of xlsx output of forum-pl-2758.ods
commit 7999585bd8378f1a8d04ea2a9a93a8e0bf4d8eb6
Date: Fri May 9 08:50:17 2025 +0100
crash on null pattern de-ref
commit 1bf9bbea96
Date: Tue Oct 28 16:53:49 2025 +0300
tdf#169115: sc: fix use-after-free bug in ScDocument::FillInfo
commit 9f366af81478ad218dc2ef2e37423a9ebcc84e73
Date: Sat Apr 25 14:47:02 2026 +0200
ScPatternAttr use-after-free
commit 20fe691a18fb35120d0765dd1519acd6d2986c38
Date: Tue Apr 28 08:33:34 2026 +0200
ScPatternAttr use-after-free (2)
This commit picks the class member fields that are still raw
ScPatternAttr* and converts them to CellAttributeHolder:
ScUsedAreaIterator::pPattern and pFoundPattern
ScInputHandler::pLastPattern
LotAttrCol::ENTRY::pPattAttr
ScPatternCache::Entry::pPattern
The CalcAll() workaround from 9f366af81478 then doesn't seem to be needed(?)
A new compiler plugin catches class member fields of raw type
ScPatternAttr pointer.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibb9f28b8fcaa5470c7a82eee52900c2d60434e41
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3163
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 9c7b6313a29067bf0eef12884fc3ce7efb0374e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209822
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Allocate and fill in the mpaMemberSlimArray.
In the eager init case, where everything is initially allocated
as Slim results, it uses less memory just to create a simple
linear array rather than storing a pointer for each one.
Fixup the promotion code to move between the arrays rather
than change the pointer in the MemberArray.
On tdf#126710 this saves ~11.5GB (maxresident)
tdf#100244 (full case) this saves about 6.3GB (max resident)
In tdf#126710's case, the 'virt' column in top appeared to save
even more; possibly due to large reallocations in the vector that's
been removed?
Change-Id: I7681304310e060da191edc1fb243900ce59193a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209101
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Define mpaMemberSlimArray as a span of ScDPResultMemberSlim's,
we'll use this in future instead of the Vector that might
hold pointers to any subclass of ScDPResultMember.
Make GetMember and GetMemberCount reference it.
The actual allocation of the array comes later.
Change-Id: Id2abf23e72a92fee0dc3e4326370692a3567dafd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209098
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
Use GetMember() for most cases rather than directly
accessing the member array, since soon we'll have
two member arrays.
Change-Id: I76eca012af6743b29de1e53e96a2ff46187f8a8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209097
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>
The pivot table output set pivot table specific cell styles on its
cells ("Pivot Table Value", "Pivot Table Result", ...) and created
them in the document on first use. Remove this, so adding a pivot
table no longer adds any cell styles.
The attributes that these styles carried are applied as direct
formatting instead. The member cells are aligned to the left, and
the subtotal and grand total labels and results are bold. The left
alignment is also what makes the member indents visible, an indent
has no effect in a centered cell. The style name mapping in
stylehelper.cxx stays, so documents that already contain these
styles keep working.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ib33d170d2da38a60c0739eda8fa79ce4f1fcf745
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8254
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit fee8a092ac3388c873d2b0763f7ce3d8cd032b76)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209431
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
The formatting of the pivot table output was spread across
ScDPOutput: cell styles and frames were applied inline while the
table content was written, and ScDPOutputImpl drew the block
frames.
Add sc::pivot::StyleOutput, which handles all the drawing. ScDPOutput
now only records the sections of the table (layout geometry, field
cells, member spans, subtotal and grand total rows and columns,
indents and expand or collapse buttons). The cell styles are applied
while the sections are recorded, at the same points where they were
applied before, so they always come before any direct formatting
(number formats, pivot table format attributes) reaches the cells.
The block frames, the indents and the expander buttons are then drawn
by apply() in one pass over the collected sections. The drawn output
stays the same as before, and a different look, like the OOXML pivot
table styles, can later be drawn from the same sections.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ia628de6badf511d299f36bf474194ecad17a9c56
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8253
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 9f5a36c822b170835c55143716be9eca28ac3e91)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209430
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Follow-up hardening for the recently added first-class callables
(LAMBDA, LET and macros).
Bound the nesting depth of callable evaluation. A lambda body runs in a
fresh nested interpreter that does not pass through the per-cell
recursion counter, so a lambda that ends up calling itself could keep
nesting. Cap the depth at the same limit used for ordinary formula cell
evaluation and return an error once it is reached.
When cloning a lambda body, skip an empty or inverted token span and
copy only the tokens that are actually present, so no uninitialized slot
is ever handed to the new token array.
Cast a callable to its concrete type directly instead of doing a runtime
type check on every call, since the opcode already identifies the type.
Widen the parameter and argument counts from short.
Rewrite the copied macro comments in plain English and remove the
commented-out matrix callable code and its declaration.
Add tests for a terminating self-referential lambda and for a lambda
that would otherwise recurse without bound.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ib520c48b5fa726f883ba4595d61786b45eeedbf5
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/7114
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 5b8c9b85c20257449907c8c69c0145ccdb017b03)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208345
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
This string is a confusing mix of several strings seperated by
semicolons. It seems quite easy for translators to misunderstand so
let’s just split them out into actual separate strings and add a
comment.
The patch below recently changed the string so it will now have to be
translated again. For the previous string, it looks like there are
mistakes in the translation for Persian and Tibetan which seem to have
replaced the semicolons with a different symbol.
commit 77ea61b986
Author: Heiko Tietze <tietze.heiko@gmail.com>
Date: Fri Aug 7 08:02:20 2026 +0200
Resolves tdf#172980 - Rename 'Hide' to 'Skip' in CSV import dialog
Change-Id: Ic05abf5943d75ecadf312d898b46b9a79bb6bbac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209108
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
ScDPResultMemberFull::CheckShowEmpty(..) is declared but
never implemented - but there is a base class implementation
which is fine.
All existing calls are on ScDPResultMember* so don't hit a problem
but if something tries to call it on a ScDPResultMemberFull* it
tries to call the missing function.
Signed-off-by: Dr. David Alan Gilbert <dave@treblig.org>
Change-Id: I8350517e87ed118e0065412f16aa6053f3bbda9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209014
Tested-by: Jenkins
Reviewed-by: David Gilbert <freedesktop@treblig.org>