summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-09-01 14:15:22 +0200
committerEike Rathke <erack@redhat.com>2022-09-01 18:01:29 +0200
commit15acaddb54c3e14a49b0d26d879c4436d34933e1 (patch)
tree428aa3e2d563b077eb815eff4d948e2424948906 /sc
parent5aaa0cda74de4170972b7988d8fca16a560b8500 (diff)
Related: tdf#142293 Remove temporariness now implemented at GetOpCodeMap()
Change-Id: Ic61f45b1da286e2f4890bbc81dc5cd18c0d5bbe5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139202 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/calcconfig.cxx12
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;
}