summaryrefslogtreecommitdiffstats
path: root/sc/inc
Commit message (Collapse)AuthorAgeFilesLines
* Replace list by vector in accessible part of scJulien Nabet2017-11-191-3/+1
| | | | | | | | | | + remove useless typedef following https://cgit.freedesktop.org/libreoffice/core/commit/?id=65e578640f0258768a9253389356dbc63c845b7e + use for range loops Change-Id: I9b69acf4c0b783ee8db34791b1044cbebb68da9f Reviewed-on: https://gerrit.libreoffice.org/44919 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* coverity#1422192 include param field in string fieldEike Rathke2017-11-171-1/+1
| | | | Change-Id: Ia2ef910fd9b4b74c8cf227717fde93c562bbb1b6
* Straighten use of MAXSTRLEN to be maximum string lengthEike Rathke2017-11-161-2/+2
| | | | | | | | ... plus limiting 0-character, and not buffer length in (only) some cases where max len then was MAXSTRLEN-1, accompanied by a mix of >= and > comparisons. Change-Id: I5b8452db52b1d464eb1410e31990043f7997af20
* tdf#113768 Fix opposite argument description for Calc function VDB.Winfried Donkers2017-11-131-2/+2
| | | | | | | | | | Also, use self-explaining variable name for argument NoSwitch. Added use of argument NoSwitch to unit test document. Change-Id: I801d4dbd489898b28543e0eb46f74717671ea03a Reviewed-on: https://gerrit.libreoffice.org/44647 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
* Replace list by vector in scmod (sc)Julien Nabet2017-11-111-2/+2
| | | | | | | | Change-Id: I5171de5a13861d36d30f8489b7d83768e8c2ac25 Reviewed-on: https://gerrit.libreoffice.org/44622 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* loplugin:unusedmethodsNoel Grandin2017-11-102-8/+0
| | | | | | | Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454 Reviewed-on: https://gerrit.libreoffice.org/44553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* ScImportStarCalc10 appears uncallableCaolán McNamara2017-11-081-1/+0
| | | | | | | | | | | | | | | | | | I can't see a mention of "StarCalc 1.0" anywhere in our code which might appear here as a filtername last mention of something like it is... commit cf8f6fe1f9d65eedbc6f4d65ce0fa88831830966 Author: Michael Stahl <mstahl@redhat.com> Date: Tue Feb 5 15:49:26 2013 +0100 officecfg: remove references to binfilter formats Change-Id: Ia6f9ab89489e33ca3680c150fd896035b8dee491 Reviewed-on: https://gerrit.libreoffice.org/44426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
* ofz#4052 limit listener range to actually available sheetsEike Rathke2017-11-061-0/+18
| | | | | | | | ... instead of an arbitrary reference range read from a binary file format, here 4k sheets resulting in >3GB allocated listener memory. Change-Id: I629297f4249fdf16a0ede098b63d9648fda69ac3
* Resolves: tdf#111428 swap (only) ScColumn::mnBlkCountFormulaEike Rathke2017-11-031-2/+0
| | | | | | | | | | | | | | | | commit 423df1fa929784c14e3a133c06468589fe9269cd Date: Thu Nov 2 12:53:14 2017 +0100 Resolves: tdf#111428 implement CellStoreEvent::swap() in ScColumn::SwapCol() erroneously swapped also the CellStoreEvent's ScColumn* but of course the CellStoreEvent stays at its ScColumn and is not swapped with the CellStoreType. So swap only the mnBlkCountFormula that CellStoreEvent::mpCol accesses. ASAN rightly complained about heap-use-after-free. Change-Id: Ic44fed96c49bea7365bf1200e06788860966795c
* Resolves: tdf#111428 implement CellStoreEvent::swap() in ScColumn::SwapCol()Eike Rathke2017-11-021-0/+2
| | | | | | | | | | | | | | | | | CellStoreEvent remembered the original ScColumn* and corresponding ScColumn::mnBlkCountFormula, hence after inserting a column to the left the quick check of ScColumn::HasFormulaCell() whether there are any formula cells worked on the swapped in column (originally the one to the right) that happens to be empty in the scenario. Things worked correctly by accident if the next column to the right already contained a formula cell. Regression from commit e57a5905fb2975307af654710430d0a876dbd061 Date: Sat Jul 16 20:01:48 2016 -0400 Change-Id: If993856ceee657736f516a81c293506041a6b7eb
* loplugin:constantparam in scNoel Grandin2017-10-312-9/+5
| | | | | | | Change-Id: I2a55811f1741341c30f84ea3d010cc12eb6f2df9 Reviewed-on: https://gerrit.libreoffice.org/44086 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Handle decimalSeparatorAlternative in ScColumn::ParseString(), tdf#81671Eike Rathke2017-10-271-1/+2
| | | | Change-Id: I9f708b28ee5fdb23217e75386a64ab86dacfd3c4
* loplugin:finalclasses in scNoel Grandin2017-10-273-12/+7
| | | | | | | Change-Id: I83438eaf2c1045a9212a63ed9fd8b3371e9b06aa Reviewed-on: https://gerrit.libreoffice.org/43896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* loplugin:includeform: scStephan Bergmann2017-10-2318-19/+19
| | | | Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
* Move GetElementsMax() to .cxxEike Rathke2017-10-231-17/+0
| | | | | | Nothing else is using it so we don't need it in .hxx Change-Id: I0df879a7be2c56a70c30f50f44a92bb527b5a9ed
* overload std::hash for OUString and OStringNoel Grandin2017-10-2313-20/+19
| | | | | | | | | no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* coverity#1401307 document checked 'Uncaught exception'Caolán McNamara2017-10-212-2/+5
| | | | | | | | | | | | markup std::unique_ptr where coverity warns a dtor might throw exceptions which won't throw in practice, or where std::terminate is an acceptable response if they do Change-Id: Icc99cdecf8d8b011e599574f0a05b59efd1c65c2 Reviewed-on: https://gerrit.libreoffice.org/41561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
* use rtl::Reference in sc/../uno/*Noel Grandin2017-10-182-10/+10
| | | | | | | | | instead of manual reference counting Change-Id: I60798316f2b63800a9f539cb719305c00d91ecc5 Reviewed-on: https://gerrit.libreoffice.org/43491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* remove unused ScCompressedArray constructorNoel Grandin2017-10-171-8/+0
| | | | | | | Change-Id: Ida4d8abe50885d10288169024b597fa946d1c26b Reviewed-on: https://gerrit.libreoffice.org/43438 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Simplify ScCompressedArray constructorNoel Grandin2017-10-171-8/+3
| | | | | | | | | nobody is setting a custom delta Change-Id: I5dd9ac691fb226697eb8cb2b6b0b673552a4f049 Reviewed-on: https://gerrit.libreoffice.org/43437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* dyncolcontainer: use ScBitMaskCompressedArray for pColFlagsNoel Grandin2017-10-171-1/+1
| | | | | | | Change-Id: I5df10fe7477e05424eb5e8a3544073a264568aac Reviewed-on: https://gerrit.libreoffice.org/43409 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* dyncolcontainer: use ScCompressedArray for pColWidthNoel Grandin2017-10-172-3/+28
| | | | | | | | | | and enhance ScCompressedArray with an iterator to avoid O(n^2) "for" loops. Change-Id: I7d8fda8306b0a5c73bf373b3991e1c07271bc9d9 Reviewed-on: https://gerrit.libreoffice.org/43387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* adapt dataprovider to the requirements of the new UIMarkus Mohrhard2017-10-121-0/+9
| | | | | | | Change-Id: If10a68a27591f3195ef85c21ea98324903819b36 Reviewed-on: https://gerrit.libreoffice.org/43256 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* use std::swap instead of own implementationMarkus Mohrhard2017-10-101-4/+1
| | | | | | | Change-Id: Iabc0eee868a2ad5623a1ac39b26bb2bc5981e829 Reviewed-on: https://gerrit.libreoffice.org/43249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
* Revert "check for unnecessary DLLPUBLIC annotations"Stephan Bergmann2017-10-041-1/+1
| | | | | | | | | | | This reverts commit a599eeab786ecbe1b5b6509e3c792e5c1ba31248, plus follow-up fa4431449d0306e8179f53a2a69c549800bd24bd "Avoid bogus loplugin:dllmacro 'unnecessary *DLLPUBLIC declaration ...'". See (abandoned) <https://gerrit.libreoffice.org/#/c/42983/> "loplugin:dllmacro: Handle implicit member functions" how this would have needed to be extended to give consistent results across Linux and macOS, but then would have started to remove DLLPUBLIC from entities that apparently need to at least have default type visibility on macOS and started to make tests fail.
* lok - sc: lift row limit to 500kMarco Cecchetti2017-10-021-1/+1
| | | | | | | | | | Due to previously intruduced optimizations, it is safe and fast enough to navigate through a 500k rows speadsheet. Change-Id: I865d0b60629b5bbf796e9e48df6ff21242a13e5a Reviewed-on: https://gerrit.libreoffice.org/40454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
* lok: sc: overlays and edit view misplaced by other view actionsMarco Cecchetti2017-10-024-0/+11
| | | | | | | | | | | | | | | The edit view, the cell cursor and the cell selection overlays become misplaced when another user inserts, deletes or resizes a row. The same is true for columns. The solution takes care of the current tab each view is displaying and of undo/redo actions. Change-Id: I24c94f774f3b18028c9356a904e1b14b07c5c61a Reviewed-on: https://gerrit.libreoffice.org/40016 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
* Bin duplicated forward declarationTor Lillqvist2017-10-021-1/+0
| | | | Change-Id: Id5fda192de625c5fdfd6f9dce3ebcd68e06f1c7a
* Replace list by vector in macromgr.cxx (sc)Julien Nabet2017-10-011-1/+1
| | | | | | | Change-Id: I5b57d4f4a1e0c68fdc56d84392f4b1472a67e82b Reviewed-on: https://gerrit.libreoffice.org/42992 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
* ofz#3487 further limit ScMatrix elements allocationEike Rathke2017-09-291-10/+12
| | | | | | | | | | To 85M elements per matrix. The effective allocation depends on data types and distribution and is not statically predictable here. Previous limit (allowing 128M elements) in the fuzz case allocated 6.5GB temporarily, it now fails early with matrix size error. With the case's string data types and changed input ranges probably still 4GB could be allocated. Change-Id: I20ab3cf22705bf022f1c8c8e55b1c412380915dd
* check for unnecessary DLLPUBLIC annotationsNoel Grandin2017-09-291-1/+1
| | | | | | | | | on classes which are fully defined in a header file Rename the dllprivate plugin to dllmacro and add the functionality there. Change-Id: I4581d551c46a8f61213d95973f323359d08278d8
* -Werror,-Winconsistent-missing-overrideStephan Bergmann2017-09-251-1/+1
| | | | Change-Id: I1d6d315cea33ba19a7d61f532c9d968d582b476f
* FormulaTokenArray::Clear() virtual, ScTokenArray::Clear() overridesEike Rathke2017-09-251-1/+1
| | | | | | A sliced Clear()/ClearScTokenArray() was never intended. Change-Id: I25df3fa8829f6bc8f1dee6ef0d27b28491d6a5c3
* Clarify comment of "copy"-ctor and operator=()Eike Rathke2017-09-251-2/+4
| | | | Change-Id: I64b5c1384c116ac659fe674adcda142eddf79d5e
* Rename GetSelectEntryCount -> GetSelectedEntryCountSamuel Mehrbrodt2017-09-251-1/+1
| | | | | | | Change-Id: I405b347b404ed0acb3b6a0204e0b914a7698ce25 Reviewed-on: https://gerrit.libreoffice.org/42284 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* Fresh run of bin/update_pch.shMike Kaganski2017-09-224-70/+132
| | | | | | | Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
* tdf#112501: Pivot table: popupbuttons are placed on wrong cellsTamás Zolnai2017-09-211-0/+2
| | | | | | | | | ...imported from XLS Change-Id: I45bc4a0182e6a62471bc02ac1bca31f9735e6566 Reviewed-on: https://gerrit.libreoffice.org/42508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* Rename GetSelectEntryPos -> GetSelectedEntryPosSamuel Mehrbrodt2017-09-211-1/+1
| | | | | | | Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4 Reviewed-on: https://gerrit.libreoffice.org/42283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* Rename GetSelectEntry -> GetSelectedEntrySamuel Mehrbrodt2017-09-211-2/+2
| | | | | | | Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce Reviewed-on: https://gerrit.libreoffice.org/42282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* Add debugging output operator<< for ScRangeTor Lillqvist2017-09-141-0/+19
|
* convert ScAttrArray to use std::vectorNoel Grandin2017-09-142-20/+20
| | | | | | | | | | | | instead of re-implementing it ourselves. Which lead to some changes in Xf::AttrList since the import process wants to donate it's array to ScAttrArray. Change-Id: I176148131fb5f163e25691ad690f63398ba1a556 Reviewed-on: https://gerrit.libreoffice.org/42205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* tdf#107267: Fix grand total calculationJean-Sebastien Bevilacqua2017-09-131-1/+1
| | | | | | | | | | | | | To fix the grand total calculation, we add another step. This step loop through all row to find the min and max of each value. These min and max are then used by the grand total. Patch by Linagora Change-Id: If3200840764d0ad9cb63231ac9f67b5d5ed197f1 Reviewed-on: https://gerrit.libreoffice.org/42042 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
* rename ScAttrEntry.nRow to nEndRowNoel Grandin2017-09-131-7/+8
| | | | | | | | | since it's the last row that the pattern applies to Change-Id: I80d6d5787768b1e98e958d7adc4c13c37c560ccd Reviewed-on: https://gerrit.libreoffice.org/42211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
* Prefix one more member of ScDocument: pDrawLayerTor Lillqvist2017-09-121-3/+3
| | | | Change-Id: I8b2fdca8a58db6c6633d7708ed42ca218799c53b
* Prefix one more member of ScDocument: pVirtualDevice_100th_mmTor Lillqvist2017-09-121-1/+1
| | | | Change-Id: Idf82b514eac385ff3e9f9dc373d0e7fd41d00819
* Prefix one more member of ScDocument: pPrinterTor Lillqvist2017-09-121-1/+1
| | | | Change-Id: I9a67be61661f90633398a303ee467cafa7bdd548
* tdf#112337: Pivot table: empty / blank item is not imported from XLSTamás Zolnai2017-09-121-2/+2
| | | | | | | Change-Id: I7ed9e5cacdf6df80b2f100d040cbbeda33b085d3 Reviewed-on: https://gerrit.libreoffice.org/42181 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* tdf#112278: Pivot table: filtering of non-string fields is not exported to XLSTamás Zolnai2017-09-091-0/+2
| | | | | | | | | | | | It is needed to use the right string representation of field value. During export this representation is available directly, next to the actual value. During import we can use the number format attached to the corresponding pivot field. Change-Id: Ie8f731f6c72d7f55f43c318e52d63dc4e993d9c0 Reviewed-on: https://gerrit.libreoffice.org/42069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
* sc-perf: do not add a million empty filter entries just to sort and discardEike Rathke2017-09-084-6/+46
| | | | | | | | | | | | | | | | Which can happen if an (anonymous) database range as filter range was selected to span an entire column of which most (the tail) is empty cells. The entries are processed to be unique anyway. This significantly shortens the time to display the filter dialog. Happened with attachment http://bugs.documentfoundation.org/attachment.cgi?id=136074 of bug https://bugs.documentfoundation.org/show_bug.cgi?id=112258 Change-Id: Ia169911d6f23611a3b3ecbf291757465f1998210 Reviewed-on: https://gerrit.libreoffice.org/42118 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
* tdf#107135 Add missing ODFF function SEARCHB.Winfried Donkers2017-09-072-0/+13
| | | | | | | Change-Id: Ic72693ad8f33fb94c171751f82680eabad1d3d6d Reviewed-on: https://gerrit.libreoffice.org/41900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>