General UNO Component Project Type

From Apache OpenOffice Wiki
Revision as of 13:36, 6 October 2006 by Jsc (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

The StarOffice/OpenOffice.org Component wizard creates a new project based on a J2SE class library project and supports additional targets to create a complete office extension package and to deploy this package into the configured office installation.
The wizard collects all necessary information and allows the selection of exisiting services and interfaces which should be implemented. In the same wizard step it is also possible to define completely new services and interfaces to design abstract interfaces for a completely new functionality.
After finishing the wizard you can directly build the project and can create and deploy the office extension package in your office. All interface methods are default implemented and do nothing. In a second step you can insert your implementation in the generated skeleton, rebuild the extension and deploy it again to see the effect in your office.

Project Wizard

The project wizard is quite simple to use, you simply choose

  • File -> New Project -> StarOffice/OpenOffice.org -> StarOffice/OpenOffice.org Component

and follow the wizard.

  • Step 1: Selecting the project type

Component1.png

  • Step 2: Defining the project name, Add-In name, an optional package and the project location

Component2.png

  • Step 4: Specifiy or define the UNO IDL services and interfaces which should be implemented

Component3.png



You can simply create or deploy the oxt extension package by choosing:

Project View -> Project Node -> Context Menu -> Create OXT|Deploy Office Extension

When you have deployed the package the usage of the new UNO component in your office is straight forward. Either you have implemented a special service provider interface (SPI) and can use it in the same way as any other implementations of this SPI can be used or you have defined some new service and/or interfaces and can instantiate your component as a normal service over the global service manager.


Generated Code

For a UNO component the wizard generates new UNO IDL files depending on the defintion of new types in the wizard and a complete code skeleton file implmenteing all selected services and interfaces. All interface bodies are default implemented:

Personal tools