Skip to content

fix(pptx): keep a hyperlink attached to a whole shape - #4787

Merged
dolfim-ibm merged 1 commit into
docling-project:mainfrom
mittalpk:fix/pptx-shape-hyperlink
Oct 14, 2026
Merged

dolfim-ibm merged 1 commit into
docling-project:mainfrom
mittalpk:fix/pptx-shape-hyperlink

Conversation

@mittalpk

Copy link
Copy Markdown
Contributor

A hyperlink attached to a whole shape (a:hlinkClick under p:cNvPr, python-pptx shape.click_action.hyperlink.address) was dropped: the shape's text items had hyperlink=None. They now carry the shape's link unless they already have one. A relative address becomes a Path and a URL an AnyUrl, as in the DOCX backend. Click actions that are not links, such as a jump to another slide, are ignored.

This is independent of #4443, which handles run-level links (#4442). The two compose: a run's own link takes precedence, and the shape's link only fills items without one. Both touch mspowerpoint_backend.py, so I'm happy to rebase on whichever lands first.

Issue resolved by this Pull Request:
Resolves #4782

Checklist:

  • Documentation has been updated, if necessary.
  • Examples have been added, if necessary.
  • Tests have been added, if necessary.

A link stored as a:hlinkClick under the shape's p:cNvPr was dropped. The
shape's text items now carry it unless they already have a link of their
own. Click actions that are not links, such as a jump to another slide,
are ignored.

Signed-off-by: Praveen Mittal <pkmittal28@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ DCO Check Passed

Thanks @mittalpk, all your commits are properly signed off. 🎉

@mergify

mergify Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 Merge protection satisfied — ready to merge.

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@github-actions github-actions Bot added ai:ci-safe AI triage found no CI-safety concern (advisory) bug Something isn't working pptx issue related to pptx backend labels Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

AI triage (advisory)

Checked commit 24802243e9. The analysis read the diff only. It did not run code from this pull request.

The PR fixes shape-level hyperlinks in the PPTX backend. When a whole shape carries an `a:hlinkClick` action, its text items now receive the link unless they already have a run-level one.

Topic labels added: bug, pptx.

CI safety: no concern found. A maintainer must still approve CI.

1 related pull request(s) in the same code
PR State Signal Assessment
#4443 open referenced as #4443; also references issue #4442 related: PR #4443 adds run-level hyperlink and character formatting to the same backend file. Both PRs import the same helpers (urlparse, AnyUrl) and touch overlapping hunks, but they fix different problems: run-level links vs. shape-level links.

The ai:* labels are advisory. They do not approve CI and they do not add tests:full. A new push runs this check again.

@codecov

codecov Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 69.69697% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
docling/backend/mspowerpoint_backend.py 69.69% 7 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@dolfim-ibm dolfim-ibm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dolfim-ibm
dolfim-ibm merged commit 8508141 into docling-project:main Oct 14, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai:ci-safe AI triage found no CI-safety concern (advisory) bug Something isn't working pptx issue related to pptx backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PPTX: a hyperlink on a whole shape (p:cNvPr/a:hlinkClick) is dropped

2 participants