Simple License

From Apache OpenOffice Wiki
Jump to: navigation, search



This feature is about displaying a license text to the user during installation. This is not supported for bundled extensions. Distributors of Apache OpenOffice need to clarify license details with the publishers of extensions, which they want to bundle with Apache OpenOffice.

The user can agree or decline the license, where in the latter case the installation will be aborted. It is called “Simple License” because there is no tamper resistant mechanism that prevents the installation in case the user does not agree to the license. It also does not do anything more than just displaying a license text. The text can be localized (see Documentation/DevGuide/Extensions/Localized XML Elements).

The license text is displayed either in a dialog or in the console dependent on the way the Extension Manager was started. When it was started by the Tools - Extension Manager menu item or by invoking unopkg gui in the console then a dialog is used. By using unopkg add the license text will be displayed in the console and user input has to be done through the same.

The license dialog or the license text in the console is displayed when the extension is being installed. Currently, there are two modes to install extensions, user mode and shared mode. An extension that was installed in user mode (let's call it a user extension) can only be used by just that person who installed it. If the extension was installed in shared mode (let's call it a shared extension), then it can be used by all users. Since the license text is only displayed during installation, all users who are using a shared extension will not see any license text (except the user who installed this shared extension). However, the publisher of the extension may think it necessary that everyone who wants to use it has to agree to the license first. For this purpose, he can mark the extension accordingly. This extension can then only be installed in user mode and not in shared mode. Likewise, the extension can be marked indicating that only the person who installs it needs to agree to the license. Such an extension can be installed in both modes. But when installing in user mode then every user has to agree to the license nonetheless.

As of OOo 3.3 shared extension can also require that every user accepts the license. This happens the first time a user starts Apache OpenOffice after the shared extension was installed. If the user declines the license, then the extension is not usable for this user. It will, however, be displayed in the dialog, where the user can accept the license later. Similarly, a user can accept the license by running unopkg validate. For example

unopkg validate --shared org.openoffice.legacy.ShortLicense.oxt

Here is an example of the description.xml:

  <?xml version="1.0" encoding="UTF-8"?>
  <description xmlns="http://openoffice.org/extensions/description/2006"
    xmlns:xlink="http://www.w3.org/1999/xlink">
    <registration>
      <simple-license accept-by="user" >
        <license-text xlink:href="registration/license_de.txt" lang="de" />
        <license-text xlink:href="registration/license_en_US.txt" lang="en-US" />
      </simple-license>
    </registration>
  </description>

In this example, the license would have to be agreed to by all users (that means no shared mode installation). This is indicated by the value user of the attribute accept-by in the <simple-license> element. The attribute could also have the value admin, which would indicate that the license needs only be agreed to by the person who installs it.

The <license-text> elements contain information about the files which contain the text that is displayed. The content of these files must be UTF-8 encoded. It is displayed exactly as it is in the file. That is, no formatting occurs. There can be one to many <license-text> elements, where each element provides information about a different language of the license text. The attribute xlink:href contains a relative URL (relative to the root directory of the extension) which points to a file which contains the license text in exactly one language. Which language is indicated by lang attribute.

If the package manager does not find a <license-text> element which matches the locale of Apache OpenOffice then it will pick the first <license-text> element as the default. Prior to OpenOffice.org 2.4, the default entry needed to marked explicitly by license-id attribute.

Important Issues

  • (Obsolete as of OpenOffice.org 3.3) Using the simple license in extensions always requires user interaction. Using accept-by="user" in the <license-text> prevents this extension from being installed centrally, that is as shared extensions. Both issues can prevent the extension from being used by companies, which centrally maintain software.
  • (Obsolete as of OpenOffice.org 3.3. Feature is not supported, but installation will not hang when using extensions with a license) The 'simple license' does not work for bundled extensions (installation will probably hang as user input is required). If one wants to build an Apache OpenOffice installation set with bundled extensions, then they must not use this feature.

To get around these limitations, extensions need to provide the attribute suppress-if-required="true".


See also


Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages