Commit Graph
517709 Commits
Author SHA1 Message Date
Noel Grandin 9fb6bc06eb cool#15761 Speedup calc cursor / data-entry
I suspect that what is happening here is that maDirtyTableColumnNames is
getting a lot of entries and we are refreshing stuff more than we need to.

Swap the loop ordering so that refresh each DB at most once.

Change-Id: Iee629083a81dd52365af90a820a5a78a27f6c3ef
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2556
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 5d7371e71ecf7fc9a52d70e55f3060c0aab04d56)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206683
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-16 14:47:36 +02:00
Dan Williams 8a5777a0c6 vcl/qt: fix alpha-mask handling todos
Change-Id: I98a12feba2e6bced3842cc3957389547cbc55dd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206474
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-06-16 14:22:51 +02:00
Christian Lohmaier 427b39d55a bump product version to 27.2.0.0.alpha0+
Change-Id: I78635e43495928eefce8125f63258f7ff4d36c43
2026-06-16 13:35:28 +02:00
Christian Lohmaier e6d16d8cd2 Update git submodules
* Update translations from branch 'master'
  to fcf6aec13418e7af4178c2f692bf40179356f5f4
  - update translations for master/26.8
    
    and force-fix errors using pocheck
    
    Change-Id: I96a306e2b47e39b63f4142ed1f3c6ad0dbcd5543
2026-06-16 13:23:05 +02:00
Christian Lohmaier bffafd8d08 CppunitTest_sc_tiledrendering fails when building with multiple langs
d84c0d493b changed how the langauge list
is handled, before it just cached the English names and used those even
after the UI langauge was changed, after the change it will recreate the
list and use the localized names.
That broke the checks, so forcing the language to en-US is a workaround,
but it doesn't seem like the proper fix esp. for the second instance:
* open a french document, so content is in French, using janvier as
  expected.
* script sets language to Spanish, that works since at that point LO's
  UI is English still, recalculating with that returns ene / enero
* script then tries to set the language to English but fails, document
  stays in Spanish and still returns ene

the language selection depends on the available languages, so setting
the language to Enlish before trying to set a different language seems
like an unnecessary hack/surely there's a way to set the document
language without depending on localized names.

Change-Id: I95957c0900523a49112eb48dc7a016950ffc7ab8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206313
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2026-06-16 12:18:25 +02:00
Justin Luth 70bf50bb8d tdf#164800 doc import: don't limit RES_PARATR_LIST_AUTOFMT to SwNumRule
This fixes a 24.8.3 regression.

Hidden paragraphs were no longer being hidden,
due to commit 7b8cec8322
    tdf#162268 sw: ApplyParagraphMarkFormatToEmptyLineAtEndOfParagraph

That's because only numbered paragraphs were filling
the paragraph marker's character properties,
and thus the hidden property was missing.

Remove my cautious limitation to only do this for numbering.
RES_PARATR_LIST_AUTOFMT in general has been around since 6.4,
so most 'generic' issues related to it should be ironed out by now.

An alternative solution would be to set
APPLY_PARAGRAPH_MARK_FORMAT_TO_EMPTY_LINE_AT_END_OF_PARAGRAPH to false.

make CppunitTest_sw_ww8export4 \
    CPPUNIT_TEST_NAME=testTdf164800_hiddenPara

Change-Id: I5adf468f6a64e4331d307ccb22e17485c8d1205e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206487
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-16 11:47:32 +02:00
Xisco Fauli 65d33ff97e tdf#172431: Return error when col/row args are greater than source
I wrongly assumed TAKE and DROP behave the same way when
I implemented them, but they don't.
It needs the unittest to be adapted a bit

Change-Id: I59dbeb07ce86cac039f99a747c6d72ed35e89ec0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206661
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 11:35:15 +02:00
Stephan Bergmann 495918adb9 Fix heap-use-after-free in ScOutputData::FindChanged
The loop in ScOutputData::FindChanged reused the ScFormulaCell pointers cached
in mpRowInfo.  But the preceding EnsureFormulaCellResults call can contract
an auto-resizing matrix formula, and can thus delete the matrix's cells.

This apparently started to break in 8070124eb9f0f5a4c7ea26a0fe39366d2ff8d26a
"sc: fix crash when a matrix formula contracts mid-iteration", making the
CppunitTest_sc_uicalc2 it introduced fail with

> ==558773==ERROR: AddressSanitizer: heap-use-after-free on address 0x7ca7f493fc48 at pc 0x7bc78ec4338a bp 0x7ffdce34e080 sp 0x7ffdce34e078
> READ of size 8 at 0x7ca7f493fc48 thread T0
>  #0 in ScFormulaCell::IsRunning() const at engine/sc/inc/formulacell.hxx:363:48
>  #1 in ScOutputData::FindChanged() at engine/sc/source/ui/view/output.cxx:1963:29
>  #2 in ScGridWindow::UpdateFormulaRange(short, int, short, int) at engine/sc/source/ui/view/gridwin.cxx:5388:17
>  #3 in ScGridWindow::UpdateFormulas(short, int, short, int) at engine/sc/source/ui/view/gridwin.cxx:5336:5
>  #4 in ScTabView::UpdateFormulas(short, int, short, int) at engine/sc/source/ui/view/tabview3.cxx:2785:26
>  #5 in ScTabViewShell::Notify(SfxBroadcaster&, SfxHint const&) at engine/sc/source/ui/view/tabvwsh5.cxx:242:17
>  #6 in SfxBroadcaster::Broadcast(SfxHint const&) at engine/svl/source/notify/SfxBroadcaster.cxx:43:24
>  #7 in ScDocShell::PostDataChanged() at engine/sc/source/ui/docshell/docsh3.cxx:95:5
>  #8 in ScDocShell::SetDocumentModified() at engine/sc/source/ui/docshell/docsh.cxx:3265:9
>  #9 in ScDocShellModificator::SetDocumentModified() at engine/sc/source/ui/docshell/docsh.cxx:3656:19
>  #10 in (anonymous namespace)::performAutoFormatAndUpdate(std::basic_string_view<char16_t, std::char_traits<char16_t>>, ScMarkData const&, short, int, short, bool, bool, std::shared_ptr<ScDocShellModificator> const&, ScViewFunc&) at engine/sc/source/ui/view/viewfunc.cxx:478:19
>  #11 in ScViewFunc::EnterData(short, int, short, rtl::OUString const&, EditTextObject const*, bool) at engine/sc/source/ui/view/viewfunc.cxx:817:9
>  #12 in ScViewFunc::EnterDataToCurrentCell(rtl::OUString const&, EditTextObject const*, bool) at engine/sc/source/ui/view/viewfunc.cxx:665:5
>  #13 in ScCellShell::Execute(SfxRequest&) at engine/sc/source/ui/view/cellsh3.cxx:290:40
>  #14 in SfxStubScCellShellExecute(SfxShell*, SfxRequest&) at engine/workdir/SdiTarget/sc/sdi/scslots.hxx:7965:27
>  #15 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) at engine/sfx2/source/control/dispatch.cxx:256:9
>  #16 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) at engine/sfx2/source/control/dispatch.cxx:755:9
>  #17 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) at engine/sfx2/source/control/bindings.cxx:1054:22
>  #18 in SfxBindings::Execute_Impl(unsigned short, SfxPoolItem const**, SfxCallMode) at engine/sfx2/source/control/bindings.cxx:961:5
>  #19 in SfxBindings::Execute(unsigned short, SfxPoolItem const**, SfxCallMode) at engine/sfx2/source/control/bindings.cxx:884:12
>  #20 in ScCellShell::Execute(SfxRequest&) at engine/sc/source/ui/view/cellsh3.cxx:381:39
>  #21 in SfxStubScCellShellExecute(SfxShell*, SfxRequest&) at engine/workdir/SdiTarget/sc/sdi/scslots.hxx:7965:27
>  #22 in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot const&, SfxRequest&, bool) at engine/sfx2/source/control/dispatch.cxx:256:9
>  #23 in SfxDispatcher::Execute_(SfxShell&, SfxSlot const&, SfxRequest&, SfxCallMode) at engine/sfx2/source/control/dispatch.cxx:755:9
>  #24 in SfxBindings::Execute_Impl(SfxRequest&, SfxSlot const*, SfxShell*) at engine/sfx2/source/control/bindings.cxx:1054:22
>  #25 in SfxBindings::Execute_Impl(unsigned short, SfxPoolItem const**, SfxCallMode) at engine/sfx2/source/control/bindings.cxx:961:5
>  #26 in SfxBindings::Execute(unsigned short, SfxPoolItem const**, SfxCallMode) at engine/sfx2/source/control/bindings.cxx:884:12
>  #27 in ScInputHandler::EnterHandler2(ScEnterMode, bool, rtl::OUString, rtl::OUString const&) at engine/sc/source/ui/app/inputhdl.cxx:3537:23
>  #28 in ScInputHandler::EnterHandler(ScEnterMode, bool) at engine/sc/source/ui/app/inputhdl.cxx:3264:5
>  #29 in ScModule::InputEnterHandler(ScEnterMode, bool) at engine/sc/source/ui/app/scmod.cxx:1473:19
>  #30 in ScTabViewShell::TabKeyInput(KeyEvent const&) at engine/sc/source/ui/view/tabvwsh4.cxx:1469:33
>  #31 in ScGridWindow::KeyInput(KeyEvent const&) at engine/sc/source/ui/view/gridwin.cxx:3945:26
>  #32 in (anonymous namespace)::KitPostAsyncEvent(void*, void*) at engine/sfx2/source/view/kithelper.cxx:1298:35
>  #33 in Link<void*, void>::Call(void*) const at engine/include/tools/link.hxx:105:45
>  #34 in ImplHandleUserEvent(ImplSVEvent*) at engine/vcl/source/window/winproc.cxx:2311:30
>  #35 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) at engine/vcl/source/window/winproc.cxx:2868:13
>  #36 in SalFrame::CallCallback(SalEvent, void const*) const at engine/vcl/inc/salframe.hxx:310:29
>  #37 in SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at engine/vcl/headless/svpinst.cxx:289:22
>  #38 in non-virtual thunk to SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) at engine/vcl/headless/svpinst.cxx
>  #39 in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const at engine/vcl/source/app/salusereventlist.cxx:119:58
>  #40 in SalUserEventList::DispatchUserEvents(bool) at engine/vcl/source/app/salusereventlist.cxx:120:13
>  #41 in SvpSalInstance::ImplYield(bool, bool) at engine/vcl/headless/svpinst.cxx:442:22
>  #42 in SvpSalInstance::DoYield(bool, bool) at engine/vcl/headless/svpinst.cxx:519:21
>  #43 in InnerYield(bool, bool) at engine/vcl/source/app/svapp.cxx:389:48
>  #44 in Scheduler::ProcessEventsToIdle() at engine/vcl/source/app/svapp.cxx:449:12
>  #45 in ScModelTestBase::insertStringToCell(rtl::OUString const&, std::basic_string_view<char16_t, std::char_traits<char16_t>>) at engine/sc/qa/unit/helper/qahelper.cxx:318:5
>  #46 in testSpillMatrixContractionOnEdit::TestBody() at engine/sc/qa/unit/uicalc/uicalc2.cxx:2184:5
>
> 0x7ca7f493fc48 is located 72 bytes inside of 160-byte region [0x7ca7f493fc00,0x7ca7f493fca0)
> freed by thread T0 here:
>  #0 in operator delete(void*, unsigned long) at ~/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:187:3
>  #1 in std::default_delete<ScFormulaCell>::operator()(ScFormulaCell*) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/unique_ptr.h:92:2
>  #2 in std::default_delete<ScFormulaCell> std::for_each<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScFormulaCell**, std::__cxx1998::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>>, std::__debug::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>, std::random_access_iterator_tag>, std::default_delete<ScFormulaCell>>(__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScFormulaCell**, std::__cxx1998::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>>, std::__debug::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>, std::random_access_iterator_tag>, __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<ScFormulaCell**, std::__cxx1998::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>>, std::__debug::vector<ScFormulaCell*, std::allocator<ScFormulaCell*>>, std::random_access_iterator_tag>, std::default_delete<ScFormulaCell>) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_algo.h:3775:2
>  #3 in mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell, mdds::mtv::delayed_delete_vector>::overwrite_values(mdds::mtv::base_element_block&, unsigned long, unsigned long) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/../types.hpp:779:9
>  #4 in void std::__invoke_impl<void, void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long, unsigned long>(std::__invoke_other, void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long&&, unsigned long&&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/invoke.h:63:14
>  #5 in std::enable_if<is_invocable_r_v<void, void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long, unsigned long>, void>::type std::__invoke_r<void, void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long, unsigned long>(void (*&)(mdds::mtv::base_element_block&, unsigned long, unsigned long), mdds::mtv::base_element_block&, unsigned long&&, unsigned long&&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/invoke.h:113:2
>  #6 in std::_Function_handler<void (mdds::mtv::base_element_block&, unsigned long, unsigned long), void (*)(mdds::mtv::base_element_block&, unsigned long, unsigned long)>::_M_invoke(std::_Any_data const&, mdds::mtv::base_element_block&, unsigned long&&, unsigned long&&) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/std_function.h:295:9
>  #7 in std::function<void (mdds::mtv::base_element_block&, unsigned long, unsigned long)>::operator()(mdds::mtv::base_element_block&, unsigned long, unsigned long) const at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/std_function.h:581:9
>  #8 in mdds::mtv::element_block_funcs<mdds::mtv::default_element_block<10, double, mdds::mtv::delayed_delete_vector>, mdds::mtv::default_element_block<52, svl::SharedString, mdds::mtv::delayed_delete_vector>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject, mdds::mtv::delayed_delete_vector>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell, mdds::mtv::delayed_delete_vector>>::overwrite_values(mdds::mtv::base_element_block&, unsigned long, unsigned long) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/.././block_funcs.hpp:209:9
>  #9 in mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::set_empty_in_single_block(unsigned long, unsigned long, unsigned long, bool) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1976:13
>  #10 in mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::set_empty_impl(unsigned long, unsigned long, unsigned long, bool) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1898:18
>  #11 in mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::set_empty(mdds::mtv::soa::detail::iterator_base<mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::iterator_trait> const&, unsigned long, unsigned long) at engine/workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1142:12
>  #12 in (anonymous namespace)::EmptyCells::operator()(sc::RowSpan const&) at engine/sc/source/core/data/column3.cxx:1066:34
>  #13 in (anonymous namespace)::EmptyCells std::for_each<std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<sc::RowSpan*, std::__cxx1998::vector<sc::RowSpan, std::allocator<sc::RowSpan>>>, std::__debug::vector<sc::RowSpan, std::allocator<sc::RowSpan>>, std::random_access_iterator_tag>>, (anonymous namespace)::EmptyCells>(std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<sc::RowSpan*, std::__cxx1998::vector<sc::RowSpan, std::allocator<sc::RowSpan>>>, std::__debug::vector<sc::RowSpan, std::allocator<sc::RowSpan>>, std::random_access_iterator_tag>>, std::reverse_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<sc::RowSpan*, std::__cxx1998::vector<sc::RowSpan, std::allocator<sc::RowSpan>>>, std::__debug::vector<sc::RowSpan, std::allocator<sc::RowSpan>>, std::random_access_iterator_tag>>, (anonymous namespace)::EmptyCells) at ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/17.0.0/../../../../include/c++/17.0.0/bits/stl_algo.h:3775:2
>  #14 in ScColumn::DeleteCells(sc::ColumnBlockPosition&, int, int, InsertDeleteFlags) at engine/sc/source/core/data/column3.cxx:1096:5
>  #15 in ScColumn::DeleteArea(int, int, InsertDeleteFlags, bool, sc::ColumnSpanSet*) at engine/sc/source/core/data/column3.cxx:1120:19
>  #16 in ScTable::DeleteArea(short, int, short, int, InsertDeleteFlags, bool, sc::ColumnSpanSet*) at engine/sc/source/core/data/table2.cxx:433:25
>  #17 in ScDocument::DeleteAreaTab(short, int, short, int, short, InsertDeleteFlags) at engine/sc/source/core/data/document.cxx:2064:17
>  #18 in ScDocument::ResizeMatrixFormula(ScAddress const&, short, int) at engine/sc/source/core/data/documen4.cxx:517:17
>  #19 in ScDocument::ProcessPendingMatrixResizes() at engine/sc/source/core/data/documen4.cxx:623:9
>  #20 in sc::MatrixResizeGuard::~MatrixResizeGuard() at engine/sc/inc/MatrixResizeGuard.hxx:39:19
>  #21 in ScColumn::EnsureFormulaCellResults(int, int, bool) at engine/sc/source/core/data/column4.cxx:2012:1
>  #22 in ScTable::EnsureFormulaCellResults(short, int, short, int, bool) at engine/sc/source/core/data/table7.cxx:449:32
>  #23 in ScDocument::EnsureFormulaCellResults(ScRange const&, bool) at engine/sc/source/core/data/document10.cxx:1037:27
>  #24 in ScOutputData::FindChanged() at engine/sc/source/ui/view/output.cxx:1950:20
>  #25 in ScGridWindow::UpdateFormulaRange(short, int, short, int) at engine/sc/source/ui/view/gridwin.cxx:5388:17

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I0e32afb07a49f149294e2bf20cb10194ae84fd81
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4135
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 780c73802eb8ace937d7b0d5be8a33ba710d2f55)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206646
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 11:04:21 +02:00
Caolán McNamara b601b4304e crashtesting: defer dynamic-array resize during the CalcAll walk
ScTable::CalcAll interprets every formula cell in each column's cell
store. Interpreting a dynamic-array master whose result size changed
runs ResizeMatrixFormula, which deletes or inserts reference cells in
the columns being walked and frees the block the iterator sits on.

Take a MatrixResizeGuard around the whole per-table walk so any such
resize is queued and drained once, after every column. At the table
level this covers both callers, ScDocument::CalcAll and the direct
FetchTable(n)->CalcAll() in the xlsx exporter, and the per-table drain
makes the trailing ProcessPendingMatrixResizes in ScDocument::CalcAll
dead, so drop it.

forum-mso-en4-776376.xlsx aborted before this under DoHardRecalc when
saved to xlsx or ods, and converts cleanly with this.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I54cd8ce944d791339a0f2feec02bea5bb87d9312
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4216
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 630cd3a5e5a7280cc19f80b51751de8afda2afe9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206659
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 10:38:45 +02:00
Caolán McNamara 4ffb30e976 ofz#523165456 Timeout
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Icf8d2fe0208a076251c791e713d8a859e2c8eaca
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4408
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit fb90356fc40c859f5cb7e6c03b4c828351862c7d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206615
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 09:18:32 +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
Tomaž Vajngerl 6f1fb25a94 sc: add @ prefix operator for opting out of array spill
The @ operator collapses an array operand to its upper-left value.
It is the implicit-intersection prefix used to opt a formula out
of the dynamic-array spill behaviour. =@SEQUENCE(4) returns 1
instead of the four-row spill.

The new ocSingleValue opcode joins the unary-operator range so the
existing compile and interpret machinery treats it like any other
unary prefix. The @ character stops being part of name syntax in
the OOXML grammar, so sheet names that contain @ have to be quoted
from now on.

In-session only for now. The operator is parsed and interpreted
but not yet serialised into XLSX or ODS.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I18cf56e34f933ebb7f6e43c157618c9fe28dbe0f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4172
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit fbd04d7c394ad7445a667bf63820f88551b176e1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206673
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 09:14:42 +02:00
Noel Grandin 9537ccc6fe no need to allocate SmNodeList on heap
It is already a node-based structure and supports being std::move'd around.

This avoids some unnecessary heap allocation work.

Change-Id: If6ee7d1852a26408f9e1c93b55a222d551a44550
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2452
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 2e3bad7d59c37d86e22f214c8ac640a0c54c25c5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206643
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-16 09:13:37 +02:00
Stephan Bergmann 6bc9e31108 external/coinmp: Various UBSan issues
...as seen during CppunitTest_sc_solverobj,

> CglPreProcess.cpp:6432:21: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CglPreProcess::addCutGenerator(CglCutGenerator*) at <null> (engine/instdir/program/libCgl.so.1 +0x2e858a)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1dd308)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:11504:39: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CbcModel::findIntegers(bool, int) at <null> (engine/instdir/program/libCbc.so.3 +0x2e0857)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1dd7f3)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglPreProcess.cpp:1721:36: runtime error: 1.79769e+308 is outside the range of representable values of type 'int'
>  #0 in CglPreProcess::preProcessNonDefault(OsiSolverInterface&, int, int, int) at <null> (engine/instdir/program/libCgl.so.1 +0x2f71a6)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1e4777)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglPreProcess.cpp:1722:36: runtime error: -1.79769e+308 is outside the range of representable values of type 'int'
>  #0 in CglPreProcess::preProcessNonDefault(OsiSolverInterface&, int, int, int) at <null> (engine/instdir/program/libCgl.so.1 +0x2f71d1)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1e4777)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:7134:24: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CbcModel::addHeuristic(CbcHeuristic*, char const*, int) at <null> (engine/instdir/program/libCbc.so.3 +0x3e315b)
>  #1 in doHeuristics(CbcModel*, int, CbcOrClpParam*, int, int, int) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x2ac48e)
>  #2 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1d8334)
>  #3 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #4 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #5 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #6 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #7 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:7110:24: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CbcModel::addCutGenerator(CglCutGenerator*, int, char const*, bool, bool, bool, int, int, int) at <null> (engine/instdir/program/libCbc.so.3 +0x349035)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1d8efb)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:7119:30: runtime error: null pointer passed as argument 2, which is declared to never be null
> /usr/include/string.h:48:28: note: nonnull attribute specified here
>  #0 in CbcModel::addCutGenerator(CglCutGenerator*, int, char const*, bool, bool, bool, int, int, int) at <null> (engine/instdir/program/libCbc.so.3 +0x34921e)
>  #1 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1d8efb)
>  #2 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #3 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #4 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #5 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #6 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglKnapsackCover.cpp:3908:36: runtime error: -1.79769e+308 is outside the range of representable values of type 'int'
>  #0 in CglKnapsackCover::createCliques(OsiSolverInterface&, int, int, bool) at <null> (engine/instdir/program/libCgl.so.1 +0x1af0ab)
>  #1 in CbcCutGenerator::CbcCutGenerator(CbcModel*, CglCutGenerator*, int, char const*, bool, bool, bool, int, int, int, int) at <null> (engine/instdir/program/libCbc.so.3 +0x7fb17)
>  #2 in CbcModel::addCutGenerator(CglCutGenerator*, int, char const*, bool, bool, bool, int, int, int) at <null> (engine/instdir/program/libCbc.so.3 +0x348ace)
>  #3 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x1d9c2d)
>  #4 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #5 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #6 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #7 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #8 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:9355:93: runtime error: division by zero
>  #0 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x371e89)
>  #1 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #2 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x10643e)
>  #3 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #4 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #5 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #6 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #7 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #8 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #9 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #10 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #11 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CbcModel.cpp:9332:49: runtime error: division by zero
>  #0 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x3760c7)
>  #1 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #2 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x10643e)
>  #3 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #4 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #5 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #6 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #7 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #8 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #9 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #10 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #11 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> ClpSimplex.cpp:2560:34: runtime error: applying non-zero offset 120 to null pointer
>  #0 in ClpSimplex::gutsOfCopy(ClpSimplex const&) at <null> (engine/instdir/program/libClp.so.1 +0x6ab776)
>  #1 in ClpSimplex::ClpSimplex(ClpSimplex const&, int) at <null> (engine/instdir/program/libClp.so.1 +0x6a912b)
>  #2 in ClpPresolve::gutsOfPresolvedModel(ClpSimplex*, double, bool, int, bool, bool, char const*, char const*) at <null> (engine/instdir/program/libClp.so.1 +0x59c16c)
>  #3 in OsiClpSolverInterface::initialSolve() at <null> (engine/instdir/program/libOsiClp.so.1 +0xa53f)
>  #4 in CglPreProcess::postProcess(OsiSolverInterface&, bool) at <null> (engine/instdir/program/libCgl.so.1 +0x3600f1)
>  #5 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x107ac1)
>  #6 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #7 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #8 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #9 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #10 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #11 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #12 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #13 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #14 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> ClpSimplex.cpp:2563:34: runtime error: applying non-zero offset 120 to null pointer
>  #0 in ClpSimplex::gutsOfCopy(ClpSimplex const&) at <null> (engine/instdir/program/libClp.so.1 +0x6ab771)
>  #1 in ClpSimplex::ClpSimplex(ClpSimplex const&, int) at <null> (engine/instdir/program/libClp.so.1 +0x6a912b)
>  #2 in ClpPresolve::gutsOfPresolvedModel(ClpSimplex*, double, bool, int, bool, bool, char const*, char const*) at <null> (engine/instdir/program/libClp.so.1 +0x59c16c)
>  #3 in OsiClpSolverInterface::initialSolve() at <null> (engine/instdir/program/libOsiClp.so.1 +0xa53f)
>  #4 in CglPreProcess::postProcess(OsiSolverInterface&, bool) at <null> (engine/instdir/program/libCgl.so.1 +0x3600f1)
>  #5 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x107ac1)
>  #6 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #7 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #8 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #9 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #10 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #11 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #12 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #13 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #14 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> ClpSimplex.cpp:2567:37: runtime error: applying non-zero offset 120 to null pointer
>  #0 in ClpSimplex::gutsOfCopy(ClpSimplex const&) at <null> (engine/instdir/program/libClp.so.1 +0x6ab751)
>  #1 in ClpSimplex::ClpSimplex(ClpSimplex const&, int) at <null> (engine/instdir/program/libClp.so.1 +0x6a912b)
>  #2 in ClpPresolve::gutsOfPresolvedModel(ClpSimplex*, double, bool, int, bool, bool, char const*, char const*) at <null> (engine/instdir/program/libClp.so.1 +0x59c16c)
>  #3 in OsiClpSolverInterface::initialSolve() at <null> (engine/instdir/program/libOsiClp.so.1 +0xa53f)
>  #4 in CglPreProcess::postProcess(OsiSolverInterface&, bool) at <null> (engine/instdir/program/libCgl.so.1 +0x3600f1)
>  #5 in CbcHeuristic::smallBranchAndBound(OsiSolverInterface*, int, double*, double&, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) const at <null> (engine/instdir/program/libCbc.so.3 +0x107ac1)
>  #6 in CbcHeuristicFPump::solution(double&, double*) at <null> (engine/instdir/program/libCbc.so.3 +0x1a25ed)
>  #7 in CbcModel::doHeuristicsAtRoot(int) at <null> (engine/instdir/program/libCbc.so.3 +0x34fd61)
>  #8 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x306fec)
>  #9 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #10 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #11 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #12 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #13 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #14 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglCliqueHelper.cpp:296:53: runtime error: division by zero
>  #0 in CglClique::createFractionalGraph() at <null> (engine/instdir/program/libCgl.so.1 +0x81b36)
>  #1 in CglClique::generateCuts(OsiSolverInterface const&, OsiCuts&, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x60a26)
>  #2 in CglFakeClique::generateCuts(OsiSolverInterface const&, OsiCuts&, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x72e73)
>  #3 in CbcCutGenerator::generateCuts(OsiCuts&, int, OsiSolverInterface*, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x8281c)
>  #4 in CbcModel::serialCuts(OsiCuts&, CbcNode*, OsiCuts&, int) at <null> (engine/instdir/program/libCbc.so.3 +0x3f37a6)
>  #5 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x35d618)
>  #6 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #7 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #8 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #9 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #10 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #11 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #12 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglTwomir.cpp:1782:14: runtime error: division by zero
>  #0 in DGG_add2stepToList(DGG_constraint_t*, char*, double*, double*, DGG_list_t*, DGG_data_t*, DGG_constraint_t*) at <null> (engine/instdir/program/libCgl.so.1 +0x5c63ed)
>  #1 in DGG_generateCutsFromBase(DGG_constraint_t*, DGG_list_t*, DGG_data_t*, void const*) at <null> (engine/instdir/program/libCgl.so.1 +0x5c227e)
>  #2 in DGG_generateTabRowCuts(DGG_list_t*, DGG_data_t*, void const*) at <null> (engine/instdir/program/libCgl.so.1 +0x5aa163)
>  #3 in CglTwomir::generateCuts(OsiSolverInterface const&, OsiCuts&, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x59c4bd)
>  #4 in CbcCutGenerator::generateCuts(OsiCuts&, int, OsiSolverInterface*, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x8281c)
>  #5 in CbcModel::serialCuts(OsiCuts&, CbcNode*, OsiCuts&, int) at <null> (engine/instdir/program/libCbc.so.3 +0x3f3896)
>  #6 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x35d61b)
>  #7 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #8 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #9 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #10 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #11 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #12 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #13 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

and

> CglGomory.cpp:1317:30: runtime error: 3.84447e+09 is outside the range of representable values of type 'int'
>  #0 in CglGomory::generateCuts(OsiRowCutDebugger const*, OsiCuts&, CoinPackedMatrix const&, CoinPackedMatrix const&, double const*, double const*, double const*, double const*, double const*, char const*, CoinWarmStartBasis const*, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x142933)
>  #1 in CglGomory::generateCuts(OsiSolverInterface const&, OsiCuts&, CglTreeInfo) at <null> (engine/instdir/program/libCgl.so.1 +0x1342e8)
>  #2 in CbcCutGenerator::generateCuts(OsiCuts&, int, OsiSolverInterface*, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x8281c)
>  #3 in CbcModel::serialCuts(OsiCuts&, CbcNode*, OsiCuts&, int) at <null> (engine/instdir/program/libCbc.so.3 +0x3f3896)
>  #4 in CbcModel::solveWithCuts(OsiCuts&, int, CbcNode*) at <null> (engine/instdir/program/libCbc.so.3 +0x35d61b)
>  #5 in CbcModel::branchAndBound(int) at <null> (engine/instdir/program/libCbc.so.3 +0x33f172)
>  #6 in CbcMain1(int, char const**, CbcModel&, int (*)(CbcModel*, int), CbcSolverUsefulData&) at <null> (engine/instdir/program/libCbcSolver.so.3 +0x215c37)
>  #7 in CbcSolveProblem(void*, PROBLEMINFO*, OPTIONINFO*, int) at <null> (engine/instdir/program/libCoinMP.so.1 +0x2c880)
>  #8 in CbcOptimizeProblem at <null> (engine/instdir/program/libCoinMP.so.1 +0x2fdeb)
>  #9 in (anonymous namespace)::CoinMPSolver::solve() at engine/sc/source/solver/CoinMPSolver.cxx:325:23
>  #10 in ScSolverSettings::solve() at engine/sc/source/ui/unoobj/solveruno.cxx:902:14
>  #11 in sc_apitest::ScSolverSettingsObj::testXSolverSettings() at engine/sc/qa/extras/scsolverobj.cxx:121:19

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I8baaad0d3214da27cc85f76e267d4783dfae81e5
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4150
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 85b26ba51a219795938c82288e38518d7f9aec5e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206638
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 09:13:29 +02:00
Caolán McNamara 716cae1cd4 remove dead AddAllUnknownWords/FN_ADD_UNKNOWN slot
there is no implementation of this

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibc3f36c6133b10e59a0826d20e6991fd9d27ded0
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3248
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 9c729eb552208f8024d9711cc8eaa3bc4f5391a5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206652
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 09:12:11 +02:00
Caolán McNamara 92b5ede0df the custom pivot point widget should take focus
Change-Id: I1b26dcf8fe836e3a45752789033b4decbc806671
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/989
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Parth Raiyani <parth.raiyani@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit ba0aa2cb2294ddd57d4eeca4356122935d23706f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206666
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-16 08:29:37 +02:00
Caolán McNamara 0ae4789b37 use the more efficient RangeIterator to skip hidden rows
SfxBindings::NextJob_Impl
     SfxBindings::Update_Impl
       SfxDispatcher::FillState_
         ScCellShell::GetState
           ScTabViewShell::GetFunction
             ScDocument::GetSelectionFunction
               ScTable::UpdateSelectionFunction
                 ScColumn::UpdateSelectionFunction  (4,067 samples, 4.62%)

from:

https: //github.com/caolanm/profiles/blob/co-25.04/watchdog/Share-2026-04-15T08%3A15%3A18.958372.svg
Change-Id: I4bb965d3abc0077c966e974c4894579cb777cfb6
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/987
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit fb3166336e203bb423942b9001440aa4c1f08e66)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206668
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-16 07:50:44 +02:00
Caolán McNamara 36b3eb054b add a recursion depth to ReadRegionNode
Change-Id: I6e17304405af5e6260ebe9c78ff344101a7c0060
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/762
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 4cebc4ad8b977959430829223b10309df8601d1c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206667
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-06-16 07:50:11 +02:00
Andreas Heinisch 818737303a tdf#58349 - Turn border button into a split button
Turn Border button into a split button and remember recent border style.

Change-Id: I7c971ff9f5f18504cea9058ffd876f3608a7479f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206619
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-06-16 07:26:03 +02:00
Andreas Heinisch d289b2b3ce tdf#137107 - Prevent scrolling to cursor when deleting header/footer
Change-Id: Idaf3b8ca9271dc08491c2eaa6bef9da7faaf948a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206440
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-06-16 07:23:09 +02:00
Mike Kaganski 2851604e32 Clarify expected values
The expression calculates needed narrow blanks, after wide blanks
were calculated. The calculation assumes narrow blank 1/4th of a
wide blank; the possible result is 0 to 3.

Also: drop the variable for 0.5, used once. The operation here is
"multiply by 2"; using "divide by 0.5" for that is confusing, and
unless there is some rationale behind that (like IEEE-754-specific
details giving different results here), better use simpler form.
In this case, the variable came from commit
074f0ab1d7 (tdf#76296 Import MathML's
<mspace>, 2016-11-15), and back then, it was Fraction; there seems
to be no specific need for division here.

Change-Id: I0260580023af005efb00eaba06ab6497cc269d43
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/1111
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1169
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit ccf247612e1cfaaf7cd53f250f4a2719a10fa524)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206654
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 01:22:52 +02:00
Andras Timar 4e1f2ed7eb sc: only build the opencl CppunitTests when OPENCL is in BUILD_TYPE
opencl-test-1.cxx and opencl-test-2.cxx call
ScModelTestBase::enableOpenCL() and disableOpenCL() unconditionally,
but those helpers in qahelper.cxx are wrapped in
#if HAVE_FEATURE_OPENCL. configure.ac adds OPENCL to BUILD_TYPE and
defines HAVE_FEATURE_OPENCL together, so without OPENCL the link
fails with unresolved externals on test_sc_opencl-1.dll (seen on the
Windows app build).

Gate the two tests on OPENCL via gb_Helper_optional, matching the
pattern already used for Package_opencl in the same file.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I4fc9572f98c9b4bbbaab81fad7dc28780ef37397
(cherry picked from commit 36e32e6126e761af9fa7689cc9c1e59aa8b9c46e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206655
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 01:21:53 +02:00
Xisco Fauli a03cef8e94 canvas: replace boost::adaptors::reverse with std::views::reverse
Change-Id: I1f0275d2b4dc47223cf8a925c918c3062d82b45b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206651
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 01:21:17 +02:00
Xisco Fauli 4a029e0f23 fast_float: upgrade to 8.2.10
Downloaded from https://github.com/fastfloat/fast_float/archive/refs/tags/v8.2.10.tar.gz

Change-Id: I0354bdd3a7f9c0d4a22a81fe6e94e6235de9f3bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206648
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 01:21:10 +02:00
Pranam Lashkari 38f8e5a53b sw: reset stale OOXML ParaId/ParentId when copying comment fields
When copying annotations from a DOCX-imported document, the copied
SwPostItField retained the original m_nParaId and m_nParentId values.
These OOXML paragraph IDs became stale duplicates, causing
UpdatePostItsParentInfo (sidebar rebuild) and the OOXML export to
match replies to the wrong parent via ParaId, breaking comment threads
after paste or save/reload.

Reset both IDs to 0 during copy so that parent-child resolution falls
through to PostItId and ParentName based matching, which are correctly
updated by EstablishParentChildRelationsOfComments.

Change-Id: Ia910edbdafebc9acff6dc91f9052a6a98d09f1ed
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3222
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 9c721d2f0f14f48b4f2255bf7717b3b3652620fe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206653
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 01:21:02 +02:00
Xisco Fauli 4480a9ecce nss: upgrade to 3.125
Downloaded from https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_125_RTM/src/nss-3.125-with-nspr-4.39.tar.gz

Change-Id: I06d5925e4b142ff8c98f0b553bfabf0c757a1dc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206650
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-16 01:20:51 +02:00
Noel Grandin 3a46865a64 simplify MSC_VER conditionals
we require _MSC_VER >= 1930 now

Change-Id: I493a3fe4267c8ea148d411535b9de24666154722
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2887
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit adb5dce15a169d0142f40eb8efff94c6822c7dbc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206640
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-16 01:20:43 +02:00
Stephan Bergmann b09ba6bfcf Disable the Toolkit XDataTransferProviderAccess unoapi test without DnD
At least for one of my builds, JunitTest_toolkit_unoapi_2's toolkit.Toolkit
fails its XDataTransferProviderAccess check at getDragSource(), which returns
null:

> [toolkit.Toolkit::com::sun::star::awt::XDataTransferProviderAccess::getDragSource()] is testcode: [getDragSource()] - COMPLETED.FAILED

getDragSource has no XDragSource to return without a drag-and-drop capable VCL
backend: when the unoapi soffice runs the svp plugin without --headless,
SalInstance::CreateDragSource skips its GenericDragSource stub (gated on
headless/unittest/uitest) and the svp backend's ImplCreateDragSource returns
null.  (The corresponding getDropTarget only passes because
Window::GetDropTarget always returns a non-null DNDListenerContainer wrapper.)

Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I2c76b27e22e99612d8030598f338a78ca7c55ec3
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4187
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit c35ff1648f319723710a9143fbeb9ecf1a7fec70)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206645
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 01:20:30 +02:00
Caolán McNamara 64b1bf3a65 sd: stop refreshing SlideTransitionPane on every shape change
SlideTransitionPane's EventMultiplexerListener default branch called
onSelectionChanged + onChangeCurrentPage on every non-Disposing event,
including ShapeChanged.

ShapeChanged fires for every text edit on any view, so with several
users editing the panel re-emitted its full notebookbar state hundreds
of times to every view, although the page-level transition properties
had not changed.

Sync SlideTransitionPane with CustomAnimationPane so SlideTransitionPane
handles only the same explicit cases. And use the same sort of setup
as that panel does, e.g. take the controller from the ViewShellBase directly like:

commit ec58f5e318
Date:   Thu Dec 16 09:12:41 2004 +0000

    2004/12/10 10:11:53 af 1.2.10.1: #i38630# Using the right controller after views have changed.

Transitions panel update sent on every shape edit since:

commit c4e0d6596d
Date:   Thu Jun 2 15:43:45 2016 +0200

    notebookbar: added slide transition tab

To reproduce: open the Slide Transition sidebar in Impress, click into
a text frame and type. updateControls() fires twice per keystroke via
the ShapeChanged -> default path. With this change it only fires on
actual slide selection changes.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I12a44e17e982f0502fe8fbf6b61f41cb3ac26e07
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3236
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit 9a49d09e20b0687b30c9603d427ae2bd87d20638)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206639
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 01:20:16 +02:00
Andras Timar 0447d0cc95 emfio: null-check VectorGraphicData before dereferencing in MULTIFORMATS
ReadMultiformatsComment dereferenced aGraphic.getVectorGraphicData()
unconditionally to call setSizeHint, then a few lines later acquired
the same pointer into a local and checked it for null. Reorder so
the null check happens before the first use, and reuse the local
for getType() too.

vcl::ImportPDF always installs a non-null VectorGraphicData on
success today, so this is defensive against future changes (or
edge-case ImportPDF backends that succeed without producing one)
rather than a fix for a confirmed crash. The macOS dbgutil
tinderbox report for tdf#167641 was not reproducible on two
separate macOS boxes, so the underlying issue could not be
diagnosed; this guard is the conservative belt-and-braces change.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2569f26b099f305dd98b94ef4e9ab5c9a20fef11
(cherry picked from commit 36b0369ad6205aa7383ff4e93214853ea1081d61)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206642
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-16 01:19:22 +02:00
SilverGreen93 e3f9d403b8 Fix Windows Qt build
## Issue

Build errors can be seen on Windows:

```
C:\sources\lo\libo-core\vcl\qt6../qt5/QtFrame.cxx(682): error C2065: 'm_SessionManagerInhibitor': undeclared identifier
C:\sources\lo\libo-core\vcl\qt6../qt5/QtFrame.cxx(682): error C2065: 'APPLICATION_INHIBIT_IDLE': undeclared identifier
```

 ## Root cause

The build errors occur because the code is trying to use m_SessionManagerInhibitor and APPLICATION_INHIBIT_IDLE on platforms where they're not defined. These symbols are only available on Unix-like systems (Linux, Solaris, FreeBSD, OpenBSD).

 ## Fix

Revert change from commit 811769f009 which
replaced the proper if defined directive with __EMSCRIPTEN__

Change-Id: I1d15d96d0f971c7006ebf2caad8638fec2705007
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206471
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-16 00:45:38 +02:00
Caolán McNamara 4b3f1395d3 oss-fuzz: enable libc++ fast hardening
so an out-of-range operator[] aborts instead of reading adjacent live
memory that the address sanitizer's redzones don't catch.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4af111c97251a3e55f836b7eff2d80b3eb3f4c96
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4438
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 995bf715d44a2e6483719cf446936dd6ae82f36c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206637
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-15 23:01:23 +02:00
Caolán McNamara e663f8baed translate only file URLs
Change-Id: I41076b8af670d673bf29b14c02db0c66744feb0b
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4409
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
(cherry picked from commit 478eb7de0d14a05e6501bd44851f73ec0df5c59a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206635
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-15 22:45:57 +02:00
Caolán McNamara 0e42d404ec ofz#501319523 Timeout
GetEndEllipsisString removed one character at a time. Some fuzz document
cases have thousands of extra characters, so do a smarter binary search
effort instead.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5df5d029f1a2ca894adaafc6d16e7f08c425a7f4
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3573
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 15c4f6a44d60eab4c82197ae2565ed59a50d62e0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206616
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-15 22:36:30 +02:00
Caolán McNamara a0bb721247 crashtesting: rtf export wrote footnote table rows outside the footnote
Footnote text is buffered into m_aSectionHeaders while
m_bBufferSectionHeaders is set, but EndParagraphProperties and the
depth-1 StartTableRow wrote straight to the output stream, so a table
in a footnote shed its row definitions and intbl/itap paragraph marks
outside the buffered footnote group. Route both writes through the
buffer.

Not a regression, co-25.04 writes the same. Reproduced with
File_1333.docx (the cloudon set) converted to rtf and reloaded, where
the import rejects our own output with the io::WrongFormatException
"mismatch between \itap and number of \nestrow" of

 #1 writerfilter::rtftok::RTFDocumentImpl::dispatchSymbol at sw/source/writerfilter/rtftok/rtfdispatchsymbol.cxx:305
 #2 writerfilter::rtftok::RTFTokenizer::dispatchKeyword at sw/source/writerfilter/rtftok/rtftokenizer.cxx:2195
 #3 writerfilter::rtftok::RTFTokenizer::resolveKeyword at sw/source/writerfilter/rtftok/rtftokenizer.cxx:2145
 #4 writerfilter::rtftok::RTFTokenizer::resolveParse at sw/source/writerfilter/rtftok/rtftokenizer.cxx:2023
 #5 writerfilter::rtftok::RTFDocumentImpl::resolve at sw/source/writerfilter/rtftok/rtfdocumentimpl.cxx:920

and on the crashtesting box as part of the loadComponentFromURL
AbortOnLoadFailure cluster.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I71a46c396f52f3a3d38bb84c778bd1eef871e3c8
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4449
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit c5a540fde6c993c9aa527ffbc2e9a1700808f9c8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206634
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-15 22:36:19 +02:00
Caolán McNamara cfa0fd5a76 keep the WW8 autotext entry index within the sttbfglsy tables
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Id748a8eb55244e44c58e2645668f9ba78f276099
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4435
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 8c571be687e642566e0a46c45358194e9198c45d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206633
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-15 22:36:02 +02:00
Xisco Fauli 6ac93e562a normalize some namespace declarations
Change-Id: I4cc17f852dd58d95e97cdc673d1f1ca0c6de6c03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206636
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-06-15 22:35:56 +02:00
Caolán McNamara 6bc93227e7 limit palette index
use the same SanitizePaletteIndex guard ipsd and iras already have.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iff3450ab2c3781c5181b3f28ed2a321d1e49c6ae
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4425
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ada76821319b80671dba9908aeea8cabba5cedc0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206612
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-15 22:35:38 +02:00
Xisco Fauli 99343e6677 mariadb-connector-c: upgrade to 3.4.9
Downloaded from https://dlm.mariadb.com/4751056/Connectors/c/connector-c-3.4.9/mariadb-connector-c-3.4.9-src.tar.gz

Change-Id: Ie0a57d57a3bbfcc8e269b9dcd6700c3e8b93fea1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206610
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-15 21:16:21 +02:00
Andras Timar b3dc45b192 sw: null-check SwPostItContent::GetPostItField() in BringCommentToAttention
Crash on NavigatorSelectComment when the underlying post-it field has
already died. SwPostItContent::Notify() nulls m_pField on SfxHintId::Dying,
so GetPostItField() may legitimately return nullptr while the navigator
entry is still around. content.cxx:7325 dereferenced it unconditionally:

  SwContentTree::BringCommentToAttention (content.cxx:7325)
    SwPostItContent::GetPostItField()  -> nullptr
    SwPostItField::GetPostItId()       -> SIGSEGV (this+offsetof(m_nPostItId))

Capture the pointer and skip the entry if null, matching the guard
already used at content.cxx:6617.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I7a98ddb1cac69b15aa9af6346c4a177425a9718b
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2655
(cherry picked from commit 49d66e488b5d6151c04abacf3508878c29766b12)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206641
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-15 21:15:59 +02:00
Caolán McNamara 4510754aa3 Get notes page via flat list instead of forcing page list rebuild
this is a typical way to get the notes page anyway

Change-Id: I1f5d0195980e1a0e5e7b1531f95ee3891ba5d8f4
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/961
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit b803327d156c4c799a176e3ce62e774d3c381d6f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206608
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2026-06-15 21:15:19 +02:00
Dan Williams ba3e229934 tdf#172343: fix menu translation string lifetime
AquaSalMenu owns the returned translation (it was already
autoreleasing it) so it must be copied after being read
out of the translation dictionary. While we're at it also
remove the unused mpAltTitle from AquaSalMenu.

Fixes: c0ff12fc3a
Change-Id: I77c59f901347ba24846dd770c952734676adf2db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206488
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Dan Williams <dcbw@libreoffice.org>
2026-06-15 19:13:59 +02:00
Caolán McNamara 99a9627474 don't fill the ScPatternAttr format caches during threaded calc
As seen with CppunitTest_sc_statistical_functions_test
reported at https://gerrit.libreoffice.org/c/core/+/189023

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5ec84a02b308cf7189b1a26a4e1415a7c8dd8e50
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4248
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
(cherry picked from commit 96cdd385759f3c19c2a61c0dee9d551c2a4784b7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206614
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-15 18:12:20 +02:00
Olivier Hallot 9805b432e8 Update git submodules
* Update helpcontent2 from branch 'master'
  to e8d729c0fe8761998e2f5e6caf704b1c63055af9
  - Add precision on TXTAFTER and TEXTBEFORE
    
    Change-Id: I1358b6e2119cd9aa8b1c27f0be2643479738b96c
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/206656
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2026-06-15 17:09:18 +02:00
Caolán McNamara d69b6bb243 limit the column index in the WK3 row attribute import
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I577c3bc2da2e0589015f682a207459341131fbc8
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4429
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 5b1f87ab6b93518c266434711a9e5c00baceac2c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206613
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-15 16:39:37 +02:00
Christopher Sherlock a8cbfb0112 vcl: Clean up signature and style for logical offsets
Refactors the CoordinateMapper::SetLogicalOffset implementation to
match standard const reference placement style (Size const& rOffset)
and positions it lower in the source file to align with structural
member grouping conventions.

Additionally, this patch cleans up long line-wrapping indentation
artifacts inside the polygon processing block of
OutputDevice::PixelToLogic to maintain clean, standardized VCL
formatting guidelines.

Key changes:
* vcl/source/outdev/CoordinateMapper.cxx: Repositioned
  SetLogicalOffset and adjusted the parameter signature to match
  consistent layout declarations.
* vcl/source/outdev/map.cxx: Re-wrapped aPt calculation blocks in
  PixelToLogic to improve localized readability.

Change-Id: I297bc4abc627c6b60b0015fd01fd8e72108ae44c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203644
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-06-15 16:23:46 +02:00
Heiko Tietze 9b13a44784 Hide customization of uno:WidgetTestDialog
Follow-up to 7f44d4b0efa23affc71b5dc77ac2fd78cc76e87e
Fixes the missing label in the customization dialog

Change-Id: Ic438172e6603299b6cea0c8747af4c242fa8f178
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206447
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-06-15 16:08:10 +02:00
Furkan Ahmet Kara 88d6a8d52a tdf#145614 Convert #define to constexpr
Change #define to constexpr in sw/source/uibase/docvw

Change-Id: I030282a5a66cd3f9906f3b2acbf57377d570a449
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204795
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-06-15 10:29:26 +02:00
Michael Weghorn a73c417288 cui: Set parent for certificate manager executable chooser dialog
Set the parent for the file dialog that can be used to
select the certificate manager executable in the "Security"
tab page of the options dialog.

Without this, the dialog is not properly modal on top of the
options dialog at least with gtk3 and qt6 with native widgets in
use (SAL_VCL_QT_USE_WELDED_WIDGETS=1), see also mention in
previous commit

    Change-Id: Ie02510e0a2a008ab94a89e668def2c4964e481db
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Jun 11 10:58:05 2026 +0200

        tdf#130857 qt weld: Support "Security" options tab page

. The dialog can be triggered like this:

* start Writer
* "Tools" -> "Options"
* "LibreOfficeDev" -> "Security"
* press the "Browse..." button in the "GPG Certificate Manager"
  section

Change-Id: I67276b62b4c63181317c603feca986bf43553804
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206379
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-06-15 09:03:56 +02:00
Andreas Heinisch 9ec6651b76 tdf#149631 - Record break type and page style for macro replay
Change-Id: I26dd2f29bc4ef1e9382edd31257b0b6916713c14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206472
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-06-15 09:03:19 +02:00