Bug 120734 - Right click context menu contains "Remove Hyperlink" without a hyperlink present
Summary: Right click context menu contains "Remove Hyperlink" without a hyperlink present
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Samuel Mehrbrodt (allotropia)
URL:
Whiteboard: target:6.4.0 target:6.5.0 target:6.4.0.1
Keywords:
: 112800 (view as bug list)
Depends on:
Blocks: Context-Menu
  Show dependency treegraph
 
Reported: 2018-10-20 17:25 UTC by Telesto
Modified: 2019-12-04 21:12 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
1000 Paragraphs (12.25 KB, application/vnd.oasis.opendocument.text)
2019-11-11 14:07 UTC, Samuel Mehrbrodt (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-10-20 17:25:28 UTC
Description:
Right click context menu contains "Remove Hyperlink" without a hyperlink present

Steps to Reproduce:
1. Open attachment 145862 [details]
2. CTRL+A
3. Open the Right click context menu

Actual Results:
Remove Hyperlink shows up at the bottom

Expected Results:
Shouldn't be there


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.2.0.0.alpha0+
Build ID: b63d48a146c3615f56b6ec83361b3c02ebcbb215
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-10-13_23:33:20
Locale: nl-NL (nl_NL); Calc: CL
Comment 1 Dieter 2018-10-21 14:16:11 UTC
I confirm it with

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 48cfa0b00b22f11ade53aec79b2fdddad253e1bd
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-10-03_02:01:42
Locale: en-US (de_DE); Calc: CL

Occurs only, if you mark all the text.
Comment 2 Xisco Faulí 2018-10-23 16:24:06 UTC
Also reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.10; Render: default; 


Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e


LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 3 Commit Notification 2019-08-12 14:03:25 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

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

tdf#120734 Only enable "Remove hyperlink" when hyperlink selected

It will be available in 6.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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Dieter 2019-09-15 14:35:07 UTC
Verified with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: f0c832acb53326ccc9a8c1a47401fbc9e1081feb
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@62-TDF, Branch:master, Time: 2019-09-11_05:46:53
Locale: en-GB (de_DE); UI-Language: en-US
Calc: threaded

Samuel, thanks for fixing it.
Comment 5 Commit Notification 2019-11-08 08:34:09 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

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

Revert "tdf#120734 Only enable "Remove hyperlink" when hyperlink selected"

It will be available in 6.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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Samuel Mehrbrodt (allotropia) 2019-11-08 08:35:18 UTC
Had to revert this because of bug 128555.
Comment 7 Samuel Mehrbrodt (allotropia) 2019-11-11 14:07:07 UTC
Created attachment 155705 [details]
1000 Paragraphs
Comment 8 Samuel Mehrbrodt (allotropia) 2019-11-11 14:09:58 UTC
This seems to depend on the number of paragraphs.

1. Open attachment 155705 [details].
2. Select all text -> "Remove hyperlink" is in context menu
3. Delete the last paragraph end of the document (after "1000")

-> "Remove hyperlink" context menu entry is gone.
Comment 9 Dieter 2019-11-11 14:40:37 UTC
There is no hyperlink within the document and therefore no "Remove Hyperlink" entry in the context menu
Comment 10 Dieter 2019-11-11 14:42:24 UTC
Sorry, I think I have to use master-build. Will try with 6.4.0Beta, if it is available.
Comment 11 Dieter 2019-11-19 12:47:01 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #8)
> This seems to depend on the number of paragraphs.
> 
> 1. Open attachment 155705 [details].
> 2. Select all text -> "Remove hyperlink" is in context menu
> 3. Delete the last paragraph end of the document (after "1000")
> 
> -> "Remove hyperlink" context menu entry is gone.

Repro with

Version: 6.4.0.0.beta1 (x64)
Build ID: 4d7e5b0c40ed843384704eca3ce21981d4e98920
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 12 Samuel Mehrbrodt (allotropia) 2019-11-21 15:37:11 UTC
So Writer has an internal limit where it stops analysing the content after 1000 paragraphs and set's the state DONTCARE. In that case the "Remove hyperlink" context menu entry becomes active, as the content might contain a hyperlink.

Not sure if it makes sense to increase that limit (bugdoc has 1.105 paragraphs), or if we just close as WONTFIX. I'd probably just close this bug if noone objects.
Comment 13 Dieter 2019-11-21 18:29:08 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #12)
> Not sure if it makes sense to increase that limit (bugdoc has 1.105
> paragraphs), or if we just close as WONTFIX. I'd probably just close this
> bug if noone objects.

Bug 112800 also is about the limitation of 1000 paragraphs. Perhaps there are some more reports. So I there should be an general decision if those bugs are WONTFIX or not. If we take into account the efforts of writing books with LO, we should try to increase this limit.
Comment 14 Commit Notification 2019-11-26 08:14:30 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2d341a75c083cf2336fd14db66e850109fe83c89

tdf#120734 Increase max lookup value to 10.000

It will be available in 6.5.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.
Comment 15 Samuel Mehrbrodt (allotropia) 2019-11-26 08:16:30 UTC
I increased the limit to 10.000 paragraphs. Let me know if this works better for large documents or if it's still too small.
Comment 16 Samuel Mehrbrodt (allotropia) 2019-11-26 08:16:43 UTC
*** Bug 112800 has been marked as a duplicate of this bug. ***
Comment 17 Commit Notification 2019-11-26 22:00:17 UTC
Samuel Mehrbrodt committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/84b6c7563d9561efeb375e33dcf7ff20c4eabfc8

tdf#120734 Increase max lookup value to 10.000

It will be available in 6.4.0.1.

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.
Comment 18 Dieter 2019-12-04 21:12:56 UTC
Verified (also for issue described in bug 112800) with

Version: 6.5.0.0.alpha0+ (x64)
Build ID: 89f0af144c18efafe2573801641689a1432c0cae
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded

Samuel, thanks for fixing it!