diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-12-09 13:14:35 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-12-09 13:52:53 +0200 |
commit | 4c66ce8ec8f67d3bc2db5c79de68f4bda26d2e60 (patch) | |
tree | 8fd4f4dff690d0e02684bd0a996dc7366fba7a34 /sc | |
parent | 9b307e64d616554c11609898dd01190e62045ed7 (diff) |
Bin the dummy interpreter (which was ifdeffed out anyway)
Change-Id: I262d0c07bd4851a2da52f94ef3fc229bdc0e7e06
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/formulagroup.cxx | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/sc/source/core/tool/formulagroup.cxx b/sc/source/core/tool/formulagroup.cxx index 32ee19aa770d..15bec560181f 100644 --- a/sc/source/core/tool/formulagroup.cxx +++ b/sc/source/core/tool/formulagroup.cxx @@ -30,8 +30,6 @@ #include <boost/scoped_array.hpp> #include <boost/unordered_map.hpp> -#define USE_DUMMY_INTERPRETER 0 - #include <cstdio> #if HAVE_FEATURE_OPENCL @@ -468,59 +466,11 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& rDoc, const ScAddres return true; } -#if USE_DUMMY_INTERPRETER -class FormulaGroupInterpreterDummy : public FormulaGroupInterpreter -{ - enum Mode { - WRITE_OUTPUT = 0 - }; - Mode meMode; -public: - FormulaGroupInterpreterDummy() - { - const char *pValue = getenv("FORMULA_GROUP_DUMMY"); - meMode = static_cast<Mode>(OString(pValue, strlen(pValue)).toInt32()); - SAL_INFO("sc.formulagroup", "Using Dummy Formula Group interpreter mode " << (int)meMode); - } - - virtual ScMatrixRef inverseMatrix(const ScMatrix& /*rMat*/) - { - return ScMatrixRef(); - } - - virtual bool interpret(ScDocument& rDoc, const ScAddress& rTopPos, - const ScFormulaCellGroupRef& xGroup, - ScTokenArray& rCode) - { - (void)rCode; - - // Write simple data back into the sheet - if (meMode == WRITE_OUTPUT) - { - boost::scoped_array<double> pDoubles(new double[xGroup->mnLength]); - for (sal_Int32 i = 0; i < xGroup->mnLength; i++) - pDoubles[i] = 42.0 + i; - rDoc.SetFormulaResults(rTopPos, pDoubles.get(), xGroup->mnLength); - } - return true; - } -}; - -#endif - FormulaGroupInterpreter *FormulaGroupInterpreter::msInstance = NULL; /// load and/or configure the correct formula group interpreter FormulaGroupInterpreter *FormulaGroupInterpreter::getStatic() { -#if USE_DUMMY_INTERPRETER - if (getenv("FORMULA_GROUP_DUMMY")) - { - delete msInstance; - return msInstance = new sc::FormulaGroupInterpreterDummy(); - } -#endif - if ( !msInstance ) { #if HAVE_FEATURE_OPENCL |