[Libreoffice-commits] core.git: officecfg/registry sc/source

Tor Lillqvist tml at collabora.com
Wed Nov 19 02:25:06 PST 2014


 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |    2 +-
 sc/source/core/tool/calcconfig.cxx                       |    1 -
 sc/source/ui/optdlg/calcoptionsdlg.cxx                   |    4 ++++
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 8f317cd32e3a0ae7b6dfd28cd3a3f5aa9f5da6ec
Author: Tor Lillqvist <tml at collabora.com>
Date:   Wed Nov 19 12:10:10 2014 +0200

    Don't use OpenCL for RAND by default
    
    The current implementation from 60ae598d537c14283109e1c6de22ec43a0147bcf is so
    broken it isn't even funny.
    
    Change-Id: I962d2643d21283340646893bb7892fb2a3d0c2e3

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 425f9b8..abf01b0 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1373,7 +1373,7 @@
 	    might be calculated using OpenCL.</desc>
           <!-- numeric values correspond to RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUBPRODUCT;PROUDCT;NORMDIST;MIN;MAX;SUM;AVERAGE;SUMIFS -->
           </info>
-          <value>66;82;83;84;88;102;103;104;149;204;209;213;222;223;224;225;226;236;403</value>
+          <value>82;83;84;88;102;103;104;149;204;209;213;222;223;224;225;226;236;403</value>
         </prop>
         <prop oor:name="OpenCLAutoSelect" oor:type="xs:boolean" oor:nillable="false">
           <!-- UIHints: Tools - Options  Spreadsheet  Formula -->
diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx
index 0ba4cdf..ff81e98 100644
--- a/sc/source/core/tool/calcconfig.cxx
+++ b/sc/source/core/tool/calcconfig.cxx
@@ -40,7 +40,6 @@ void ScCalcConfig::setOpenCLConfigToDefault()
     mbOpenCLAutoSelect = true;
     mnOpenCLMinimumFormulaGroupSize = 100;
 
-    maOpenCLSubsetOpCodes.insert(ocRandom);
     maOpenCLSubsetOpCodes.insert(ocSin);
     maOpenCLSubsetOpCodes.insert(ocCos);
     maOpenCLSubsetOpCodes.insert(ocTan);
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index 3a4764e..92af35a 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)");
     }


More information about the Libreoffice-commits mailing list