Files
odfstudio/include
Mike Kaganski 32dec34df6 tdf#171022 sw,vcl: name the element a link points at
Exporting a document to PDF/UA-2 produced a file that fails
ISO 14289-2 clause 8.8, once per outline item and internal link.
veraPDF reports

 Destination in Outline item, OpenAction or Link annotation is not
 a structure destination

The destination named the page and an area on it, and that is all:
what was linked to could only be worked out by looking at what the
layout had put at that position.

A destination for a link or an outline item is now written as a GoTo
action carrying a structure destination beside the page one
(ISO 32000-2 12.3.2.3):

 /A<</Type/Action/S/GoTo/D[<page> 0 R/XYZ ...]/SD[<elem> 0 R/XYZ ...]>>

sw creates a destination before its target is tagged, so the node is
remembered while the cursor is on it, and matched against the tags in
the pass that already runs after the last page. Creating one and
remembering its node is a single call now, which every destination a
link or an outline item points at goes through: bibliography entries
and links in the text of a shape are named as well.

The cursor is not always on the target: a jump that selects a frame
or a drawing object, and one that finds nothing, move it nowhere, and
where it was left standing on the link, that link's own element must
not become the target. The pass over a shape's links can instead
start with the cursor on the target already, where a jump that did
reach it shows no move either, so there the mark names its own node.
Those keep writing /Dest, as do a target that was never tagged and
one whose element was never emitted.

The element carries its role and its content, not a name of its own:
a heading becomes /S/H1 with no /Alt or /T. veraPDF does not check
what a structure destination points at, so the test does.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: Ic76d80d46f130d549ebaacf175393a3d6ec77998
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12300
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit a6502c6e96d13425bcb4a3bf5731a998982d5957)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211150
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-18 19:07:01 +02:00
..
2026-09-03 08:53:27 +02:00
2026-08-28 16:33:11 +02:00
2026-04-30 08:54:45 +02:00
2026-08-25 11:17:36 +02:00
2026-09-03 08:53:27 +02:00
2026-08-27 13:59:07 +02:00
2026-06-04 10:00:29 +02:00
2026-09-03 08:53:27 +02:00
2026-08-25 11:57:36 +02:00
2026-09-03 08:50:28 +02:00
2026-09-03 08:54:54 +02:00
2026-08-28 16:33:11 +02:00
2026-08-25 11:57:36 +02:00
2026-09-10 21:26:38 +02:00
2026-08-21 14:19:46 +02:00
2026-08-25 14:31:09 +02:00
2026-09-03 08:54:54 +02:00
2026-09-03 09:00:23 +02:00
2026-08-27 20:39:06 +02:00
2026-09-03 09:00:23 +02:00
…
2026-09-10 21:26:38 +02:00
2026-09-03 09:02:25 +02:00
2026-09-03 09:02:25 +02:00
2026-09-03 08:51:42 +02:00
2026-09-03 08:51:42 +02:00
…
…