Bug 112131

Summary: Unable to modify hyperlink target in document
Product: LibreOffice Reporter: Yousuf Philips (jay) (retired) <philipz85>
Component: DrawAssignee: Justin L <jluth>
Status: RESOLVED FIXED    
Severity: normal CC: ilmari.lauhakangas, jluth
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=112130
Whiteboard: target:24.2.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 112125    
Attachments: sample

Description Yousuf Philips (jay) (retired) 2017-08-31 07:52:26 UTC
Created attachment 135895 [details]
sample

Steps:
1. Open attached doc
2. Enable design mode in View > Toolbars > Form Controls
3. Select the button on page 1
4. Insert > Hyperlink to edit the hyperlink button
5. Notice that target in document is set to 'Slide 2'
6. Edit the text field to change it to 'Slide 3' or target in document button to the right of the text field to open up the target in document window and select 'Slide 3' and press apply button and then close button
7. Click the OK button or the apply button and then the OK button
8. Reopen the hyperlink dialog with Insert > Hyperlink and notice the change wasnt saved.

Version: 6.0.0.0.alpha0+
Build ID: 0e35b7738d9f276c0566df0f2cc0f1eed7900d6c
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Timur 2017-08-31 14:31:23 UTC
Modifying simple hyperlink seems to work. So it looks like problem is with changing hyperlink in design mode, with either document or internet hyperlink.
Comment 2 Yousuf Philips (jay) (retired) 2017-08-31 14:52:00 UTC
(In reply to Timur from comment #1)
> Modifying simple hyperlink seems to work. So it looks like problem is with
> changing hyperlink in design mode, with either document or internet
> hyperlink.

You only need to activate design mode after saving a file, but with a blank document design mode is already on.
Comment 3 QA Administrators 2018-09-01 02:41:39 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2020-09-01 04:01:27 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2020-11-18 18:46:10 UTC
Still repro

Arch Linux 64-bit
Version: 7.1.0.0.alpha1+
Build ID: bd3aeaefff5e7bdef10c4702d1f388083557614e
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 15 November 2020
Comment 6 QA Administrators 2022-11-19 03:35:08 UTC Comment hidden (obsolete, spam)
Comment 7 Justin L 2023-11-01 13:11:29 UTC
repro 24.2+

Note that since LO 6.4 the existing link does not work, because "Slide" has changed to "Page" internally.
See LO 6.4 942d1d2ea59bf4605f2c464a6b29c967fa9f8de8.

The URL can be changed by the control's properties.
Comment 8 Justin L 2023-11-01 16:03:46 UTC
The problem seems to lie in DrawViewShell::InsertURLButton. While we have
SdrInventor::FmForm == pMarkedObj->GetObjInventor()
we don't have
pMarkedObj->GetObjIdentifier() == SdrObjKind::FormButton
because it is a SdrObjKind::UNO.
Comment 9 Commit Notification 2023-11-01 18:14:22 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112131 sd: check if SdrObjKind::UNO accepts hyperlink props

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.