Code Hint - Removing Dupe Entry in Keyboard Shortcut List

Markus Mohrhard markus.mohrhard at googlemail.com
Fri Jun 28 05:34:11 PDT 2013


Hey Joel,

2013/6/28 Joel Madero <jmadero.dev at gmail.com>:
> Hi All,
>
> There is a dupe entry of "Rename Sheet" in the customize keyboard settings
> for Spreadsheet - in the "Format" section. I have located the code:
>
> http://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu#1304
> &
>
> http://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu#1312
>
> When I actually delete the entry and do make, dev-install the menu is
> changed but I'm left with a new entry at the top of the list. I deleted
>
> http://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu#1312
>
> and then I get
>
> .uno:name on the top of the list of customize shortcut, if I delete #1304 I
> get .uno:renameTable at the top of the list.
>
>
> Not sure how these are being generated just by me deleting the entries.

Yes. The menu definition is in a different file and the file you
modified is just the strings. So when it does not find a string for a
uno command it falls back to the command string.

>
> Another interesting observation is that two other such entries already exist
> in the list even in 4.1 RC (probably before also)
>
> .uno:CharEndPreviewFontName
> .uno:CharPreviewFontName
>
>
> Hints appreciated, seems like a really easy fix, weird behavior from a
> deletion though.
>

Actually these are normally not trivial as they have code indirectly
attached to them so you should first check that also the attached
actions have the same behavior or are surely unused. Normally the
string is mapped to a command id which is then used in the code. For
example the .uno:RenameTable can't be deleted because it has a lot of
code attached that is necessary. I could not find anything for the
.uno:Name command but if you say that it appears in the menu when you
delete the string definition there appears to be somewhere a hidden
mapping.

Regards,
Markus

P.S. I did not check closer what can be done in this special case.


More information about the LibreOffice mailing list