Created attachment 73352 [details]
Sample mml file to test
When using Import Formula feature, if some formula is already entered in the editor, importing a MathML file first copies the current formula, and then pastes the MathML content. This makes the preceeding formula to show twice.
1. Open Math
2. Enter the following: "1 <ENTER> newline <ENTER>", put the caret after the last <ENTER>.
3. Menu Tools -> Import Formula -> MathML 1.01 -> select some .mml file (attached is a sample mml file created from an example from mathjax site)
Expected: there should be symbol One followed by newline followed by the newly imported formula: "1 <ENTER> newline <ENTER> <Imported formula>"
Actual result: two lines with ones before the formula: "1 <ENTER> newline <ENTER> 1 <ENTER> newline <ENTER> <Imported formula>"
This does not happen when importing a .odf formula.
I can reproduce this with latest master, and with Linux, so putting this as platform -> All.
I sent a patch fixing this: https://gerrit.libreoffice.org/#/c/4369/
Let's wait the guys review :)
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":
Fix fdo#59641 - Duplication in formula when import mathml
The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Fixed in master.
Thanks for reporting!