Bug 169617 - FILESAVE PPTX SmartArt with link becomes invalid on save
Summary: FILESAVE PPTX SmartArt with link becomes invalid on save
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: OOXML-SmartArt PPTX-Hyperlink
  Show dependency treegraph
 
Reported: 2025-11-22 14:24 UTC by Aron Budea
Modified: 2025-11-22 14:25 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Sample PPTX (40.89 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2025-11-22 14:24 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2025-11-22 14:24:52 UTC
Created attachment 204207 [details]
Sample PPTX

The attached PPTX file contains a simple SmartArt, with a link to another slide, and an external one. Open and save it back to PPTX, then try opening it in PowerPoint: it will fail.

The problem is 'ppt/diagrams/_rels/*.rels', or precisely, the lack of them, as can be seen after unzipping the result PPTX. Inside eg. 'ppt/diagrams/data1.xml' the links are stored as follows:
- external
  <a:hlinkClick xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId1"/>
- internal
  <a:hlinkClick xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:id="rId2" action="ppaction://hlinksldjump"/>

These would need corresponding Relationship elements in 'ppt/diagrams/_rels/data1.xml.rels':
<Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" Target="../slides/slide2.xml"/>
<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="https://libreoffice.org/" TargetMode="External"/>

There's something similar in 'ppt/diagrams/diagram1.xml' and 'ppt/diagrams/_rels/drawing1.xml.rels', but only the external relationship is recorded there.

This originates from the following commit in 6.3, but it is an implementation error, as SmartArt export used to be more basic:
https://git.libreoffice.org/core/commit/aafaf1f55fa413ad49d4556cf7c0a713dd206ae4
author		Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>	Wed Mar 13 10:49:30 2019 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	Mon Apr 08 10:07:35 2019 +0200

"PPTX export: save SmartArt as diagram instead of group of shapes"

A couple of other interesting commits:
https://git.libreoffice.org/core/commit/dba1f992d0757b9c353dd41d55dd89ecafd70603
author		Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>	Fri Mar 08 12:45:24 2019 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	Mon Mar 11 17:38:07 2019 +0100

"PPTX import: save SmartArt markup into InteropGrabBag"

https://git.libreoffice.org/core/commit/58278ea997b92d02177b6641794f49a4c7005130
author		Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>	Fri Mar 15 23:50:13 2019 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	Mon Mar 18 09:22:45 2019 +0100

"PPTX import: save also OOXDrawing in InteropGrabBag"

Perhaps what could be done here is saving hyperlink relationships into the grab bags, and writing them back on export.