summaryrefslogtreecommitdiff
path: root/sc/source
AgeCommit message (Collapse)Author
2021-11-15uitest: sc: add support for pivot table popupXisco Fauli
Change-Id: Id990178051e81a81bf6f6a0fb920473d3ee21fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125259 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-15Revert "improve performance of cell equality comparisons)" (tdf#139612)Luboš Luňák
This reverts commit 5e9c2677e8fcd19b289d947b94ceba52b138728b. Reason for revert: I based this on code that tdf#139612 talks about, and which is possibly incorrect. Change-Id: Ie9e46a19ac8fe10bbf6cf6f429741200684d5bfd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125138 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-13Resolves: tdf#145640 MoveReference...Reorder() there are RPN tokens as wellEike Rathke
Change-Id: I03fdf8f9d94e7a499e995b900bba564cd054bd2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125123 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-11-12Resolves: tdf#145645 pivot table popups don't dismiss when item activatedCaolán McNamara
Change-Id: I5a68a08600b7792d924ec77694a60651df5d9c83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125112 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-12Fix (mis-)uses of temporary O[U]StringLiteralStephan Bergmann
...as sub-expressions of ternary operators, which happened to keep compiling after 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String" and e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uString" because both branches are of the same type O[U]StringLiteral<N>, and which didn't cause any issues because no dangling pointers to those temporary objects escaped the surrounding full expressions. This was found with an experimental build with VS 2022 with --enable-latest-c++, which would support HAVE_CPP_CONSTEVAL after some linking fix in the configure.ac detection code (which is forthcoming in a later commit) and flagged all these uses in ternary operators as error C7595 "call to immediate function is not a constant expression". That error looks bogus (and it also caused a false > sd/source/ui/unoidl/unoobj.cxx(742): error C7595: 'Color::Color': call to immediate function is not a constant expression so HAVE_CPP_CONSTEVAL will need to remain undefined for VS 2022 until that compiler bug is fixed), but it nicely found all these cases that should arguably be cleaned up. Change-Id: I81de94e8af5a6c50e5fe7dfa1a4b253e0c2a68f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125082 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-12simplify construction of XMLPropertyMapEntryNoel Grandin
so we don't have to pass in the size of the string literal. This is mostly a preparatory change, to make an another patch of mine less noisy. Change-Id: Idafcd68586b8b465e63dc89e4a4180d2e70ac3a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125080 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-12Use more o3tl::convert in scMike Kaganski
Change-Id: I624b6c570eff8b6cdc83ffcb2d0dbadf848715b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120330 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-11Drop ScGlobal::GetEmptyOUString() and EMPTY_OUSTRINGMike Kaganski
OUString default ctor already uses a static instance (through rtl_uString_new), no need to have another module-specific static. Commit d8037ae18a297229d1b79f8f76331abfd548350d had removed its sw counterpart some time ago. Change-Id: I140fe13bc1f6b0cbe188e83e602fdebe995e467a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125061 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-11tdf#142986 sc sampling: allow more than default (100) samplesJustin Luth
The default maximum for a spinbutton must be 100. For some reason, the previous setMax to maxint was removed in LO 6.3 in commit 2c5c20b19c349a4b7f6d78d69d8d57f9af5c351c. Change-Id: I846c1ce037db6ef3b8d48975e24b748cad0394d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124948 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2021-11-11do not use grouped cell calculation for just a single cellLuboš Luňák
We do threaded calculations per row, so there's no point in setting up all the thread stuff effectively just for a single thread (all but one would be called to do nothing). No point in setting up OpenCL in this case either. Change-Id: I91ea5a7f219f8518a934ecbb04667fa7fba1cdff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125026 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-10sc: EMBED_SOURCE: extend copy to clip area...Dennis Francis
to include the draw objects in the sheet read from system clipboard. This is needed because GetCellArea() computes the "last row" and "last column" only based on the cell contents and not the drawing layer contents. So copying a "empty cells" range that has images in it and pasting it will not include any images without this fix. Change-Id: I56ffb14e881a1aecc5b43590ea4fb3fc1c35ace8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124629 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 789d19776ab451a6118b938830d488961b42dae5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124673 Tested-by: Jenkins
2021-11-10sc: EMBED_SOURCE: also include objects on copy to clipDennis Francis
This is to match the behaviour of copy-pasting with the internal clipboard. If user copies a range that contains some images then on pasting these images are also included when using internal clipboard document. Change-Id: I61a6e71bd6afcace51230d1e7e7539e88404cbe5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124628 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 430a3e123c24ba2e87d89dddebb4fda4d3ff2e93) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124672 Tested-by: Jenkins
2021-11-10sc: fix clip cell range for clip with no contentDennis Francis
The problem was observed in LOK mode with the following step: 1. Select and copy a sheet area with no content. 2. Paste this into another document. => You get an error dialog saying "Protected cells cannot be modified". The issue here is in ScViewFunc::PasteDataFormat, rSrcDoc.GetDataStart() gives the correct cell indices of the clip selection, but GetCellArea() truncates the range to empty range as there is no content. Since these functions are used in many places which might depend on this behaviour, it seems right to fix it just for this usecase. Change-Id: Ibc85a8d7dd33b377a37298ea9a2a7ebb55eccf1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124627 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 4ff08a1332e5150d7ef978572e747ac8da3a0820) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124671 Tested-by: Jenkins
2021-11-09Remove this hard-coded "Default" style name in CalcKevin Suo
Replace it with the defined SC_STYLE_PROG_STANDARD macro. Hard-coded style names can cause problems such as tdf#134161. Change-Id: I27b5dfd3a4f60785622d51fe903484982f51f803 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124644 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-08tdf#142033 - Handle embedded newline set via SetDataArrayAndreas Heinisch
Change-Id: I798f9a2a2ce599ba8ca3ef1f5ae91801d8f1b138 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124681 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2021-11-08tdf#139205: Keep hierarchical structure of localized default styles in CalcKevin Suo
The default cell styles (when creating a new Calc document), as returned by orcus parsing, are built-in English names, as defined in sc/res/xml/styles.xml. These names can be localized. On non-English UI, all these (localized) styles names will be forced to use the localized "Default" as their parent because there is no such non-localized parents in the localized style tree on UI. In this patch, I added SC_DLLPUBLIC to ScStyleNameConversion::ProgrammaticToDisplayName, then used this function to convert the parent style name to the (localized) UI name. Change-Id: I3689211a10c60a5e7b2b273b6c15a4da92f0d633 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124556 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Eike Rathke <erack@redhat.com>
2021-11-08improve performance of cell equality comparisons (tdf#139444)Luboš Luňák
When comparing cell and a string for (in)equality, that means comparing the whole cell, even when not explicitly asked for. Whole cell comparison is simpler and faster. Change-Id: Ic7a79b20f710f2a5d84f62c714d67c088a22d449 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124881 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-08optimize VLOOKUP by returning SharedString if possible (tdf#139444)Luboš Luňák
Profiling shows that the slowness mostly comes from converting the cell's SharedString to OUString and then the comparison converts it back. To improve performance, return the SharedString if possible and ignore the OUString. Change-Id: Idb190bd0354cea3185e5ff9ebaf92cab63f23f70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124880 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-08make a number of Calc functions return value by actually returning itLuboš Luňák
All these returned their value using a reference argument, for apprently no good reason. Change-Id: I6a33417e7df2aac67427c16e5003dfaaa1a814d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124872 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-08tdf#48622 Adapt sidebar line styles to new defaultsSamuel Mehrbrodt
Change-Id: I81287d90c2250838391fa79d2f6455219ea822c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124680 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-11-07forward decls go after #includeNoel Grandin
Change-Id: I54c33508639044092356eed5144720261b4f65db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-07return XShape from SdrObject::getUnoShapeNoel Grandin
instead of XInterface, to make it obvious what the reality of the requirement is Change-Id: Icdd4113f2a0ece930305f4d8ba010b81d24f43c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124802 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-05use more DECL_DLLPRIVATE_STATIC_LINKNoel Grandin
to avoid unnecessarily exporting symbols Change-Id: I224848cea217977088fe0643511660a7c99b7277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124733 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-05use more DECL_DLLPRIVATE_LINKNoel Grandin
to avoid unnecessarily exporting symbols Change-Id: I6855894d0166c300ced169e36861f38811baa48d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124730 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-05Blind fix for ubusan errorKohei Yoshida
from https://ci.libreoffice.org/job/lo_ubsan/2189/ [_RUN_____] Test::testCellBroadcaster [...] ==24129==ERROR: AddressSanitizer: heap-use-after-free on address 0x61700006c470 at pc 0x2ab6e05145e4 bp 0x7ffecaa28d70 sp 0x7ffecaa28d68 READ of size 8 at 0x61700006c470 thread T0 #0 0x2ab6e05145e3 in sc::CellStoreEvent::element_block_released(mdds::mtv::base_element_block const*) /sc/source/core/data/mtvelements.cxx:47:13 #1 0x2ab6de749427 in mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreTrait>::delete_element_block(unsigned long) /workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:403:17 #2 0x2ab6de74921b in mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreTrait>::delete_element_blocks(unsigned long, unsigned long) /workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:412:9 #3 0x2ab6de733225 in mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, sc::CellStoreTrait>::clear() /workdir/UnpackedTarball/mdds/include/mdds/multi_type_vector/soa/main_def.inl:1088:5 #4 0x2ab6df024987 in ScColumn::FreeAll() /sc/source/core/data/column3.cxx:161:13 #5 0x2ab6decff134 in ScColumn::~ScColumn() /sc/source/core/data/column.cxx:97:5 #6 0x2ab6decf708a in o3tl::default_delete<ScColumn>::operator()(ScColumn*) /include/o3tl/deleter.hxx:55:38 #7 0x2ab6decf5999 in std::unique_ptr<ScColumn, o3tl::default_delete<ScColumn> >::reset(ScColumn*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:376:4 #8 0x2ab6decf4c8e in ScColContainer::Clear() /sc/source/core/data/colcontainer.cxx:42:21 #9 0x2ab6decf4a84 in ScColContainer::~ScColContainer() /sc/source/core/data/colcontainer.cxx:33:5 #10 0x2ab6e070e3c6 in ScTable::~ScTable() /sc/source/core/data/table1.cxx:344:1 #11 0x2ab6df50abba in o3tl::default_delete<ScTable>::operator()(ScTable*) /include/o3tl/deleter.hxx:55:38 #12 0x2ab6df4c3483 in std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >::~unique_ptr() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:268:4 #13 0x2ab6df4dc87c in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:98:19 #14 0x2ab6df4dc7c6 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*>(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:108:6 #15 0x2ab6df4dc744 in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*>(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:136:7 #16 0x2ab6df4dc488 in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:206:7 #17 0x2ab6df50df73 in std::__cxx1998::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::_M_erase_at_end(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1513:2 #18 0x2ab6df70f5b0 in std::__cxx1998::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1248:9 #19 0x2ab6df70b5d4 in std::__debug::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/debug/vector:699:9 #20 0x2ab6df704cb2 in ScDocument::Clear(bool) /sc/source/core/data/documen9.cxx:506:12 #21 0x2ab6df490652 in ScDocument::~ScDocument() /sc/source/core/data/documen2.cxx:363:5 #22 0x2ab6e363315d in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2925:1 #23 0x2ab6e363333b in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2894:1 #24 0x2ab6e3633514 in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2894:1 #25 0x2ab6de4f105d in SvRefBase::ReleaseRef() /include/tools/ref.hxx:163:29 #26 0x2ab6de4a6259 in tools::SvRef<ScDocShell>::clear() /include/tools/ref.hxx:64:22 #27 0x2ab6de2b1aaa in Test::closeDocShell(tools::SvRef<ScDocShell>&) /sc/qa/unit/ucalc.cxx:365:18 #28 0x2ab6de2b2102 in Test::tearDown() /sc/qa/unit/ucalc.cxx:380:5 #29 0x2ab6de543787 in CppUnit::TestCaller<Test>::tearDown() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:185:15 #30 0x2ab69335765a in CppUnit::TestCaseMethodFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 #31 0x2ab6ae4f3957 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:46:14 #32 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 #33 0x2ab6a2974ff7 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:78:12 #34 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 #35 0x2ab69f4479c2 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx:62:16 #36 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 #37 0x2ab6932bfff4 in CppUnit::DefaultProtector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/DefaultProtector.cpp:15:12 #38 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 #39 0x2ab69332272c in CppUnit::ProtectorChain::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:86:18 #40 0x2ab6933c1b39 in CppUnit::TestResult::protect(CppUnit::Functor const&, CppUnit::Test*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:182:28 #41 0x2ab693356092 in CppUnit::TestCase::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:95:11 #42 0x2ab693359af2 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 #43 0x2ab693358cea in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 #44 0x2ab693359af2 in CppUnit::TestComposite::doRunChildTests(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:64:30 #45 0x2ab693358cea in CppUnit::TestComposite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestComposite.cpp:23:3 #46 0x2ab6933ef6ce in CppUnit::TestRunner::WrappingSuite::run(CppUnit::TestResult*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:47:27 #47 0x2ab6933c059e in CppUnit::TestResult::runTest(CppUnit::Test*) /workdir/UnpackedTarball/cppunit/src/cppunit/TestResult.cpp:149:9 #48 0x2ab6933f062b in CppUnit::TestRunner::run(CppUnit::TestResult&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /workdir/UnpackedTarball/cppunit/src/cppunit/TestRunner.cpp:96:14 #49 0x4ff1d5 in (anonymous namespace)::ProtectedFixtureFunctor::run() const /sal/cppunittester/cppunittester.cxx:329:20 #50 0x4fbbc5 in main2() /sal/cppunittester/cppunittester.cxx:478:16 #51 0x4fa052 in sal_main() /sal/cppunittester/cppunittester.cxx:614:14 #52 0x4f9e9e in main /sal/cppunittester/cppunittester.cxx:609:1 #53 0x2ab69517d554 in __libc_start_main (/lib64/libc.so.6+0x22554) #54 0x425894 in _start (/workdir/LinkTarget/Executable/cppunittester+0x425894) 0x61700006c470 is located 752 bytes inside of 768-byte region [0x61700006c180,0x61700006c480) freed by thread T0 here: #0 0x4f7548 in operator delete(void*, unsigned long) /home/tdf/lode/packages/llvm-llvmorg-9.0.1.src/compiler-rt/lib/asan/asan_new_delete.cc:172 #1 0x2ab6decf709b in o3tl::default_delete<ScColumn>::operator()(ScColumn*) /include/o3tl/deleter.hxx:55:38 #2 0x2ab6decf5999 in std::unique_ptr<ScColumn, o3tl::default_delete<ScColumn> >::reset(ScColumn*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:376:4 #3 0x2ab6decf4c8e in ScColContainer::Clear() /sc/source/core/data/colcontainer.cxx:42:21 #4 0x2ab6decf4a84 in ScColContainer::~ScColContainer() /sc/source/core/data/colcontainer.cxx:33:5 #5 0x2ab6e070e3c6 in ScTable::~ScTable() /sc/source/core/data/table1.cxx:344:1 #6 0x2ab6df50abba in o3tl::default_delete<ScTable>::operator()(ScTable*) /include/o3tl/deleter.hxx:55:38 #7 0x2ab6df4c3483 in std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >::~unique_ptr() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:268:4 #8 0x2ab6df4dc87c in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:98:19 #9 0x2ab6df4dc7c6 in void std::_Destroy_aux<false>::__destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*>(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:108:6 #10 0x2ab6df4dc744 in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*>(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:136:7 #11 0x2ab6df4dc488 in void std::_Destroy<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > >&) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_construct.h:206:7 #12 0x2ab6df50df73 in std::__cxx1998::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::_M_erase_at_end(std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >*) /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1513:2 #13 0x2ab6df70f5b0 in std::__cxx1998::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:1248:9 #14 0x2ab6df70b5d4 in std::__debug::vector<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> >, std::allocator<std::unique_ptr<ScTable, o3tl::default_delete<ScTable> > > >::clear() /home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/debug/vector:699:9 #15 0x2ab6df704cb2 in ScDocument::Clear(bool) /sc/source/core/data/documen9.cxx:506:12 #16 0x2ab6df490652 in ScDocument::~ScDocument() /sc/source/core/data/documen2.cxx:363:5 #17 0x2ab6e363315d in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2925:1 #18 0x2ab6e363333b in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2894:1 #19 0x2ab6e3633514 in ScDocShell::~ScDocShell() /sc/source/ui/docshell/docsh.cxx:2894:1 #20 0x2ab6de4f105d in SvRefBase::ReleaseRef() /include/tools/ref.hxx:163:29 #21 0x2ab6de4a6259 in tools::SvRef<ScDocShell>::clear() /include/tools/ref.hxx:64:22 #22 0x2ab6de2b1aaa in Test::closeDocShell(tools::SvRef<ScDocShell>&) /sc/qa/unit/ucalc.cxx:365:18 #23 0x2ab6de2b2102 in Test::tearDown() /sc/qa/unit/ucalc.cxx:380:5 #24 0x2ab6de543787 in CppUnit::TestCaller<Test>::tearDown() /workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:185:15 #25 0x2ab69335765a in CppUnit::TestCaseMethodFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5 #26 0x2ab6ae4f3957 in (anonymous namespace)::Protector::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:46:14 #27 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 #28 0x2ab6a2974ff7 in (anonymous namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext const&) /unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:78:12 #29 0x2ab693328cd7 in CppUnit::ProtectorChain::ProtectFunctor::operator()() const /workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:25 during CppunitTest_sc_ucalc Change-Id: I778984beb9d1e355d3b8f9617b193424f332a32e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124709 Tested-by: Jenkins Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2021-11-04tdf#48622 Add new border line width defaultsSamuel Mehrbrodt
* Hairline (0.05pt) * Very thin (0.5pt) * Thin (0.75pt) * Medium (1.5pt) * Thick (2.25pt) * Extra thick (4.5pt) This unifies the default border line widths throughout the program. Users can still set any line width they want by chosing "Custom" in the "Border" tabpage. Also, existing documents won't be changed. The new defaults are just for newly added borders. Change-Id: I7af85dc189a688a749812824508c33c7814b50f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122683 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-11-04Move these SC_STYLE_PROG_* and SC_PIVOT_STYLE_PROG_* constexpr to headerKevin Suo
so that they can be reused in other parts of the code base. Need to change them to inline to avoid "defined but not used" compiling error. Change-Id: I44de7c2ebbc9ae57c229f89faf69a788013d7816 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-04tdf#145079 XLSX export: fix regression of internal hyperlinksTünde Tóth
Hyperlinks with internal named range targets didn't work. Regression from commit 3c3b9ad8886da916027f0fb940a2df822d63d4d7 (tdf#143220 XLSX export: fix hyperlink to sheet target) Note: original test case of the unit test document of tdf#143220 wasn't changed. It's only extended with two new test cases for verifying the fix for the regression. Change-Id: I8128ebb977dba7304bc9c69e45f6c55c71f800cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123816 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-03Upgrade mdds and liborcus to 2.0.0 and 0.17.0, respectively.Kohei Yoshida
Change-Id: I9e856fc2d61f1789a6f1702514837860539a0f49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124573 Tested-by: Jenkins Tested-by: René Engelhard <rene@debian.org> Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2021-11-03This aParentName can be constKevin Suo
Change-Id: If3d94b7b8e9b10934b1be0771c4c85536bc750f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124642 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-03tdf#97667 Add XML Dump methods for Calc Pool ItemsFelipe Lema
Continuation of https://gerrit.libreoffice.org/c/core/+/88475 Change-Id: Ic41ae7df362a796c56e95b38ccb534bbe045ead7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113497 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-11-03improve find-can-be-private scriptNoel Grandin
add progress display and cleanup child processes Change-Id: I86cc13dee17f6d1ea2874f0ebe178426fbc82076 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124634 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-01multiline calc inputbar not redrawing and adjusting scrollbar on delete of textCaolán McNamara
backspace is ok, but with delete when a line is deleted the scrolled up lines are visually duplicated at the bottom Change-Id: I22e91aa3c3213876d36c593cae7989e8913bffc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124548 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-01tdf#138475: also set font size/weight/posture for CJK/CTL languages...Kevin Suo
when parsing the default Calc styles. As an initial matter, orcus currently does not support XML_font_size_asian, XML_font_size_complex, XML_font_weight_asian, XML_font_weight_complex etc in: https://gitlab.com/orcus/orcus/-/blob/master/src/liborcus/odf_styles_context.cpp#L128 While this need to be improved by Orcus, actually in Calc we provide the default font attributes in sc/res/xml/styles.xml and it makes no sense to set different font size/weight/posture for each language type. As a result we apply the same font attributes of latin to all these languages. Change-Id: I1b105fecce45aa22c6b72e15305e25dc6669d2cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124536 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-31add o3tl::span ctor from std::vectorLuboš Luňák
Makes code simpler, and std::span can be constructed from std::vector too. Change-Id: Iae26b53c52148c19d9068a63126a7393d098d654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124507 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2021-10-30Prepare for removal of non-const operator[] from Sequence in scMike Kaganski
Change-Id: Ic49c0fda3e98aeda471e674b68d40464ddac1ea1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124382 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-30tools::Long->sal_Int32 in the DX arraysNoel Grandin
Change-Id: I36ddc11b39763dc77086591fe9bb756195b4294f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124459 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-30Add comments for defaults of bEvaluateFormulasEike Rathke
The default is "true" if not present at all for compatibility of older filter options strings. The default is "false" if present. Change-Id: I79383e6fcf211fc8b8f933ae93f6d53ec084d551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124454 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-10-29pass DX array around using o3tl::span instead of pointerNoel Grandin
so we get bounds checking in debug mode Note that I cannot just pass around the std::vectors involved because there is a place in editeng which calls with a subset of a vector. Change-Id: I5088a139593c27bf9cbe5d843ab4b0048ac6d508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-27ofz: Timeout, clamp hyperlink range when fuzzingCaolán McNamara
Change-Id: I604a20c8f239bdec00317e3e9e2a7476f5a3ee83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124281 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-27fix AVX512 detectionLuboš Luňák
The value wasn't in config_host.mk.in, so it's never been used. And also fix Calc Kahan CPU-specific code yet again :( . Change-Id: Iacfd500e5a662b2b4b96a009d129a012d278a3ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124248 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-27try harder not to mix CPU-specific code with generic codeLuboš Luňák
Jenkins Windows builds occassionally fails with illegal instruction (https://ci.libreoffice.org/job/gerrit_windows/110191/console). This seems to be because those AVX etc. files use std::abs(double), which is really just a fancy inline function calling the real fabs() or whatever function. And in debug builds inlines do not get inlined, they get emitted as copies. And since arraysumAVX.cxx is listed as the first object for Library_sc, apparently the linker likes to pick up the AVX-compiled inline function as the std::abs() version to use for Library_sc. Try to avoid this in two ways: - move the CPU-specific object files later in the list of library files - use plain C headers in those sources, no fancy <cmath> Change-Id: Ifd14076f79e9fbd7cc4c4a63a9764dff6715e63a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124249 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-10-27Typo: pDataIgoreCase->pDataIgoreCase in scJulien Nabet
Change-Id: I61f90680f907ee567f1af45801be3e939849d4ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124246 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-10-26Heuristic filename extension should be <= 4 charactersEike Rathke
Still unclear what exact scenario in lcl_ScAddress_Parse_OOo() it would positively detect, but loading broken references may be caught by this and just a '.' dot somewhere leading to an (unresolved) external and then the InfoBar triggering. At least restrict that to the maximum length of 4 characters for common filename extensions. Hit by loading a range name pointing to $'zens. politik hj 1'.$#ref!#REF! or $'zens. politik hj 1'.$a$#ref!:#REF! in https://ask.libreoffice.org/uploads/short-url/6jOXRPprzGPOc5y0eHkUT6y6MfB.ods of https://ask.libreoffice.org/t/69315/15 Change-Id: I2191f4511cc492679259e74edd242bfced03b0fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124240 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-10-26Restore original lcl_ScAddress_Parse_OOo() behaviour detecting externalEike Rathke
It's quite unclear why exactly this would even be necessary, but commit 296baa2fb6dd4150a7855114093a9703cdc18b09 CommitDate: Tue Oct 5 18:14:37 2010 -0400 Ported calc-extref-interpreter-rework-*.diff from ooo-build. introduced a heuristic whether a reference could be a so far unrecognized external reference and used String.Erase(n) to strip a detected possible filename extension starting from the '.' dot to form a sheet name. commit 6f93499b881416140c57bc86acdac0ae6e01c314 CommitDate: Tue Oct 8 10:03:08 2013 +0200 convert sc/inc/address.hxx from String to OUString then changed the String.Erase(n) to OUString::replaceAt(n, 1, "") which of course does not the same but just removes the '.' dot character. In that commit this was the only replacement doing that, others already used a correct OUString::copy(). Just restore the original intention, whyever.. Change-Id: Icc46115f9f25eaf1ed727c233fb1c69942c4b1af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124238 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-10-26Drop ContainerHelper::vectorToSequence and use comphelper::containerToSequenceMike Kaganski
Change-Id: I987c56feab147cdbeb4ad58bd5ebb23dce6dbbca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124215 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-26let focus enter calc sheet bg color dialog's valueset on clickCaolán McNamara
Change-Id: I884c8209e6b26e6c99654c4126ba81cf7e46c69f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124236 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-26tdf#145129 XLSX import: round down default row heightAttila Szűcs
like table layout of MSO does, e.g. 20 pt to 19.5 pt. Same as tdf#144642, but with default row height. Follow-up to commit 537cb82be8fa021fd9382cca874645c75daaef20 "tdf#144642 XLSX import: round down row height to 0.75 pt". Co-authored-by: Tibor Nagy (NISZ) Change-Id: Iefb615b56e5ddc11a5e839cf6d90516b18646045 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123655 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-10-26tdf#142010 XLS import: fix bad calculation after editingLászló Németh
Inserting a column messed up formulas in the test document of tdf#142010. This was a regression resulted by the tdf#89281 fix for a performance regression in XLS import related to shared formulas. Revert of commit ba686b9bd2596811141e4028947334f10799c356 "tdf#89281 fix performance regression of XLS import - cleanup" and commit b18b5b7edf3d14ef5f0efe53e367f88a423088c4 "tdf#89281 fix performance regression of XLS import". Change-Id: I96636fb1d84939385efbe7054a4271ff10b88907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124151 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>