aboutsummaryrefslogtreecommitdiff
path: root/source/es/basic
ModeNameSize
-rw-r--r--messages.po20892logplain
loud-provider-for-android'>feature/owncloud-provider-for-android LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/sc/source/core/tool/cellform.cxx
AgeCommit message (Collapse)Author
2024-11-22loplugin:unusedmethodsNoel Grandin
Change-Id: I24666a7746f8920ddf84731f204f3e1a5b9b0c85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177024 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-27add a visitor contraption to avoid Reference counting costsCaolán McNamara
brings my save times from 8.7s to to 5.85s Change-Id: I7f3ebbed78ee4d59f4ed9d04f1e35d2ea69a0c01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175689 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
2024-10-25speedup saving large XLS file with lots of query formula(2)Noel Grandin
reduce cost of OUString construction by avoiding initialising a temporary and then overwriting it. 12s to 10s Change-Id: I889152ba71947004ca7d5c96f073182c94d95ed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175539 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-25speedup saving large XLS file with lots of query formulaNoel Grandin
make more use of svl::SharedString instead of unnecessarily creating OUString that then need to be interned. We were spending all our time inside the the SharedStringPool::intern function. 20s to 12s Change-Id: I344f0acfd462fdb6d78e392881f066a56844fa94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175538 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-18make ScRange single-arg constructor explicitNoel Grandin
Change-Id: Ie24e1e601b639dd62dbb8a201378a970699b20ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170686 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-17loplugin:ostr in sc/../toolNoel Grandin
Change-Id: I04c41c79613397745a2e97c2e8a247e11f114c7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167767 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-03-23Related: tdf#160056 do calc NumberFormatting via ScInterpreterContextCaolán McNamara
and for the duration of Threaded calculation where there will be no new formats required we can drive number formatting with the unlocked RO policy. Change-Id: Ic0e449acdcf834bc569d13b4a984f13c55316801 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165160 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2022-09-20avoid some string refcounting with sheets with lots of conditional formattingNoel Grandin
Change-Id: Ibb2de1aa28a57748bede6085074f60af757ae5ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-18create getter for ScCellValue::mpFormulaNoel Grandin
so we can assert that it has the correct tag type Change-Id: Iab13a6d6ea1783c69395f06f28732769e5fe8b18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136059 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-17create getter for ScCellValue::mpEditTextNoel Grandin
so we can assert that it has the correct tag type Change-Id: I984c22ae2527d652f2d4194227dc1173793300c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136054 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-17create getter for ScCellValue::mpStringNoel Grandin
so we can assert that it has the correct tag type Change-Id: I8933919aefc2bb22694a283b54dc3de11d16e5a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-16create getter for ScCellValue::mfValueNoel Grandin
so we can assert that has the correct tag type Change-Id: I0d626130cb014e19239e88a6988018c83d061f68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136001 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-16make meType in ScCellValue privateNoel Grandin
as a first step to wrapping up the internals of this class and adding some asserts Change-Id: Ic13ddd917948dbf3fd6d73f44b8efcc727726baf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135994 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-06tdf#148383: Obtain start/end strings always in system localeDaniel Kamil Kozar
ScFillSeriesDlg always expects the strings describing the start and end values to be in the system locale. This change ensures that and fixes the bug where using non-locale-default data in the Fill Series dialog leads to an error. Change-Id: I25eafa2174294dc35a63473a54c529c2d7bd87ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132532 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2022-02-14Recheck modules s[a-c]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I867e1f7a2c44210de3281b36e22708a5d32ddb7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129476 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2021-11-23allow matching of empty cells as svl::SharedString (tdf#133804)Luboš Luňák
This may speed up some lookups. Change-Id: I13a39abc43c64eb758fa55a6cdbda3e83e179121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125743 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-11-23set empty value if not returning a shared stringLuboš Luňák
This is strictly speaking not necessary if callers would always initialize to nullptr, but I guess this is better. Change-Id: Ica88395e0f615afbd58efa71e5d64bfdd2a37319 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125734 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@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-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-09-21tdf#144253 tdf#144324 sc filter: use formatted values in filtersBalazs Varga
if the results of formulas are values. Followed up of 40acda4e78127fa9f513646ef210b074d40cf307 (Related: tdf#140968 avoid duplicated filter values) Change-Id: Ib396d2b7cc08ba41b5936a53a28b5e38bf678b3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121715 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-08-13split SvNumberFormatter into it's own headerNoel Grandin
so I can make changes without running into cyclic dependencies between header files Change-Id: I98a91c7cc66002ba745cdb8239e5cc267922a45c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120412 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-25tdf#140968 tdf#140978 XLSX import: fix lost rounded filtersBalazs Varga
if the stored filter values are in the visible cell format (e.g. rounded values) instead of the original (editing) values. Now AutoFilter popup window shows the items according to the visible cell format (e.g. 1.0 instead of 1.01 or 0.99), but still grouping them based on the "editing format" (e.g. not rounded values which visible during editing), i.e. there could be repeated values in the filtering conditions (e.g. two options "1.0" and "1.0" for 1.01 and 0.99). Note: Next step will be to group and filter based on the actual cell format, like MSO does, to simplify filtering of values rounded by the cell format (e.g. selecting the single AutoFilter condition "1.0" to filter both 1.01 and 0.99). Change-Id: I430da5e09794fc4ed8acf79b6485926f46b70277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112343 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-27tdf#42949 Fix new IWYU warnings in directory sc/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I217817e2e4a42b096f5a7fb6344568c10d69aab2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106078 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-09-24ScCellFormat::GetString never called with a null ScDocument*Caolán McNamara
and similar, allowing a few redundant null checks to be dropped Change-Id: Ice0d6d57df112a09d3e1af3d34126b3519529daf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103278 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-18ScCellValue::getString never called with a null ScDocument*Caolán McNamara
Change-Id: Idff982e715b012e35e0abd0b904f4b83d7f6f51a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103007 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-17ScFormulaCell always has a ScDocument&Caolán McNamara
allowing us to drop some checks of it against null Change-Id: I60235414e05f8d9c618ddbbf9b01501ef13303d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-03Make ImpSvNumberformatScan::GetColor constMike Kaganski
Change-Id: Idbcce18029944ab884cdde03e21190cbb574a00f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102005 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2019-12-07rename ScEditEngineDefaulter::SetTextCaolán McNamara
so its clear that it is not an override of baseclass EditEngine::SetText Change-Id: I85ee9c9b212fe9248fb7e5fcb1ec83679ffb633d Reviewed-on: https://gerrit.libreoffice.org/84553 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-09-26loplugin:constmethod in scNoel Grandin
Change-Id: I78c4fb4acf21756f91582caee5e30e3ad1fc2ae4 Reviewed-on: https://gerrit.libreoffice.org/79543 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-14cache cell positions when searching in calc (tdf#108347)Luboš Luňák
The document has a large number of rows, and mdds normally always searches from the first item when looking up the container position, which leads to a quadratic cost when searching the entire sheet. GetCellValue() already has a variant that caches the last position, so just use it (and make sure to invalidate if it's search&replace and something changes). Change-Id: I26da60cebf641e10ed92e548fe5f9016900d3cf0 Reviewed-on: https://gerrit.libreoffice.org/72290 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-10-08sc: speed-up: no usage of temp strings objectsSerge Krot
Change-Id: I7d9812672e4cbefd7e422b5c70b54ee3ea50df2d Reviewed-on: https://gerrit.libreoffice.org/61446 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-24consistently use sal_uInt32 for number formats in scNoel Grandin
instead of a mix of short/sal_uLong/sal_uInt32 Change-Id: Ie5bd26e1a6f716c0c4e174a6d560827084b3f421 Reviewed-on: https://gerrit.libreoffice.org/45159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: scStephan Bergmann
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2017-07-03Translate German comments and debug strings (leftovers in dirs sal to sc)Johnny_M
Translates leftovers found using a custom regex and manually checking the rest of the affected file. Additionally: - A few spelling fixes Change-Id: I2b83bd11adf520b90bb29c8ea624990759dad3c6 Reviewed-on: https://gerrit.libreoffice.org/39427 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-01-09New loplugin:externvar: scStephan Bergmann
Change-Id: I6f9df997a957a1fa49161add2adafe228d036a30
2016-11-16remove anything svHybridValueCell related, it's nowhere set anymoreEike Rathke
Change-Id: I9887d7ca83ffc012fec1a78ef9ef537d2188a7e3
2016-10-06Resolves: tdf#76836 use text format only for text contentEike Rathke
Numeric content is not to be formatted with the text format. Entering a value in such formatted cell still forces it to text content as usual and then it is displayed using the text format. The previous behavior displaying also numeric content using the text format was always wrong and neither Excel nor Gnumeric do it. A numeric content is displayed left aligned though, which also Excel does. Change-Id: I3038123b2bfdc4669a8f73840742da92a1df895d
2016-09-23convert formula error codes to scoped enumNoel Grandin
Change-Id: I5ff214bf1ec9031e30344bc125bc99916fd11bfb Reviewed-on: https://gerrit.libreoffice.org/28897 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-09-23perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 relatedEike Rathke
There were over 150 places in *::Notify() functions that did some dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast operations come with quite some cost, so avoid if possible. Specifically for ScFormulaCell::Notify() that created a bottleneck in scenarios where cells were notified that already handled a previous notification. In mass operations doing the dynamic_cast before it could be decided whether having to act on it or not this made 2/3 of all time spent in the Notify() call. To get rid of that rename/move SfxSimpleHint to SfxHint and let classes derive from SfxHint instead of SfxSimpleHint. This comes only with a slight cost that an additional sal_uInt32 is transported in such hints, initialized to 0, but this is neglectable compared to the huge gain. For the rare cases where a Notify() actually expects both, an SfxHint (formerly SfxSimpleHint) and a derived hint, this changed order of the dynamic_cast involved so the simple SfxHint::GetId() is handled last. Modules using such combinations can further optimize by treating the simple SfxHint::GetId() first once verified that none of the other derived hints use an ID not equal to zero respectively none of the ID values the simple hint uses. Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce Reviewed-on: https://gerrit.libreoffice.org/29205 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2016-03-25we already pass the ScRefCellValue as parameter, tdf#93405Markus Mohrhard
Change-Id: I27f7e8ffe93545fe872a0c5b64f26dc90cb70e6f
2016-03-25these two methods are identical copies, related tdf#93405Markus Mohrhard
This already gives a 15% improvement as we now only query the cell twice instead of three times. Change-Id: I2e0533f05ace6773ad0710b2c586ca325aeae91b
2016-03-03loplugin:unuseddefaultparams in sc (part2)Noel Grandin
Change-Id: I356a86bfca20cbf2c52185697042dce5237e847d
2015-12-15Bin silly 'STATIC DATA' commentsTor Lillqvist
Change-Id: I50e3772b7b479d2cf1eb644c7334d0f987874ccb