summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2021-09-08Fix typosAndrea Gelmini
Change-Id: I42d38399726acb1d044b4b9f032de96ded00e5bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121542 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-09-07loplugin:unusedmethodsNoel Grandin
Change-Id: I6295d6ff6fb7410852351801c324244308c5c472 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-07Use while instead of for loopMichael Weghorn
... since only the condition and no init-statement or iteration-expression is set anyway. Change-Id: Icd9c5c9cf1e89f39984ed13624246731da0d7acc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121729 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-07sc: lok: introduce LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR callbackDennis Francis
to send the document background color (Calc only for now). Change-Id: Ibd2f042a81c9bb714bed947c4ef92f82ff3e6f50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120524 Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Tested-by: Dennis Francis <dennis.francis@collabora.com> (cherry picked from commit 5f2d669a51a91b21196eecb935aa55d3fc1aa7be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120738 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2021-09-06tdf#144242 no width-height swap for line and pathlineRegina Henschel
MS Office swaps width and height for rotation angle ranges 45..135 and 225..315. Line and Pathline objects incorporate the rotation into their points, so have no rotation. Line and open Pathline objects nevertheless report an rotation angle. That one is used to align the text direction to the line. But because of this reported angle, width and height were swapped. The patch excludes these objects explicitly. The case differentiation for the rotation range had forgotten to normalize the angle. Therefore, in a reopened spreadsheet, the line was accidentally exported correctly without width-height swap, because in this case the rotation angle is negative. Change-Id: I5f698d1cc734e17bcb02ff77db5224a228392e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121661 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-09-06Revert "tdf#142214: autocomplete: do not search across empty blocks"Ilmari Lauhakangas
This reverts commit ca2ec443893731093970914feb750b31ea13e47f. Breaks user experience. Removed ScTiledRenderingTest::testAutoInputStringBlock as well. Change-Id: Id03bc645d78c29c0aa588b2133fc1cb96f3cceb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121640 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-09-06tdf#142579 Consider cond. format background colors in color filterSamuel Mehrbrodt
In addition to color scale, consider background colors set by a conditional style. Change-Id: I203c4a5ae87aa7b47c2caafcac703b0a0c1a677c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121474 Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-09-06tdf#142580 Consider cond. format text colors in color filterSamuel Mehrbrodt
When using a conditional style to override the text color in conditional formatting, the color from the style overrides directly applied text color. Consider this in the color filter. Change-Id: Ieaa1c475d87866de1e2d497127be9d06d1f3d3f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121311 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-09-06tdf#142579 Consider color scale background colors in color filterSamuel Mehrbrodt
When using a color scale in conditional formatting, the color from the color scale overrides the cell background color. Consider this in the color filter. Change-Id: Ifbefedbf1152165b65f8fbc3eeff29ffccf29898 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121074 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-09-06[API CHANGE] oox: fix import of chart date categoriesDennis Francis
Before this fix, date categories imported in oox's DataSourceContext were stored as formatted strings according to number format code in <c:formatCode> under the <c:cat> tree. As a result chart2 could not recognize them as dates. This causes problems like: * The axis that is linked to date categories cannot use the scaling/range-selection(min/max)/increments specs mentioned as axis properties. This results in distorted/unreadable chart renders w.r.t the date axis. * No re-formatting is attempted as per the number format provided for axis. This patch introduces a role qualifer argument to the XDataProvider interface method createDataSequenceByValueArray to support categories of date type via this method. When exporting to oox, write date categories and format code under <c:cat> <c:numRef> <c:numCache> This patch also fixes some discrepancies in date axis interval computation (auto mode) found by already existing unit tests. Change-Id: Ibc53b0a56fdddba80ba452d5567ce98d80460ea7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121525 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-09-06tdf#142965 color filter: allow filtering by no fill/automatic colorSamuel Mehrbrodt
Change-Id: Idd0a41cea936fd19adbc07561b0d9c0cba735f0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120946 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-09-05no need to allocate DimensionNode with unique_ptrNoel Grandin
Change-Id: Ia832d2098b72a9e88e7a708d205c49bd3e9c82a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121652 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-05cid#1491055 Explicit null dereferencedCaolán McNamara
this always dereferenced pCode so it already assumes pCode cannot be null Change-Id: I19b601d7f2e089eb2037532590f727c5cd276dd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121695 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-05no need to allocate ColumnSpanSet with unique_ptrNoel Grandin
Change-Id: If3aaa2a4bc556dad41f56054890dc07f96d42dda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121651 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-05ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: Icbb4187ecc3cbb371fa7c2e6003b920be287ec6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121667 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-05ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I5222e0c116d7f828539af84321dd30a71c2e14a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121655 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-05move variables to where they are usedCaolán McNamara
Change-Id: If341e4f6cf1e83a9f28c273fee280edfc11d8a1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121658 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-05fix indentCaolán McNamara
Change-Id: I04033ec4c95a352c0662e445a0d207d514696041 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121657 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-05ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: Icd01771dfa1ae7db94851d888ae3ce657313c67a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121656 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-05no need to allocate NamePropsType with unique_ptrNoel Grandin
Change-Id: Ib042c481d682467620ae72a0b7e0bb2a5c8bf6ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121649 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04Fix assert in sc/undoblk3Julien Nabet
since: commit 0abf2ac27859f1e91a3d183b81948b1fe8f5aca3 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Sep 16 11:25:25 2020 +0100 AppendContentsIfInRefDoc never passed a null ScDocument* Change-Id: Ia21f8fecdf8a6aea7ea9c6ea4d579c5e53882bbd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102982 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Change-Id: Id699c7be3a81b251541f9a46fd3e1149c47f5df9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121642 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-04inline ScTokenArray into ScFormulaCellGroupNoel Grandin
Change-Id: I3a12566141b3243142c5e30381ac5eb3ba9c493a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04no need to allocate RangeListType with unique_ptrNoel Grandin
Change-Id: I18681749501bb6750912c79b9ff04f5ffc4f0364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121644 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04flatten ScFormulaCellGroupNoel Grandin
Change-Id: Ie33a6de78bd120f143da35ffc26af94178c734c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121643 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04no need to allocate ScMyLabelRange with unique_ptrNoel Grandin
Change-Id: I67b7b865d3c48e31e5efff5151c516ca7c51fd27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04store ScTokenArray by value in SharedFormulaBufferNoel Grandin
Change-Id: Ibff3c2fea3cadc234266953ab15ae5f25c4ac1e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121626 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04no need to allocate ScMyNamedExpression with unique_ptrNoel Grandin
Change-Id: I853aee13d3afc25e7e1ec1aa0d1a41dba7de0fb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121623 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04no need to allocate ScMyImportValidations with unique_ptrNoel Grandin
Change-Id: I1f720b05834f24e395456d4e82cdf772242be7f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121622 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04no need to allocate ScMyLabelRanges with unique_ptrNoel Grandin
Change-Id: I87564621a24737df74ad7475910250fde8dbe4fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121621 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04no need to allocate ScMyNamedExpressions with unique_ptrNoel Grandin
Change-Id: Ib82404230a0da4865c8c83087bca255811a89ed7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-04use std::vector for fetching DX array dataNoel Grandin
because I'm trying to track down a related heap corruption, and that is much easier if the access to the array is checked by the std::vector debug runtime Change-Id: Ia665f5cebb7f14d88942e88b4b400ad3c28ef5d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121527 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-03ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I1bd251165fb428f560a6844951e28109febeee7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121592 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-03ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: Ib703febb7e632ec4ae18756065a1c60ffc75569e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121590 Tested-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-03ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I3ea65a72567e934325e24ff658fc1b9c0468abcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121591 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-03tdf#131548 Android: jump to cellIlhan Yesil
Added LOK_CALLBACK_SC_FOLLOW_JUMP: fire this signal to jump to cell cursor in android viewer. Payload format same as LOK_CALLBACK_INVALIDATE_TILES. Change-Id: Ic896baccf1327d6ccdf104811446e3454a42679e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116448 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-09-03tdf#144155: Revert "tdf#36383 sc AutoFilter: fix changing row height"Xisco Fauli
This reverts commit 3678e0efcb8bedc58dd329a430da0ac3b1572df8. Conflicts: sc/qa/uitest/autofilter/tdf36383.py Change-Id: Ie1abd0cdea013571a27b187ffcb20125a0656442 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121512 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins
2021-09-02tdf#144209: sc_subsequent_filters_test2: Add unittestXisco Fauli
Change-Id: I00a0f1efad4d003c7213117ede7f14fbdcb2c00e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121509 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-02rename UpdateMode -> UpdateLayout in editeng classNoel Grandin
... because "update" is such a generic term I keep forgetting what we are turning on and off Also return the previous value from SetUpdateLayout to make the save/restore code more compact. Change-Id: Iae1764c837a92e58c9b17521f130e8fc80311d22 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121479 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-02Use utl::TempFile::EnableKillingFileMike Kaganski
Helps keep temp directory clean also on exceptions Change-Id: I81c17d90d6905653db946e68faf2a7f59c17da15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121466 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-02Resolves tdf#144227 - Default command to switch UIHeiko Tietze
Remaining .uno:ToolbarMode replaced by .uno:ToolbarModeUI Change-Id: Ie5afaa997dabaca0feafde41355945460f1292f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121417 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2021-09-02unused definesNoel Grandin
Change-Id: I494e64c69decb9fb3d5b13ffc2f18d99f6b7749f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121442 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-02ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I2b33dd4893bb71bd7880e068d26ebe3d31d07ab1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121485 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-01Resolves: tdf#144209 Handle General containing formats in RoundValueAsShown()Eike Rathke
Calling SvNumberformat::GetThousandDivisorPrecision() for a "AA "General format resulted in 3000 as that was implemented for tdf#106253 without taking into account that ImpSvNumberformatInfo::nThousand may be abused under some conditions, which here is having FLAG_STANDARD_IN_FORMAT = 1000 as nThousand, multiplied by 3 gives 3000. Subtracted from the 0 precision gave -3000 decimals for which of course the new rounding produced 0 where it previously simply ignored the decimals and returned the original value. Change-Id: I66afaf1e2d8b2654d9f7cc8cfb66389357fb742d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121447 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2021-09-01ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I8d581560433e555f7f26b4e24d1acd399acf4d52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121445 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-01ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I7f37460bd39f5d069550c0e6241fe654f8c910d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121443 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-01ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I9ae6e92cd5677619f8604764acbbe30a7290002e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121444 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-09-01clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: I8553b1e2b1c3461fa55eb19593b1a97ed9e7ab1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121433 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-01tdf#118938 XLSX import/export: fix permission for editingTünde Tóth
The password for editing wasn't asked, also wasn't exported in XLSX documents. Now it's exported in Calc using the following steps, also verified before editing: - In File->Save As, choose Excel 2007–365 (.xlsx) format; - enable checkbox "Save with password" and click Save; - in the dialog "Set password", click on "Options" and enable checkbox "Open file read-only", and enter a password for editing (i.e. skip the password for opening). Note: Excel 2016 doesn't ask password for editing, but Office 365 does. Passwords created in Excel haven't been supported, yet. Also passwords with diacritics aren't interoperable. Note: saving the file under a different path is still allowed both in Calc and Excel without asking the password for editing. Change-Id: Ic00d7c5a785e04d270a182a4087ea922d7d92979 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121371 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-09-01sc: do not use dashes in the file namesXisco Fauli
underscores are used predominantly Change-Id: I4a51903a2c7712f463b10a56c7466077544adfee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121408 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-09-01ofz: MemorySanitizer: use-of-uninitialized-valueCaolán McNamara
Change-Id: I4e1a5a6254c22423d8b7e75d4afc88393fc816de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121399 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>