1. Open any document (without any comments) 2. Format > Comments... Result: Nothing happens. 3. Insert a comment in comment-less document. 4. Format > Comments... Result: Character dialog box appears Enhancement: Format > Comments... should be greyed out until one or more comments are present.
Created attachment 166480 [details] screenshot Hi, Blanco, it is greyout in 7.1. See my screenshot. Please came back with a feedback.
Created attachment 166481 [details] Not greyed out example Thanks BogdanB, but you have used "View" menu. Please try again using "Format" menu. Attachment shows what I see.
Confirm in Version: 7.0.2.2 Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994 CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded It is useless to stay like this.
@Heiko - I tried, without success, to find in the code where this should be modified. I am not sure that I can achieve the intended result, but I wanted to at least try. I think the "State" (of whether comments exist or not) is set here. https://opengrok.libreoffice.org/xref/core/sw/source/uibase/shells/textfld.cxx?r=93099409&fi=StateField#778 or maybe here: https://opengrok.libreoffice.org/xref/core/sw/source/uibase/shells/annotsh.cxx?r=2c771c05#1139 and I can see that the menu item is .uno:FormatAllNotes, but I could not see where the test should be made in deciding whether to make the menu item active. Can you give me some code pointers? Thanks.
(In reply to sdc.blanco from comment #4) > Can you give me some code pointers? Thanks. +++ b/sw/source/uibase/shells/textfld.cxx @@ -803,6 +803,8 @@ void SwTextShell::StateField( SfxItemSet &rSet ) rSet.InvalidateItem( FN_DELETE_COMMENT ); rSet.InvalidateItem( FN_HIDE_NOTE ); } + if (!pPostItMgr->HasNotes()) + rSet.DisableItem( FN_FORMAT_ALL_NOTES ); } break; (Please double check the logic)
Seth Chaiklin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b4bcee02229fbb382c6b2d774caba54d43b58697 tdf#137568 grey-out Format - Comments in menu, when no comments It will be available in 7.1.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.
It's ok now in Version: 7.1.0.0.alpha1+ Build ID: 0f0a5b63b19196f9463149a0a1991704c940efe2 CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded Verified.