Bug 101100 - Impress doesn't display properly some PPTX binary equations created with Microsoft Equation, image stretched (OK if resaved in MSO)
Summary: Impress doesn't display properly some PPTX binary equations created with Micr...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: low normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:pptx, regression
Depends on:
Blocks: EMF-WMF PPTX-Equations
  Show dependency treegraph
 
Reported: 2016-07-24 16:51 UTC by Volga
Modified: 2023-01-24 16:24 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
PPTX file used for test (1018.28 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2016-07-24 16:51 UTC, Volga
Details
PPTX file slide 7 - The actual content (71.58 KB, image/png)
2016-07-24 16:52 UTC, Volga
Details
PPTX file slide 7 - how LO opened (142.41 KB, image/png)
2016-07-24 16:58 UTC, Volga
Details
Font setting of Microsoft Equation Editor (38.64 KB, image/png)
2016-08-08 03:36 UTC, Volga
Details
This is the “Symbol” font (45.49 KB, application/zip)
2016-08-08 03:40 UTC, Volga
Details
MT Extra used by Equation Editor (4.85 KB, application/zip)
2016-08-08 03:44 UTC, Volga
Details
PPTX file slide 7 (77.34 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2018-08-24 13:10 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2016-07-24 16:51:21 UTC
Created attachment 126383 [details]
PPTX file used for test

Impress can not properly open the attached PPT file.

Problem Description:
LibreOffice Impress is not able to display equations in the attached PPT file, they have been found created with Microsoft Equation Editor.


Steps to reproduce:
1. Open the attached PPT file with Impress;
2. Compare with the expected result in the PNG file.

Issue was initially reported in:
http://www.libreofficechina.org/thread-823-1-1.html

Reproduced to me in:
Version: 5.1.4.2 (x64)
Build ID: f99d75f39f1c57ebdd7ffc5f42867c12031db97a
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
Locale: zh-CN (zh_CN)
Comment 1 Volga 2016-07-24 16:52:22 UTC
Created attachment 126384 [details]
PPTX file slide 7 - The actual content
Comment 2 Volga 2016-07-24 16:58:06 UTC
Created attachment 126385 [details]
PPTX file slide 7 - how LO opened
Comment 3 Buovjaga 2016-08-05 19:10:54 UTC
I see it messed up in a different way in 5.3, but still messed.
The problem is with theta and phi.
In 3.6 the theta and phi are substituted with q and j and there is no mess.

I guess we can call this some sort of a regression.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: f3d26af51588af441f62fb69bb7a5432845226ac
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on August 5th 2016

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 4 Volga 2016-08-07 08:09:51 UTC
(In reply to Buovjaga from comment #3)
> I see it messed up in a different way in 5.3, but still messed.
> The problem is with theta and phi.
> In 3.6 the theta and phi are substituted with q and j and there is no mess.
> 
> I guess we can call this some sort of a regression.
> 
> Arch Linux 64-bit, KDE Plasma 5
> Version: 5.3.0.0.alpha0+
> Build ID: f3d26af51588af441f62fb69bb7a5432845226ac
> CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
> Locale: fi-FI (fi_FI.UTF-8); Calc: group
> Built on August 5th 2016
> 
> Arch Linux 64-bit
> Version 3.6.7.2 (Build ID: e183d5b)


It seems to me they are display via “Symbol” font.
https://en.m.wikipedia.org/wiki/Symbol_(typeface)
Comment 5 Volga 2016-08-08 03:36:08 UTC
Created attachment 126656 [details]
Font setting of Microsoft Equation Editor

On Microsoft Equition Editor the font of Greek letters and mathmatical symbols are defalting to “Symbol” font, which has own encoding. For example, on LO Writer, when you input the following letters, switch to “Symbol”, they will displaying alpha to omega:
    A B G D E Z H Q I K L M N X O P R   S T U F C Y W
    a b g d e z h q i k l m n x o p r V s t u f c y w
Comment 6 Volga 2016-08-08 03:40:56 UTC
Created attachment 126657 [details]
This is the “Symbol” font
Comment 7 Volga 2016-08-08 03:44:40 UTC
Created attachment 126658 [details]
MT Extra used by Equation Editor

Microsoft Equation Editor also used MT Extra font to display certain symbol, which is also has its own character encoding. This font generally installed in C:\Program Files\Common Files\microsoft shared\EQUATION if you installed Microsoft Office.
Comment 8 Volga 2016-08-09 02:59:16 UTC
Microsoft Equation Editor can save the font styles into equations. In this file you can found them in the path /ppt/embeddings if you open this file by 7-zip.
Comment 9 Regina Henschel 2016-08-09 21:02:55 UTC
The equations are not created with Microsoft Equation Editor but are OLE objects of "MathType 5" a product of Design Science (www.dessci.com).

So LibreOffice leaves them as OLE object and shows the replacement graphics. That has worked correctly for most equations in Version: 4.2.2.1
Build-ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f. Only few equation have some errors in position.

It is partly broken (some images are correct, some are distort) in Version: 4.3.0.0.alpha1+
Build ID: 145f2e970f46a3a3e5456b122d71f17c3abe878f
TinderBox: Win-x86@42, Branch:master, Time: 2014-04-26_23:32:36

It is totally wrong in Version: 4.4.0.3
Build-ID: de093506bcdc5fafd9023ee680b8c60e3e0645d7
Gebietsschema: de_DE

It makes no difference, whether in Options > Load/Save > Microsoft Office the converting options are checked or not.

Because I run all versions on the same PC, and so the same fonts are available, the reason cannot be a missing font.
Comment 10 Regina Henschel 2016-08-09 21:14:30 UTC
In case there is a font problem in addition for you, goto http://www.dessci.com/en/dl/fonts/?src=hpfnt, where Design Science describes, how to get the fonts needed for MathType.
Comment 11 Volga 2016-08-10 10:34:24 UTC
(In reply to Regina Henschel from comment #9)
> The equations are not created with Microsoft Equation Editor but are OLE
> objects of "MathType 5" a product of Design Science (www.dessci.com).

As Wikipedia, Microsoft Equation Editor is simplified version of MathType, so I think these equations can be edited by both Microsoft Equation Editor and MathType. As of MS Office 2013, if you want to just install this editor, you can click “Custome” key to select “Equition Editor” only.
Comment 12 Xisco Faulí 2016-09-22 13:41:27 UTC
It looks like the square root problem was introduced in this commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=a85317c67f870917231e82eb29fd5023e55b87de

Unfortunately, it looks like Tomaz is not longer involved in the project.

On the other hand, I've created another bug for the font size problem: bug 102360
Comment 13 Xisco Faulí 2016-09-23 14:47:15 UTC
@Tomaz: it looks like this regression was introduced by this commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=a85317c67f870917231e82eb29fd5023e55b87de.
Could you please take a look at it whenever you have some time?
Regards
Comment 14 Volga 2016-09-23 15:39:40 UTC Comment hidden (no-value)
Comment 15 Xisco Faulí 2016-09-26 15:09:42 UTC Comment hidden (obsolete)
Comment 16 Volga 2017-04-11 10:53:08 UTC
I open the file again with LO 5.3.2.2, many of them looks better than previous version, but several equations still incorrect for their size, width and position.

Version: 5.3.2.2 (x64)
Build ID: 6cd4f1ef626f15116896b1d8e1398b56da0d0ee1
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: zh-CN (zh_CN); Calc: CL
Comment 17 Volga 2017-11-27 10:46:20 UTC Comment hidden (obsolete)
Comment 18 Timur 2018-08-24 13:10:22 UTC
Created attachment 144411 [details]
PPTX file slide 7

(In reply to Volga from comment #16)
> I open the file again with LO 5.3.2.2, many of them looks better than
> previous version, but several equations still incorrect
"Many" and "several" is not proper bug reporting. Not immediately clear with 66-slides test file. 
 
From what I see in 6.2+ on slide 7, there's still wrong square root with original test file, but it's correct on attached slide 7 PPTX extracted in MSO.
Comment 19 Volga 2019-11-22 08:10:59 UTC
This is still repro with:

版本: 6.3.3.2 (x64)
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU 线程: 2; 操作系统: Windows 10.0; UI 渲染: 默认; VCL: win; 
区域语言: zh-CN (zh_CN); UI 语言: zh-CN
Calc: threaded

A formula still messed up in page 7.
Comment 20 Volga 2019-11-23 07:08:53 UTC
Reproduced again with:

版本: 6.5.0.0.alpha0+ (x64)
Build ID: 32dcf3f0fdafcf44457842a8aa4f54d30d856ca9
CPU 线程: 4; 操作系统: Windows 10.0 Build 18362; UI 渲染: 默认; VCL: win; 
区域语言: zh-CN (zh_CN); UI 语言: zh-CN
Calc: threaded
Comment 21 Timur 2019-12-07 19:32:47 UTC
Square root issue is seen on slide 7 of original attachment 126383 [details], as Volga tested.
I'm just adding that MSO saved attachment 144411 [details] has formulae OK, but issue with OLE icons, which is bug 113186.
Comment 22 Gabor Kelemen (allotropia) 2023-01-24 16:24:34 UTC
This seems to be fixed in 7.4 with:

https://git.libreoffice.org/core/+/1c25d22bfa072eb78da8930a3877f37a70ff707b

author	Julien Nabet <serval2412@yahoo.fr>	Wed May 18 21:52:52 2022 +0200
committer	Julien Nabet <serval2412@yahoo.fr>	Thu May 19 10:55:06 2022 +0200

Simplify an "ImportGraphic" method by removing useless pExtHeader (WmfExternal)