Bug 169952 - FILESAVE: ODP -> PPTX Charts are not properly exported
Summary: FILESAVE: ODP -> PPTX Charts are not properly exported
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
26.8.0.0 alpha0+ master
Hardware: All All
: medium normal
Assignee: Karthik
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: OOXML-Chart PPTX-Corrupted
  Show dependency treegraph
 
Reported: 2025-12-12 14:45 UTC by Karthik
Modified: 2026-01-08 03:01 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
ODP File (29.78 KB, application/vnd.oasis.opendocument.presentation)
2025-12-12 14:45 UTC, Karthik
Details
lp120919-1.odp (302.77 KB, application/vnd.oasis.opendocument.presentation)
2026-01-08 02:45 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karthik 2025-12-12 14:45:24 UTC
Description:
Open the attached ODP file and save it as PPTX, the resulting file can't be opened in PowerPoint.

OOXML validator gives the below error
```
  {
    "Description": "Inner exception: Data at the root level is invalid. Line 2, position 5666..",
    "Path": {
      "Namespaces": {},
      "XPath": "",
      "PartUri": "/ppt/charts/chart1.xml"
    },
    "Id": "ExceptionError",
    "ErrorType": "Schema"
  }
```

chart1.xml contains invalid schema.

Steps to Reproduce:
1. Open the attached ODP file
2. Save it as PPTX
3. Open the resulting file in PowerPoint

Actual Results:
PowerPoint fails to open the file

Expected Results:
PowerPoint opens the file without any problem


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: 520(Build:2)
CPU threads: 22; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Debian package version: 4:25.2.3-2+deb13u2
Calc: threaded
Comment 1 Karthik 2025-12-12 14:45:51 UTC
Created attachment 204597 [details]
ODP File
Comment 2 Aron Budea 2026-01-08 02:45:08 UTC
Created attachment 204968 [details]
lp120919-1.odp

Let's note the complete bugdoc, lp120919-1.odp here as well.

While the conversion fails in the range between 2023-01-31 (75c0d7827625c683d52a9e2f3a7c514df890107b) and 2023-04-08 (4f347ebabad6355014889f0a81b107dc774590fe) in 7.6, this issue likely got introduced by the following commit:
https://git.libreoffice.org/core/commit/269585d6b461b565fe75f77b6dbf219749edc5ab
author		Miklos Vajna <vmiklos@collabora.com>	Wed Mar 08 08:04:09 2023 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	Wed Mar 08 08:06:59 2023 +0000

"oox, sd: fix ever-increasing chart IDs when exporting to PPTX"

That isn't the time this file started getting corrupted, that was in 5.0, with bibisect pointing to this commit:
https://git.libreoffice.org/core/commit/fd1372ba8b1c3eb3c7fad6d9c623176c8071f31b
author		Caolán McNamara <caolanm@redhat.com>	Thu Jan 01 19:58:59 2015 +0000
committer	Caolán McNamara <caolanm@redhat.com>	Fri Jan 02 16:14:36 2015 +0000

"boost::unordered_map->std::unordered_map"

...but this probably isn't the real commit, Mike's fix in 25.2 / 24.8 for bug 163064 refers to a slightly older commit that could be the culprit:
https://git.libreoffice.org/core/commit/275aebc5085cd4b0fd3d045ef1ec65c99e1d5b56
author		Mike Kaganski <mike.kaganski@collabora.com>	Sat Sep 21 18:41:17 2024 +0500
committer	Mike Kaganski <mike.kaganski@collabora.com>	Sat Sep 21 22:33:12 2024 +0200

"tdf#163064: pic element is required here, after all

In commit cf15306ccf49da290b391517e2c5dd22a4f1be45 (ERROR: Invalid
content was found starting with element 'p:pic'., 2014-12-22), the
pic element inside the oleObj element was only alloswed for the old
revision of ECMA-736 export, because that was considered invalid by
officeotron. However, as of ECMA-376-1:2016,  this element is
mandatory; CT_OleObject definition in Annex A has:

 <xsd:element name="pic" type="CT_Picture" minOccurs="1" maxOccurs="1"/>

and Annex L (Primer) has L.7.2.5 "Embeddings in a PresentationML
Document" saying:

 The oleObj element shall have a pic child element that (optionally)
 contains the image data to be used in place of loading the actual
 object data."

That commit in 5.0 was:
https://git.libreoffice.org/core/commit/cf15306ccf49da290b391517e2c5dd22a4f1be45
author		Miklos Vajna <vmiklos@collabora.co.uk>	Mon Dec 22 22:36:56 2014 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	Mon Dec 22 22:48:37 2014 +0100

"ERROR: Invalid content was found starting with element 'p:pic'."

So while this 5.0 regression got fixed in 25.2/24.8, the other one introduced in 7.6 overlaps with it.

In addition, the complete bugdoc is also affected by bug 170241, with one embedded XLSX getting lost on conversion.
Comment 3 Karthik 2026-01-08 03:01:07 UTC
I have a fix for this on collabora branch https://gerrit.libreoffice.org/c/core/+/195566, but `CppunitTest_oox_tokenmap` keeps failing in jenkins, when testing locally there are no problems