Bug 125668 - Equations are not converted correctly
Summary: Equations are not converted correctly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: OLE-Objects
  Show dependency treegraph
 
Reported: 2019-06-03 19:13 UTC by Mohammed Saifullah
Modified: 2019-06-04 07:20 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Equation and text formatting (359.88 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-06-03 19:14 UTC, Mohammed Saifullah
Details
LibreOffice converted (34.23 KB, image/jpeg)
2019-06-03 19:15 UTC, Mohammed Saifullah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohammed Saifullah 2019-06-03 19:13:36 UTC
Description:
Equations created through MS Equation Too are not converted correctly. Text conversion is also distorted.

Steps to Reproduce:
1.Open attached .pptx document with LibreOffice Impress.
2.
3.

Actual Results:
Formula and text formatting is incorrect

Expected Results:
Formula and text formatting are expected to be correct. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Mohammed Saifullah 2019-06-03 19:14:44 UTC
Created attachment 151885 [details]
Equation and text formatting
Comment 2 Mohammed Saifullah 2019-06-03 19:15:17 UTC
Created attachment 151886 [details]
LibreOffice converted
Comment 3 V Stuart Foote 2019-06-04 05:42:29 UTC
Confirming on current master/6.4.0alpha0 and 6.2.4.2 builds on Windows 10

There are several issues.

First is font mishandling--because the OOXML is using Cambria Math and assigning Unicode SMP codepoints from the Mathematical Alphanumeric Symbols block. Specifically U+1d465 Mathamatical Italic Small X. Since the LibreOffice formula editor defaults to Liberation Serif for variables it has no coverage of the block, nor is there any font fallback, and the variable from the OLE formula shows a blank when rendered.

But an easy workaround, setting LO formula editor to use the same font as MS Office Equation editor -- Cambria Math, the variable(s) will show on the document canvas.

The other issues on slide one and two of attachment 151885 [details], where a text box using bullets is holding the OLE formulas. 

1) The import filter incorrectly positions and sizes the OLE to the full size of the imported Text box--stretching the formula. Should either keep defaults for LO Formula editor, or better read the font size from the object in XML

2) On filter import LibreOffice displays both the Text box bullets, but also the fallback image (media/image5.png on slide one, and media/image6.png on slide two). And slide two shows "double struck" for the text bullet as the import is positioned incorrectly, that is bug 117658 -- the import filter should do one or the other. Either import the just the image, or import just the bullets of the Text box.

3) On slide two, the Formula OLE for the bullet is not rendered, so only see the fallback image. But by deleting the initial text bullet it allows the Formula OLE to render. So the import filter is not handling the OLE in the text box when other text bullets are present.
Comment 4 V Stuart Foote 2019-06-04 06:08:38 UTC
So handling the formula import from OOXML was done by Michael S. in
https://cgit.freedesktop.org/libreoffice/core/commit/?id=332a796366b7cb91dff41de4b9ffb17843112a3e

And the text boxes with multiple bullets are not parsed, explaining 3).