diff options
-rw-r--r-- | sc/source/core/tool/calcconfig.cxx | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/sc/source/core/tool/calcconfig.cxx b/sc/source/core/tool/calcconfig.cxx index 27836704dab9..7eb36d73a97c 100644 --- a/sc/source/core/tool/calcconfig.cxx +++ b/sc/source/core/tool/calcconfig.cxx @@ -187,11 +187,7 @@ bool ScCalcConfig::operator!= (const ScCalcConfig& r) const OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet& rOpCodes) { OUStringBuffer result(256); - // If GetOpCodeMap() initializes the map at base class - // formula::FormulaCompiler before any ScCompiler did, all AddIn mapping - // would be missing also in future. So if it didn't exist destroy it again. formula::FormulaCompiler aCompiler; - const bool bTemporary = !aCompiler.HasOpCodeMap(css::sheet::FormulaLanguage::ENGLISH); formula::FormulaCompiler::OpCodeMapPtr pOpCodeMap(aCompiler.GetOpCodeMap(css::sheet::FormulaLanguage::ENGLISH)); for (auto i = rOpCodes->begin(); i != rOpCodes->end(); ++i) @@ -201,18 +197,13 @@ OUString ScOpCodeSetToSymbolicString(const ScCalcConfig::OpCodeSet& rOpCodes) result.append(pOpCodeMap->getSymbol(*i)); } - if (bTemporary) - aCompiler.DestroyOpCodeMap(css::sheet::FormulaLanguage::ENGLISH); - return result.makeStringAndClear(); } ScCalcConfig::OpCodeSet ScStringToOpCodeSet(std::u16string_view rOpCodes) { ScCalcConfig::OpCodeSet result = std::make_shared<o3tl::sorted_vector< OpCode >>(); - // Same as above. formula::FormulaCompiler aCompiler; - const bool bTemporary = !aCompiler.HasOpCodeMap(css::sheet::FormulaLanguage::ENGLISH); formula::FormulaCompiler::OpCodeMapPtr pOpCodeMap(aCompiler.GetOpCodeMap(css::sheet::FormulaLanguage::ENGLISH)); const formula::OpCodeHashMap& rHashMap(pOpCodeMap->getHashMap()); @@ -244,9 +235,6 @@ ScCalcConfig::OpCodeSet ScStringToOpCodeSet(std::u16string_view rOpCodes) if( result->find( ocSub ) != result->end()) result->insert( ocNegSub ); - if (bTemporary) - aCompiler.DestroyOpCodeMap(css::sheet::FormulaLanguage::ENGLISH); - return result; } |