sc/inc/formulagroup.hxx | 3 +-- sc/source/core/opencl/formulagroupcl.cxx | 3 --- sc/source/core/tool/formulagroup.cxx | 13 ++++++++++++- 3 files changed, 13 insertions(+), 6 deletions(-)
New commits: commit d4a74de62dd0336ad7d3a21980976d520b0f0105 Author: Kohei Yoshida <[email protected]> Date: Fri Sep 13 11:34:52 2013 -0400 More sensible way to handle software interpreter invocation. Change-Id: Iea44ec03ce5b779558a8f5e762d0428d90f2334d diff --git a/sc/inc/formulagroup.hxx b/sc/inc/formulagroup.hxx index f57b237..f4cbbdb 100644 --- a/sc/inc/formulagroup.hxx +++ b/sc/inc/formulagroup.hxx @@ -61,8 +61,7 @@ class SC_DLLPUBLIC FormulaGroupInterpreter class SC_DLLPUBLIC FormulaGroupInterpreterSoftware : public FormulaGroupInterpreter { public: - FormulaGroupInterpreterSoftware() : - FormulaGroupInterpreter() {} + FormulaGroupInterpreterSoftware(); virtual ~FormulaGroupInterpreterSoftware() {} virtual ScMatrixRef inverseMatrix(const ScMatrix& rMat); diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx index d958b1b..61d9944 100644 --- a/sc/source/core/opencl/formulagroupcl.cxx +++ b/sc/source/core/opencl/formulagroupcl.cxx @@ -1072,9 +1072,6 @@ extern "C" { SAL_DLLPUBLIC_EXPORT sc::FormulaGroupInterpreter* SAL_CALL createFormulaGroupOpenCLInterpreter() { - if (getenv("SC_SOFTWARE")) - return NULL; - #if USE_GROUNDWATER_INTERPRETER if (getenv("SC_GROUNDWATER")) return new sc::opencl::FormulaGroupInterpreterGroundwater(); diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 3b929fa..1a40b15 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -16,6 +16,7 @@ #include "scmatrix.hxx" #include "formula/vectortoken.hxx" +#include "rtl/bootstrap.hxx" #include "config_features.h" #include <vector> @@ -134,6 +135,10 @@ void fillMatrix( ScMatrix& rMat, size_t nCol, rtl_uString** pStrs, size_t nLen ) } +FormulaGroupInterpreterSoftware::FormulaGroupInterpreterSoftware() : FormulaGroupInterpreter() +{ +} + ScMatrixRef FormulaGroupInterpreterSoftware::inverseMatrix(const ScMatrix& /*rMat*/) { return ScMatrixRef(); @@ -359,7 +364,13 @@ FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic() if ( !msInstance ) { #if HAVE_FEATURE_OPENCL - if ( ScInterpreter::GetGlobalConfig().mbOpenCLEnabled ) + + bool bSoftware = false; + OUString aVal; + if (rtl::Bootstrap::get("SC_SOFTWARE", aVal) && aVal == "1") + bSoftware = true; + + if ( ScInterpreter::GetGlobalConfig().mbOpenCLEnabled && !bSoftware) { #ifdef DISABLE_DYNLOADING msInstance = createFormulaGroupOpenCLInterpreter(); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
