Commit Graph
41588 Commits
Author SHA1 Message Date
Michael Weghorn ec8be139bc sc a11y: Return concrete type in ScAccessibleDocument::GetAccessibleSpreadsheet
Change-Id: I11d00468deff9438038eb8d66208a8772ccdf6fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210604
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-10 18:30:31 +02:00
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
Andrea Gelmini 3ff64935b4 Fix typos
Change-Id: I48e41434d3f451725a724cd86750731a9fc67fcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210569
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 16:00:26 +02:00
Andrea Gelmini 6410690a38 Fix typos in code and comments.
Change-Id: I8f1419c60c8aec0784e6de685ba7f630ae99638d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210571
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-10 14:00:17 +02:00
Xisco Fauli 406f55ced7 sc: drop obsolete check. Minimum GCC version is 13
Since
commit 16dd61ab4d
Author: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Date:   Sat Mar 21 08:40:09 2026 +0200

    Bump minimum GCC version to 13

Change-Id: I7e06e83b7987f36b20b764a164f2da22f022e25f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210557
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-09 09:31:19 +02:00
Caolán McNamara 6c859d0acd crashtesting: don't thread a formula that uses ocSpill
see on loading forums/xlsx/forum-mso-en4-748529.xlsx and doing a
hard recalculation, which aborts with:

 soffice.bin: sc/inc/formulacell.hxx:514: void ScFormulaCell::MaybeInterpret():
 Assertion `!rDocument.IsThreadedGroupCalcInProgress()' failed.

 #4  ScFormulaCell::MaybeInterpret at sc/inc/formulacell.hxx:514
 #5  ScFormulaCell::IsEmpty at sc/source/core/data/formulacell.cxx:3153
 #6  FillMatrixHandler::operator() at sc/source/core/data/column2.cxx:2636
 #7  sc::ParseBlock at sc/inc/mtvfunctions.hxx:66
 #8  ScColumn::FillMatrix at sc/source/core/data/column2.cxx:2708
 #9  ScTable::FillMatrix at sc/source/core/data/table1.cxx:2700
 #10 ScDocument::FillMatrix at sc/source/core/data/documen8.cxx:400
 #11 ScInterpreter::CreateMatrixFromDoubleRef at sc/source/core/tool/interpr5.cxx:386
 #12 ScInterpreter::ScSpilledRange at sc/source/core/tool/interpr1.cxx:1703
 #13 ScInterpreter::DispatchOpCode at sc/source/core/tool/interpr4.cxx:3868
 #14 ScInterpreter::Interpret at sc/source/core/tool/interpr4.cxx:4414
 #15 ScFormulaCell::InterpretTail at sc/source/core/data/formulacell.cxx:2209
 #16 ScColumn::CalculateInThread at sc/source/core/data/column2.cxx:3270
 #17 ScTable::CalculateInColumnInThread at sc/source/core/data/table1.cxx:2740
 #18 ScDocument::CalculateInColumnInThread at sc/source/core/data/documen8.cxx:421
 #19 Executor::doWork at sc/source/core/data/formulacell.cxx:5463

ScSpilledRange calculates cells itself. It calls MaybeInterpret on the
master cell of the dynamic array, and CreateMatrixFromDoubleRef then
covers the whole spill range, so FillMatrix asks every cell in that
range whether it is empty and IsEmpty calculates it. A worker thread
inside a threaded group calculation must not calculate a cell.

The dependency evaluator can't cover it either, only the operand's own
cell is named by a reference token and how far the spill reaches is
known only once that cell has been calculated

an issue since:

commit 9b97b0fc91bce4b8726ea210347e8ea84270e148
Date:   Mon Jul 6 13:09:39 2026 +0000

    sc: add the # postfix operator for spilled-range references

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id58e88d1bd927576e4723dd23bc119673feed108
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11285
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 89af05e8a5e8ce4ae337e2f0048f670940573930)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210542
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-08 16:16:39 +02:00
Andreas Heinisch 52fe6ff648 tdf#97354 - Keep formula bar content visible while a ref dialog is open
Still clear the formula bar content when the view itself is no longer
active.

Change-Id: I2aab4c320c342676fc547b8879fc2e6986d88ce8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208862
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-09-07 11:30:08 +02:00
Julien Nabet e808025d6f tdf#146404: Fix number Format Code when reopen ods/fods
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
2026-09-07 10:17:29 +02:00
Julien Nabet 0df8960f56 tdf#173364: fix Unable to edit database range for xlsx document
The pb appears with 0d7be893f5:
Table Style: introduce insert/delete Table... command available from

with ods pData->GetTableStyleInfo() is nullptr so buttons like "Modify"
but also "Delete" or all the "Options" part, are enabled (sensitive=true)
with xlsx pData->GetTableStyleInfo() is not null and these same buttons are disabled.

I don't know if the return of GetTableStyleInfo is ok for both cases but I don't know why
we should test this to know if these buttons should be enabled or not.

To be homogeneous, I also did the same for m_xAssignFrame.

Change-Id: Ib2295f26b53163a9612159c1564227d9b2b8ca9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210506
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-07 10:16:20 +02:00
Julien Nabet 296b49f581 Related tdf#150928: replace character set by encoding (sc/part 3+connectivity)
Change-Id: I78d3c989be9e02e39d646b3c1eb672e3f37bd43c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209380
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-07 10:15:23 +02:00
Samuel Mehrbrodt 9fc9e5bc9e tdf#173381 PDF export: Make sure that link contents are always set
Use name, link text or the link itself - depending on what is available.

Change-Id: Iea6654e2aae22d39c031b2cb953c34a5a1ce42ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210458
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
2026-09-07 08:07:57 +02:00
Andreas Heinisch 766e4da2bb tdf#122473 - Import alignment and axis-based pivot area formats
Change-Id: I2b90187d8e6e9788cc37320dff9035f2042b30f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210016
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
2026-09-07 07:58:38 +02:00
DrRobotto d3d6804807 tdf#168193 - For autofilter look up row label instead of scanning all members
Change-Id: I1001e51b088f7cc405ed4b3d2c05c80a23aeaa63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210450
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-09-05 08:50:22 +02:00
Stephan Bergmann 2dc002cab1 Fix UBSan dynamic-type-mismatch
...at

> engine/sc/source/ui/unoobj/chart2uno.cxx:1622:20: runtime error: downcast of address 0x7c6579dde660 which does not point to an object of type 'ScDoubleRefToken'
> 0x7c6579dde660: note: object is of type 'ScExternalDoubleRefToken'
>  00 00 00 00  b0 11 4e 1b f5 7b 00 00  00 00 13 00 01 00 00 00  00 00 be be be be be be  80 16 8d 79
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'ScExternalDoubleRefToken'
>  #0 in (anonymous namespace)::InsertTabNumber::operator()(boost::intrusive_ptr<formula::FormulaToken> const&) const at engine/sc/source/ui/unoobj/chart2uno.cxx:1622:20
>  #1 in __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag> std::__for_each<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, (anonymous namespace)::InsertTabNumber>(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, (anonymous namespace)::InsertTabNumber&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_algo.h:159:6
>  #2 in (anonymous namespace)::InsertTabNumber std::for_each<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, (anonymous namespace)::InsertTabNumber>(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<boost::intrusive_ptr<formula::FormulaToken>*, std::__cxx1998::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>>, std::__debug::vector<boost::intrusive_ptr<formula::FormulaToken>, std::allocator<boost::intrusive_ptr<formula::FormulaToken>>>, std::random_access_iterator_tag>, (anonymous namespace)::InsertTabNumber) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_algo.h:3846:7
>  #3 in ScChart2DataProvider::detectArguments(com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSource> const&) at engine/sc/source/ui/unoobj/chart2uno.cxx:1961:16
>  #4 in non-virtual thunk to ScChart2DataProvider::detectArguments(com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSource> const&) at engine/sc/source/ui/unoobj/chart2uno.cxx
>  #5 in oox::drawingml::ChartExport::getSplitCategoriesList(rtl::OUString const&) at engine/oox/source/export/chartexport.cxx:723:106
>  #6 in oox::drawingml::ChartExport::exportSeriesCategory(com::sun::star::uno::Reference<com::sun::star::chart2::data::XDataSequence> const&, int) at engine/oox/source/export/chartexport.cxx:4498:89
>  #7 in oox::drawingml::ChartExport::exportSeries_chart(com::sun::star::uno::Reference<com::sun::star::chart2::XChartType> const&, cpo::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::chart2::XDataSeries>> const&, bool&) at engine/oox/source/export/chartexport.cxx:4048:21
>  #8 in oox::drawingml::ChartExport::exportAllSeries(com::sun::star::uno::Reference<com::sun::star::chart2::XChartType> const&, bool&) at engine/oox/source/export/chartexport.cxx:3881:5
>  #9 in oox::drawingml::ChartExport::exportPieChart(com::sun::star::uno::Reference<com::sun::star::chart2::XChartType> const&) at engine/oox/source/export/chartexport.cxx:3687:5
>  #10 in oox::drawingml::ChartExport::exportPlotArea(com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> const&, bool) at engine/oox/source/export/chartexport.cxx:2932:33
>  #11 in oox::drawingml::ChartExport::exportChart(com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> const&, bool) at engine/oox/source/export/chartexport.cxx:2302:5
>  #12 in oox::drawingml::ChartExport::exportChartSpace(com::sun::star::uno::Reference<com::sun::star::chart::XChartDocument> const&, bool, bool) at engine/oox/source/export/chartexport.cxx:1570:5
>  #13 in oox::drawingml::ChartExport::ExportContent_(bool) at engine/oox/source/export/chartexport.cxx:1480:9
>  #14 in oox::drawingml::ChartExport::ExportContent() at engine/oox/source/export/chartexport.cxx:1457:5
>  #15 in oox::drawingml::ChartExport::WriteChartObj(com::sun::star::uno::Reference<com::sun::star::drawing::XShape> const&, int, int) at engine/oox/source/export/chartexport.cxx:1273:5
>  #16 in XclExpChartObj::SaveXml(XclExpXmlStream&) at engine/sc/source/filter/excel/xeescher.cxx:1897:22
>  #17 in (anonymous namespace)::SaveDrawingMLObjects(XclExpObjList&, XclExpXmlStream&) at engine/sc/source/filter/xcl97/xcl97rec.cxx:304:16
>  #18 in XclExpObjList::SaveXml(XclExpXmlStream&) at engine/sc/source/filter/xcl97/xcl97rec.cxx:414:5
>  #19 in XclExpRecordList<XclExpRecordBase>::SaveXml(XclExpXmlStream&) at engine/sc/source/filter/inc/xerecord.hxx:386:21
>  #20 in ExcTable::WriteXml(XclExpXmlStream&) at engine/sc/source/filter/excel/excdoc.cxx:717:14
>  #21 in ExcDocument::WriteXml(XclExpXmlStream&) at engine/sc/source/filter/excel/excdoc.cxx:918:44
>  #22 in XclExpXmlStream::exportDocument() at engine/sc/source/filter/excel/xestream.cxx:1163:18
>  #23 in oox::core::FilterBase::filter(cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/oox/source/core/filterbase.cxx:500:83
>  #24 in oox::xls::ExcelFilter::filter(cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sc/source/filter/oox/excelfilter.cxx:200:27
>  #25 in SfxObjectShell::ExportTo(SfxMedium&) at engine/sfx2/source/doc/objstor.cxx:2743:25
>  #26 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at engine/sfx2/source/doc/objstor.cxx:1853:19
>  #27 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sfx2/source/doc/objstor.cxx:3263:39
>  #28 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sfx2/source/doc/objstor.cxx:3051:20
>  #29 in SfxObjectShell::APISaveAs_Impl(std::basic_string_view<char16_t, std::char_traits<char16_t>>, SfxItemSet&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sfx2/source/doc/objserv.cxx:329:19
>  #30 in SfxBaseModel::impl_store(rtl::OUString const&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) at engine/sfx2/source/doc/sfxbasemodel.cxx:3247:42
>  #31 in SfxBaseModel::storeToURL(rtl::OUString const&, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at engine/sfx2/source/doc/sfxbasemodel.cxx:1830:13
>  #32 in UnoApiTest::save(TestFilter, cpo::uno::Sequence<com::sun::star::beans::PropertyValue> const&, char const*) at engine/test/source/unoapi_test.cxx:386:16
>  #33 in testCool14390_ChartExternalRef::TestBody() at engine/sc/qa/unit/subsequent_export_test4.cxx:881:5

apparently caused by 003c0007c13e443fe4e520d1b70586266abf7811 "reduce
Sc*Ref*Token virtual calls".  Now using the helper that was introduced there.

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I3e1c82e8069cb03af29e8dc260017fc3e867f72b
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/11014
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 3797f2792490a1c114ce0a80db2d544bce08670b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210500
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-04 19:47:07 +02:00
Michael Weghorn 2416a01efb tdf#173243 sc: Don't use deleted TreeIter in Pivot table "Data Field" dlg
commit c54f872f50
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Apr 9 09:00:54 2026 +0200

        sc: Use activated row param in ScPivotLayoutTreeListData::DoubleClickHdl

had switched from passing an int by value to
passing a weld::Entry by ref to the lambda
function in ScPivotLayoutTreeListData::DoubleClickHdl.

Since that function is run asynchronously, this can
result in the weld::TreeIter passed to
ScPivotLayoutTreeListData::DoubleClickHdl
already having been deleted by the time it's
accessed in that lambda function.

Create a copy of the iterator held by a std::shared_ptr
and pass that one by value to avoid/fix the issue.

Change-Id: I2387aca5eb5d572d0e6a551589c07a6c683185f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210483
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-04 19:07:24 +02:00
Justin Luth 3487e467f0 tdf#160921 tdf#163088 sc GetNeededSize: setSubpixelPositioning
This fixes a 24.2 regression from Khalid's commit 4b743de97f.

The problem I'm trying to fix is that setting optimal column width
is not necessarily providing enough width to avoid seeing '###'.

The reason is that GetOptimalColumnWidth calls GetTextWidth
with MapMode disabled, so no subpixel calculations were done.

However LayoutString does have MapMode enabled,
so it calculates a different length than what optimal column got.

Surely that must always be wrong. But Khalid's similarly more-correct
commit triggered a lot of 'regressions'. However, this should be
moving in the right direction as tdf#168002 suggests
that mbSubpixelPosition should always be true in the future.

Since it is needed for width, it seems reasonable that it should
also be done for height...

Change-Id: I30590ebba8b3027c5214ee075a1a258d3a61b8c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210438
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-09-03 20:03:09 +02:00
Ben Urban e1d69c4592 tdf#127808, tdf#173380: sc: Fix dynamic arrays for LAMBDA and LET
* Recognize LAMBDA during dynamic array analysis; LAMBDA
never produces an array, but it can be part of a formula
that generates one.

* Fix handling of LET; subexpressions before the last should
not affect the result, unless we are willing to to a more
thorough analysis.

* Update test to check for the new behavior.

* Account for svExternalDoubleRef.

Change-Id: Ia9a4761079de986906ac70252066d8d9b4655f59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210461
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-03 19:42:45 +02:00
Samuel Mehrbrodt 307f955adf cool#15780 sc: don't export an invalid totals row to XLSX
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>
2026-09-03 12:11:34 +02:00
Justin Luth bf588c5d9a tdf#162830 sc LayoutStrings: use decimal size to fit repeat into width
Using the rounded integer width of a single character
and using that to determine how many times to repeat it in a give space
is bound to result in disaster.
Instead, determine an approximation of the real size of the string.

This is just layout stuff - no idea how to capture it in a unit test.

Change-Id: Ie0cbc891d986357a1037b1476cb1cd4c9601e876
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210439
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-09-03 01:55:01 +02:00
Michael Weghorn 2d24bba4dd sc a11y: Return concrete type in ScChildrenShapes::GetAt
Change-Id: I04f64fa9fc6a5655c7ef6cb0cbb27ce8065dabd3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210387
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-02 14:35:48 +02:00
Michael Weghorn fb7b228e72 sc a11y: Return concrete type in ScShapeChildren::Get{Fore,Back}groundShapeAt
Change-Id: I39bf2b2c12a6fef70b4f3038a9924e992961ba90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210385
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-02 14:35:30 +02:00
Michael Weghorn 86bfe9819d sc a11y: Return more concrete type in ScShapeChildren::GetControl
Change-Id: I410560ed5dba053891eb8be67b2a82cf052f4e87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210384
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-02 14:34:44 +02:00
Michael Weghorn b1d8a800cf sc a11y: Return more concrete type in ScShapeChildren::Get{Back,Fore}Shape
Change-Id: Ifb0462eacfad5a6174c867571bddbfa100a474f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210383
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-02 14:34:17 +02:00
Xisco Fauli 64a367ebf1 cid#1696360: Silence Dereference after null check
I tried to workaround it in
commit e3a3958242
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Fri Jul 10 15:16:47 2026 +0200

    cid#1696360: silence Dereference after null check

which later got reverted in
commit d4b4b6e24d
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Mon Aug 24 10:49:25 2026 +0200

    cid#1696360: Dereference after null check

Change-Id: I311834328b23af62a88d37ecca9ce118005642a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210369
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-02 01:02:42 +02:00
Mike Kaganski 84c8ca6fd5 Address review comments
See https://gerrit.collaboraoffice.com/c/online/+/9927

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I6139405c1285914323a4c2e0b3ef6ace0034195b
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9953
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 609c2a17a654452409ec090c47351b49c4990349)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210335
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-01 19:51:49 +02:00
Mike Kaganski ecf0efa073 tdf#165609: save the form control label font and alignment
The XLSX export wrote the label as a bare <font> element, so a checkbox
came back with the control default font at 10pt and adjacent labels
overlapped. The label's font name, size and colour, its bold, italic,
underline and strikeout, and its horizontal and vertical alignment are
now written out.

The underline stopped reaching the export altogether when the control
property list started asking for "FontLineStyle", which no control model
has: commit 3187193a61 (tools: rename
FontUnderline to FontLineStyle, 2016-01-29) renamed the VCL enum and
took the UNO property name string along. The same rename hit
sw/source/filter/html/htmlforw.cxx, which is not handled here and needs
a separate fix. A double underline also needs the "fontN" class on the
underline element, which the import compared with a literal "font4",
introduced with no explanation given in commit
04c272eb83 (dr77: #i114128# import legacy
drawing controls, 2010-08-26). N is the index into the workbook font
table, and is treated as one now.

Excel keeps the label font in the VML shape, in the DrawingML run
properties and in a workbook font record, and builds its model from the
DrawingML, while we read the VML and the record it names. Both are
written here so that the two applications show the same document. TODO:
read the label font from the DrawingML run properties, as Excel does.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I87259d25a68829f6c1a78179f8e3aa7811a5688f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9927
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ca86699205743f2709f3cd5d412a8a3f0d3fba38)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210334
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-01 19:51:44 +02:00
Noel Grandin 3b52fbc96f merge EditTextObjectImpl into EditTextObject
this is a weird kind of pimpl pattern, lets just simplify it.

Which means we can remove the Clone() method in favour
of a normal copy constructor.

Change-Id: Ib5793c66df4729f48def8b3cead0f39f2ba94830
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10550
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit dd8a795b5aed4c44e11eef86eaf19b1f88edf0f8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210320
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-01 15:40:01 +02:00
Tomaž Vajngerl 38fb197b05 sc: put back the @ that OOXML leaves out of a plain =@ref# cell
OOXML leaves the @ of =@$I$112# out of the saved text and expresses it
by keeping the cell a plain non-array formula, while an @ over
anything wider keeps its _xlfn.SINGLE. The import didn't put it back,
so the cell showed the row-aligned value while its formula read
=$I$112#, the spelling for a spill.

The @ goes back the way the binary format import already does, and
only for that thinned shape: a non-master cell whose whole formula is
one reference with the operator after it, not even parentheses.
Anywhere wider, injecting an @ would force the operand into an array
and change the result, so (A1)# is left alone.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ib8071804eaa805880e20552eeee92665756c5cd7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10164
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 273dbf42009efe6d9f59edf28a4272cfe366196f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210314
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-01 09:08:51 +02:00
Tomaž Vajngerl 62eced2131 sc: allow parentheses on both sides of the intersection blank
The compiler decides whether a blank is the intersection operator by
looking at the tokens on either side. Both parenthesis tokens have the
separator type, which those checks read as "not a reference", so
=SUM((A1:B1,A2:B2) A1:A2) didn't parse even though it should intersect
the list with the range. The parentheses are now accepted by their
opcode, and so is a reference list built from a converted separator on
either side.

The blank also keeps the parenthesis after it a group. An operand
followed by a parenthesis normally opens an argument list for a
callable, but with the intersection blank in between there is no call,
so ocCall is not injected. A name in front still calls either way.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I8e4b5fb7136419b4e937c8abb521711a8d418af8
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10162
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit b12a7af0e1aab942aa5014b799a96271d03c472f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210305
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 23:49:41 +02:00
Tomaž Vajngerl d0b3ad7b83 sc: read a function call after the range operator
A symbol like F25:IF lexes as a single range reference because IF is
also a valid column name, and then it doesn't name a valid range. The
whole symbol was kept as an unknown name, so =SUM(F25:IF(TRUE,F26))
gave #NAME? instead of summing up to the cell the call returns.

When such a symbol is followed by an opening parenthesis the lexer now
backs up to the range operator and reads it again (a symbol that isn't
a reference at all is already handled elsewhere). The reference then
stands on its own and the call after the operator is read separately.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I709de89206008894b1a07b482ac1ca5457ab059d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10161
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit cc8e9277c510bb8f95d11a37e326a68bd8bca513)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210304
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 20:27:29 +02:00
Tomaž Vajngerl c56ee53c8a sc: join list parts that start with a reference
A reference list is built from the separator between two parts of a
parenthesised expression, and which parts join was decided from the
opcodes at the top of their compiled code. That was wrong both ways:
INDEX returns a reference but wasn't counted, so (INDEX(A1:A3,1),B1)
fell apart, while (F25, F26%) didn't parse at all even though it
should give #VALUE!.

The left part now has to end in a reference or an opcode that returns
one, INDEX among them. The right part joins if it starts with one, or
with a nested list, IF, CHOOSE, a lookup, the @ operator or an error
constant. What it then makes of that reference is the calculation's
business.

A part starting with anything else leaves the separator a separator
and the formula doesn't parse, which is what the producing
application refuses at its formula bar too.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: If65d2f0f9cc599729564cfc5369c0479b07c93e8
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10160
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 50ddf65b640a9cb88aea56be4367a3e44152c230)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210303
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 20:27:22 +02:00
Tomaž Vajngerl 72751755b5 sc: report #VALUE! when a reference list is used as a single value
A reference list holds several ranges, so there is no single value an
operator could work on. GetDouble and GetString had no case for it and
fell through to their parameter error, so =(A1,B1)% and =(A1,B1)&"x"
came out as Err:504 instead of #VALUE!. They report #VALUE! now. A
function that takes the list itself, like SUM, still reads it whole.

The union operator gave the generic Err:502 when one of its parts was
a value instead of a reference, as in =(A1~5). That reports #VALUE!
now too.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I8da8a30a691f2b939d04af7f1abd58e586cd5b7f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10159
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 2cd6e380f8aec3b691dc15ade6798191b8d64d89)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210302
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 20:27:09 +02:00
Tomaž Vajngerl 850bbbc51a sc: keep a spilled range's place through an operator
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>
2026-08-31 20:27:00 +02:00
Tomaž Vajngerl 53d7ae86a0 sc: let a # over more than one cell report no reference
The # operator refers to the master cell before it. ScSpilledRange
took its operand with PopSingleRef, which turns anything that isn't a
single reference into a parameter error, so a # after a range or a
reference list came out as Err:504 instead of #REF!. Anything covering
more than one cell has no master, so it now reports #REF! too, same as
an empty cell or a non-master already did.

An array formula has to give the same single #REF!. The operand's
parameter class wasn't declared, so in an array context the range
operand got turned into a matrix and the operator ran once per cell -
a dynamic-array master then spilled the error matrix or gave #SPILL!.
Declaring the operand as a reference makes the operator take the range
as a whole.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I196f67b644035fbbf87b08c605a5dd2719831ba0
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10157
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 54382bfb0bf025ee4839a6f6d86a07123e893400)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210294
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 17:35:29 +02:00
Tomaž Vajngerl 1ff770e5bf sc: bind the # operator to the reference it follows
The # postfix operator was parsed at the same level as the percent
sign, which is looser than the prefix operators. Because of this
=@A1# compiled to the spill range of an implicit intersection and
=-A1# to the spill range of a negated value. Neither of those means
anything, and OOXML writes the # around the reference alone in both
cases.

The # is now parsed right after the factor it follows, tighter than any
operator that can come before it. A whole range reference goes inside,
because the lexer reads A1:A3 as a single reference. The percent sign
stays above the reference operators, so =A1%# leaves the # with nothing
to bind to and doesn't parse, and the export drops such a # (OOXML has
no spelling for it either).

A blank between two operands is only the intersection operator if both
sides yield a reference. The # does, so the checks that keep the blank
alive and that keep the operator once the operands are known had to be
told about it.

The interpreter passes the spill range on as a matrix that carries the
range it was read from. The intersection, range and union operators
only took references and refused that, so PopReferenceOperand now
hands them the carried range as a double reference.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I1a587bf291ff639b326a366b8efc332106eb5fd3
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10156
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit c589c34aaec00d60fc47f1933762b105f9d22de3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210293
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 17:35:25 +02:00
Xisco Fauli f85e275322 cid#1700588: Explicit null dereferenced
Change-Id: I0d46f67fc400d113a32568dea38071d797fa50ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210284
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-31 17:01:26 +02:00
Andrea Gelmini 8d20be5245 Fix typos in code and comments
Change-Id: I8c95e46a41462345101559f83436a053201613c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210188
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-08-31 16:47:59 +02:00
Xisco Fauli 757b965e92 cid#1695413: Use after free
Change-Id: I00e5340215d10d5b664c2676ac9377471841221f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210285
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 16:38:20 +02:00
Xisco Fauli 1c9dc99eec cid#1695404: silence Use after free
Change-Id: I62650493ac4e77f81004dad30743d45fc914c728
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210283
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-31 16:12:41 +02:00
Tomaž Vajngerl 1ac50fddc7 sc: rewrite the token array into the OOXML shape
OOXML writes @ and # as calls and a reference union as a parenthesised
list, so for each of them we need to know how far the sub-expression
under it reaches. CreateStringFromTokenArray worked that out from the
text it had already written. The problem with this is that every pair
it spliced in shifted all the offsets that were still waiting behind
it, so it kept breaking.

Instead of patching the text, OOXMLRewriter builds a second
token array in the shape OOXML spells out and the writer walks that as
it stands. The call names and the parentheses are ordinary tokens, so
there is nothing to splice and no offsets to keep track of. It is the
same trick RewriteMissing already plays a few lines further up, and it
means the input and the output can be looked at side by side.

The # changes place, from behind its operand to a call in front of it,
so it gets an opcode of its own. _xlfn.ANCHORARRAY spells ocAnchorArray
now, and ocSpill keeps the native postfix spelling with no OOXML one at
all, so the postfix form cannot end up in a file by accident. The
import already rewrote the call back into the postfix operator and now
recognises it by opcode instead of by position. The @ stays
ocSingleValue, it is already in front of its operand so only the
parentheses are new.

The OFFSET() literal argument is swapped for the reference error in
the same pass, instead of the writing loop jumping over tokens.

A unit test drives the rewrite on its own: token array in, token array
out, one case per shape. The shapes that end up with nothing to wrap
are in there too - a lone @, one with a missing argument, and text that
never parsed - since those are the ones where dropping a token is the
only change.

Also drop the dead "@" and "#" rows from the OOXML symbol table, the
rows above them already have _xlfn.SINGLE and _xlfn.ANCHORARRAY.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I63944fb85b5c4388f304f7d94afd0b4f347d7782
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10155
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 4feac84950f5b524d99e277481de50f7b45a8d2f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210292
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-08-31 15:56:50 +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 53d4a4de52 Fix typo in code
Change-Id: I2b9e20d3548ac4b3d743efda4ccad644eb0835dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210148
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-29 15:55:59 +02:00
Andrea Gelmini 0ba789a027 Fix typos
Change-Id: I0af4d3788a2220e88b2f4e0f66eafd05eef33d80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210181
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 15:36:21 +02:00
Andrea Gelmini 521920dde2 Fix typos in code and comments
Change-Id: I27027a36c31a230bd3d215c7fc80ec1ea86c3d72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210184
Tested-by: Jenkins
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 15:33:06 +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 26cdd66c9d Fix typos
Change-Id: I9c27950f54dea4ed21808fd25114b2a0b2c32b7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210187
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-29 13:33:08 +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
Justin Luth 769601079f tdf#131430 sc ReplaceAllStyle: save range to undo
Before, it generally wasn't saving ANYTHING
because rMark is normally not marked,
and even if it is, it could be random.
The only time rMark means anything is if rSearchItem.GetSelection().

But even that doesn't help because the undo has no idea of range.
ScUndoReplace::Undo attempts to undo the entire document,
so definitely more than bOnlyMarked needs to be included.

In fact, even sheets that don't even have a match
need to be backed up. Entirely.

This seriously needs to be looked at by a Calc Pro
who could optimize this by passing rMatchedRanges
to ScUndoReplace. And only CopyToDocument a RangeList.
But of course, there is also bMatchedRangesWereClamped...
which thankfully doesn't affect styles, only text.

Change-Id: I2087e255e3e4b3387b388e1f2d28c19717e50342
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210247
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-08-29 02:45:18 +02:00
Andrea Gelmini 9cfefaf90a Fix typos
Change-Id: I04037b6e2bd89d4583d06a2ebf19e8ae02eea4e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210180
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-08-29 00:16:36 +02:00
Andrea Gelmini 180ec0047c Fix typos
Change-Id: Ib755512aa8defa5c635a769c417371ba324c6beb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210182
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-08-28 16:34:03 +02:00