Bug 59641 - Tools->Import Formula->MathML copies already entered formula
Summary: Tools->Import Formula->MathML copies already entered formula
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:4.2.0
Depends on:
Reported: 2013-01-21 00:34 UTC by Mike Kaganski
Modified: 2013-06-20 14:00 UTC (History)
0 users

See Also:
Crash report or crash signature:
Regression By:

Sample mml file to test (1.11 KB, application/mathml+xml)
2013-01-21 00:34 UTC, Mike Kaganski

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2013-01-21 00:34:45 UTC
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.
Comment 1 Marcos Souza 2013-06-17 14:20:03 UTC
I can reproduce this with latest master, and with Linux, so putting this as platform -> All.
Comment 2 Marcos Souza 2013-06-19 17:57:47 UTC
I sent a patch fixing this: https://gerrit.libreoffice.org/#/c/4369/

Let's wait the guys review :)
Comment 3 Commit Notification 2013-06-20 13:58:59 UTC
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.
Comment 4 Marcos Souza 2013-06-20 14:00:40 UTC
Fixed in master.

Thanks for reporting!