Bug 115956

Summary: Add function to import MathML formula from clipboard
Product: LibreOffice Reporter: Volga <shanshandehongxing>
Component: Formula EditorAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED INVALID    
Severity: normal CC: rb.henschel
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:

Description Volga 2018-02-23 03:37:27 UTC
Description:
An online editer WIRIS Editor (http://www.wiris.com/en/editor) has an ability to produce mathmatical formula from web page, and copying as MathML format. Thus if a formula is copying as MathML format, LibO Math can be allowed to import it from clipboard.

Steps to Reproduce:
-

Actual Results:  
-

Expected Results:
-


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Android 5.1.1; Mobile; rv:58.0) Gecko/58.0 Firefox/58.0
Comment 1 Volga 2018-02-23 03:41:07 UTC
On this editor if I input a quadratic formula ax² + bx + c =0, while I click Copy button, paste to here, it will become the following MathML code:
<math style="font-family:'Times New Roman'" xmlns="http://www.w3.org/1998/Math/MathML"><mi>a</mi><msup><mi>x</mi><mn>2</mn></msup><mo>+</mo><mi>b</mi><mi>x</mi><mo>+</mo><mi>c</mi><mo>=</mo><mn>0</mn></math>
Comment 2 Regina Henschel 2018-02-23 20:47:38 UTC
Use Tools > "Import MathML from Clipboard" in the formula editor. In a Writer document e.g. you need to first use Insert Formula and then "Import MathML from Clipboard". You can combine the commands using a macro, for the cases you are sure that the clipboard contains valid MathML.

The command "Import MathML from Clipboard" detects MathML in cases too, were it is MathML in content but is not marked as MathML by the source application.
 
I think it would be too expensive to do the tests, whether it is valid MathML, on each clipboard content, to show MathML as item in the list of clipboard contents.
Comment 3 Volga 2018-02-24 02:30:00 UTC
OK. Thanks.