summaryrefslogtreecommitdiff
path: root/sc/inc/tokenarray.hxx
AgeCommit message (Collapse)Author
2017-04-30More fine-grained disabled vector states.Kohei
Useful for group formula logging. Change-Id: I40a02f0aa88d7c63a641f2a79956236d0db39f15 Reviewed-on: https://gerrit.libreoffice.org/37088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-08-29loplugin:countusersofdefaultparamsNoel Grandin
Change-Id: I26f46ddac3d7d810ebfa1c3e7f1a77427369828e Reviewed-on: https://gerrit.libreoffice.org/28451 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-22sc: remove unused ScCloneFlags: Adjust3Drel and NoCaptionJochen Nitschke
ScTokenArray::ReadjustRelative3DReferences() is unused now and is removed too Adjust3Drel got obsolete with commit 3f41b12c6685b82b5c2674bd9b9d5991adebeaf9 SwapRow() is no more! NoCaption got obsolete with commit c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094 remove mpNote from ScBaseCell Change-Id: I0e21a80ad06b2f0cb1346cf2eeeabbb7cce9d6e9 Reviewed-on: https://gerrit.libreoffice.org/27439 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-06-14intern SharedStringEike Rathke
Change-Id: Ic8e6d3595002094792462b585d427f58c5c84156
2016-06-14explicit svl::SharedString(const OUString&) ctorEike Rathke
... to prevent accidental surprises. Not interned shared strings constructed from OUString have mpDataIgnoreCase=nullptr so can't be used for case insensitive comparison. Change-Id: I03323354298a73e93b18d2796ec447c072fdefa5
2016-05-31tdf#100160 - Changing OpenCL state doesn't update sheetMarco Cecchetti
now we re-check for vectorization state of formula token each time OpenCL is enabled or disabled Change-Id: I652397dd154f5fbf788cb511c70e53a47cc94293
2016-05-26loplugin:unusedreturntypesNoel Grandin
and clean up the python script Change-Id: I0a7068153290fbbb60bfeb4c8bda1c24d514500f Reviewed-on: https://gerrit.libreoffice.org/25439 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-24tdf#75372 rework sheet-copy names for converting global names to sheet-localEike Rathke
This during copying a sheet copies global names that from a copied formula cell reference the copied sheet and converts the copied global names to sheet-local names. References to the original sheet are updated to point to the new sheet. It works for names used in formula cells copied but needs enhancement to pick up nested names, i.e. names used in names that do not reference the sheet but the nested name does. Change-Id: I1aa16cb28c9f7b3581bec289435492c21e6fcd73
2016-03-24loplugin:constantparam in scNoel Grandin
Change-Id: I8608a6cb47972e9b838cc5ea431863348758ded0
2016-03-19adjust sheet references when copying sheet-local named expressionsEike Rathke
... so references to the local sheet point to the new scope's local sheet and not to the originating sheet. Change-Id: I7f33f4e9b379ec01d6c2587e92ffe851892fc32d
2016-03-18Resolves: tdf#96915 implement other-sheet-local named expressionsEike Rathke
Change-Id: I0d62536caa6eb455473a755067abc585662cd9a5
2016-01-15loplugin:unusedmethods unused return value in scNoel Grandin
Change-Id: I3ccc98d2e042120093e2e8508518681588692393
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-07-22loplugin:unusedmethods scripting,scNoel Grandin
Change-Id: I0016aefce1aad3a89bd23dcec6fbab58a7c844d7 Reviewed-on: https://gerrit.libreoffice.org/17263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-07introduce ScTokenArray::AdjustReferenceOnCopy(), tdf#92468Eike Rathke
Change-Id: I0a7ac0d9d10e96223cd5f095a771aa6f9d271417
2015-06-23in OOXML save references of named expressions with col,row=0,0 base positionEike Rathke
Saving relative references of named expressions to OOXML never worked, upon reload they pointed to a different position offset by the value of the original base position. This at least saves positive relative references correctly, while generating #REF! for negative offsets which is slightly better than having them point to a wrong location and silently calculate different values.. Also, this is a prerequisite for TableRef ThisRow references in named expressions to be saved correctly in A1 notation, which results in a relative row 0 value. Change-Id: I3734f910794ceab4b9224b214ad11c64d1d18e67
2015-06-22TableRef: inherit RelName in generated reference if named expressionEike Rathke
Change-Id: I67621e59c6e20e7f3b5101772b5d274d8c745ce9
2015-03-10Fix issue in re-use of ScTokenArray objects from a TokenPoolTor Lillqvist
The TokenPool::operator[] is used to initialise and take into use an object from the pool. Which is a fascinating thing as such and probably not entirely in good style. Anyway, the objects in the pool are of type ScTokenArray, a class derived from FormulaTokenArray. The operator[] called the FormulaTokenArray::Clear() function to initialise the object. This left the fields added in ScTokenArray uninitialised, having whatever value the previous use of the object had set. Which of course is bad. In practice, this showed up in the handling of formulas in the .xls input filter. If an earlier (or the first?) formula had happened to be one for which we don't want to use OpenCL, the meVectorState of its ScTokenArray object in the pool had been set to FormulaVectorDisabled. When the same pool object was later re-used for another formula, it kept that same meVectorState, even if there was no reason to. Thus formula groups that should have been OpenCL accelerated weren't. This can have a significant impact on performance of document loading and recalculation for large documents. I added a function to ScTokenArray to clear (initialise) such an object, both the FormulaTokenArray part and the ScTokenArray-specific part, and call that instead. This fixes the issue. I named the added function ClearScTokenArray() to make it clear that it is a separate function. Sure, possibly Clear() should be made into a virtual of FormulaTokenArry and overridden in ScTokenArray, and the overriding Clear() would first call the base class's Clear(). But I can't be sure that there aren't other calls of FormulaTokenArray::Clear() that *must* mean the base class one. Better safe than sorry. And of course, I did *not* want to name the function in ScTokenArray also "Clear()", like in the base class, without it being virtual. That is horrible style in my opinion, even if there certainly is precedence for such even in the very same classes, i.e. the Clone() function... Change-Id: I0e0e13e5ca705603005a1e0a46866f095cd2ac4d
2015-02-26split formula grouping for reference edge expansion, tdf#81659 relatedEike Rathke
Edge expansion may change expressions individually, which must be split off the group. Change-Id: Id4328bd8c42f2ff9f83d2edc845537971f3a39d3
2015-02-12tdf#89281 fix performance regression of XLS import - cleanupLászló Németh
Change-Id: I6d7f279732d9992d584aab96c3a747d6e6130147
2015-02-10tdf#89281 fix performance regression of XLS importLászló Németh
The fix for Bug 76611 caused ~20% performance loss in XLS import. With optional cloning of ScTokenArray of the shared XLS formulas depending on the need of address wrapping, it is possible to gain back near the original performance. Note: The original patch for Bug 76611 has already got an unit test, too (see wrapped-refs.xls), and that unit test works with this improved patch, too. Change-Id: Ibfb59d1543ef9c4b8a075d5c4e37f77ab451aaa0
2015-02-04Check number of cells referenced by group instead of group sizeTor Lillqvist
Put using it in #if 0 for now, though. This reverts commit 2021275f8fc33d9917d5fef58959a95da1dc7e6f. Change-Id: Ia6541df12ee97747badbbedd758873688190b00c
2015-01-07Revert "Check number of cells referenced by group instead of group size"Tor Lillqvist
This reverts commit cc4dbc0c4613b169045341d1f02bc4c47a407fa0.
2014-12-19Check number of cells referenced by group instead of group sizeTor Lillqvist
It's more relevant when deciding whether to use OpenCL or not. Note that we won't use OpenCL for a single formula cell, no matter how large a calculation it invokes (like =SUM(A1:A1000000), for instance), as a single cell is not a group. Change-Id: I66b03c197431c2b4cef96f46b010d99d3e0624fc
2014-11-25remove boost/unordered_map.hpp include from types.hxx.Kohei Yoshida
types.hxx is included by pretty much everyone inside sc. Let's not stick a boost header in there... Change-Id: Iaf2aa9e13d0e02437bcd9e71a0143432abfa0a7c
2014-11-25fix fdo#79441 again and keep references to other sheets during sortEike Rathke
... also if other references are not updated. References to other sheets are never to be treated as relative during sort, they are always absolute, even if they have relative row/column part references. Broken again during the big sort mess. Even if there was a unit test, which didn't help as it got disabled / adapted to the change.. Change-Id: Ic0e61c5e1cb0728e20725c29e450ab0eb55c3305
2014-10-23Remove ScToken from the formula::FormulaToken hierarchyStephan Bergmann
...to keep UBSan from complaining about illegal downcasts from FormulaToken to ScToken (which were practically harmless, given that ScToken did not add any data members). Change-Id: I8fdc026eec363442cc4b720b71d65c972b4a4446
2014-07-31fdo#78555: Retain formula results when moving a range of cells.Kohei Yoshida
* No need to re-compile RPN token array on reference change alone. We do that when the formula contains one or more names that have been updated. * Adjust undo code to get it to work without relying on ref undo document, which would cause the token arrays to be unnecessarily recompiled. * Whatever else need to be changed in order to pass all unit tests. Change-Id: I99e86d23320aca8900fef011da23a9d34e42751e
2014-07-13fdo#81309: Adjust references during sort.Kohei Yoshida
Change-Id: I2b98610f6b774400ecfaffe2905201c27fcab33f
2014-06-25remove whitespaceMarkus Mohrhard
Change-Id: Ib15413e73409cc33de01fa92a47b9d1237cfc4b2
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-05-21ODS load perf: transfer ownership of the ScTokenArray to save cycles.Michael Meeks
Add API to wnsure we don't end up allocating 32k bytes of tokens for each ScFormulaToken, as happens when you Add a token to a new empty ScTokenArray. Change-Id: Ib12a3065eb513243a2146ebb009fbaa650385dd9
2014-05-11fix-includes.pl: scThomas Arnhold
Change-Id: Iade3fedac5d2f8e978b7dd9c30f001d7d1564946
2014-05-01fdo#78079: Re-work sort by column to get it to do the right thing.Kohei Yoshida
Also fixed reference update problem. Change-Id: I06e6115ef969a011fdd5c92d5eb1927fb7ae789b
2014-04-25fdo#76611: Wrap reference addresses at max boundaries.Kohei Yoshida
When importing shared formula tokens. Change-Id: I7e1a05a78c3a93330476516e0459cffb668e3f66
2014-04-19fixincludeguards.sh: scThomas Arnhold
sorry, huge one...
2014-04-14fdo#76294: Intern strings in AddFormulaToken() as well.Kohei Yoshida
And a whole bunch of changes needed to make that happen. Change-Id: Idd98fbc99322c0d72fb0a7848d89cb1a6abc88b6
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-03-25fdo#74322: Handle moving of named ranges correctly.Kohei Yoshida
But named ranges are adjusted if and only if the references are absolute. Change-Id: I6c5287b413884b045f1a798c6c6683aa17863f24
2014-03-15fdo#71491: Adjust reference during undo of drag-n-drop of cell range.Kohei Yoshida
Also with this commit, the signature of SvtListener::Notify() changes, by dropping the first argument which nobody uses. This change was necessary in order to call it directly without needing to pass any broadcaster instance. Change-Id: I6a1e97f0fb1e070d1d8f7db614690b04c9e8024e
2014-03-12fdo#75977: Clear sheet deleted flags for affected references when undoing.Kohei Yoshida
This will allow formula cells to restore deleted references when they get recalculated. With this change, SetDirty() that previosly took no argument has been renamed to SetAllFormulasDirty(), and it now takes one argument that stores context information. Change-Id: If0de5dc1737a2722b6d61a87644b10a4f921edc5
2014-02-15fdo#63154 Remove unused solar.h reference in scAlexandre Vicenzi
Change-Id: I160f7af515d0a42f20fbc694fff7f39567ebeec5 Reviewed-on: https://gerrit.libreoffice.org/8062 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2013-11-14Create string from token array directly from ScTokenArray. Still WIP.Kohei Yoshida
And make it re-entrant for thread safety. This method should not modify the internal state of the token array object. The one with ScCompiler is not re-entrant. Still some way to go. Change-Id: I06de3637341727aef0963dddfb98527f415bf7fa
2013-10-11Make the same change to the orcus interface & remove unused methods.Kohei Yoshida
Change-Id: I1263026133b694e531c0a99b16d622e1ae12db48
2013-09-07iString to OUString in some calc core codeMarkus Mohrhard
Change-Id: I25fc70cfd01f5ad25f7362157796d3ddf06139e1
2013-08-12Collect all boundaries at which to split the formula group.Kohei Yoshida
Change-Id: Ic78d7a06991b983e625b161f11fbbabce02334f3
2013-08-12Map shared formula from xls to formula groups, and share the tokens as well.Kohei Yoshida
No more mapping to range names. Change-Id: Ic43b6ef35a91fe4d6fff748ebc22969ba4e036db
2013-07-30Adjust named range references on sheet move.Kohei Yoshida
Change-Id: I3b20f79d9c2f373c93a34ccdb308c6d5c09f69e7
2013-07-30Update range names on sheet deletion.Kohei Yoshida
It works fine with live calc instance, but somehow fails in unit test. Change-Id: Ie60774b4f1f8391801e0d9358f6cca78d8e52397