Kaydet (Commit) 9429cf24 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

We (will) need ScCalcConfig also for formula groups

The settings for interpretation of text (string) cells as numbers affect
whether OpenCL can be used or not to get expected results, when operating on
vectors that contain also text cells.

Change-Id: I0a7fd657038846ba762aa6ee6a95c001aea8f124
üst 0608c2cb
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <config_features.h> #include <config_features.h>
#include "address.hxx" #include "address.hxx"
#include "calcconfig.hxx"
#include "types.hxx" #include "types.hxx"
#include "stlalgorithm.hxx" #include "stlalgorithm.hxx"
...@@ -120,11 +121,17 @@ public: ...@@ -120,11 +121,17 @@ public:
class SC_DLLPUBLIC FormulaGroupInterpreter class SC_DLLPUBLIC FormulaGroupInterpreter
{ {
static FormulaGroupInterpreter *msInstance; static FormulaGroupInterpreter *msInstance;
protected:
protected:
ScCalcConfig maCalcConfig;
FormulaGroupInterpreter() {} FormulaGroupInterpreter() {}
virtual ~FormulaGroupInterpreter() {} virtual ~FormulaGroupInterpreter() {}
public: /// Merge global and document specific settings.
void MergeCalcConfig(const ScDocument& rDoc);
public:
static FormulaGroupInterpreter *getStatic(); static FormulaGroupInterpreter *getStatic();
#if HAVE_FEATURE_OPENCL #if HAVE_FEATURE_OPENCL
static void fillOpenCLInfo(std::vector<OpenCLPlatformInfo>& rPlatforms); static void fillOpenCLInfo(std::vector<OpenCLPlatformInfo>& rPlatforms);
......
...@@ -464,6 +464,12 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddres ...@@ -464,6 +464,12 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddres
FormulaGroupInterpreter *FormulaGroupInterpreter::msInstance = NULL; FormulaGroupInterpreter *FormulaGroupInterpreter::msInstance = NULL;
void FormulaGroupInterpreter::MergeCalcConfig(const ScDocument& rDoc)
{
maCalcConfig = ScInterpreter::GetGlobalConfig();
maCalcConfig.MergeDocumentSpecific(rDoc.GetCalcConfig());
}
/// load and/or configure the correct formula group interpreter /// load and/or configure the correct formula group interpreter
FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic() FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment