summaryrefslogtreecommitdiff
path: root/sc/source/ui/optdlg
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-19 12:10:10 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-19 12:24:36 +0200
commit8f317cd32e3a0ae7b6dfd28cd3a3f5aa9f5da6ec (patch)
tree0abaacfe041c18461a6f3e3cc0e1ee1eee833f00 /sc/source/ui/optdlg
parentf9fb1fcb8e0558a719cc6b423064d19433ce5e37 (diff)
Don't use OpenCL for RAND by default
The current implementation from 60ae598d537c14283109e1c6de22ec43a0147bcf is so broken it isn't even funny. Change-Id: I962d2643d21283340646893bb7892fb2a3d0c2e3
Diffstat (limited to 'sc/source/ui/optdlg')
-rw-r--r--sc/source/ui/optdlg/calcoptionsdlg.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 3a4764e53d8c..92af35a784b0 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -993,7 +993,11 @@ IMPL_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton*, )
for (int i = 0; i < N; ++i)
{
+#if 0 // While our RAND OpenCL implementation is broken...
pDoc->SetString(ScAddress(0,i,1), "=RAND()");
+#else
+ pDoc->SetValue(ScAddress(0,i,1), (i%13)/13.);
+#endif
pDoc->SetValue(ScAddress(1,i,1), comphelper::rng::uniform_real_distribution(0, 1000));
pDoc->SetString(ScAddress(10,i,1), OUString("=IF(AND(A") + OUString::number(i+1) + ">= 0,A" + OUString::number(i+1) + "<= 1),0,1)");
}