From 4c66ce8ec8f67d3bc2db5c79de68f4bda26d2e60 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 9 Dec 2014 13:14:35 +0200 Subject: Bin the dummy interpreter (which was ifdeffed out anyway) Change-Id: I262d0c07bd4851a2da52f94ef3fc229bdc0e7e06 --- sc/source/core/tool/formulagroup.cxx | 50 ------------------------------------ 1 file changed, 50 deletions(-) (limited to 'sc') 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 #include -#define USE_DUMMY_INTERPRETER 0 - #include #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(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 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 -- cgit