starmath/source/symbol.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+)
New commits: commit 25b2e4a4e2f9b2191bdd80cca5a015e5b6089399 Author: Khaled Hosny <kha...@libreoffice.org> AuthorDate: Thu Aug 10 14:19:45 2023 +0300 Commit: خالد حسني <kha...@libreoffice.org> CommitDate: Thu Aug 10 15:43:47 2023 +0200 tdf#32415: Always accept English symbol names in math If symbol name does not match localized names, try to find a match using English (export) names. Change-Id: Id668ee68b07c8431c2780b78e26e07d3aef043aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155553 Tested-by: Jenkins Reviewed-by: خالد حسني <kha...@libreoffice.org> diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index 5dcf17309372..1523543d0a43 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -115,6 +115,17 @@ SmSym *SmSymbolManager::GetSymbolByName(const OUString& rSymbolName) SymbolMap_t::iterator aIt( m_aSymbols.find( rSymbolName ) ); if (aIt != m_aSymbols.end()) pRes = &aIt->second; + else + { + for (auto& [_, rSymbol] : m_aSymbols) + { + if (rSymbol.GetExportName() == rSymbolName) + { + pRes = &rSymbol; + break; + } + } + } return pRes; }