Summary: | Calc: Counter-intuitive "Default" context menu for comments makes them blue and changes font | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Ming Hua <ming.v.hua> |
Component: | Calc | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | 79045_79045, buzea.bogdan, heiko.tietze, mentoring |
Priority: | medium | Keywords: | difficultyBeginner, easyHack, skillCpp, topicUI |
Version: | Inherited From OOo | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=55682 | ||
Whiteboard: | target:7.3.0 | ||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 101216 |
Description
Ming Hua
2020-12-12 07:13:49 UTC
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 |