Bug 165181 - FILESAVE PPTX Certain presentations with embedded media fail to open with PowerPoint after saving to PPTX via command line
Summary: FILESAVE PPTX Certain presentations with embedded media fail to open with Pow...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
7.3.3.2 release
Hardware: All All
: medium normal
Assignee: Aron Budea
URL:
Whiteboard: target:25.8.0 target:25.2.2
Keywords: bibisected, bisected
Depends on:
Blocks: PPTX-Corrupted
  Show dependency treegraph
 
Reported: 2025-02-11 01:26 UTC by Aron Budea
Modified: 2025-02-13 04:49 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2025-02-11 01:26:22 UTC
Save either of the following ODP presentations as PPTX using --convert-to, with a similar command:
soffice.exe --convert-to pptx <file name>
Try opening the result in PowerPoint.

Some samples:
- attachment 128618 [details] from bug 103810	
- attachment 145517 [details] from bug 120452
- attachment 146319 [details] from bug 121125
- attachment 151694 [details] from bug 125517

=> PowerPoint complains about a problem.

The cause is that in [Content_Types].xml the media file is listed with ContentType 'application/vnd.sun.star.media'. That happens, because the media files embedded in the attachments were saved in old LO versions with this MIME type, and they're read and written back as such, to ODP as well, but that's fine for LO.

Interestingly, no problem when the file is saved using the UI, it seems there's some UI-related step that somehow corrects the MIME type based on the URI (which happens when opening the file as well, but it's overwritten by the stored MIME type).

Observed using LO 25.8.0.0.alpha0+ (6042e60d69c40d1f307710e60a278cb286d68603) / Windows.

The issue started occurring after the following commit in 7.4 (also backported to 7.3), but the cause of the bug had existed before, too:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=b64c55169d72bfde6aee00673a56d5c25acfd4d4
author		Tünde Tóth <toth.tunde@nisz.hu>	2022-03-24 16:54:01 +0100
committer	Xisco Fauli <xiscofauli@libreoffice.org>	2022-03-30 20:47:06 +0200

tdf#53970 PPTX: fix export of embedded media files
Comment 1 Commit Notification 2025-02-12 10:00:53 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

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

tdf#165181 Don't overwrite guessed media MIME type with default on load

It will be available in 25.8.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 2 Commit Notification 2025-02-13 04:49:20 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/9d55511024024d72616a197b74775c6a83c37323

tdf#165181 Don't overwrite guessed media MIME type with default on load

It will be available in 25.2.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.