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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 4 15:06:57 UTC 2018


 sc/source/core/opencl/op_math.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 6a2241e7db0c1db232b33dce619a203aadf21ec0
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Nov 16 17:46:43 2018 +0100
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Tue Dec 4 16:06:31 2018 +0100

    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 at collabora.com>

diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx
index 74c8dd4ceb87..a9216f72b3e7 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -3081,7 +3081,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++)
@@ -3185,6 +3185,8 @@ void OpSeriesSum::GenSlidingWindowFunction(std::stringstream &ss,
             ss << "))\n";
             ss << "        return 0;\n";
         }
+        else
+            throw Unhandled(__FILE__, __LINE__);
     }
     ss << "    return res;\n";
     ss << "}";


More information about the Libreoffice-commits mailing list