diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2018-11-16 17:46:43 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2018-12-05 10:58:15 +0100 |
commit | 1b0dc235543fc3f8185fc2f5f7bdf92c164a0826 (patch) | |
tree | 1abc21e4f4132fc401cfdc1e87ef41980fdfed9f | |
parent | 7a8d6a23ea5b895f00f759017ad4a1d1eb7c94c9 (diff) |
opencl SERIESSUM does not handle plain double arguments
sc_subsequent_filters_test in ScFiltersTest::testFunctionsODS() also
checks "SERIESSUM(2;3;2;3)", which the opencl code does not handle.
At least bail out gracefully instead of returning 0.
Change-Id: I154dca8cc437a6225b4eb98012232d80683f0114
Reviewed-on: https://gerrit.libreoffice.org/64242
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit 6a2241e7db0c1db232b33dce619a203aadf21ec0)
Reviewed-on: https://gerrit.libreoffice.org/64532
-rw-r--r-- | sc/source/core/opencl/op_math.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index 45306aee893e..341c3b04c333 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -3080,7 +3080,7 @@ void OpQuotient::GenSlidingWindowFunction(std::stringstream &ss, void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss, const std::string &sSymName, SubArguments &vSubArguments) { - if( vSubArguments.size() != 4){return;} + CHECK_PARAMETER_COUNT(4,4); ss << "\ndouble " << sSymName; ss << "_"<< BinFuncName() <<"("; for (size_t i = 0; i < vSubArguments.size(); i++) @@ -3184,6 +3184,8 @@ void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss, ss << "))\n"; ss << " return 0;\n"; } + else + throw Unhandled(__FILE__, __LINE__); } ss << " return res;\n"; ss << "}"; |