Bug 129061 - FILEOPEN PPTX: equation not displayed because Impress doesn't support inline formulas
Summary: FILEOPEN PPTX: equation not displayed because Impress doesn't support inline ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: highest normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0 target:24.8.2 target:24...
Keywords: bibisected, bisected, dataLoss, filter:pptx, implementationError
: 81494 91300 105886 124976 125123 130026 132692 133232 133239 134001 134068 136910 138633 138971 143479 146100 154741 163483 (view as bug list)
Depends on:
Blocks: ODF-import PPTX-Equations
  Show dependency treegraph
 
Reported: 2019-11-27 14:28 UTC by Ofir
Modified: 2024-11-09 19:11 UTC (History)
31 users (show)

See Also:
Crash report or crash signature:


Attachments
PPTX with text, equation and animations (33.95 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-11-27 14:29 UTC, Ofir
Details
PDF exported from PowerPoint 2013 (183.47 KB, application/pdf)
2019-11-27 14:30 UTC, Ofir
Details
Minimal sample document (37.39 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2019-11-27 14:44 UTC, Xisco Faulí
Details
Sample PPTX file with various equations and text (1.66 MB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2024-11-06 14:06 UTC, Rafael Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ofir 2019-11-27 14:28:40 UTC
Description:
The attached PPTX has 2 lines of text and a third line with equation.
Each line has on-click animation.
The text is duplicated and the animation is wrong. This is somehow caused by the equation.

Steps to Reproduce:
1. Open the attached PPTX in Impress
2. Compare with the PDF exported from PowerPoint 2013.
3. Try to play the animations.

Actual Results:
The text is duplicated. The animations don't play one by one on click.

Expected Results:
No duplicate text.
Separate animations on click.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.3.2 (x86)
Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 8; OS: Windows 6.1; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL
Comment 1 Ofir 2019-11-27 14:29:38 UTC
Created attachment 156147 [details]
PPTX with text, equation and animations
Comment 2 Ofir 2019-11-27 14:30:15 UTC
Created attachment 156148 [details]
PDF exported from PowerPoint 2013
Comment 3 Xisco Faulí 2019-11-27 14:43:31 UTC
Hello,
So the duplicate equation is fixed in https://cgit.freedesktop.org/libreoffice/core/commit/?id=4038d6c393c3cf6330671124ba69cdba98b24960
However, the same commit has caused the equation x to disappear... I believe we can consider that a regression...

author	Miklos Vajna <vmiklos@collabora.com>	2019-11-13 17:41:45 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	2019-11-13 18:43:57 +0100
commit 4038d6c393c3cf6330671124ba69cdba98b24960 (patch)
tree 79dbbc062df6fb3acd544e223b6b7cd036f1da54
parent ae499df25c01a149dfbb387da17a7f8a232a6a4e (diff)
tdf#117658 PPTX import: fix duplicated math object handling

Bisected with: bibisect-linux64-6.5

Adding Cc: to Miklos Vajna
Comment 4 Xisco Faulí 2019-11-27 14:44:20 UTC
Created attachment 156149 [details]
Minimal sample document
Comment 5 Miklos Vajna 2019-11-27 17:31:15 UTC
This is how this "worked" in the past: The PPTX file contains both drawingML / mathML markup for the slide and also a replacement image. We used to read both: the OOXML markup missed the math formula and the replacement image did not.

This is how this is "broken" currently: we now only read the OOXML markup to avoid the duplication, but Impress doesn't support inline formulas (just math objects), so the import can't really do much more than just ignoring the math formula.

Considering this as a regression is fair enough, but I would say the root cause here is missing feature, it's not like I can sit down and just "fix this": if we read both versions, then we have duplication, if we read only the markup then we can have problems when Impress misses some PowerPoint feature and if we only read the replacement image, then we regress because the formula is not editable.

To sum up, the root cause here is really a missing feature, let me tag this as an implementation error, rather than a regression.

This Impress core limitation is even documented in a debug warning in commit 332a796366b7cb91dff41de4b9ffb17843112a3e (oox: import Math objects from PPTX files, 2016-01-21):

warn:oox.drawingml:2141:2141:oox/source/drawingml/shape.cxx:667: losing a Math object...
Comment 6 Ofir 2019-11-28 09:00:17 UTC
Miklos, can you please give an example of OOXML element representing inline formula that Impress doesn't support and Math object that Impress does support?
Maybe I can preprocess the pptx and replace inline formulas with math objects.
Comment 7 Miklos Vajna 2019-12-02 08:55:01 UTC
This bug has an example of a PPTX shape which has both text and math markup, Impress can't handle this.

E.g. bug 117658 has an example PPTX shape which has only math markup, so we can map that to Impress math objects.
Comment 8 Timur 2019-12-07 19:06:32 UTC
*** Bug 125123 has been marked as a duplicate of this bug. ***
Comment 9 Timur 2019-12-07 20:28:28 UTC
*** Bug 105886 has been marked as a duplicate of this bug. ***
Comment 10 Timur 2019-12-07 20:32:35 UTC
Inline math examples in:
- PPTX attachment 131045 [details] from bug 105886, PDF as attachment 131046 [details].
- attachment 113333 [details] from bug 81494, equation𝑡ℎ𝑒 is shown as equation.
- slide 3 of attachment 151079 [details] from bug 124976
Comment 11 Timur 2019-12-07 20:33:09 UTC
*** Bug 81494 has been marked as a duplicate of this bug. ***
Comment 12 Timur 2019-12-07 20:34:19 UTC
*** Bug 124976 has been marked as a duplicate of this bug. ***
Comment 13 Timur 2019-12-07 20:43:15 UTC
Further examples in https://web.archive.org/web/20160721184553/http://www.mmds.org/mmds/v2.1/ch10-graphs1.pptx from bug 102200.
I didn't close as duplicate because it needs to be thoroughly checked.
Comment 14 Timur 2020-01-20 13:47:41 UTC
*** Bug 130026 has been marked as a duplicate of this bug. ***
Comment 15 Timur 2020-05-04 21:05:44 UTC
*** Bug 132692 has been marked as a duplicate of this bug. ***
Comment 16 raal 2020-05-21 21:20:57 UTC
*** Bug 133232 has been marked as a duplicate of this bug. ***
Comment 17 Xisco Faulí 2020-06-15 14:18:45 UTC
*** Bug 134001 has been marked as a duplicate of this bug. ***
Comment 18 Xisco Faulí 2020-06-17 14:11:45 UTC
*** Bug 134068 has been marked as a duplicate of this bug. ***
Comment 19 Xisco Faulí 2020-09-15 16:02:46 UTC
Still reproducible in

Version: 7.1.0.0.alpha0+
Build ID: 6f1e02c96b887750f974c187a82ecd6236e6a435
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 20 Xisco Faulí 2020-10-12 17:32:24 UTC
*** Bug 136910 has been marked as a duplicate of this bug. ***
Comment 21 Xisco Faulí 2020-12-16 11:57:17 UTC
*** Bug 138971 has been marked as a duplicate of this bug. ***
Comment 22 Xisco Faulí 2020-12-16 12:00:13 UTC
Increasing importance due to the number of duplicates
Comment 23 Ming Hua 2020-12-18 07:32:23 UTC
Can someone (Timur?) who knows what to check have a look at bug 138633 and see if that's also a duplicate?  Thanks.
Comment 24 Xisco Faulí 2020-12-18 08:55:23 UTC
*** Bug 138633 has been marked as a duplicate of this bug. ***
Comment 25 thomas.mitterfellner 2020-12-19 19:55:33 UTC
I just wanted to mention that https://bugs.documentfoundation.org/show_bug.cgi?id=138971 contains kind of minimal test files of the same document (one line of text, one formula) in odp, pptx and pdf format (all saved with some version of PP Office 365).
Comment 26 NISZ LibreOffice Team 2021-01-22 07:41:54 UTC
*** Bug 133239 has been marked as a duplicate of this bug. ***
Comment 27 NISZ LibreOffice Team 2021-07-22 11:45:23 UTC
*** Bug 143479 has been marked as a duplicate of this bug. ***
Comment 28 Julien Nabet 2021-12-08 21:01:54 UTC
*** Bug 146100 has been marked as a duplicate of this bug. ***
Comment 29 Julien Nabet 2021-12-08 21:03:38 UTC
*** Bug 91300 has been marked as a duplicate of this bug. ***
Comment 30 Julien Nabet 2021-12-08 21:09:02 UTC
Miklos/Regina/Michael: reading https://bugs.documentfoundation.org/show_bug.cgi?id=129061#c5 + 332a796366b7cb91dff41de4b9ffb17843112a3e
I understand that it's an ODF limitation.
1) Is it something which could be asked and hoped for a future ODF version?
2) would it be possible to implement this as an ODF LO extension (waiting by an official ODF version supporting the ad hoc feature)?
Comment 31 Regina Henschel 2021-12-08 21:35:57 UTC
(In reply to Julien Nabet from comment #30)
> Miklos/Regina/Michael: reading
> https://bugs.documentfoundation.org/show_bug.cgi?id=129061#c5 +
> 332a796366b7cb91dff41de4b9ffb17843112a3e
> I understand that it's an ODF limitation.

No, it is not a limitation of ODF.  The feature exists in ODF but is not implemented in LibreOffice. From view of ODF, Writer frames (which can have formulas as content in LibreOffice) and Draw/Impress "text box" are the same.
Comment 32 Michael Stahl (allotropia) 2021-12-13 10:57:16 UTC
it depends - the math formulas could be imported into as-char Math embedded objects, which is already possible with ODF but not implemented in LO (svx/editeng).

but IIRC the math formulas aren't laid out like embedded objects, they may be laid out as in-line text so you could have half of the formula at the end of one line and the other half at the start of the next line - this is a feature that is missing in both ODF and LO.

(also commit 332a796366b7cb91dff41de4b9ffb17843112a3e indicates that in PresentationML formulas aren't supported either so it's not OOXML feature but PowerPoint extension...)
Comment 33 Rafael Lima 2022-04-29 12:57:34 UTC
> but IIRC the math formulas aren't laid out like embedded objects, they may
> be laid out as in-line text so you could have half of the formula at the end
> of one line and the other half at the start of the next line - this is a
> feature that is missing in both ODF and LO.

Having formulas that can be automatically split to adjust to the paragraph (or to a text box) is something that affects all LO modules, specially Writer in DOCX imports.

For instance, when you open DOCX files with long equations that span more than one line in Word, they will not be entirely visible in Writer.
Comment 34 thebudget72 2022-08-24 07:12:40 UTC Comment hidden (no-value)
Comment 35 Rafael Lima 2022-10-03 22:48:57 UTC
In February 2022 I read a blog post by TDF about a tender that tried to address bug 129061, among many other ODF compliance issues.

https://blog.documentfoundation.org/blog/2022/02/28/tender-to-cleanup-and-further-improve-odf-conformance-202202-01/

At first I was very excited because I thought the inline formula issue in Impress was finally coming to an end. However, the bug was in a list from which not all of them needed to be fixed.

So I'd like to know if this was one of the bugs fixed for this tender.
Comment 36 V Stuart Foote 2022-10-03 23:17:39 UTC
(In reply to Rafael Lima from comment #35)
> ...
> https://blog.documentfoundation.org/blog/2022/02/28/tender-to-cleanup-and-
> further-improve-odf-conformance-202202-01/
> ... 
> So I'd like to know if this was one of the bugs fixed for this tender.

Well if any progress on inline math element of the tender, it has not made it into current master against 7.5.0

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9063d99ff5ee43cc1239fc1dbb5d9897bdda1c9b
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 37 Michael Stahl (allotropia) 2022-10-04 13:26:43 UTC
this bug was included in the tender, at least to the extent that Math embedded objects in shape text should be implemented, similar to existing feature in Writer text frames - the inline layout doesn't exist in ODF currently.

but i'm sorry to report that currently the customer doesn't want us to start working on the tender.
Comment 38 Gabor Kelemen (allotropia) 2023-06-10 16:14:46 UTC
*** Bug 154741 has been marked as a duplicate of this bug. ***
Comment 39 IlarsiWilson 2024-01-24 06:37:33 UTC Comment hidden (spam)
Comment 40 Commit Notification 2024-09-11 13:51:03 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7cfff4751befd678b3db4b6f16b020d38f4e9c32

Related: tdf#129061 Avoid formula import and use fallback for now

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 41 Commit Notification 2024-09-11 18:51:01 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/b3b330e544df8fb802403fe133e8f8095966ac12

Related: tdf#129061 Avoid formula import and use fallback for now

It will be available in 24.8.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 42 Commit Notification 2024-09-12 12:12:26 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/b7a4e32a1a5ef8309b5a97db7a6db6a568a576e0

Related: tdf#129061 Avoid formula import and use fallback for now

It will be available in 24.2.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 43 raal 2024-10-21 21:17:08 UTC
*** Bug 163483 has been marked as a duplicate of this bug. ***
Comment 44 steve 2024-11-06 13:14:33 UTC
Tried to reproduce in Version: 25.2.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: c8cfe6822f148d6f4ac545a9c66f17c4bcb1d9a3
CPU threads: 12; OS: macOS 15.1; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

1. Open PPTX with text, equation and animations with main build
2. not seeing duplicated text. View looks identical to " PPTX with text, equation and animations"
3. select animation and press "play" on right column at the bottom: view goes black briefly and then shows again as previously

Not quite sure what this means as we have no screenshot showing the duplicated text which the orignal report mentions.

If this is partly fixed, should a follow-up bug be filed for the remaining problem with the animation not playing in preview?
Comment 45 Rafael Lima 2024-11-06 14:06:46 UTC
Created attachment 197441 [details]
Sample PPTX file with various equations and text

So I was taking a look at how Impress now works after Mike's patches and I'm not sure the situation has improved. I would say that in some respects it got worse. Let me explain...

Take this sample file... it is an Operations Research lecture I had prepared in 2017 using PowerPoint. It has a lot of equations mixed with text (slides 5 and 6 are good examples).

Prior to the patches, if I opened this file the text on slides 5 and 6 was imported alright, but the equations that were mixed in the text were simply ignored; and the equation objects that were not alongside any text were imported as equations in Impress, though their sizes were all broken.

Now, after the patches, all equations are imported as images; and all objects that contain equations are also entirely imported as images. This is problematic because all the text in the slides are no longer editable. They look OK at first, but as soon as you try to edit them, they're all images and the text can't be changed. If an uninformed user opens a PPTX file like this, edit something else and saves it, they'll lose all their text data... all the text will have been transformed into images.

This is why I think this new behavior did not improve the situation... and for me, this is actually worse, because now I simply cannot open these files in Impress anymore. Previously I at least could import the text and fix what was missing; but now I can't import neither the text, nor the equations.

I would like to stress that this is possibly the biggest missing feature in Impress that makes it really hard to use it for preparing lectures involving mathematical notations. And this is well supported by our competitors OnlyOffice and WPS.
Comment 46 Andy 2024-11-09 19:11:52 UTC
I am writing this because my bug 163483 was amrked as a duplicate of the present one. I can confirm the bug is present in latest 24.8.3 release.
However, reading comment 45 it does not feel as if it is the same... using 24.8.3, when I export an impress file into pptx, then reopen the pptx file into impress 24.8.3, ALL math equation have disappeared do not exist anymore even as empty objects. The data is there tough, since when reopening the file with impress 24.2.6 equations are there.
If I open the file with Powerpoint 2019, it is declared corrupted and the option to restore it fails.
However if I save it again with LO 24.2.6, then equations reappear and the file is correctly opened with Powerpoint 2019.
In all this, I do not see any equation transformed into bitmap images, as in comment 45.
So it seems to be anther issue...
In all Impress 24.8 looks like it was submitted to some changes that cause troubles with equations and PPTX conversion, as well as full screen display (see bug 163220)