Bug 134456 - Hyperlink colours cannot be changed by changing Hyperlink style
Summary: Hyperlink colours cannot be changed by changing Hyperlink style
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
6.4.3.2 release
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Help-Changes-Features
  Show dependency treegraph
 
Reported: 2020-07-02 04:43 UTC by Luke Kendall
Modified: 2020-07-12 13:41 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kendall 2020-07-02 04:43:02 UTC
I expected that by selecting a hyperlink in a cell and opening the Manage Styles panel, which showed the style was Hyperlink, that I could change the font color by the Font Effects tab, which shows a preview of the hyperlink as expected.

Nor did selecting the text of the hyperlink and setting the colour via the text colour toolbar control. It had no effect either.

But doing so has no effect.  The only way to change a hyperlink color is as per the instructions https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwjW4_zV3q3qAhVszzgGHWmFBvMQFjABegQICxAE&url=https%3A%2F%2Fwiki.documentfoundation.org%2Fimages%2Ff%2Ff1%2FWG5403-WorkingWithText_2.odt&usg=AOvVaw3O96P0cDyKv6WHN4RH8ifL

Perhaps either enable the font colour to be set in the usual way, or grey out the controls which don't have any effect.
Comment 1 Telesto 2020-07-02 21:28:35 UTC
This is about Writer, I assume.. As the component is set to Calc
Comment 2 Telesto 2020-07-02 21:35:44 UTC
OK checked Calc

Not working in
7.1

nor in
6.0

style is not present in
Version: 5.3.0.2
Build ID: 5ad7b2889021c491af62f7930a4b1cb631392f16
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
Locale: nl-NL (nl_NL); Calc: group

and older versions
Comment 3 Telesto 2020-07-02 21:38:46 UTC
Not sure what the idea was with the Hyperlink style.. a hyperlink is created automatic, but the style isn't attached to it.. 

You have to apply it manually (and will work after all)
Comment 4 Luke Kendall 2020-07-03 08:20:13 UTC
I couldn't find a way to apply the style manually to check that.
I tried selecting the text and then double clicking Hyperlink style in the Manage Styles dialogue.
I tied selecting Fill Format mode in the MS dialogue and clicking on the cell.
When I do either of those things, the underline style chosen in the text style is applied. But the colour is not. 
So maybe it is a genuine bug.
And yes, I'm referring to Calc, nott Writer.
Comment 5 Heiko Tietze 2020-07-03 09:12:51 UTC
If it was Writer I would immediately switch from direct formatting to character style. But Calc does not have a text style, only the whole cell can be formatted as hyperlink. Meaning content like "Click here http:\\foo.org" would be formatted as a whole. Eike, Mike: what do you think?
Comment 6 Mike Kaganski 2020-07-03 09:36:44 UTC
In Calc, the "hyperlink" cell style is intended for the cases where Calc does *not* apply the hyperlink formatting automatically: e.g., for a column of formulas like '=HYPERLINK("www.example.org?q="&A1)'. Setting that column to that style helps the formatting, and is perfectly logical.

But for automatically applied text run formatting, the colors are taken from Options->LibreOffice->Application Colors (Unvisited/Visited links). I don't know if there's a way to define the other properties of hyperlink text - but I don't expect spreadsheet to provide too flexible ways to format parts of cells, which is anyway only possible manually on per-cell basis, while in all other aspects, spreadsheet documents are about bulk operations involving same formulas, formatting, etc in thousands of cells... (But yes, if this is out of user control at least in some way, like the formatting applied automatically, it's not good.)

Actually I would love to see "Application Colors" to transform into "Application Formatting", with each element presenting not only color, but also other applicable properties, e.g. font and background. Then defining the look and feel of an auto-applied hyperlink formatting could be done in a single place. (But it's an off-topic, I realize.)
Comment 7 Heiko Tietze 2020-07-09 07:14:19 UTC
Sorry, but I don't get the point of cell formatting with hyperlink style. Sure, I can enter www.foo.bar and undo the auto formatting (links are shown in lighter blue without underlining) and apply the cell style. But this example is very much artificial. My take: remove Hyperlink cell style from Calc.
Comment 8 Telesto 2020-07-09 07:24:39 UTC
(In reply to Heiko Tietze from comment #7)
> My take: remove Hyperlink cell style from Calc.

I agree
Comment 9 Mike Kaganski 2020-07-09 07:25:46 UTC
(In reply to Heiko Tietze from comment #7)
> Sorry, but I don't get the point of cell formatting with hyperlink style.
> Sure, I can enter www.foo.bar and undo the auto formatting (links are shown
> in lighter blue without underlining) and apply the cell style.

No it's not for this use case at all. The style is not for a random cell where you put an URL, and artificially disable URL recognition. It's (as other styles in Calc) for potentially huge ranges of cells with structured data (here: formulas).

Imagine a spreadsheet with goods of this company; in column A, there's an ID; then its name in B, price in C, and clickable URL in D. How would those URLs in D be created? There are maybe tens of thousands of rows - would you type "http://www.thisfictionalcompany.com/?id=1234" by hand ten thousand times? No, you will use a formula which would take the id from A, like this (in D2):

>  =HYPERLINK("http://www.thisfictionalcompany.com/?id=" & A2; "Click to see full description for " & B2)

Try this formula yourself, and see how it creates a clickable cell ("Ctrl+Click to go to ..."), which you can expand (copy to 1000s of rows) in usual Calc's ways (e.g., auto-filling, etc) - but it doesn't get coloured as hyperlink!

Are you suggesting to apply direct formatting to those 1000s of cells? The style is to select D, and apply the style. Is it wrong?
Comment 10 Heiko Tietze 2020-07-09 07:35:44 UTC
Okay, you got me convinced. Hyperlink cell style is meaningful so this request is WF.
Comment 11 Luke Kendall 2020-07-09 13:38:18 UTC
Because I've learned from this that the hyperlink style does not work like it does in Writer (and Draw?), it's okay by me if you resolve this as Won't Fix.

I do think that other users may fall into the same trap I did.  Maybe that's something that could be addressed by adding to the documentation.  As I said in comment 4, in response to comment 3, I couldn't find a way to apply the formatting directly to have a visible effect on the colour.  That might mean the ability to set the colour is misleading (but maybe it does work that way when applied from a formula)?

Anyway, I just thought I'd make that observation.  I'm happy for you to decide.
Comment 12 Telesto 2020-07-09 14:42:31 UTC
Lets add the documentation department. See comment 9 and 11