summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2022-04-13ofz#46352 assert on bad string offsetCaolán McNamara
Change-Id: I60123fd0460b8038f08582a0bcbf2307af321df1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132862 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-03-28tdf#147014 Image missing due to integer overflowAron Budea
32-bit awt::Point/Size/Rectangle cannot fit size of 1M rows with larger (eg. 5x the usual) height, and could overflow. This causes problems in 64-bit Linux builds and, since the following commit, in 64-bit Windows builds: 3d90997fb6f232d8008df4d166d7b97b869c200f For now, clamp possibly overflowing values to 32-bit. Change-Id: Ifda7265703388abdfb47f523da4f0c5822358404 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129876 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132168 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132205
2022-03-24warn on too many rows/column when loading ODSLuboš Luňák
There's a warning when loading XLSX, but not when loading ODS. Now that 7.4 is going to support 16k columns, that would be a useful warning, either if we raise the limits again, or backported to 7.2/7.3 . Change-Id: I204bca32e1ff37332b86361d3d81d3fee29c15ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131945 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-03-21Resolves: tdf#148054 Advance offset for all columns, tdf#104927 regressionEike Rathke
Regression from commit 621c189173b35ac7f5ce4c578f57045479c63ab6 CommitDate: Sat Jan 9 05:13:55 2021 +0100 tdf#104927 consider character width for CSV import that for fixed width introduced a visual count of character widths for CJK IVS characters but did not advance the character offset for skipped hidden columns. Instead of having to ask bDetermineRange three times in the loop, split off an extra loop for bDetermineRange, advancing the offset then is straight forward and just only non-skipped columns are extracted and written to document. Change-Id: Ib6ab6b68c5fc0f6ff854d629d75742c39ed6ddf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131722 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 6b768542ddd52573bbdb0e7b5b85ce5a9dd4551d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131606 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-03-08proper columns range check (tdf#147830)Luboš Luňák
Change-Id: Ib23bc3f194fa418035e7c70a4f3e1b682f9c46b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131181 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit d032b81bbf2ca87114d15749d74166d0ba414972) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131195 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-28ensure null terminatorCaolán McNamara
LIBREOFFICE-WB8DT2Q9 Change-Id: I98529325bbd3ff475ba84b4991eb17240440df4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130668 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
2022-02-21clear ScDocumentImport position cache if iterators are invalidCaolán McNamara
SheetDataBuffer::finalizeArrayFormula calls ScCellRangeObj::setArrayTokens ScDocFunc::EnterMatrix ScDocument::InsertMatrixFormula and InsertMatrixFormula calls the variant of ScColumn::SetFormulaCell which doesn't take a sc::ColumnBlockPosition& param when SetFormulaCell adds a cell to the column so any iterators belonging to ScDocumentImport are invalid. Change-Id: Ic2814ecbeafdeb99632d2a255ed6c1dedf7376b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130151 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-18fix range checking in calls like ScDocument::GetNote()Luboš Luňák
Change-Id: I5612e765b3484b0515f4a16030ee19133ae3126a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130076 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 957d99a539df6e21fd40370938ca5dab1613cf8c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130105 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-17for unallocated columns check default column attributes (tdf#132057)Luboš Luňák
The problem was that this was returning false for the protected attribute just because a column was not allocated, but the default attributes had the flag set (so if the column had been allocated first it would have the flag set too). Change-Id: I2ef1ef40cafb7e8fc6f7b561c0a376af63f2ad26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129984 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit a717029e217621482ef799731f945090c6d6be4b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130015 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 5bdf7c93abd15dc422586228186e822096ce1517) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130018
2022-02-16tdf#113785 sc: IsDataFiltered must be normalizedJustin Luth
I can't believe this hasn't caused major issues and has survived as a bug for so long. Due to the way IsDataFiltered is coded, it is required that the range is normalized in order to get any kind of meaningful result, so lets ensure that. Change-Id: I2ede77f738fbaeb05a0f1425a2e88e59fca08e9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129735 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> (cherry picked from commit bda200a5e9c4592bd61b7924fa171ec3265bfd24) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129761 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130049 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-02-16Resolves: tdf#147421 Do not use OUString::replaceAll() to strip null-bytesEike Rathke
It reallocates and concatenates for each replacement so for massive amounts takes ages. Change-Id: Ibe1673fd4775c5b95833000669c1a24e718fd77c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129971 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 4b0c17609c2cca326bbcc9e8488a327a4a9ea952) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129945 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-02-16tdf#113785 sc FillAutoSimple: also optimize in negative directionJustin Luth
By only coding the optimization for the downward autofill, it totally broke an upward autofill. So this patch simply fixes the LO 4.3ish regression from commit a995462e6855061816c6529c366f20ace2b45868. This fix means that the non-hidden cells get the auto-value instead of being erased. However, the hidden cells are still erased (which is the topic of tdf#119957). I'm not going to bother with a unit test for this portion. If I can solve bug 119957 as well, then the unit test for that can cover both situations. Change-Id: If6320ccf87fa8893ca6766c265b7760cc46ed7d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129723 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> (cherry picked from commit 618084819babc839510860b74b36631749093c4c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129753 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit f3035cdb6a8d3ef56180640ef9d04031012250b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129760 Reviewed-by: Eike Rathke <erack@redhat.com>
2022-02-07Resolves: tdf#74577 tdf#92960 Create missing offsets in very outer tableEike Rathke
... if local table is outer table. Change-Id: I5996609264f4ad9efa8d76a8d0ab730bf1dded24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129540 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 8a9b870a40c41c7cae6e43452b593804fa17f831) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129550 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> (cherry picked from commit 2ea7055ea6115051a92c66a439b02d83bb067db7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129561 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-01-25tdf#146571 Ignore focus changes after closing Manage changes dialogCaolán McNamara
Change-Id: Ib588310410a265acdd129a8e51adf56bb5973bd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128869 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128823 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2022-01-22tdf#146367 reintroduce approxAdd() similar handling with last summandEike Rathke
... to tie result to 0 eliminating opposite sign small equalish fractions. This does not "fix" all interim values of the bug's sample document, which repeatedly adds single values in sequence using SUM() and should use the + operator instead to benefit from approxAdd() for each, but maintains the better accuracy of Kahan summation in the not near equal zero cases. And the dreaded SUM(0.1;0.2;-0.3) also works again resulting in 0 with all permutations. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128451 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 730b8aba72356bb8ba0066a5517b1224a4f1e232) Conflicts: sc/inc/kahan.hxx Change-Id: I67188a6abbdb98212f070166ad02319c3d477e28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128464 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-01-16tdf#136481 show the focus rect for the case nothing is yet selectedCaolán McNamara
but the cursor is at pos 0 Change-Id: I7c94480bffdced23fe89d4e3ba0e729742247130 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128414 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4bdf28b404f90236d93ce207671f755a71f28496) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128430 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-13tdf#146454 - Check for multiline string in setDataArrayAndreas Heinisch
Check for a multiline string in the setDataArray function. If that is the case, set a string or edit cell. Otherwise, just set a plain string in order to prevent performance issues due to the adjustments of the row height. Regression from b9e2c5d2a36fbd189c20448cadf4212edf02914d Change-Id: I9216b198b878fda5da29596d25504db853acd756 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127660 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit 2d11710df6d81c03007d136667a443e09cc70eed) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128332 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit b1e2d386afc3174d79a11fcfe365bf3a51f0caef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128333
2022-01-10tdf#146617: iterators may be invalidated during handler callMike Kaganski
... when the handler decides to remove itself from listeners. Change-Id: I1d5fe802f50d284bf70d747edaff0a19852c5a7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128054 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit e9dce4e8cbea04d6c6636a45f5a172e986714409) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128074 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 6d8b019f8f72d9802d86ab0414c909db04fdc912) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128160 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-01-09Resolves: tdf#146592 "Reset" to the current document propertiesCaolán McNamara
not those seen at the initial load of the TabPage Change-Id: Ieba4c278a0a9b7fef3030d8462cb845c27dba9b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127961 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-01-04For now, disable tests giving dubious results on AArch64Stephan Bergmann
when built with -ffp-contract enabled (-ffp-contract=on default on Clang 14 trunk since <https://github.com/llvm/llvm-project/commit/f04e387055e495e3e14570087d68e93593cf2918> "Making the code compliant to the documentation about Floating Point", cf. 19559ebbee160d1625d06feec7e6566772dad231 "Allow for a presumably more precise result of BESSELY(80,9)"; and -ffp-contract=fast default when building with optimizations on GCC) on both Linux (with 6cb20e0b298f41fe88984aebfe5454f936a0ae3a "Disable CppunitTset_sc_*_functions_test for linux_aarch64 for now, too" reverted) and macOS. Change-Id: Ie867d999173410ec9868bd14c0ee04bbba371920 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126727 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 72b25619960cdaa829c8ea10e27d9c0b20a2c26f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127785 Reviewed-by: Eike Rathke <erack@redhat.com>
2022-01-04CppunitTest_sc_subsequent_filters_test2: check format instead of stringXisco Fauli
Otherwise, this might fail. See 660e538ee77109bc3e7dff4491164d696e503abc < Disable broken part of ScFiltersTest2::testTdf126116 > Change-Id: I40534b70fc19ee163d9e6cb0c081fae40b81fdb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127774 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127776
2021-12-26Related: tdf#146377 Let AND(), OR(), XOR() propagate the current error, if anyEike Rathke
... instead of forcing Err:504 Change-Id: I7e91671ffc61bf82d9095378656b41981040f55e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127492 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 4674ff347cd2e71445503efdc0c110d094daa80b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127477 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-12-23CppunitTest_sc_subsequent_filters_test2: fix test depending on current yearXisco Fauli
While at it, move the file from ods to fods for better tracking in git Change-Id: I16df221e3a7341dc7c53de6130158c3887c472a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127361 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127364 Reviewed-by: Eike Rathke <erack@redhat.com>
2021-12-21ofz#42605 Null-dereferenceCaolán McNamara
Change-Id: Ief752f20aa3e7672e4ed7f6cd1809ee56a096c43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127052 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-12-16Resolves: tdf#126565 RefEditModified() preset current sheet for address-onlyEike Rathke
Change-Id: Ifa662a9d55fae10e3e1e3e115c9c5eb10972cbbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126899 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit ec4f8cd2172bf7b232961f31ebd22d7e13af261e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126883 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-13tdf#128895 sc xmlimport: create enough dynamic cols if propsJustin Luth
Since LO 6.3, only 64 columns are created by default, where previously it was a fixed 1024. A common user practice is to hide all columns not used, but this collapsed property was lost because only part of the columns were actually created and thus exported. In this example, import specifies 1017 hidden columns (H-AMJ), but since only 64 columns are created, export only specified 57. So ensure that on import, any column with defined properties is created - even if they don't contain any content. Change-Id: If928880baf5585613715a1f4361a9059584d1ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126540 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> (cherry picked from commit 297ab561c6754f89326a1e8ce1751233669578d7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126668 Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126728
2021-12-10new ScTypedStrData: typically missed argument in CTOR, tdf#142910 follow-upJustin Luth
Pretty much any attempted use of eType was completely wrong and lost. Regression from commit f6b143a57d9bd8f5d7b29febcb4e01ee1eb2ff1d CommitDate: Wed Jul 7 17:44:46 2021 +0200 tdf#142910 sc filter: fix "greater than" or "smaller than" etc Most calls to this are missing the "rounded number" argument, so the enumator is actually accepted as the double fRVal, and the StringValue eType was left as the default value (Standard), instead of the intended enumerator. 0.0 looks too much like 0, 0 to even notice in casual code reading. This had rendered the type mostly irrelevant. Change-Id: If4fa69d4b3077981244a2c3a785f80b77f9f9501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126453 Tested-by: Eike Rathke <erack@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit ac1ea5944a236efef75af7c85d0ffe10d374e7fa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126591 Tested-by: Jenkins
2021-12-07Bump tolerance from 30 to 40 to make this test pass on my MacTor Lillqvist
Assuming that the original 30 was just an arbitrary number that happened to work on the developer's machine, and for reasons a slightly larger tolerance is needed on mine. Change-Id: I08fe883dbe2eb88b7903019a71b689b539b085a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123810 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126476
2021-12-02tdf#145819 Revert logic of the image-with-rotation dialog: sc & sdGabor Kelemen
Change-Id: I906e83ada98fd7a583872a2eaa76d7fd04a5401b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126110 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 970cbb120a62e952e80348b8e94478600241273a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126144
2021-12-01tdf#144244: fix crash when FILESAVE a calc file after delete some columnsJulien Nabet
see bt here: https://bugs.documentfoundation.org/attachment.cgi?id=176507 Regression from 3238606c8470f3eaeada3fc601e186ec5cfac925 tdf138138 Apply shape shift also to NoRotatedAnchor The 'normal' anchor (as on screen) is connected to the snap rectangle, the NoRotatedAnchor is connected to the logic rectangle. They differ, if the shape is transformed, e.g. rotated. Error was, that values of the 'normal' anchor were applied to NoRotatedAnchor instead of calculating the shift of NoRotatedAnchor independently. The error becomes only visible on save, because there the NoRotatedAnchor is used. Effected shape types are legacy shapes, text boxes and transformable OLEs. I have not tested, whether this fix would work for LO 7.0 too. Let's apply the same controls as we do with ScDrawObjData retrieved with GetObjDataTab Change-Id: I73cb3dd3c47a7ec55667e498d4a62842ce63d861 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125852 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 1d45f84bd08c8d196fcf3c9baaf2cad010884e5c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126140 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-01tdf#144107: fix incorrect conditioning on bGrid...Dennis Francis
introduced in 3092322bb83998397b09d3f34b6d04b5e5c1da50 The intention was to avoid the default line drawing in the original else branches to be conditional on bMergeCover. The previous patch used 'bGrid' as a surrogate for the original 'else' case - which is wrong. Change-Id: I7c6b49fa9c21064312273b1051ffc7f81de3fef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126076 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 307c1f13821386687b8cf3c560ff2570b89ac3a9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126135 Reviewed-by: Eike Rathke <erack@redhat.com>
2021-11-29Reverts tdf#144247 tdf#101217 - 4 digits in row height/col widthHeiko Tietze
Reverts patch I29d90b413e6f6f6e8b73d30ac47d644a69d15046, ad8edac43e73555bc2055514300c5b81a1bb04ea and partially Ibdee348d84a8b96d8f698e7fc6db89eb24422f5d Change-Id: Iba5fd2d2a65d813c2d5ba85e66a7c3e07b726ca5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125871 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit f82f6a2714fbf7882eb1d77351574392ae8e4c27) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125888 Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126015
2021-11-29tdf#144940 sc: fix disabled header/footer regressionAttila Bakos (NISZ)
Setting "Same content on first page" in the Page Style dialog on either the Header or Footer tab resulted disabled header/footer after reload. This was due to flawed logic when assigning SC_UNO_PAGE_HDRON/FTRON value: "leftness" was checked for but not "first pageness". Regression from commit b9993369b4011cd8f367e439f5248096827f1efc "tdf#121715 XLSX: support custom first page header/footer". Co-authored-by: Daniel Arato (NISZ) Change-Id: I8ee4c9f8145913d9dc5f4b66cdbc2352f2e405f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125367 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 5db9b33dadda67c7f97d8c23df17211fae380919) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125841 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-28Resolves: tdf#144410 show submenu indicator for color filtering optionsCaolán McNamara
includes.. 1) Related: tdf#144410 we don't want a gap in a multicol spanning separator we would need another column to show a drop down indicator, and we don't want the separators to have a visible gap in that case Change-Id: Ib45b4cda41a09b631f3ea4d4427a8073a9e243d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125900 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> 2) gtk[3|4] move the indicator to the edge Change-Id: Ib92e8f1e35e6465b52a69f3a8513068668dc6953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125951 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-27Regression Statistics: use cell reference, not fix row to calculate offsetEike Rathke
The INDEX() offset was calculated with a fix row number derived from the initial output position, like 35-ROW(). That fails if the range later is moved or rows inserted/deleted. Instead, use a cell reference of the cell's current column and end row, like ROW($A$34)+1-ROW(). 34+1 to not have things shifted if a row is inserted before 35. Change-Id: I11276c4acb35505576daa1a20ad49a4fcdbaba49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125914 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 324e5c3942870749fae0e62c1c11a1400b772584) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125898 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-25Resolves: tdf#128914 Create copies for non-shareable token arraysEike Rathke
Change-Id: I59fdcf48fb0da9d944b00a140e043e4ea5fb1ae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125789 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 89c4bc5220810dc3684a473f87d001f2c55438a1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125725 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-24Resolves: ofz#41299 Rewind also on last resort #REF! IsReference()Eike Rathke
Otherwise for #ref!e:o NextNewToken() bailed out with an uninitialized maRawToken. Change-Id: I8b3b399a5a3636ccda3104ba2a5971e5e9a8fc02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125736 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 51a0a85247fab56040416e40b7c7d878689acb26) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125715 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-18tdf#142420 color menu should be a child of the autofilter, not a siblingCaolán McNamara
which is why it doesn't appear at all under wayland. This should also get it positioned better rather than using a fixed pixel offset. Change-Id: I9a4193c27b4172469cea3d980c86cff9ca701ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125360 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-18revert "vlookup - optimize SC_EQUAL and NOT_EQUAL." (tdf#139612)Luboš Luňák
That commit breaks lookup when the "Search criteria = and <> must apply to whole cells" option is disabled, as it enforces whole cell checking regardless of the option. Given that the option is enabled by default in LO ('SearchCriteria' in Calc.xcs) and it's what MSOffice does as well, and this default gives good performance regardless of the option, I don't understand the purpose of the commit. Possibly it was based on a document where somebody disabled the option and then indeed got worse performance. Solution: Don't do that :). This reverts the code parts of a953fa1c0f6a40a08859570516c511f3a841 . The test I've kept but switched to ensure that partial matching does work if the option to match whole cells is disabled. I've also changed the tooltip for the option to mention performance and not suggest that off is the default. 7.2: UI string change not included. Change-Id: I56d7b6e7b8e9f0622f7ad6d447daf56c3b705a7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125267 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 8dec2a98ce29251936cd45ebf864a89ff767ee50) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125350 Tested-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-17Resolves tdf#144247 - Change display precision of row height / column widthHeiko Tietze
Use 2 digits by default but 4 in case of user-defined values for row height and column width. This partially reverts ad8edac43e73555bc2055514300c5b81a1bb04ea as the optimal width is back to 2 digits Change-Id: I4cb53071783c76d9fbea0cc2feaa0b860c73c647 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123802 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> (cherry picked from commit e396017b598e6ef161e71f18638b4d94cd92e6ee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125349 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-14Resolves: tdf#145645 pivot table popups don't dismiss when item activatedCaolán McNamara
Change-Id: I5a68a08600b7792d924ec77694a60651df5d9c83 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124983 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-11-14Resolves: 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 (cherry picked from commit 79589afe173ba8f17bfbbc6b38f0dfbc5fd9e0c9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124985 Reviewed-by: Caolán McNamara <caolanm@redhat.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> (cherry picked from commit eb50d356ffbe5bd2e3de9ac574ddf28ce4e034ad) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124972
2021-11-09tdf#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> (cherry picked from commit b9e2c5d2a36fbd189c20448cadf4212edf02914d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124858 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-09tdf#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> (cherry picked from commit 4024673d69475191ba221fd0db2e595bf796d4fd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124855
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> (cherry picked from commit 85a86ba6ba34ff0dfc92c3ce38cba86daf547121) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124687 Tested-by: Jenkins Reviewed-by: Tünde Tóth <toth.tunde@nisz.hu>
2021-11-02multiline 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/+/124471 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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> (cherry picked from commit 3b977328dfbe613d925dc52c22e36b7e15a34ada) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124472 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-27tdf#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> (cherry picked from commit 7d5703ca50d719fbd82615fb81da7949fe163ae5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124189 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-10-22tdf#130104 - FILESAVE XLSX: cell indent increased on each saveKevin Suo
In OOXML, 1 indent = 3 space char width. ----- The Old Method: ----- XLSX Import: As per the line: sal_Int32 nIndent = getUnitConverter().scaleToMm100( 3.0 * maModel.mnIndent, Unit::Space ); assume the width of space char is 88, then: If the OOXML indent is 1, then nIndent would be 264.5, and casted to 264. If the OOXML indent is 2, then nIndent would be 528.5, and casted to 528. If the OOXML indent is 3, then nIndent would be 792.5, and casted to 792. ... Also, as Mike Kaganski has pointed out, we use twips in sc indent internally, thus it is wrong to convert to Mm100 unit here. XLSX Export: As per the line: nTmpIndent = (nTmpIndent + 100) / 200; Assume we did not edit the document upon open, and simply save it. Now: If our indent is 264, then the calculated OOXML indent would be 1.82, and then casted to 1, while the expected value is 1. If our indent is 528, then the calculated OOXML indent would be 3.14, and then casted to 3, while the expected value is 2. If our indent is 792, then the calculated OOXML indent would be 4.46, and then casted to 4, while the expected value is 3. ... Then if you reopen the saved xlsx file with Calc, the increament of indent continues on each save which causes serious format loss. Most importantly, if you change the indent of cells using the Calc toolbar indent icon, one-click would be 10pt = 200 twips, see defined macro SC_INDENT_STEP. This causes a mess when you change the indent in an xlsx document. ----- The New Method ----- In this patch, I have changed the XLSX import to convert the excel indent unit to 3-spaces-width *in twips*. Then, per code advice from Mike Kaganski, as a mirror operation, I have changed the XLSX export logic to detect the width of the space char (which *should* be the same as the one detected at the time of xlsx import), and use this width to convert the indent in twips unit to excel unit. This way, the indent will remain the same on xlsx export. ----- TODO: ----- 1. On xlsx import of the file tdf130104_indent.xlsx, the default font (i.e. font for the "Normal" style) is "Times New Roman". However, when the UI locale is set to Simplified Chinese and "Asian" option is enabled in Tools->Options->Language Settigns-> Languages->"Default Languages for Documents", upon resave as xlsx, the default font for the document is changed to "Noto Sans CJK SC" on my system, which causes the space-width detected to be different from the width detected on xlsx import. This seems to be another bug, see tdf#131349. (Luckily the unit test in this patch passes, this is because the change of space width resulted from the change in default font is very small thus the conversion is not impacted.) 2. The UI part need to be improved, so that after xlsx import, if the user hit the "Increase Indent" or "Decrease Indent" toolar icon to change the indent, Calc should be able to detect that we are operating in an xlsx file, thus the "increment" should be 3 * width of space char, rather than the current SC_INDENT_STEP. Also, the if the user changes the default font of the xlsx document, the Calc should recalculate the indent for each cell to reflect the possible change in width of space char. Change-Id: I5f7a4ecbcd93079d1c19db3b0b641dda949f6fbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123111 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 6b93ee72df1aa42d1a3482ffc396bd0c23134f8b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123872 Tested-by: Jenkins