Description: The Calc comment's context menu has an item labelled "Default" that performs very counter-intuitive action and is IMHO rather useless. Steps to reproduce: 1. New empty spread sheet, Insert > Comment; 2. Type some text in the newly created comment. On my system at least, the background color of the comment box is PostIt yellow, and the font of the text is Liberation Sans; 3. Use mouse to select all the text in the comment, right-click, see the "Default" item at the bottom of the context menu, choose it; 4. The backgroud of the comment changes to blue, the font of the text changes to Libreation Serif (and slightly large size, it seems), the shadow of the comment box and the arrow of the leader line also changes. One would expect "Default" means the comment would look like how it's created without further formatting change. However it seems Calc comments are text boxes in a rectangular shape with some special formatting, and this "Default" menu just revert everything back as if it's just a regular shape with a regular text box or something. (Just guessing here, as the blue color is the same default color of a filled shape in Draw.) Additional info: This happens in 6.4.7 as well as in 7.1.0 Beta1: Version: 6.4.7.2 (x64) Build ID: 639b8ac485750d5696d7590a72ef1b496725cfb5 CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; Locale: zh-CN (zh_CN); UI-Language: en-US Calc: threaded Version: 7.1.0.0.beta1 (x64) Build ID: 828a45a14a0b954e0e539f5a9a10ca31c81d8f53 CPU threads: 2; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: zh-CN (zh_CN); UI: zh-CN Calc: threaded Also if one does not select all text in the comment, and click "Default" context menu, the background of comment doesn't change, but the text font still does.
OMG, it's terribly of course I confirm the bug in Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 4677345e3695bac158bb04048b4d5c608ed764b4 CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: CL I think that item just applies the Draw default style to the comment's shape UX-team - we should change it (or just delete that "Default" Comment's context menu item) to something more useful
The command is also available at standard shapes, we cannot just remove it. Or can we? I mean it shrinks the shape size to zero margin ('resize shape to fit text' without any spacing) and sets Liberation Serif in black on skyblue background which is hard to read (the default for shapes), quite ugly. For some reason, the command is not available in Writer and Draw. So either we add code to hide this command when the menu starts from Calc comments (sounds like a tricky task) or remove the command (and the code).
The topic was on the agenda for the design meeting but hasn't got further input. So let's kill the "Default".
(In reply to Heiko Tietze from comment #3) > The topic was on the agenda for the design meeting but hasn't got further > input. So let's kill the "Default". Heiko, is there the code point for it?
Maybe it's an easyhack but not sure and too lazy to dig for code pointer. Check the UNO command name, search the *.sdi files for this command name, take the SID_* command into the search to find the execute method. Removing the command from the menu is a piece of cake.
To remove "Default" from the context menu just remove this line sc/uiconfig/scalc/popupmenu/drawtext.xml -> .uno:StandardTextAttributes But to eradicate the function completely clear these too: sc/sdi/scalc.sdi -> SfxVoidItem StandardTextAttributes SID_TEXT_STANDARD sc/inc/sc.hrc -> #define SID_TEXT_STANDARD (FORMAT_MENU_START + 18) sc/sdi/drawsh.sdi -> SID_TEXT_STANDARD [ ExecMethod = ExecDrawAttr; StateMethod = NoState; ] sc/sdi/drtxtob.sdi -> SID_TEXT_STANDARD [ ExecMethod = ExecDrawAttr; StateMethod = NoState; ] sc/source/ui/drawfunc/drawsh.cxx -> case SID_TEXT_STANDARD: // delete hard text attributes sc/source/ui/drawfunc/drtxtob.cxx -> case SID_TEXT_STANDARD: // delete hard text attributes Search for SID_TEXT_STANDARD to double-check.
(In reply to Heiko Tietze from comment #6) > To remove "Default" from the context menu just remove this line > sc/uiconfig/scalc/popupmenu/drawtext.xml -> .uno:StandardTextAttributes > > But to eradicate the function completely clear these too: > sc/sdi/scalc.sdi -> SfxVoidItem StandardTextAttributes SID_TEXT_STANDARD > sc/inc/sc.hrc -> #define SID_TEXT_STANDARD (FORMAT_MENU_START + 18) > sc/sdi/drawsh.sdi -> SID_TEXT_STANDARD [ ExecMethod = ExecDrawAttr; > StateMethod = NoState; ] > sc/sdi/drtxtob.sdi -> SID_TEXT_STANDARD [ ExecMethod = ExecDrawAttr; > StateMethod = NoState; ] > sc/source/ui/drawfunc/drawsh.cxx -> case SID_TEXT_STANDARD: // delete hard > text attributes > sc/source/ui/drawfunc/drtxtob.cxx -> case SID_TEXT_STANDARD: // delete hard > text attributes > > > Search for SID_TEXT_STANDARD to double-check. I don't think we should kill it at all, let's just delete it from the Calc Comment's context menu
Roman Kuznetsov committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/43b0d4f709a3a1446a32e36abb5deaa3bb45ddd9 tdf#138842 Delete Default item from Calc Comment's context menu It will be available in 7.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.
Roman's patch has removed the entry from the context menu but keep the function (as well customizability).
Confirm taht Default is gone now. Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 4a8184ce0cc59e4e223cf963141c16644b762440 CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: ro-RO (ro_RO); UI: en-US Calc: threaded