summaryrefslogtreecommitdiff
path: root/sc
AgeCommit message (Collapse)Author
2018-08-21uitest Calc-Text Case; tdf#119155 ; tdf#119162Zdeněk Crhonek
Change-Id: Ifaf90b8bcf37bc712f734778a935370027696210 Reviewed-on: https://gerrit.libreoffice.org/59328 Tested-by: Jenkins Reviewed-by: Zdenek Crhonek <zcrhonek@gmail.com>
2018-08-20Simplify containers iterations, tdf#96099 follow-upArkadiy Illarionov
Use range-based loop or replace with std::any_of, std::find and std::find_if where applicable. Change-Id: I2f80788c49d56094c29b102eb96a7a7c079567c6 Reviewed-on: https://gerrit.libreoffice.org/59143 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-20Resolves: tdf#119137 treat scalar non-reference non-array argument as matrixEike Rathke
... of size 1x1 so all further checks are applicable as for any other array. Change-Id: I0c8926bc56f5e451ca4847e0f0c76a1be97418f2 Reviewed-on: https://gerrit.libreoffice.org/59317 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-08-20coverity#1438402 Improper use of negative valueCaolán McNamara
Change-Id: I00aa17ae4fd543faabc4cb7a052e3561da29c1e6 Reviewed-on: https://gerrit.libreoffice.org/59311 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-19Menubar Calc: update sheet menuentry according to table in writerandreas kainz
Calc sheet menubar entry First section was use the same items than writer so the WriterCategories were moved to GenericCategorie Main benefit is that app specific items are centralized in sheets - Format -> Row, Columns and Merge items are in Sheet on the same subsection than writer - Format -> Print Range was moved from Format to Sheet where SplitTable is in writer - Format -> Conditional and Style stuff was moved to Sheet where the Style stuff is located in writer. In writer there are NO Style items in Format - Tools -> Protect and View -> Protect is centralized in Sheet like in Writer -> Table - Sheet -> Comments are now in Edit -> Comments like i writer open point: Sheet -> Size -> The entries has to be renamed to be more clear (like already in writer) Change-Id: Ic014ccc260dd3264ef6e79a2b71d268e40f22088 Reviewed-on: https://gerrit.libreoffice.org/56912 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-08-18coverity#1438401 assert nPrevIndex >= 0Caolán McNamara
Change-Id: I1b6e4428aa44163bd098517ed654ea115c10daf7 Reviewed-on: https://gerrit.libreoffice.org/59292 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-17Use for-range loopsCaolán McNamara
Change-Id: I7bf26258b8330a5f81657a3684c81ce429b37090 Reviewed-on: https://gerrit.libreoffice.org/59262 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-17ofz: make ValidNewTabName faster wrt collisionsCaolán McNamara
Change-Id: Id2058719c3bc822518faa922a6cd0409b4088ac7 Reviewed-on: https://gerrit.libreoffice.org/59253 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-08-17Resolves: tdf#118983 do not expand range if sheet references not affectedEike Rathke
Change-Id: Ib207d3723ce1d370a953e652957aaed399affc9c Reviewed-on: https://gerrit.libreoffice.org/59255 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-08-17make GetCodeName accessor more standardCaolán McNamara
Change-Id: Ieee004ef7f6c7db5503a8a0d1660785105ec0511 Reviewed-on: https://gerrit.libreoffice.org/59251 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-17make GetName accessor more standardCaolán McNamara
Change-Id: I8cb4853be09e37499d26acb6889b3d9b2c70dcf8 Reviewed-on: https://gerrit.libreoffice.org/59252 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-17loplugin:useuniqueptr in ScFormatRangeStylesNoel Grandin
no need to store a ref-counted thing like OUString on the heap, just put it directly inside a std::vector. And no need to store a dynamic container like std::list on the heap either, just put it directly inside a std::vector. Change-Id: If14a620916caab543d799ca868ee94129a51c672 Reviewed-on: https://gerrit.libreoffice.org/59224 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-17loplugin:useuniqueptr in ScColumnRowStylesBaseNoel Grandin
Change-Id: I44e9cb38f57684930a94bd1f185e87a9605b65c2 Reviewed-on: https://gerrit.libreoffice.org/59225 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16Related tdf#118547: don't change protection symbol if nTab == TABLEID_DOCJulien Nabet
See Eike's comment in https://gerrit.libreoffice.org/#/c/59035/ Change-Id: Ic0f6f0a6fc8d08a7c92b2c12bd301f5089843891 Reviewed-on: https://gerrit.libreoffice.org/59218 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-08-16data->sort->options->copy sort results to, enter "asd"->ok crashesCaolán McNamara
Change-Id: If0748d26f8e65b07e98fdda577931348fc479724 Reviewed-on: https://gerrit.libreoffice.org/59186 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-16Resolves: tdf#119013 do not over-aggressively reorder date particlesEike Rathke
In particular not when reading documents as we don't know what the original (default/system) locale was when the date format was created and stored and whether the format's date order actually matched the locale's ordering. Regression from commit 51478cefaa4e265b42e3f67eda0a64767ff3efba CommitDate: Tue Apr 18 17:01:27 2017 +0200 Resolves: tdf#107012 follow date order of the target locale Change-Id: I9d3bdbd512d95ed81ff6459e368a2d7497ec8a2d Reviewed-on: https://gerrit.libreoffice.org/59182 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-08-16remove mempoolNoel Grandin
we've been using the normal memory allocator instead of the sal slab allocator ever since commit bc6a5d8e79e7d0e7d75ac107aa8e6aa275e434e9 Date: Wed Nov 15 16:52:44 2017 +0530 Disable custom allocator Change-Id: I3383962cedb85d56fbec695398901f6ff7057651 Reviewed-on: https://gerrit.libreoffice.org/58577 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16pass SfxMedium around by std::unique_ptrNoel Grandin
Change-Id: Ibde7b68d9248f80d5304991390a80742265f37b3 Reviewed-on: https://gerrit.libreoffice.org/59031 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in ScOutlineDocFuncNoel Grandin
Change-Id: I036a860bd861f0fa1136d242a5e042c5c56d4226 Reviewed-on: https://gerrit.libreoffice.org/59125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in ScDBDocFuncNoel Grandin
Change-Id: Iaa71bbc2a10e46153209bf3264c74c8ce78f007b Reviewed-on: https://gerrit.libreoffice.org/59124 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in XclImpChangeTrackNoel Grandin
Change-Id: Ib7670dd3595af4a4aafa2502a5e3b2ed4ad7fe11 Reviewed-on: https://gerrit.libreoffice.org/59135 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in XclExpAutofilterNoel Grandin
Change-Id: Ibd57de5b8309048ec29e869f3058b0a8bb26df71 Reviewed-on: https://gerrit.libreoffice.org/59134 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in ScGridWindowNoel Grandin
Change-Id: I4b7cb0b5346cd21d6aa3b25dbe5e37a107b179b5 Reviewed-on: https://gerrit.libreoffice.org/59133 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in ScContentTreeNoel Grandin
Change-Id: Ib3aab99712e40f0b5482f87aaf37d228a72f3684 Reviewed-on: https://gerrit.libreoffice.org/59132 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in ScViewUtilNoel Grandin
Change-Id: Id28d24e05e0f416ffaab4e22ad1189834e1570ab Reviewed-on: https://gerrit.libreoffice.org/59131 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-16loplugin:returnconstant in ScTokenConversionNoel Grandin
Change-Id: I17d8d188cb4a51978af41788ee3adf9d221c8bdb Reviewed-on: https://gerrit.libreoffice.org/59126 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15Fix typo: s/an other/another/gAndrea Gelmini
Change-Id: Iab3302d20fb9b0be4b97331709f83f818a46b2da Reviewed-on: https://gerrit.libreoffice.org/59100 Tested-by: Jenkins Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-08-15tdf#118990: use full URI for absolute referencesMike Kaganski
Previously (since commit 7eb5e135422f1a5830a44d129300bc3fafb4627d) only path relative to reference host was stored, and host itself was dropped. That resulted in URIs like "/share/file.xlsx", even without scheme. For Windows shares, this broke UNC paths like "\\HOSTNAME\share\file.xlsx" (which are stored in XLSX by Excel as "file:///\\HOSTNAME\share\file.xlsx"), and on subsequent import, this resulted in paths on the same drive as the document (like "C:\share\file.xlsx"). With this change, we will store "file://HOSTNAME/share/file.xlsx", which is correctly processed by both LibreOffice and MS Excel. Change-Id: I3f13aa0b3ae8dc41ec28eaa1416d536469c4562a Reviewed-on: https://gerrit.libreoffice.org/59064 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-15ofz#9894 cut out slow pathsCaolán McNamara
Change-Id: I4be00089740e5d96ceac70505e190769e86b55eb Reviewed-on: https://gerrit.libreoffice.org/59106 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-15Resolves: tdf#118609 crash in calc after some manipulation through basicCaolán McNamara
Change-Id: I518b15359b29c845604d2e9cde64bdb637078ba1 Reviewed-on: https://gerrit.libreoffice.org/59052 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-15pass ScPrintRangeSaver around by std::unique_ptrNoel Grandin
Change-Id: I5b5ffe9f421b63951b05d9d6f58af346b8fdf0d1 Reviewed-on: https://gerrit.libreoffice.org/59029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15tdf#115086 crash in assignLabelsToDataSequenceCaolán McNamara
since... commit c45358e928b9b9419bba10a0fcb661696cb7647a Date: Mon Apr 24 00:09:08 2017 +0200 preserve "Total" label on round-trip, remove code duplication Change-Id: I83ed20e1cab8d67f2f5aedcaf862756d9548bf9f Reviewed-on: https://gerrit.libreoffice.org/59060 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-15sc: Report #DIV/0! when MOD()'s divisor is 0Takeshi Abe
as Excel does [1], while ODF 1.2 does not specify which kind of error should be assigned for that case. [1] https://support.office.com/en-us/article/mod-function-9b6cd169-b6ee-406a-a97b-edf2a9dc24f3 Change-Id: Id6ebf790ac407f2a8b8769fc0518f136a1271a3d Reviewed-on: https://gerrit.libreoffice.org/58351 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-08-15Resolves: tdf#119034 do not floor() for Logical A1Eike Rathke
Either it is 0.0 or it is not. Change-Id: I8e170e08b7a26ade65ca3b8db26a2d8c581e444c Reviewed-on: https://gerrit.libreoffice.org/59057 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
2018-08-15tdf#119141 Revert "sc htmlimp: non-global sheet range names"Justin Luth
This reverts commit 5720c85ccea9f1481bd604b806c5be728e59a13f, which was made in response to the suggestion in comment 6 of bug 114487 and backported to 6.0.6. But ScAreaLink::FindExtRange doesn't bother to search the local rangenames, and the Links to External Files dialog also doesn't give non-global variables as options. Since this was just a "logical" change, simply revert it to repair the regression. Any attempt to support local rangenames is something bigger that isn't appropriate for backport to stable. Change-Id: I8bd4dcc6492da2712e13b2e54cf81609cdc5936e Reviewed-on: https://gerrit.libreoffice.org/58761 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2018-08-15loplugin:useuniqueptr in OverlayObjectListNoel Grandin
Change-Id: I641d93e54504c27bcc49bae8edf6286c0a9a471f Reviewed-on: https://gerrit.libreoffice.org/59024 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15Related tdf#118547: Lock mark on protected sheet tabJulien Nabet
Fix opposite case, see https://bugs.documentfoundation.org/show_bug.cgi?id=118547#c10 Change-Id: I2c4e55f8929b1979e71a4040dfac1ba7cff51aeb Reviewed-on: https://gerrit.libreoffice.org/59035 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-08-15loplugin:returnconstant in ScDetectiveFuncNoel Grandin
Change-Id: Id6eef7772b32a93d43d0417c5b6e24d9189c4e73 Reviewed-on: https://gerrit.libreoffice.org/58955 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-15convert ScChangeActionCellListEntry to std::vectorNoel Grandin
no need for a linked list where each cell contains a single pointer Change-Id: I5353b178ddf3c6a69762edc23612995efd81fb41 Reviewed-on: https://gerrit.libreoffice.org/58987 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14loplugin:returnconstant in ScXMLChartExportWrapperNoel Grandin
Change-Id: Ibf448058d5c67455a747a276717ba659559017bc Reviewed-on: https://gerrit.libreoffice.org/58957 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14ofz#7790 InsertMatrixFormula timeoutCaolán McNamara
Change-Id: Ic99e4db85495f7581ff09cbfcc7bf1f57b016709 Reviewed-on: https://gerrit.libreoffice.org/58972 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-14use std::unique_ptrCaolán McNamara
Change-Id: Ib76d6a82037e36a41cebdf86af9754a51aab213c Reviewed-on: https://gerrit.libreoffice.org/58968 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-14loplugin:returnconstant in ScInterpreterNoel Grandin
Change-Id: I2ba3fde098b082659656e6a21771495ec97775d1 Reviewed-on: https://gerrit.libreoffice.org/58956 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14loplugin:returnconstant in ScColumnNoel Grandin
Change-Id: I105d07da6e1a9259a7b833a1259c0e992e35a03d Reviewed-on: https://gerrit.libreoffice.org/58954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-14create appendCopy method in OUStringBufferNoel Grandin
so we can avoid temporary copies when appending a substring of an OUString to the buffer. I would have preferred to call the method just "append" but that results in ambiguous method errors when the callsite is something like sal_Int32 n; OUStringBuffer s; s.append(n, 10); I'm not sure why Change-Id: I6b5b6641fcb5b26ce2269f89ef06e03c0b6aa76f Reviewed-on: https://gerrit.libreoffice.org/58666 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-13Fix typosAndrea Gelmini
Change-Id: Ie3baa2f843a98c1edc523050db53beaa2c803394 Reviewed-on: https://gerrit.libreoffice.org/58801 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2018-08-13crashtesting: load of ooo47086-1.xlsCaolán McNamara
presumably since... commit df1d4bd528027c60bcab2f2e0a87303610fad326 Date: Sat Aug 4 20:10:55 2018 +0200 ScCompiler::IsString, pass down the string length if we know it reading the old code, it looks it would have returned true for this case of input of a bare " but change this to return false as that doesn't seem quite right for this case Change-Id: Id54ffe6440bb842d8103174edd6b99940ca5d142 Reviewed-on: https://gerrit.libreoffice.org/58889 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-08-12loplugin:constantparamNoel Grandin
Change-Id: I676a8408e97cc8134009f764736cad68513c89ad Reviewed-on: https://gerrit.libreoffice.org/58875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-12Use o3tl::temporaryMike Kaganski
Change-Id: Ifbe8de75aa0000eab9403b8e6366ecd927851c32 Reviewed-on: https://gerrit.libreoffice.org/58894 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-12Sort includesMike Kaganski
Change-Id: Ied47f42098eb7975340ba82406fefbeb0533d704 Reviewed-on: https://gerrit.libreoffice.org/58893 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>