[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Dec 6 14:36:19 UTC 2018


 sc/source/core/opencl/op_math.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit b6dbe0abef3e73f0f5c06073ccb8338831bf0522
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue Dec 4 12:58:11 2018 +0100
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu Dec 6 15:35:55 2018 +0100

    OpenCL SQRT() error checking
    
    Change-Id: I6208cf21f53d1a2a0eb4f08962c7bddcc372aab5
    Reviewed-on: https://gerrit.libreoffice.org/64545
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    (cherry picked from commit 581c7e4a0ec50aaa13112985c7e79cd66628f997)
    Reviewed-on: https://gerrit.libreoffice.org/64612

diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx
index ec4a75daa9eb..41e6a5818166 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -1277,6 +1277,10 @@ void OpSqrt::GenSlidingWindowFunction(std::stringstream &ss,
             ss << "    arg0=";
             ss << tmpCur->GetDouble() << ";\n";
         }
+        else
+        {
+            throw Unhandled( __FILE__, __LINE__ );
+        }
     }
     else
     {
@@ -1284,6 +1288,8 @@ void OpSqrt::GenSlidingWindowFunction(std::stringstream &ss,
         ss << vSubArguments[0]->GenSlidingWindowDeclRef();
         ss << ";\n";
     }
+    ss << "    if( arg0 < 0 )\n";
+    ss << "        return CreateDoubleError(IllegalArgument);\n";
     ss << "    return sqrt(arg0);\n";
     ss << "}";
 }


More information about the Libreoffice-commits mailing list