12 April 2014: The OpenOffice Wiki is not, and never was, affected by the heartbleed bug. Users' passwords are safe and wiki users do not need take any actions.

Extensions/Extensions and Apache OpenOffice 4.0

From Apache OpenOffice Wiki
Jump to: navigation, search

Introduction

Apache OpenOffice 4.0 introduces new handling mechanisms and new APIs for Extensions.

Extensions compatible with OpenOffice 3.x may or may not work in version 4.0.

This pages collects useful information for end users and developers.

Information For End Users

General upgrade information

Extensions that you installed in OpenOffice 3.x won't be automatically available in OpenOffice 4.0 when you upgrade from OpenOffice 3.x to OpenOffice 4.0. During the first start of installed OpenOffice 4.0 you can leave the migration of your personal data from OpenOffice 3.x enabled and then OpenOffice 4.0 will install your user-installed extensions from OpenOffice 3.x to OpenOffice 4.0. These are not all extensions you might have installed in your OpenOffice 3.x as you could have shared-installed extensions and also bundled extensions.

It is recommended that, before installing OpenOffice 4.0, you take note of the installed Extensions with: ToolsManage Extensions.

You can then check the site you downloaded the Extensions from (usually http://extensions.openoffice.org) and search for your Extensions, to see if there is a version compatible with OpenOffice 4.0.

In doubt, you can download the latest version and install it in OpenOffice 4.0 (save the file from the Extensions site, then open it with FileOpen in OpenOffice) and check if it works correctly.

For commercial extensions, please contact the publisher for support. In case an extension is not publicly available, but only used privately or in your company/institution, please ask either the author of your extension or a person responsible in your company/institution for help.

Please note: If a certain extension is crucial for your personal or professional workflow, you should not install OpenOffice 4.0 before having made sure that this extension will work on version 4.0 or that an update of the extension is available.

Extensions known to be working

Popular Extensions that are reported to work correctly with OpenOffice 4.0 are:

Extensions known not to be working

The following Extensions do not have a release compatible with OpenOffice 4.0:


Please check the http://extensions.openoffice.org site (or your provider) for the latest information about upgrades.

Information for Developers

OpenOffice 4.0 brings some significant changes to the API used in Extensions.

Technical details

API changes between 3.4 and 4.0

Hanya has a complete list of API changes that all developers should read.

addons.xcu changes

  • All dictionaries will work with no modifications in version 4.0.
  • If your Extension does not contain an addons.xcu file, it will work with no modifications too.
  • If your Extension contains an addons.xcu file, you will usually have to make some small changes for it to run in OpenOffice 4.0, see this example by Hanya:


Here is an example add-on toolbar in old structure:

<?xml version='1.0' encoding='UTF-8'?>
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
oor:name="Addons" oor:package="org.openoffice.Office">
  <node oor:name="AddonUI">
    <node oor:name="OfficeToolBar">
      <node oor:name="foo.bar.hoge.addons.ToolbarTest.old" oor:op="replace">
        <node oor:name="button_1" oor:op="replace">
          <prop oor:name="Title" oor:type="xs:string">
            <value xml:lang="en-US">Show All</value>
          </prop>
          <prop oor:name="URL" oor:type="xs:string">
            <value>vnd.sun.star.script:myts?language=Basic&amp;location=application</value>
          </prop>
          <prop oor:name="Target" oor:type="xs:string">
            <value>_self</value>
          </prop>
          <prop oor:name="Context" oor:type="xs:string">
            <value>com.sun.star.sheet.SpreadsheetDocument</value>
          </prop>
        </node>
      </node>
    </node>
  </node>
</oor:component-data>

with its name:

<?xml version="1.0" encoding="UTF-8"?>
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
oor:name="CalcWindowState" oor:package="org.openoffice.Office.UI">
  <node oor:name="UIElements">
    <node oor:name="States">
      <node oor:name="private:resource/toolbar/addon_foo.bar.hoge.addons.ToolbarTest.old" oor:op="replace">
        <prop oor:name="UIName" oor:type="xs:string">
          <value xml:lang="en">Toolbar Title</value>
        </prop>
      </node>
    </node>
  </node>
</oor:component-data>

It should be converted into the following structure:

<?xml version='1.0' encoding='UTF-8'?>
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
oor:name="Addons" oor:package="org.openoffice.Office">
  <node oor:name="AddonUI">
    <node oor:name="OfficeToolBar">
      <node oor:name="foo.bar.hoge.addons.ToolbarTest.new" oor:op="replace">
        <prop oor:name="Title" oor:type="xs:string">
          <value xml:lang="en-US">Toolbar Title</value>
        </prop>
        <node oor:name="ToolBarItems">
          <node oor:name="button_1" oor:op="replace">
            <prop oor:name="Title" oor:type="xs:string">
              <value xml:lang="en-US">Show All</value>
            </prop>
            <prop oor:name="URL" oor:type="xs:string">
              <value>vnd.sun.star.script:myts?language=Basic&amp;location=application</value>
            </prop>
            <prop oor:name="Target" oor:type="xs:string">
              <value>_self</value>
            </prop>
            <prop oor:name="Context" oor:type="xs:string">
              <value>com.sun.star.sheet.SpreadsheetDocument</value>
            </prop>
          </node>
        </node>
      </node>
    </node>
  </node>
</oor:component-data>

Add Title property in your child node of OfficeToolBar node to specify its title. And create ToolBarItems node in your toolbar node, and move your toolbar entries into it.

In the above example, new one has different toolbar name from the older one. When I put both older one and new one into the same package as the following list of contents, the toolbar of the package is shown on both Apache OpenOffice 3.4 and 4.0 (I testes only OpenOffice.org 3.2 and 3.3, Apache OpenOffice 3.4 and 4.0 on Linux environment. I thought configuration data has been checked to match with installed schema during the installation of the package in the past but I forgot version that has been changed.).

<?xml version="1.0" encoding="UTF-8"?>
<manifest:manifest>
    <manifest:file-entry manifest:full-path="Addons_old.xcu" 
     manifest:media-type="application/vnd.sun.star.configuration-data"/>
    <manifest:file-entry manifest:full-path="CalcWindowState.xcu" 
     manifest:media-type="application/vnd.sun.star.configuration-data"/>
    <manifest:file-entry manifest:full-path="Addons_new.xcu" 
     manifest:media-type="application/vnd.sun.star.configuration-data"/>
</manifest:manifest>

Good practices

Specify both a minimal and maximal version of OpenOffice for compatibility

This is to be done when you create a new Extension release, within the description.xml file.

Typical (minimal version only) configuration:

   <dependencies>
       <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0" />
   </dependencies>

Recommended (both minimal and maximal version) configuration:

   <dependencies>
       <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0" />
       <OpenOffice.org-maximal-version value="4.0" d:name="OpenOffice.org 4.0" />
   </dependencies>

Test your Extension with OpenOffice 4.0

Download OpenOffice 4.0 from http://openoffice.org and test compatibility with it (a "portable" version is available from the download page too).

In general, if you want to test with the latest bleeding-edge development version, download a recent OpenOffice snapshot from here (remember: snapshots are not official releases and they are meant for testing only) and try installing your Extension.

Check that everything works, especially toolbar integration.

If the Extension works, you may want to create a new micro release with updated minimal and maximal version compatibility and upload it to http://extensions.openoffice.org

Personal tools