Bug 157816 - PAC gives >"Link" annotation is not nested inside a "Link" structure element< error with references and caption frame
Summary: PAC gives >"Link" annotation is not nested inside a "Link" structure element<...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:24.2.0 target:7.6.4
Keywords: accessibility, bibisected, bisected, regression
Depends on:
Blocks: PDF-Accessibility
  Show dependency treegraph
 
Reported: 2023-10-18 19:46 UTC by Gabor Kelemen (allotropia)
Modified: 2023-11-11 17:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer 7.6 (62.92 KB, application/vnd.oasis.opendocument.text)
2023-10-18 19:46 UTC, Gabor Kelemen (allotropia)
Details
The example file in Writer and its PDF version in PAC tool (135.26 KB, image/png)
2023-10-18 19:47 UTC, Gabor Kelemen (allotropia)
Details
link attributes and fly (14.29 KB, application/vnd.oasis.opendocument.text-flat-xml)
2023-11-01 19:53 UTC, Michael Stahl (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-10-18 19:46:42 UTC
Created attachment 190281 [details]
Example file from Writer 7.6

Attached minimized document contains some text, an image in caption frame and some cross-references.

When exported as PDF/UA, and checked in PAC 2021 tool there is a "Structure elements - Annotations" error reported: 
"Link" annotation is not nested inside a "Link" structure element

1. Open attached file 
2. Export as PDF, make sure to enable the PDF/UA option
3. Verify the resulting file in the PAC 2021 tool
-> Error message

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e9374f74385d7dfe77d1902d3d82af20143bc775
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

Seems to have started with:

https://git.libreoffice.org/core/+/8497b2f5837bcd7a047d0bd2de842d4b2ef1101b

author	Khaled Hosny <khaled@libreoffice.org>	Thu Sep 07 07:59:49 2023 +0300
committer	Michael Stahl <michael.stahl@allotropia.de>	Thu Sep 14 18:33:51 2023 +0200
tree eba17f106af6642b21e17c813d901b7f08aff4fa
parent 5623a25541925b7389ac8203eb35e3d68485b064 [diff]

tdf#157112: fix off-by-one error in /LastChar of PDF Type 3 fonts
Comment 1 Gabor Kelemen (allotropia) 2023-10-18 19:47:15 UTC
Created attachment 190282 [details]
The example file in Writer and its PDF version in PAC tool
Comment 2 Buovjaga 2023-10-27 13:49:58 UTC
Repro

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 676e0527d2f31556eccae314fbb12ce204f02ec7
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_FI); UI: en-US
Calc: threaded
Comment 3 Michael Stahl (allotropia) 2023-11-01 19:53:38 UTC
Created attachment 190594 [details]
link attributes and fly

this also happens for hyperlink attributes, and also there's more problems:
* if there is a fly anchored in the hyperlink attribute, it will become a link itself in the PDF
* fly causes link annotation to split in 2 but not the link SE (regression from bug 156565)
* if the fly vertically half-overlaps the line with the link then the selection code which only works on rectangles creates 3 rectangles, one of which is half-height and full-width, which doesn't match any of the 2 SE
Comment 4 Michael Stahl (allotropia) 2023-11-02 09:39:07 UTC
fixed on master

(it's very unclear what the commit in the description has to do with these problems)
Comment 5 Commit Notification 2023-11-02 09:39:27 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/468e5b8e0a7fefe1ca53faeb15f5f6527c37a268

tdf#157816 sw: fix getting position in field portion follow

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 6 Commit Notification 2023-11-02 09:47:30 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6593d680e21c24501a58bac216de4a7c71541959

tdf#157816 sw: PDF export: filter out links on empty space, fields

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 7 Commit Notification 2023-11-02 09:47:32 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5726be1314517d47dd733aabe64a3d85cce094c5

tdf#157816 sw: PDF export: filter out links on empty space, INetAttrs

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 8 Commit Notification 2023-11-06 09:21:25 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/4db49918efa3ae13a74d8a1450f10fb25393ce86

tdf#157816 sw: fix getting position in field portion follow

It will be available in 7.6.4.

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 9 Commit Notification 2023-11-06 13:35:47 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

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

tdf#157816 sw: PDF export: filter out links on empty space, fields

It will be available in 7.6.4.

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 10 Commit Notification 2023-11-11 17:08:00 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/1e6e6c6919cfd65bb8192fe893b45ee4d4bfa9be

tdf#157816 sw: PDF export: filter out links on empty space, INetAttrs

It will be available in 7.6.4.

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.