[Libreoffice-commits] core.git: sc/source
Tor Lillqvist
tml at collabora.com
Fri Jan 16 03:14:41 PST 2015
sc/source/core/opencl/op_math.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 521dbb3ea329a987accfe9ff39870b3a829bf6b8
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Jan 16 13:08:29 2015 +0200
Explain what the function does
Change-Id: I2179a81b5ce83beea491b86469c5b8ba232fdd15
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx
index a68cfa8..c2a9a1c 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -2832,10 +2832,18 @@ void OpConvert::GenSlidingWindowFunction(
std::stringstream &ss, const std::string &sSymName,
SubArguments &vSubArguments)
{
+ // The CONVERT function converts a value from one unit of
+ // measurement to another. It takes the units of measurements to
+ // convert between as string arguments. This implementation
+ // handles just a very small subset of such conversions.
+
int arg1=vSubArguments[1]->GetFormulaToken()->GetString().\
getString().toAsciiUpperCase().hashCode();
int arg2=vSubArguments[2]->GetFormulaToken()->GetString().\
getString().toAsciiUpperCase().hashCode();
+
+ // Check if the from and to units are those combinations that the
+ // code below supports.
if( !((arg1==5584&&arg2==108)||
(arg1==108&&arg2==5584)||
(arg1==5665&&arg2==268206)||
More information about the Libreoffice-commits
mailing list