Bug 121490 - Standard (Viewing Mode) toolbar does not have the close icon
Summary: Standard (Viewing Mode) toolbar does not have the close icon
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Roman Kuznetsov
URL:
Whiteboard: target:6.3.0 target:6.2.0.1
Keywords: difficultyBeginner, easyHack, skillDesign, topicDesign
Depends on:
Blocks:
 
Reported: 2018-11-18 11:08 UTC by Sabri Unal
Modified: 2018-12-09 16:58 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
A screenshot of Standard (Viewing Mode) toolbar. (19.25 KB, image/png)
2018-11-18 11:08 UTC, Sabri Unal
Details
Undocked standard (Viewing mode) toolbar (23.85 KB, image/png)
2018-11-19 15:57 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sabri Unal 2018-11-18 11:08:43 UTC
Created attachment 146719 [details]
A screenshot of Standard (Viewing Mode) toolbar.

Standard (Viewing Mode) toolbar does not have the close icon.

Reproduce:

* Open a text document on Writer.
* Choose, View - Toolbars - Standard (Viewing Mode)
* Move the toolbar on the text area.
Comment 1 V Stuart Foote 2018-11-18 19:03:09 UTC
Yes confirming there is no Close button action in this toolbar. Although it is easy to Customize this toolbar to add the Close button action (for uno.CloseDoc).

But not sure the these contextual ViewBar toolbars still have valid linkages. Mozilla plug-ins are a thing of the past, and a ReadOnly mode launch in LibreOffice brings up the full Standard toolbar.

Am I missing viable a use case? Does this hold over UI need to pruned?
Comment 2 Xisco Faulí 2018-11-19 09:32:28 UTC
Also reproducible in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 3 Heiko Tietze 2018-11-19 11:09:08 UTC
The Standard toolbar has 3 flavors: Standard, Standard (Single Mode), and Standard (Viewing Mode). Don't see a reason to add Close to only one and the last would be the variant for viewing a document (use case needed as Stuart pointed out). And I also doubt we need Close on all since you have always a small cross at the right-most top of the UI. This x works for me.
Comment 4 Sabri Unal 2018-11-19 13:57:23 UTC
Every toolbar has a close icon, except Standard (Viewing Mode) toolbar.

It's obvious I would search an X (Close) icon for it.
Comment 5 Heiko Tietze 2018-11-19 15:57:17 UTC
Created attachment 146797 [details]
Undocked standard (Viewing mode) toolbar

(In reply to Sabri Unal from comment #4)
> Every toolbar has a close icon, except Standard (Viewing Mode) toolbar.
> 
> It's obvious I would search an X (Close) icon for it.

That's a different topic, thought you talk about closing the document. 

Not a single toolbar has a close button (x on top right) when docked. And undocking (shown with the "kebab icon" on the left most part of the toolbar) works only if the toolbar is not locked (right mouse button > lock position).
The viewing mode toolbar is locked and when unlocked it lacks on the close feature. An ordinary and likely easy to solve issue. 

Thanks for reporting and the last clarification :-).
Comment 6 Heiko Tietze 2018-11-19 15:58:29 UTC
Maxim, could you please take a look. Maybe there is/was a reason for this configuration.
Comment 7 Maxim Monastirsky 2018-11-19 23:04:04 UTC
(In reply to Heiko Tietze from comment #6)
> Maxim, could you please take a look. Maybe there is/was a reason for this
> configuration.
Yes, there is a reason. This toolbar can be seen in action via Help > License Information > Show License. The license window opens in a special "view only" mode which doesn't have the menu bar. So if we will let people close this toolbar, there will be no way to bring it back. Similarly, we don't allow closing the full screen toolbar, because once closed there is no obvious way to leave the full screen mode.

This behavior is controlled via a special "NoClose" flag which set to true for the affected toolbars in officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu

See the original reports which introduced this flag:

https://bz.apache.org/ooo/show_bug.cgi?id=44348
https://bz.apache.org/ooo/show_bug.cgi?id=54492

However, I would suggest to hide the "Standard (Viewing Mode)" entry from the View > Toolbars menu (similar to how we hide the full screen toolbar entry), as it's not useful for normal Writer usage, and just adds confusion. This can be easily done by properly setting the "HideFromToolbarMenu" flag in WriterWindowState.xcu.
Comment 8 V Stuart Foote 2018-11-19 23:38:26 UTC
(In reply to Maxim Monastirsky from comment #7)
> Yes, there is a reason. This toolbar can be seen in action via Help >
> License Information > Show License. The license window opens in a special
> "view only" mode which doesn't have the menu bar. So if we will let people
> close this toolbar, there will be no way to bring it back. Similarly, we
> don't allow closing the full screen toolbar, because once closed there is no
> obvious way to leave the full screen mode.
> 
> This behavior is controlled via a special "NoClose" flag which set to true
> for the affected toolbars in
> officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
> 
> ...

Umm, so interesting issue here--how *do* you close that "Show License" read-only mode document example when opened with just the Start Center active. On Windows builds, closing the document from DE frame decoration also closes the Start Center. :-(

And simply adding the "uno:CloseDoc" button to the 'Standard (Viewing Mode)' toolbar, will close the doc frame for the License back to another instance of the Start Center when used.
Comment 9 Maxim Monastirsky 2018-11-19 23:50:33 UTC
(In reply to V Stuart Foote from comment #8)
> Umm, so interesting issue here--how *do* you close that "Show License"
> read-only mode document example when opened with just the Start Center
> active. On Windows builds, closing the document from DE frame decoration
> also closes the Start Center. :-(
See Bug 30920.
Comment 10 Heiko Tietze 2018-11-20 08:12:55 UTC
(In reply to Maxim Monastirsky from comment #7)
> However, I would suggest to hide the "Standard (Viewing Mode)" entry from
> the View > Toolbars menu (similar to how we hide the full screen toolbar
> entry), as it's not useful for normal Writer usage, and just adds confusion.
> This can be easily done by properly setting the "HideFromToolbarMenu" flag
> in WriterWindowState.xcu.

Agreed, it's a fully qualified easyhack now.

Alternatively we could set NoClose (or the equivalent) somewhere in the code when this window is opened. But as you said cleaning up the main menu makes sense.
Comment 11 Heiko Tietze 2018-11-20 09:41:25 UTC
Patch at https://gerrit.libreoffice.org/#/c/63630/
Comment 12 Commit Notification 2018-11-20 15:35:59 UTC
Roman Kuznetsov committed a patch related to this issue.
It has been pushed to "master":

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

tdf#121490 Hide item Standard (Viewing Mode) toolbar from menu

It will be available in 6.3.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 13 Commit Notification 2018-11-20 19:25:52 UTC
Roman Kuznetsov committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

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

tdf#121490 Hide item Standard (Viewing Mode) toolbar from menu

It will be available in 6.2.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 14 BogdanB 2018-12-09 16:58:49 UTC
Solved.

Verified on Version: 6.3.0.0.alpha0+
Build ID: e4c2d0bb57ab8ea8f5c400d103d01376b8140f22
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-11-30_21:37:10
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded