summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2018-10-15 15:20:16 +0200
committerEike Rathke <erack@redhat.com>2018-10-15 16:18:47 +0200
commitc97dd6e4ffedf4423e091b4c7e9c40c37de171e9 (patch)
tree7caee09d72f17e035662493e56714e1370814c16 /formula
parentf8f395218b242367a23f82b9b362ad5f5b2f546e (diff)
Resolves: tdf#102257 RANDBETWEEN() volatile like RAND(), ScRecalcMode::ALWAYS
Change-Id: I01698e6b9981d7dd15bf42fcb69a7bd4778d1798 Reviewed-on: https://gerrit.libreoffice.org/61792 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index db32c1de0ff1..8addeeed34e2 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1452,10 +1452,18 @@ void FormulaCompiler::Factor()
case ocConvertOOo :
case ocDde:
case ocMacro:
- case ocExternal:
case ocWebservice:
pArr->AddRecalcMode( ScRecalcMode::ONLOAD_LENIENT );
break;
+ // RANDBETWEEN() is volatile like RAND(). Other Add-In
+ // functions may have to be recalculated or not, we don't
+ // know, classify as ONLOAD_LENIENT.
+ case ocExternal:
+ if (mpToken->GetExternal() == "com.sun.star.sheet.addin.Analysis.getRandbetween")
+ pArr->SetExclusiveRecalcModeAlways();
+ else
+ pArr->AddRecalcMode( ScRecalcMode::ONLOAD_LENIENT );
+ break;
// If the referred cell is moved the value changes.
case ocColumn :
case ocRow :