Bug 87459 - CONTEXT MENU: Addition of 'Edit Hyperlink' entry in cell edit mode
Summary: CONTEXT MENU: Addition of 'Edit Hyperlink' entry in cell edit mode
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords: needsDevEval, topicUI
Depends on: 120373
Blocks: Context-Menu Cell-Edit-Mode Hyperlink-Calc
  Show dependency treegraph
 
Reported: 2014-12-18 20:56 UTC by Yousuf Philips (jay) (retired)
Modified: 2019-04-18 08:41 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
the patch (1.44 KB, application/mbox)
2015-11-04 14:32 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-12-18 20:56:03 UTC
If you right-click on a hyperlink text in a cell, the context menu only provides 'Open Hyperlink', so it would be good to also have 'Edit Hyperlink' there as well, as the only other means of a user getting to the hyperlink dialog is going to Insert > Hyperlink or clicking the insert hyperlink toolbar button.
Comment 1 Cor Nouws 2014-12-18 21:35:25 UTC
OK :)
Comment 2 Yousuf Philips (jay) (retired) 2014-12-18 21:58:04 UTC
Forgot to set this as UX. :D
Comment 3 tmacalp 2015-09-15 18:49:45 UTC
I agree with this enhancement!

Also, as far as I'm aware, Calc hyperlinks don't have an action associated with double clicking on them.  Would it cause too much confusion to associate double-clicking the link with opening it for editing?

While testing the current behavior, I noticed a number of Calc hyperlink related bugs.

Bug 1: At least in LO 5.0.1.2, when you don't have the cell containing the link open for editing and you right click a link, you are not even presented with the "Open Hyperlink" option.

Bug 2: The only place you can edit an existing hyperlink appears to be in the formula bar when you select the cell containing the hyperlink.  Even when editing the cell, the link remains in uneditable hyperlink format.

Bug 3: When you type a link in the formula bar and press space, autocorrect turns the formula bar's link into a hyperlink, which is then uneditable until you select another cell and then edit the cell again.

Bug 4: When you select the cell containing a link and click in the formula bar to edit the link, any additional characters you insert will appear AFTER the link.  So, if you change "google.com" to "gooogle.com", the result will be <google.com>o, and it will still go to google.com.

Bug 5: There is a bug that allows you to edit the link in the cell edit mode.  This method actually changes the destination of the link!  Simply select the cell containing link and right-click on the link in the formula bar.  If you then look down at the cell, you'll notice the link is now just normal text.  If you edit the cell down in cell edit mode and use autocorrect to generate a new link by pressing space after typing it, the destination will be correct.

Unfortunately, if you use bug 5, but edit the link using the formula bar, your link will drop the domain??  So, if you try to change "google.com" to "gooogle.com", it will become <gooogle>.com.

Sorry, this really started off as a "me too" report, but I kept running into bugs and added my findings...  I guess these should all be their own reports?  Or should there be a giant "Fix calc hyperlinks" bug?
Comment 4 Yousuf Philips (jay) (retired) 2015-11-04 01:09:55 UTC
(In reply to tmacalp from comment #3)
> Also, as far as I'm aware, Calc hyperlinks don't have an action associated
> with double clicking on them.  Would it cause too much confusion to
> associate double-clicking the link with opening it for editing?

The problem is that hyperlinks are treated as style text and not a single selectable object like fields, images, shapes, etc. so there isnt a means of making a double click action for it.

> Bug 1: At least in LO 5.0.1.2, when you don't have the cell containing the
> link open for editing and you right click a link, you are not even presented
> with the "Open Hyperlink" option.

Yes it seems when you right-click on a hyperlink, it positions the cursor after the hyperlink, so the context menu that appears doesnt have the 'open hyperlink' option, but if you press Escape and then left arrow key and then right-click, the the context menu will have the option. Do submit this as a new bug.

> Bug 2: The only place you can edit an existing hyperlink appears to be in
> the formula bar when you select the cell containing the hyperlink.  Even
> when editing the cell, the link remains in uneditable hyperlink format.
>
> Bug 3: When you type a link in the formula bar and press space, autocorrect
> turns the formula bar's link into a hyperlink, which is then uneditable
> until you select another cell and then edit the cell again.
> 
> Bug 4: When you select the cell containing a link and click in the formula
> bar to edit the link, any additional characters you insert will appear AFTER
> the link.  So, if you change "google.com" to "gooogle.com", the result will
> be <google.com>o, and it will still go to google.com.

If you are on a cell that only has a hyperlink in it, then you can do Insert > Hyperlink to edit the hyperlink, alternatively if you have the text cursor before the hyperlink in edit mode, you can edit it with Insert > Hyperlink. But yes modifying the hyperlink in the formula bar isnt good, so please submit bugs for its behaviour.

> Sorry, this really started off as a "me too" report, but I kept running into
> bugs and added my findings...  I guess these should all be their own
> reports?  Or should there be a giant "Fix calc hyperlinks" bug?

Yes that happens with me as well when testing, that one bug shows up one after the other, so do file bugs for the various issues. :D
Comment 5 Yousuf Philips (jay) (retired) 2015-11-04 02:24:32 UTC
Seems like the .uno:EditHyperlink command isnt available in calc for some strange reason, when it is available in writer and impress/draw, which of course doesnt do anything more than opening the same hyperlink dialog from Insert > Hyperlink. But without this option, its not possible to add an entry for in the Edit menu or in the context menu and this results in quite a bad UX for people.

I was contemplating putting .uno:HyperlinkDialog into Edit menu and edit context menu, but it doesnt work as expected.
Comment 6 Maxim Monastirsky 2015-11-04 12:58:49 UTC
(In reply to Yousuf (Jay) Philips from comment #5)
> I was contemplating putting .uno:HyperlinkDialog into Edit menu and edit
> context menu, but it doesnt work as expected.
Can you elaborate on this? What exactly isn't working? (A diff of what you tried could be useful.)
Comment 7 Yousuf Philips (jay) (retired) 2015-11-04 14:32:08 UTC
Created attachment 120261 [details]
the patch

(In reply to Maxim Monastirsky from comment #6)
> Can you elaborate on this? What exactly isn't working? (A diff of what you
> tried could be useful.)

Well i put .uno:HyperlinkDialog in the Edit menu and it is always enabled whether you have a hyperlink in a cell or not and having it in the context menu means its always visible in the context menu whether you have a hyperlink in a cell or not. One option for the context menu is to have it labeled 'Add/Edit Hyperlink', but nothing could be done for the edit menu.

.uno:EditHyperlink on the other hand, like .uno:OpenHyperlinkOnCursor, is only enabled when a hyperlink is selected.
Comment 8 Robinson Tryon (qubit) 2015-12-13 11:24:18 UTC Comment hidden (obsolete)
Comment 9 Gülşah Köse 2017-08-09 10:35:50 UTC Comment hidden (obsolete)
Comment 10 Yousuf Philips (jay) (retired) 2017-08-21 13:10:34 UTC
(In reply to Gülşah Köse from comment #9)
> @Yousuf It seems resolved to me, could you check it again?

Not resolved for me.

Version: 6.0.0.0.alpha0+
Build ID: a19dc104ec008f0bb44676d63d4764c6d7442a0d
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 11 andreas_k 2019-04-18 07:49:41 UTC
I bring back .uno:HyperlinkDialog it's no perfect solution, on the other hand the celledit context menu is not really large so have an item there that is visible always is not that an issue. 

In adition HyperlinkDialog show the user that you can add an hyperlink to an selected text.
Comment 12 Commit Notification 2019-04-18 08:41:07 UTC
andreas kainz committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/777232d03b75ef80ab7f3c57f04dee2ce4953633%5E%21

tdf#87459 bring back HyperlinkDialog again

It will be available in 6.3.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.