https://bugs.documentfoundation.org/show_bug.cgi?id=170517
Bug ID: 170517
Summary: Add description for UNO dispatch commands that lack
them
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Description:
There are many (2500+) UNO dispatch commands defined in LibreOffice that are
listed here:
Development/DispatchCommands
https://wiki.documentfoundation.org/Development/DispatchCommands
In LibreOffice welcome screen and also in separate LibreOffice applications you
can choose to customize toolbar using "Tools > Customize". Then, you may search
for commands to add to the toolbars.
Search ".uno", and you will see some UNO commands without name. Like:
.uno:Credits
.uno:OptionsSecurityDialog
.uno:WidgetTestDialog
The result is different when you open Writer, Calc, and other LibreOffice
applications, as some commands are application specific.
How to add description(s)?
Descriptions should go into appropriate .xcu. There are multiple .xcu files for
such a definition, one for generic definitions and others for application
specific definition, and a few for others in
officecfg/registry/data/org/openoffice/Office/UI/ folder.
A definition for ".uno:ParaspaceIncrease" command looks looks like this in
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu:
<node oor:name=".uno:ParaspaceIncrease" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">Increase</value>
</prop>
<prop oor:name="ContextLabel" oor:type="xs:string">
<value xml:lang="en-US">Increase Paragraph Spacing</value>
</prop>
<prop oor:name="TooltipLabel" oor:type="xs:string">
<value xml:lang="en-US">Increase Paragraph Spacing</value>
</prop>
<prop oor:name="Properties" oor:type="xs:int">
<value>3</value>
</prop>
</node>
Please not that the ContextLabel section is only needed for commands that need
a separate text for context menu or similar items. But it is usually left to
simply 1.
The meaning of Properties flag bits are discussed in the same xcu file, which
define if there is an icon, should it be rotated, and should it be mirrored,
for example consider .uno:OutlineBullet, bullet points for RTL paragraphs.
Expected Result
You should build LibreOffice again, search for the description you set in
"Tools > Customize", and find it instead of the .uno:CommandName. Details are
shown in the "Description" box below the customize dialog. You may try adding
it to the toolbar and use the toolbar button to make sure that everything works
fine.
Note: In case a UNO command should not be displayed in the toolbar, you may
hide it by changing its definition in the relevant .sdi file. For example,
.uno:ParaspaceIncrease is defined in svx/sdi/svx.sdi file.
--
You are receiving this mail because:
You are the assignee for the bug.