Customized Configuration

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 15:48, 15 February 2021 by DiGro (Talk | contribs)

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

Besides these default values, the Office Bean can be configured to use other parameters. There are three possibilities:

  • starting the connection with an explicit UNO URL including path and pipe name parameters
  • creating the connection manually and handing this object to the OOoBean
  • creating the OOoBean with such a manually created connection object.

The first method that a developer uses to configure the Office Bean is through the UNO URL passed in the setUnoUrl() call. The syntax of the UNO URL is as follows:

 url := 'uno:localoffice'[','<params>]';urp;StarOffice.NamingService'
 params := <path>[','<pipe>]
 path := 'path='<pathv>
 pipe := 'pipe='<pipev>
 pathv := platform_specific_path_to_the_local_office_distribution
 pipev := local_office_connection_pipe_name

Here is an example of how to use setUnoUrl() in code:

  OfficeConnection officeConnection = new LocalOfficeConnection();
  aBean = new OOoBean( officeConnection );
Documentation caution.png In 1.1.0 the properties mechanism was removed and cannot be used any longer. The following section about the Office Bean properties and the file are only valid for older versions. Since 1.1.0 the Office Bean uses an implicit find mechanism over the classpath for the office and the local Office Bean library so that no properties file is necessary.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages