diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-02-07 15:38:55 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-02-07 17:16:36 +0200 |
commit | 9429cf24675ae6b3a954db560ca567c9413d0ab6 (patch) | |
tree | 09159237cfb34134cd28a3a5effea0000bc6b445 /sc | |
parent | 0608c2cbfe8697f9912397afce2987bee23fd1ce (diff) |
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
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/formulagroup.hxx | 11 | ||||
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx index aa6699a9f12f..a7dba2bbf0ad 100644 --- a/sc/inc/formulagroup.hxx +++ b/sc/inc/formulagroup.hxx @@ -13,6 +13,7 @@ #include <config_features.h> #include "address.hxx" +#include "calcconfig.hxx" #include "types.hxx" #include "stlalgorithm.hxx" @@ -120,11 +121,17 @@ public: class SC_DLLPUBLIC FormulaGroupInterpreter { static FormulaGroupInterpreter *msInstance; - protected: + +protected: + ScCalcConfig maCalcConfig; + FormulaGroupInterpreter() {} virtual ~FormulaGroupInterpreter() {} - public: + /// Merge global and document specific settings. + void MergeCalcConfig(const ScDocument& rDoc); + +public: static FormulaGroupInterpreter *getStatic(); #if HAVE_FEATURE_OPENCL static void fillOpenCLInfo(std::vector<OpenCLPlatformInfo>& rPlatforms); diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 306a3ea004f9..dfa368909f7b 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -464,6 +464,12 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddres 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 FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic() { |