Bug 108486 - Hyperlink character styles automatically assigned when opening Character dialog
Summary: Hyperlink character styles automatically assigned when opening Character dialog
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.beta2
Hardware: All All
: medium trivial
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:6.0.0 target:5.4.0.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Character-Dialog
  Show dependency treegraph
 
Reported: 2017-06-12 16:10 UTC by Telesto
Modified: 2019-09-22 05:16 UTC (History)
8 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 Telesto 2017-06-12 16:10:10 UTC
Description:
Remove hyperlink in the context menu after rotating text

Steps to Reproduce:
1. Open a new Writer document
2. Type Hello
3. Select Hello 
4. Right Click Context Menu -> Character
5. Position Tab -> Rotation 90 degrees -> OK
6. Right Click the (still) selected text Hello 

Actual Results:  
Remove, Copy, Edit Hyperlink shows up in the context menu

Expected Results:
Shouldn't appear


Reproducible: Always

User Profile Reset: No

Additional Info:
Found in
Version: 5.5.0.0.alpha0+
Build ID: 076ed447f694239d5c67adee528ea6e471d909ff
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-06-09_23:54:20
Locale: nl-NL (nl_NL); Calc: CL

and in
Versie: 5.4.0.0.beta1 
Build ID: 8672113ead4e403c55e31b1d9a3d1e0f3b299577
CPU-threads: 4; Besturingssysteem:Windows 6.2; UI-render: GL; 
Locale: nl-NL (nl_NL); Calc: CL


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Dieter 2017-06-13 10:00:18 UTC
I could reproduce it with LO 5.3.4.1, but I don't think that this is a bug, because in my view everything works as it should do. For me it is not clear, why the hyperlinks should not appear.
Comment 2 Telesto 2017-06-13 11:36:07 UTC
(In reply to Dieter Praas from comment #1)
> I could reproduce it with LO 5.3.4.1, but I don't think that this is a bug,
> because in my view everything works as it should do. For me it is not clear,
> why the hyperlinks should not appear.

Multiple reasons:
1. If text horizontal is the hyperlink stuff show up in the context menu. Only if the text is vertical. This is inconstant
2. It doesn't happen in the LibO5.2 branch (I tested 5.2.4.2)
3. It's illogical: I expect a hyperlink, when I'm able to delete it. Deleting a non-existing hyperlink is a bit curious.
Comment 3 Dieter 2017-06-13 11:57:46 UTC
I now tested it with LO 5.4.0.0 beta2 and I think I got the problem. So I marked it as NEW. I also recognized that after changing the rotation back to 0 degrees (context menu => character) the hyperlink entrys still appear.
Comment 4 Yousuf Philips (jay) (retired) 2017-06-13 12:40:52 UTC
Steps:
1) Open writer
2) Format > Character
3) Click on Hyperlink tab
4) Visited and unvisited links drop down menus are set

Regression in 5.4+.
Comment 5 Xisco Faulí 2017-06-13 15:20:26 UTC
Regression introduced by:

author	Oliver Specht <oliver.specht@cib.de>	2017-03-31 12:46:15 (GMT)
committer	Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>	2017-04-03 07:36:17 (GMT)
commit 8533e21ecf8d94caebfdb3df088e462bb790f986 (patch)
tree a06b99d08ef15b0ddfd39635ebbb9330eb4c746a
parent 40eca147d11a0563eab6450cb94f0b5704c88fcc (diff)
tdf#106897: preset visited/unvisited character style in ListBox
Change-Id: I9bfa2b8a50340a6b09d8cc50e5313dc45a518472
Reviewed-on: https://gerrit.libreoffice.org/35973
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>

Bisected with bibisect-linux-64-5.4

Adding Cc: to Oliver Specht
Comment 6 Thorsten Behrens (allotropia) 2017-06-13 20:10:32 UTC
shame, regression from fixing bug 106897
Comment 7 Katarina Behrens (Inactive) 2017-06-15 10:14:22 UTC
I somehow fail to understand why was bug#106897 even filed, even more so fixed. Prior to the fix, I see the following behaviour as far as in 3.6:

Selected text is a plain text => no hyperlink styles preselected
Selected text is a hyperlink => hyperlink styles preselected

which is from my POV correct. Why would one want to preselect hyperlink styles if the text isn't a hyperlink? As a result, I'd simply suggest to revert the commit.

But maybe I'm missing some important piece of puzzle?
Comment 8 Yousuf Philips (jay) (retired) 2017-06-15 12:18:47 UTC
Bubli: Please revert as i dont understand what Samuel was implying in the other bug report unless he was selecting a hyperlink.
Comment 9 Samuel Mehrbrodt (allotropia) 2017-06-16 06:51:10 UTC
The reason for bug 106897 was, that those character styles actually _are_ the defaults for hyperlinks, thus they should be preselected.
Of course they should not be applied when no hyperlink has been entered.

I have a fix for this, please don't revert the fix for bug 106897.
Comment 10 Katarina Behrens (Inactive) 2017-06-16 07:11:31 UTC
> those character styles actually _are_
> the defaults for hyperlinks, thus they should be preselected.

I disagree, if text is not a hyperlink, hyperlink styles shouldn't be preselected. But hey, that's improved UX for you :grin:
Comment 11 Buovjaga 2017-06-16 07:45:17 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #9)
> Of course they should not be applied when no hyperlink has been entered.
> 
> I have a fix for this, please don't revert the fix for bug 106897.

I don't understand this, because for a real hyperlink, the styles are preselected correctly in old versions. I tested in 5.0 and 5.3.
Comment 12 Samuel Mehrbrodt (allotropia) 2017-06-16 08:19:56 UTC
(In reply to Katarina Behrens (CIB) from comment #10)
> I disagree, if text is not a hyperlink, hyperlink styles shouldn't be
> preselected. But hey, that's improved UX for you :grin:

Note that those styles are only for hyperlinks, they even are on a tab called "Hyperlink". They aren't used for normal text.


> I don't understand this, because for a real hyperlink, the styles are preselected correctly in old versions. I tested in 5.0 and 5.3.

Yes, but you can use that dialog also to *insert* a hyperlink. In this case, the styles for visited and unvisited links get applied, but the select boxes didn't indicate that.
Comment 13 Commit Notification 2017-06-16 08:30:15 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fcd12c6d8574c1cd4c6ff45ba54e5d286d42eaad

tdf#108486 Only apply hyperlink settings if something did change

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Katarina Behrens (Inactive) 2017-06-16 08:33:43 UTC
> Yes, but you can use that dialog also to *insert* a hyperlink. In this case,
> the styles for visited and unvisited links get applied, but the select boxes
> didn't indicate that.

So what about preselecting the styles if and only if the user hyperlinkifies the text? (inserts some URL into the text field *in this tab* )
Comment 15 Samuel Mehrbrodt (allotropia) 2017-06-16 08:55:13 UTC
(In reply to Katarina Behrens (CIB) from comment #14)
> So what about preselecting the styles if and only if the user hyperlinkifies
> the text? (inserts some URL into the text field *in this tab* )

Don't think that is necessary as the problem reported in comment 0 is fixed with my commit above.
But feel free to further improve if you want to.
Comment 16 Commit Notification 2017-06-16 11:41:35 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ed8f8ac59c06a7a1bccf603fe6d4c834ff96eaf&h=libreoffice-5-4

tdf#108486 Only apply hyperlink settings if something did change

It will be available in 5.4.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.