Apache OpenOffice (AOO) Bugzilla – Issue 71154
keyboard shortcut not displayed in a submenu created dynamically
Last modified: 2013-02-24 21:09:56 UTC
I summarize below how to create a new menu and assign a keyboard shortcut. I have attached a OOBasic macro that implements these steps, and shows the bug. a) A new menu can be created dynamically by using the "LayoutManager" property of the frame with a menu bar into which you want to insert it. (there are sample codes for this) b) Create a new popup menu with one item, and attach this menu either at the top-level of the menu bar, or as a submenu line in an existing OO menu. c) Declare a keyboard shortcut (for instance Ctrl+F11) with the same command URL as the one of the menu item of the popup menu. This is done using com::sun::star::ui::XAcceleratorConfiguration. d) The shortcut is not displayed on the menu line of the item (but is effective; Ctrl+F11 triggers the command). When the menu item is inserted at the first level of an existing menu (instead of inside a submenu, itself inserted), the shortcut is correctly displayed.
Created attachment 40295 [details] OOBasic macro ("Main") creating submenu and assigning key shortcut
cd: Take over from jsc.
new owner cd
cd: Confirmed and accepted.
cd: Fixed.
cd->tm: Please verify this issue. You have to run the Basic macro inside the attached document "issue 71154.odt". You should see a new popup menu on the "File" menu which should have one entry with a shortcut.
checked and verified in cws fwk58 -> OK !
closed