When importing OOXML math formulas, encloseOrEscapeLiteral() quoted
every delimiter character, including standard math operators like =, -,
and +. StarMath then rendered them as text-font glyphs instead of
math-font operators. This caused the equals sign to misalign with the
fraction bar and the minus sign to render as a shorter text hyphen.
Skip quoting for single-character standard math operators (+, -, *, /,
=, <, >) so StarMath treats them as proper operators with correct glyph
selection and alignment.
A bare operator alone inside braces (e.g. rsup {+}) is a StarMath parse
error because the parser expects an operand. Add a safety re-quote in
readOMathArgInElement() for that case, since all its callers wrap the
result in {...}
Change-Id: I22f01a25212d3c030e8104a00418ab1f6bdb2d07
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/3329
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit f2ccbc5a30dbac56b600747af655076d6f7058c2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205823
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Formula Editor Code for LibreOffice Writer
Good overview from the original developer:
http://www.mail-archive.com/dev@sw.openoffice.org/msg00200.html