[Libreoffice-commits] core.git: sc/source
Tor Lillqvist
tml at collabora.com
Tue Aug 25 11:43:00 PDT 2015
sc/source/core/opencl/op_spreadsheet.cxx | 45 ++++---------------------------
sc/source/core/opencl/op_spreadsheet.hxx | 1
2 files changed, 6 insertions(+), 40 deletions(-)
New commits:
commit 162264450cb62177ea133829d081fecdb02136b5
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Aug 25 21:41:43 2015 +0300
Don't claim we support strings arguments in the OpenCL VLOOKUP
The string support certainly isn't complete or correct
anyway. Partially revert c3383aafa18ef9d03b04b2a4719e71fdfabc14eb.
Change-Id: Ica86f39daf864a1a62d92f8d8300d75d020c0ee0
diff --git a/sc/source/core/opencl/op_spreadsheet.cxx b/sc/source/core/opencl/op_spreadsheet.cxx
index d6853c4..c18b2ba 100644
--- a/sc/source/core/opencl/op_spreadsheet.cxx
+++ b/sc/source/core/opencl/op_spreadsheet.cxx
@@ -162,28 +162,9 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
ss << " == ";
ss << j+1;
ss << ")\n";
- if (!(vSubArguments[1+j]->IsMixedArgument()))
- {
- ss << " {\n";
- ss << " tmp = ";
- vSubArguments[1+j]->GenDeclRef(ss);
- ss << "[rowNum];\n";
- ss << " }\n";
-
- }
- else
- {
- ss << " {\n";
- ss << " tmp = !isNan(";
- vSubArguments[1+j]->GenNumDeclRef(ss);
- ss << "[rowNum])?";
- vSubArguments[1+j]->GenNumDeclRef(ss);
- ss << "[rowNum]:";
- vSubArguments[1+j]->GenStringDeclRef(ss);
- ss << "[rowNum];\n";
- ss << " }\n";
-
- }
+ ss << " tmp = ";
+ vSubArguments[1+j]->GenDeclRef(ss);
+ ss << "[rowNum];\n";
}
ss << " return tmp;\n";
ss << " }\n";
@@ -250,23 +231,9 @@ void OpVLookup::GenSlidingWindowFunction(std::stringstream &ss,
ss << " == ";
ss << j+1;
ss << ")\n";
- ///Add MixedArguments for string support in Vlookup.
- if (!(vSubArguments[1+j]->IsMixedArgument()))
- {
- ss << " tmp = ";
- vSubArguments[1+j]->GenDeclRef(ss);
- ss << "[rowNum];\n";
- }
- else
- {
- ss << " tmp = !isNan(";
- vSubArguments[1+j]->GenNumDeclRef(ss);
- ss << "[rowNum])?";
- vSubArguments[1+j]->GenNumDeclRef(ss);
- ss << "[rowNum]:";
- vSubArguments[1+j]->GenStringDeclRef(ss);
- ss << "[rowNum];\n";
- }
+ ss << " tmp = ";
+ vSubArguments[1+j]->GenDeclRef(ss);
+ ss << "[rowNum];\n";
}
ss << " return tmp;\n";
ss << " }\n";
diff --git a/sc/source/core/opencl/op_spreadsheet.hxx b/sc/source/core/opencl/op_spreadsheet.hxx
index e787bda..190ab1d 100644
--- a/sc/source/core/opencl/op_spreadsheet.hxx
+++ b/sc/source/core/opencl/op_spreadsheet.hxx
@@ -20,7 +20,6 @@ public:
virtual void GenSlidingWindowFunction(std::stringstream &ss,
const std::string &sSymName, SubArguments &vSubArguments) SAL_OVERRIDE;
virtual std::string BinFuncName() const SAL_OVERRIDE { return "VLookup"; }
- virtual bool takeString() const SAL_OVERRIDE { return true; }
};
}}
More information about the Libreoffice-commits
mailing list