summaryrefslogtreecommitdiff
path: root/sc/inc/recursionhelper.hxx
AgeCommit message (Collapse)Author
2020-06-22failed cell dependency check should not set invalid values (tdf#132451)Luboš Luňák
Calc's dependency check done before parallel formula cell group calculation tries to ensure valid cell values for all the dependencies of the group's cell, and if it detects a problem such as a cycle it bails out. But since ScFormulaCell::Interpret() simply bailed out without doing anything, other cells could use that cell's possibly incorrect value for their calculation and get their dirty flag reset. This fix adds a flag to mark that bailing out is in progress, which ensures the bail-out is short-circuited and no cell values are set. Change-Id: Ia93c70d456682e19ce533abd2cf65ce35ffed9ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96838 Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Tested-by: Jenkins (cherry picked from commit e1b6dcc97d6b5ff15b2e9341d3943ffc05aa3236) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96802 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2019-11-07Fix typoAndrea Gelmini
Change-Id: I627e094a8c8565f29fa20cca288adb81b5a4fbd0 Reviewed-on: https://gerrit.libreoffice.org/82189 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-11-07tdf#124270 : improve formula-group cycle detectionDennis Francis
When a cycle of formula-groups is detected, do not conclude that there is a circular dependency of cells. Only mark the cells with Err:522 when all formula-groups in the cycle have cleanly backed off from the dependency evaluation mode. This commit also fixes places where we overlooked to back-off from dependency evaluation mode on detection of a cycle of formula-groups. Additionally mark formula-groups with self references as "part of cycle" by setting mbPartOfCycle. Unit tests for all these fixes are in a follow-up commit. Change-Id: I57a88bbc88adf177d49768a5d4585b3e53729aea Reviewed-on: https://gerrit.libreoffice.org/82074 Reviewed-by: Dennis Francis <dennis.francis@collabora.com> Tested-by: Dennis Francis <dennis.francis@collabora.com>
2019-10-01Thread a group of formula-groups together if possibleDennis Francis
Just before about to thread a FG, look to left and right for "mutually" independent FG's with some restrictions and thread this group of FG's together treating it as a single but longer computation load. For now the restrictions are :- All formula-groups in a FG "group" must have :- 1. Same length 2. Same relative position. 3. Same weight. This is very helpful in cases similar to the below : There are lots of (say 32) consecutive formula-groups all with same "small" length (say 8) and same weight. By conventional formula-group-threading the speed-up is limited to 8x even if we have a 256 core processor, but with this threading-multiple-formula-groups patch (in this case) we can get a speed-up of 256x provided we have a >= 256 core machine. So effectively with this patch the speed-up is now only limited to the number of cells in a range consisting of mutually indepdendent formula-groups rather than number of cells in each formula-group. Change-Id: Ib25b5abbb583fa207e8befff9a908d14313f3d51 Reviewed-on: https://gerrit.libreoffice.org/79485 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.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>
2018-11-14$SC_FORCE_CALCULATION to force Calc use opencl/threads for everythingLuboš Luňák
So that e.g. unit tests can be easily run with OpenCL forced. This forces even single cells to be evaluated using the forced method (many correctness tests are just a single cell which normally would not be used for grouped calculation). Change-Id: If5c6e77a6e0d8696d5416d760cf5e47b8acf3d27 Reviewed-on: https://gerrit.libreoffice.org/63188 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-10-15loplugin:constfields in scNoel Grandin
Change-Id: If326175d571d15752efd1b63df45b2bc785f7541 Reviewed-on: https://gerrit.libreoffice.org/61653 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-07tdf#42949 Fix remaining IWYU warnings in sc/incGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. With this patch, find-unneeded-includes gives no more problems Change-Id: I24e62be7a387d7fd97a36f54eed0ba9d83ddaf0c Reviewed-on: https://gerrit.libreoffice.org/58667 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-06Generalize FG cycle detection for...Dennis Francis
...cycles involving a mix of formula-groups and plain formula-cells which are not grouped. This fixes a crash in tdf#104213/1 Change-Id: I63b8b7379e4e5eaf322a3318f061a9e5fbc931ef Reviewed-on: https://gerrit.libreoffice.org/57031 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-06-21Do dependency computation checks for OpenCL and...Dennis Francis
software interpreter like in CPU threading. This patch also reworks the cycle detection to make it more robust. Since the dependency computation also does cycle detection, there is no need to disable group-calc(threaded/OpenCL/SW Interpreter) for non-leaf nodes in recursive interpret. The rework of cycle detection ensures that it fixes tdf#95748 correctly. Change-Id: I460addb768eedc0914491a3d24ae7220c3afbb20 Reviewed-on: https://gerrit.libreoffice.org/55665 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins
2018-05-24Calc threading : Check for "self" references...Dennis Francis
...on indirect dependencies too. Here a self reference to any formula-group means if there are any references in a formula (of the formula-group itself or any of its dependencies) that points to any element inside the formula-group. If there are any self-references, then that formula-group can't be computed in parallel. For example, with this patch we can detect the following case:- Suppose the formula-group that we want to check is: "=(F2+G2-10)*10.0" spanning A2:A100. Let the formula-group starting at F2 be "=A1*0.1-10". The indirect dependency formula-group starting at F2, references back the elements of our original formula-group at A2. This makes the F.G at A2 unsafe for parallel computation. Concretly, this patch fixes a recalc crash on tdf#63638/1 Change-Id: I7b999a34571b191d2f70da6a3831f78b24a6b0a7 Reviewed-on: https://gerrit.libreoffice.org/54433 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-04-14loplugin:passstuffbyref in scNoel Grandin
Change-Id: I75c483972db787ea9c941eaac0df023f1929b09c
2014-04-19fixincludeguards.sh: scThomas Arnhold
sorry, huge one...
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>
2012-12-04re-base on ALv2 code. Includes:Michael Meeks
Patches contributed by Herbert Duerr i#118735 prevent endless loop if vlookup/hlookup doesn't find anything http://svn.apache.org/viewvc?view=revision&revision=1239673 Patches contributed by Andre Fischer remove lp_solver http://svn.apache.org/viewvc?view=revision&revision=1199180 i#118160: Added external CoinMP library. http://svn.apache.org/viewvc?view=revision&revision=1233909 Patches contributed by Armin Le-Grand i#118485 - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 i#118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 Patches contributed by lihuiibm i#108860 - Fix range validation. http://svn.apache.org/viewvc?view=revision&revision=1242846 i#118954 Chart data will lost after copy to different file http://svn.apache.org/viewvc?view=revision&revision=1301345 Patches contributed by Ariel Constenla-Haile Fix Linux build breaker: extra qualification on member http://svn.apache.org/viewvc?view=revision&revision=1301591 i#118696 - i#118697 - Fix some Sheet Tab Color API issues http://svn.apache.org/viewvc?view=revision&revision=1225428 i#118697 - Fix uninitialized variable http://svn.apache.org/viewvc?view=revision&revision=1225859 i#118771 - ScUndoImportTab should preserve tab background color http://svn.apache.org/viewvc?view=revision&revision=1230356 i#118921 - Repaint linked sheet tab background color after updating link http://svn.apache.org/viewvc?view=revision&revision=1245177 i#118927 - Undo/Redo "Update Link" does not reset sheet tab color http://svn.apache.org/viewvc?view=revision&revision=1245241 i#118747 - Copy tab color when transferring sheets across documents http://svn.apache.org/viewvc?view=revision&revision=1230355 Patch contributed by Oliver Rainer-Wittman i#118012 - methods <ScBroadcastAreaSlot::AreaBroadcast(..)> and <ScBroadcastAreaSlot::AreaBroadcastInRange(..)> adapt stl-container iteration in order to avoid destroyed iterators during iteration. http://svn.apache.org/viewvc?view=revision&revision=1297916 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 Patch contributed by Daniel Rentz calc69: #i116936# fix VBA symbol Cells http://svn.apache.org/viewvc?view=revision&revision=1172135 Patches contributed by leiw: i#118546 CPU 100% on switched off AutoCalculate with Conditional Formatting on date values http://svn.apache.org/viewvc?view=revision&revision=1301380 Re-add new function documentation. Many various cleanups. Add missing calc66: #o11817313# also look at formula result number format, remove redundant binaries.
2012-04-09Make this non-inline too; for easier debugging.Kohei Yoshida
2012-04-09Removed duplicated methods.Kohei Yoshida
2012-04-09Make non-trivial methods non in-line.Kohei Yoshida
2011-03-10Merge commit 'ooo/DEV300_m101' into integration/dev300_m101Kohei Yoshida
2011-01-17removetooltypes01: #i112600# remove tooltypes from scMikhail Voytenko
2010-10-28add modelines to .hxx files as wellCaolán McNamara
2010-02-12changefileheader2: #i109125#: change source file copyright notice from Sun ↵Jens-Heiner Rechtien
Microsystems to Oracle; remove CVS style keywords (RCSfile, Revision)
2008-04-10INTEGRATION: CWS changefileheader (1.5.34); FILE MERGEDRüdiger Timm
2008/04/01 12:36:00 thb 1.5.34.2: #i85898# Stripping all external header guards 2008/03/31 17:13:33 rt 1.5.34.1: #i87441# Change license header to LPGL v3.
2008-03-06INTEGRATION: CWS odff (1.4.498); FILE MERGEDKurt Zenker
2008/01/17 17:31:33 er 1.4.498.1: #i32340# variable cell result ScFormulaResult, first wave
2005-10-21INTEGRATION: CWS dr41 (1.2.118); FILE MERGEDRüdiger Timm
2005/10/04 21:05:54 dr 1.2.118.2: RESYNC: (1.2-1.3); FILE MERGED 2005/09/07 11:11:50 er 1.2.118.1: #i54276# include string results in iteration convergence tests
2005-09-08INTEGRATION: CWS ooo19126 (1.2.130); FILE MERGEDRüdiger Timm
2005/09/05 15:00:55 rt 1.2.130.1: #i54170# Change license header: remove SISSL
2005-03-08INTEGRATION: CWS calcer (1.1.2); FILE ADDEDVladimir Glazounov
2005/02/18 18:52:24 er 1.1.2.1: #i20986# #i21124# #i4874# #i7309# new algorithm for recursions and iterations