summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-02-04 21:30:59 +0200
committerTor Lillqvist <tml@collabora.com>2015-02-04 21:36:18 +0200
commitcf726ae8514ce9ad8f8a88e2de06a67850543fef (patch)
tree1cb3ec5ef70e2459ec971be5a82bd0fd5f4a5cd1
parentfab297c7945b51964627aa16a0b0019442d27a66 (diff)
Add Add, Sub, Mul and Div back to the default OpenCL opcode subset
The code falls back to the traditional interpreter when necessary. This reverts commit ad582ce757f671a6271648e22a136f2d238cc15e. Change-Id: I4cbafba2c469c0814dcc5c5210db5ce495e6b641
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Calc.xcs2
-rw-r--r--sc/source/core/tool/calcconfig.cxx4
2 files changed, 5 insertions, 1 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 7ef9afbedd72..5966b0b0f863 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -1373,7 +1373,7 @@
true, and a formula contains only these operators and
functions, it might be calculated using OpenCL.</desc>
</info>
- <value>RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;NORMDIST;SUMIFS</value>
+ <value>+;-;*;/;RAND;SIN;COS;TAN;ATAN;EXP;LN;SQRT;NORMSINV;ROUND;POWER;SUMPRODUCT;MIN;MAX;SUM;PRODUCT;AVERAGE;COUNT;NORMDIST;SUMIFS</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 4e9292a2c23a..00239105455d 100644
--- a/sc/source/core/tool/calcconfig.cxx
+++ b/sc/source/core/tool/calcconfig.cxx
@@ -41,6 +41,10 @@ void ScCalcConfig::setOpenCLConfigToDefault()
// Keep in order of opcode value, is that clearest? (Random order,
// at least, would make no sense at all.)
+ maOpenCLSubsetOpCodes.insert(ocAdd);
+ maOpenCLSubsetOpCodes.insert(ocSub);
+ maOpenCLSubsetOpCodes.insert(ocMul);
+ maOpenCLSubsetOpCodes.insert(ocDiv);
maOpenCLSubsetOpCodes.insert(ocRandom);
maOpenCLSubsetOpCodes.insert(ocSin);
maOpenCLSubsetOpCodes.insert(ocCos);