Created attachment 101076 [details]
shows that cell A1 is selected but hyperlink dialog doesnt put 12 as the text in the 'Text' field
If you open calc and in A1 type '12' and press enter. then select A1 and press the add hyperlink button in the toolbar, it wont use '12' as the hyperlink text. It works if i select '12' within the cell, but not when i select the cell itself.
thanks Jay :)
Just happened to notice this when i was testing bug 79972 in ms word and noticed it did it but LibO doesnt. :)
1. open calc
2. type 12 into A1 and press enter
3. press up key to return to A1
4. insert hyperlink
5. 'text' field doesnt show '12'
Build ID: 8ba60ca42d4d1873b8cd85c5d3b5ed2f0e19df60
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2;
Locale: en-US (en_US.UTF-8); Calc: group
Thinking about reconsidering my support for this.
A 'highlighted' cell as meant here, is a cell with the cell-focus.
Always the behavior is: start typing/pasting, and the current content is ignored and replaced.
As such, the current behavior is logic and consistent.
We should take care about over-engineering. What should be shown in case of "foo http://test.com bar"? So how about keeping the current behavior and fill in the dialog only when the cell contains a valid link.
(In reply to Heiko Tietze from comment #5)
> We should take care about over-engineering. What should be shown in case of
> "foo http://test.com bar"?
The same as we show in Writer, "foo http://test.com bar".
> So how about keeping the current behavior and
> fill in the dialog only when the cell contains a valid link.
I dont think the current behaviour is good and tested Excel, WPS, Softmaker and Google Docs and all take the cell contents as the text.
@Eike, Stuart: What do you think?
I think the current behavior is not good. Users expect that the software is doing as much as possible automatically. If I select a cell (or several cells) and add a hyperlink, then I would expect that the text in this cell (these cells) is transformed to a hyperlink.
MSO Excel 2013 works like that. The result of point 5 in comment 3 from Jay is that the "Text" textfield is grayed out. All but the text itself can be edited.
This is a good solution because
- the user can't edit the cell content(s) with a grayed out text field but a hyperlink can be added (which prevents confusion or that content and formatting can be destroyed),
- the user can add a hyperlink to a whole cell or several cells as he can do it with a text string (same behavior).
(In reply to Yousuf Philips (jay) from comment #6)
> The same as we show in Writer, ...
> I dont think the current behaviour is good and tested Excel...
Calc contains structured data which makes it different to Writer.
123 http://test.com 456 -> no hyperlink
123 http://test.com -> no hyperlink
http://test.com 456 -> no hyperlink
http://test.com -> hyperlink
Regina, any relevant aspects from ODF spec?
Excel can have only one hyperlink per cell and only a hyperlink if a hyperlink, no further text. That's not a good example. And not even related to the original request. ODF doesn't have that limitation.
If I understood correctly, the original request is to prefill the hyperlink's Text field with the cell content the cell cursor is on (as if the entire cell content was selected when doing in-cell editing), and when applied the hyperlink should replace the cell content. Correct?
(In reply to Eike Rathke from comment #9)
> If I understood correctly, the original request is to prefill the
> hyperlink's Text field with the cell content the cell cursor is on (as if
> the entire cell content was selected when doing in-cell editing), and when
> applied the hyperlink should replace the cell content. Correct?
Yes this is what was requested. But there will be situations when the cell contents have a hyperlink in it, and ideally in this case, it would clear any hyperlinks already present and creating the new hyperlink that covers all the cells text.
@Eike: I meant the same as you do. I'm referring to Jay's steps in comment 3.
I think Heiko means another case for auto-hyperlinking cell-content without the hyperlink dialog which isn't was Jay had in mind when creating this bug.
(In reply to Yousuf Philips (jay) from comment #10)
As written in comment #5: its against the nature of editing in Calc
propose to add to the agenda of the UX meeting(s).
I support comment 9 and comment 10 as this is what I expect when clicking on the hyperlink command at a cell with content.
(In reply to Cor Nouws from comment #12)
> As written in comment #5: its against the nature of editing in Calc
Why is this against of Calf's nature? Software should ease user's work. It's only a question what users expect. What is the benefit of the current behavior?
(In reply to Cor Nouws from comment #4)
> Thinking about reconsidering my support for this.
> A 'highlighted' cell as meant here, is a cell with the cell-focus.
> Always the behavior is: start typing/pasting, and the current content is
> ignored and replaced.
> As such, the current behavior is logic and consistent.
The requested behavior makes that the content (foo) is indeed replaced, by the hyperlink. So my comment was confused - I support this request.
We discussed the request in the design meeting and support the idea. Removing needsUX.
*** Bug 129493 has been marked as a duplicate of this bug. ***
Could this be viable solution: https://gerrit.libreoffice.org/c/core/+/131156
May anyone can clarify my doubts here. The proposed patch just inserts the entire text into the hyperlink text as requested.
After I made my settings in the hyperlink dialog, should the entire content of the selected cell be replaced or should the hyperlink inserted after the cursor in the respective cell?
(In reply to Andreas Heinisch from comment #19)
> May anyone can clarify my doubts here. The proposed patch just inserts the
> entire text into the hyperlink text as requested.
> After I made my settings in the hyperlink dialog, should the entire content
> of the selected cell be replaced or should the hyperlink inserted after the
> cursor in the respective cell?
See comment 10: use the whole cell content if nothing has been selected, otherwise use the selection; as a bonus, if the cell/selection contains a hyperlink use only this part of the text
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":
tdf#80043 - Put selected text into hyperlink item
It will be available in 7.4.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:
Affected users are encouraged to test the fix and report feedback.
*** Bug 55342 has been marked as a duplicate of this bug. ***