[Libreoffice-commits] core.git: sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Dec 3 14:28:17 UTC 2018
sc/source/core/opencl/op_financial.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 3441edd25e2f006db46a6c9f2351558910c6a614
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Nov 9 17:34:53 2018 +0100
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Dec 3 15:27:55 2018 +0100
treat second argument of opencl's dollarde/dollarfr as integer
That's how the scaddins implementation works, and the unittests fail
in opencl mode without this.
Change-Id: I08ea7dd0a0222408abf899d2da649be53f314a4c
Reviewed-on: https://gerrit.libreoffice.org/64227
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/sc/source/core/opencl/op_financial.cxx b/sc/source/core/opencl/op_financial.cxx
index 7504cad66617..747d8a764343 100644
--- a/sc/source/core/opencl/op_financial.cxx
+++ b/sc/source/core/opencl/op_financial.cxx
@@ -185,9 +185,9 @@ void OpDollarde::GenSlidingWindowFunction(
ss << vSubArguments[1]->GenSlidingWindowDeclRef();
ss<<"))\n\t\t";
ss<<"fFrac = 0;\n\telse \n\t\t";
- ss<<"fFrac = ";
+ ss<<"fFrac = (int)(";
ss << vSubArguments[1]->GenSlidingWindowDeclRef();
- ss<<";\n\t";
+ ss<<");\n\t";
ss << "tmp = modf( dollar , &fInt );\n\t";
ss << "tmp /= fFrac;\n\t";
ss << "tmp *= pow( 10.0 , ceil( log10(fFrac ) ) );\n\t";
@@ -236,9 +236,9 @@ void OpDollarfr::GenSlidingWindowFunction(std::stringstream &ss,
ss << vSubArguments[1]->GenSlidingWindowDeclRef();
ss<<"))\n\t\t";
ss<<"fFrac = 0;\n\telse \n\t\t";
- ss<<"fFrac = ";
+ ss<<"fFrac = (int)(";
ss << vSubArguments[1]->GenSlidingWindowDeclRef();
- ss<<";\n\t";
+ ss<<");\n\t";
ss << "tmp = modf( dollar , &fInt );\n\t";
ss << "tmp *= fFrac;\n\t";
ss << "tmp *= pow( 10.0 , -ceil( log10(fFrac ) ) );\n\t";
More information about the Libreoffice-commits
mailing list