Bug 157397 - PDF export: Hyperlinks will be interchanged if there is a form control in document
Summary: PDF export: Hyperlinks will be interchanged if there is a form control in doc...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
7.5.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:24.2.0 target:7.6.3 target:7.5...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Hyperlink Form-Controls
  Show dependency treegraph
 
Reported: 2023-09-23 14:01 UTC by Robert Großkopf
Modified: 2024-02-17 06:16 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Open the document, export to pdf and have a look to target of the hyperlinks. (31.47 KB, application/vnd.oasis.opendocument.text)
2023-09-23 14:01 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2023-09-23 14:01:39 UTC
Created attachment 189772 [details]
Open the document, export to pdf and have a look to target of the hyperlinks.

Open the attached document.
Export the document to a pdf-file.
Have a look at the target of the different links.

When exporting the document to PDF in LO 7.5.3.2 or newer the links won't have the right target any more. First link to "…Kläranlage" will open last link to "…#pano=24", second link wont open anything and third link will open second link "…Mechanische Vorreinigung".

This bug appears only if there is added a form control to the document.

Tested with OpenSUSE 15.4 64bit rpm Linux and different LO-Versions. Works well with LO 7.5.2.2, fails with LO 7.5.3.2
Comment 1 m_a_riosv 2023-09-23 14:23:20 UTC
Reproducible with
Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: default; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

But something strange in the file.
Open the navigator, double-click on the 'Drawing objects' 'form 1', nothing is selected, right-click – edit, goes to the third link.
And I'm able to select the form with the mouse.
Comment 2 BogdanB 2023-09-24 14:33:07 UTC
 4c7e3137701aa96f88f37326d56f1d82c675574a is the first bad commit
commit 4c7e3137701aa96f88f37326d56f1d82c675574a
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Tue Mar 28 14:51:47 2023 +0200

    source d4d471fc88fe4fd14f44dfccdfe360dec327d4f0
    
    source d4d471fc88fe4fd14f44dfccdfe360dec327d4f0

 instdir/program/libvcllo.so | Bin 19328104 -> 19328216 bytes
 instdir/program/setuprc     |   2 +-
 instdir/program/versionrc   |   2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

Michael, please, could you take a look at this regression?
Comment 3 BogdanB 2023-09-24 14:33:39 UTC
tdf#152234 vcl: PDF/UA export: StructElem<->Annot for form controls
veraPDF complains:

  Specification: ISO 14289-1:2014, Clause: 7.18.4, Test number: 1
  A Widget annotation shall be nested within a Form tag per
  ISO 32000-1:2008, 14.8.4.5, Table 340.

This is a little simpler than for Link and Screen annotations, because
the form control StructElem and Annot are exported at the same time
from VclMetafileProcessor2D::processControlPrimitive2D().

So PDFExtOutDevData can just make up the mapping on playback.

Change-Id: Idacb84a3e414f45a2598ccb33b252205cb2bcde9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149556
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit d9031bd83ffe718a80da9ecbdbeb485e35fbabee)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149603
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Comment 4 Commit Notification 2023-10-12 09:07:09 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2e32aa1e9fc240c9cd9854655106d0decbd3694a

tdf#157397 vcl: PDF export: fix CreateControl replay

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 5 Michael Stahl (allotropia) 2023-10-12 09:09:05 UTC
fixed on master
Comment 6 BogdanB 2023-10-12 17:50:31 UTC
It's very good. Verified with
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6056a0e320f0aabbde7adb28c42e00ed72ef2e5b
CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

It's bad in (for comparison)
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 7 Commit Notification 2023-10-18 20:23:07 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/04dbdc1949e60f4dc674c2e728982af371f2f4da

tdf#157397 vcl: PDF export: fix CreateControl replay

It will be available in 7.6.3.

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-10-20 12:43:40 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/029ad921c2c5d78353d043b6fc23811e1b309b3d

tdf#157397 vcl: PDF export: fix CreateControl replay

It will be available in 7.5.9.

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-10-27 23:18:33 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5-8":

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

tdf#157397 vcl: PDF export: fix CreateControl replay

It will be available in 7.5.8.

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.