Bug 156548 - Some hyperlinks don't work after DOCX export
Summary: Some hyperlinks don't work after DOCX export
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.2.0 target:7.5.6 target:7.6.1
Keywords: filter:docx
Depends on:
Blocks: DOCX-Hyperlink
  Show dependency treegraph
 
Reported: 2023-07-31 10:10 UTC by Mike Kaganski
Modified: 2023-08-03 13:29 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
A bookmarkwith a long name, and a hyperlink to it (805 bytes, application/vnd.oasis.opendocument.text)
2023-07-31 10:10 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2023-07-31 10:10:46 UTC
Created attachment 188671 [details]
A bookmarkwith a long name, and a hyperlink to it

Open the attachment, test that the hyperlink works (Ctrl+click moves the cursor to the start ofthe target paragraph), and save as DOCX. After that, reload  the exported document.

This breaks the hyperlink - clicking it doesn't move the cursor. In Navigator, it's possible to see that the bookmark in the target paragraph has a truncated name, but the hyperlink still uses the initial long name.

Caused by incorrect implementation of [MS-OE376] Part 4 Sect. 2.13.6.2, bookmarkStart, made in commit 1fbd4001994e78040fa94ba06979b36d90dd6846 (INTEGRATION: CWS limerickfilterteam08 (1.51.4); FILE MERGED, 2003-09-01).
Comment 1 Commit Notification 2023-08-01 08:36:54 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/38feff6a04b2785b219fabe7172c857e97ef90ae

tdf#156548: make truncated long bookmark name unique, and use it in hyperlinks

It will be available in 24.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 2 Commit Notification 2023-08-02 06:04:34 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#156548: make truncated long bookmark name unique, and use it in hyperlinks

It will be available in 7.5.6.

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 3 Commit Notification 2023-08-02 06:05:37 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#156548: make truncated long bookmark name unique, and use it in hyperlinks

It will be available in 7.6.1.

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.