Apache OpenOffice Add-Ons

See Also 

Apache OpenOffice Add-Ons provide one or more functions through the user interface of Apache OpenOffice. A typical Add-On is available as a UNO package (or component) that is easily deployed. In addition to an ordinary UNO package, an Add-On package contains configuration files which specify the user interface, registration for a protocol scheme, and first-time instantiation. An Add-On will typically react on one or more commands defined for the protocol of the Add-On.

The commands that are defined in an Add-On are available either in an menu, in a toolbar, or in both a menu and a toolbar in Apache OpenOffice. The context of a command determines in which Apache OpenOffice application it will be visible. Some possible contexts are:

The context can be selected for every command. If you do not select a specific context, then your Add-On will be available in all contexts including the back-end window. If you select all contexts, then your Add-On will be available in all contexts excluding the back-end window.
You can use sub-menus and separators to organize the commands in the menu structure, and separators to organize the commands in a toolbar.

Using Add-Ons in Apache OpenOffice

After you have deployed the Add-On in an Apache OpenOffice installation you can use it directly from the user interface. You will see the name of your new top-level menu in the Apache OpenOffice menu bar. When you click on the new menu item, the menu structure with the commands you defined will drop down. A toolbar is shown containing the new commands for the current context.
You must implement the calls to your commands in your main Java file with the actions that should happen when your command is selected.

See Also