Bug 124673 - why toggle function DrawText, HyperlinkDialog and Horizontal Line
Summary: why toggle function DrawText, HyperlinkDialog and Horizontal Line
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks: Main-Menu
  Show dependency treegraph
 
Reported: 2019-04-11 08:21 UTC by andreas_k
Modified: 2025-03-29 07:19 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
writer -> menubar -> insert -> toggle (47.99 KB, image/png)
2019-04-15 14:54 UTC, andreas_k
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andreas_k 2019-04-11 08:21:25 UTC
open writer -> menubar -> insert there are 3 toggle functions
- DrawText
- HyperlinkDialog
- Horizontal Line

why are this 3 items toglle functions with an checkbox, cause nothing happen when DrawText is checked. Same for the other two functions.
Comment 1 Roman Kuznetsov 2019-04-11 09:20:10 UTC
Andreas, please add a screenshot. I think it's kde5/gtk3 problem with checkboxes in main menu like bug 123114
Comment 2 andreas_k 2019-04-11 09:32:25 UTC
that's not related to bug 123114 cause this is not how to show toggles. This bug say the three items should have toggles at all.
Comment 3 Heiko Tietze 2019-04-11 11:53:57 UTC
The hyperlink dialog is amodal and can stay open while editing. So toggle makes sense. Add Horizontal Line is similar, it adds a ruler at this position until switched off. I'm not sure about the Text Box (guess you mean this with DrawText).
Comment 4 Heiko Tietze 2019-04-11 11:56:01 UTC
(In reply to Heiko Tietze from comment #3)
> Add Horizontal Line is similar...

But since switching off doesn't remove the HR I would also rather not toggle it.
Comment 5 andreas_k 2019-04-15 14:52:46 UTC
When I activate the toggle I would think that this command is activated and I can draw an horizontal line, DrawText, but it's not activated when the toggle is set, so I don't see an benefit of have the toggle.
Comment 6 andreas_k 2019-04-15 14:54:01 UTC
Created attachment 150773 [details]
writer -> menubar -> insert -> toggle
Comment 7 Cor Nouws 2019-06-12 08:37:25 UTC
(In reply to andreas_k from comment #0)
> - DrawText
> - Horizontal Line

Should not be there indeed
Comment 8 V Stuart Foote 2019-06-12 12:11:24 UTC
On Windows builds we don't see a checkbox of course (as noted by Roman), but the "selected" status for a -Draw- Text Box object does not make sense--you can only add one Text box at a time. And as soon as the box outline is made and text entry starts the mode releases.

Likewise it doesn't make much sense for its toolbar button to show the selection status either--but that is in the distant past.

Suspect a number of these toggled selections are hold overs from how the UNO commands were created/migrated as toolbar buttons first and then picked up as menu items.

In that context the Horizontal Rule currently only applies the Horizontal Rule style to a newly inserted empty paragraph--but it used to offer a selection including gallery clipart, and could be toggled?

I'm sure there are others across the menus/toolbars where the actions probably need to be tweaked for consistency.

And as Heiko notes, the Hyperlink action is amodal dialog, and should provide a toggled selected checkbox.
Comment 9 Maxim Monastirsky 2019-06-12 12:37:41 UTC
(In reply to andreas_k from comment #0)
> - DrawText
This is a toggle, because when checked you're in a draw mode and can draw a text box. (The UI changes too: In the standard toolbar UI, the formatting toolbar disappears, and the drawing object properties toolbar takes its place. In the notebookbar UI, the drawing context activates.)

The toggle is mostly important for the toolbar button, as we want it to become pressed after clicking it. There's no way of having the toolbar button pressed, but not having a checkbox in the same command placed in a menu.

> - Horizontal Line
Technically, this doesn't insert a line, but sets the "Horizontal Line" paragraph style to the current paragraph. I agree that it isn't good to have a checkbox if it isn't possible to turn this off (and probably it won't be possible to implement, as it isn't clear which paragraph style set instead). So either we find a way to hide the checkbox (e.g. wrap the style setting with a new uno command), or simply move this item into the "Styles" menu where it really belongs.
Comment 10 Heiko Tietze 2019-06-13 07:47:49 UTC
Let's summarize:

* Keep Hyperlink as it is; the function dialog is amodal (while I would change this some users would call it a regression)
* Untoggle Draw Text (both menu and toolbar); there is no benefit to indicate the draw text function to be active as it is shown by the changed cursor.
* Untoggle Horizontal Rule; Unchecking has no effect and it's not repeatable; while technically it is a style users expect to _insert_ a HR so let's keep the position
Comment 11 andreas_k 2019-06-13 07:49:32 UTC
Is it possible to set in the menubar.xml that there should be no toggle shown? cause as Maxim wrote in the toolbar it can be usefull.
Comment 12 Heiko Tietze 2019-06-13 07:57:26 UTC
(In reply to andreas_k from comment #11)
> Is it possible to set in the menubar.xml that there should be no toggle
> shown? cause as Maxim wrote in the toolbar it can be usefull.

You have to change the UNO command definition, which applies to all occurrences.
Comment 13 Maxim Monastirsky 2019-06-13 11:40:53 UTC
(In reply to Heiko Tietze from comment #10)
> * Untoggle Draw Text (both menu and toolbar); there is no benefit to
> indicate the draw text function to be active as it is shown by the changed
> cursor.
I disagree about the toolbar part. While the changed cursor indicates that it's possible now to draw an object, it doesn't indicate *which* object is going to be drawn. It might be a text box, but as well it might be a shape or a frame. Having the corresponding toolbar button pressed is a common behavior in other drawing programs, and I think people will expect it (e.g. see Bug 39478).

I really think we need to find a way to fix the menu w/o changing the toolbar. One possible way is to introduce a special attribute for the menu xml, like Andreas suggested. That would also solve the problem with horizontal line. Another approach might be to have a special "toolbar toggle" status type, which will be interpreted by the toolbar, but not by the menubar.
Comment 14 Xisco Faulí 2019-06-13 12:14:30 UTC Comment hidden (off-topic)
Comment 15 Heiko Tietze 2019-06-13 12:20:42 UTC Comment hidden (off-topic)
Comment 16 QA Administrators 2021-06-13 03:48:44 UTC Comment hidden (obsolete)
Comment 17 QA Administrators 2023-06-14 03:12:45 UTC Comment hidden (obsolete, spam)
Comment 18 BogdanB 2025-03-22 13:06:33 UTC
As un update for this bug, as today, there are just 2 with checkbox: Hyperlink (being modal) and Horizontal line (when we place the cursor into a line with that style it is checked, else not).

So, should this bug be closed?
Comment 19 BogdanB 2025-03-22 13:06:43 UTC
Version: 25.2.1.1 (X86_64) / LibreOffice Community
Build ID: e538fb6403facdfd3db0250c3b3278236c675c2a
CPU threads: 16; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 20 Heiko Tietze 2025-03-24 08:45:57 UTC
(In reply to BogdanB from comment #18)
> So, should this bug be closed?

Keep it
Comment 21 Heiko Tietze 2025-03-25 08:11:58 UTC
(In reply to Heiko Tietze from comment #3)
> Add Horizontal Line is similar, it adds a ruler at this position until switched off.
Non-sense, uno:HorizontalLine applies a paragraph style and is therefore mutually exclusive with other PS and respectively has to be a radio button. I moved the command under the Styles root menu to keep it available for search. But we better remove it in the long run.

Still no idea what Draw Text would be, Text Box?
Comment 22 Commit Notification 2025-03-28 10:53:15 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/85b07269cd25a6dfb796558fd1e970c72ded577d

Resolves tdf#124673 - Insert > Horizontal Line must not toggle

It will be available in 25.8.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 23 BogdanB 2025-03-29 07:19:13 UTC
Verified with
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6522da9cde7e21a7d6f3d2c03b12062d80d83e1b
CPU threads: 16; OS: Linux 6.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threadedb