OpenOffice.org UNO components

See Also 

OpenOffice.org Calc UNO components provide functional enhancements for an existing OpenOffice.org office installation. UNO components can provide completely new functions for a specific functional area, or they can provide a new implementation for an existing set of services and interfaces. UNO components are the common way to extend the functionality of OpenOffice.org. Specialized wizards can simplify the work for specfic service provider interfaces. For example Calc Add-Ins can be used to add specialized financial calculation functions to Calc.

UNO components can be realized in different ways and different programming languages (see the references below). The wizard is currently focused on Java technolgies. UNO components are realized as normal J2SE class libraries where one class is identified to be the entry point for the UNO component framework. This class provides information about newly implemented services, which are are like a contract that new instances or objects for this service must fullfill. This means that it should not matter which implementation you have for such a contract. All implementations should fullfill the contract according to the service specification. The registration class supports the necessary entry points to create new instances for a specific implementation.
The generated component skeletons implement service specific interfaces as well as interfaces that the UNO framework requires. All UNO components should implement these interfaces.

XServiceInfo
This interface provides information about the supported/implemented service.
UNO component functions
These two methods must be implemented by any UNO component, and they provide necessary information for the UNO component framework.
__getComponentFactory returns a component specific factory to create new instances of this component
__writeRegistryServiceInfo provides information about supported services and provides the relationship between the implementation and the service that is used by the UNO framework to instantiate the right implementation for this service.

Using Components in OpenOffice.org

Once you have deployed a new UNO component in an OpenOffice.org installation you can use it directly from any other code or in macros. You can simply instantiate a new instance via the global service manager. If you have a new style service, you can call either the default constructor or a construcor defined in the service definition in UNOIDL.

For example:
XMyType xMT = org.openoffice.MyType.create(xContext);

See Also