Difference between revisions of "Extensions/Extensions and Apache OpenOffice 4.0"
m (→Introduction) |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Apache OpenOffice 4.0 introduces new handling mechanisms and new APIs for Extensions. | 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. | + | Extensions compatible with OpenOffice.org 3.x may or may not work in {{AOo}} version 4.0. |
This pages collects useful information for end users and developers. | This pages collects useful information for end users and developers. | ||
Line 11: | Line 11: | ||
=== General upgrade information === | === General upgrade information === | ||
− | Extensions that you installed in OpenOffice 3.x won't be automatically available in | + | Extensions that you installed in OpenOffice.org 3.x won't be automatically available in {{AOo}} 4.0 when you upgrade from OpenOffice 3.x to {{AOo}} 4.0. During the first start of installed {{AOo}} 4.0 you can leave the migration of your personal data from OpenOffice 3.x enabled and then {{AOo}} 4.0 will install your user-installed extensions from OpenOffice.org 3.x to {{AOo}} 4.0. These are not all extensions you might have installed in your OpenOffice.org 3.x as you could have shared-installed extensions and also bundled extensions. |
− | It is recommended that, '''before installing | + | It is recommended that, '''before installing {{AOo}} 4.0''', you take note of the installed Extensions with: {{menu|Tools|Manage Extensions}}. |
− | You can then check the site you downloaded the Extensions from (usually | + | You can then check the site you downloaded the Extensions from (usually https://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 | + | 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 {{menu|File|Open}} in {{AOo}}) 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. | 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. | ||
− | + | {{Note|If a certain extension is crucial for your personal or professional workflow, you should not install {{AOo}} 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 === | === Extensions known to be working === | ||
− | Popular Extensions that are '''reported to work correctly''' with | + | Popular Extensions that are '''reported to work correctly''' with {{AOo}} 4.0 are: |
* All dictionaries | * All dictionaries | ||
* [https://extensions.openoffice.org/en/node/17351 PDF Import - NEW VERSION] (use this one by Ariel, not the old "Oracle" one) | * [https://extensions.openoffice.org/en/node/17351 PDF Import - NEW VERSION] (use this one by Ariel, not the old "Oracle" one) | ||
Line 33: | Line 33: | ||
The following Extensions do not have a release compatible with OpenOffice 4.0: | The following Extensions do not have a release compatible with OpenOffice 4.0: | ||
− | * [https://extensions.openoffice.org/en/project/pdfimport Oracle PDF Import] - needs to be updated for | + | * [https://extensions.openoffice.org/en/project/pdfimport Oracle PDF Import] - needs to be updated for {{AOo}} 4.0 on Windows, Mac, 32-bit Linux and the '''4.0-compatible update''' is available at https://extensions.openoffice.org/en/node/17351 |
− | * [https://extensions.openoffice.org/en/project/mysql_connector MySQL Connector] and [https://code.google.com/a/apache-extras.org/p/aoo-my-sdbc/ Ariel's old version of it] - both need to be updated for | + | * [https://extensions.openoffice.org/en/project/mysql_connector MySQL Connector] and [https://code.google.com/a/apache-extras.org/p/aoo-my-sdbc/ Ariel's old version of it] - both need to be updated for {{AOo}} 4.0 on Windows, Mac, 32-bit Linux and the '''4.0-compatible update''' is available at https://extensions.openoffice.org/en/node/5644 |
* [https://extensions.openoffice.org/en/project/magenta-lorem-ipsum-generator Magenta Lorem Ipsum generator] - reported to be incompatible, author should have been informed. | * [https://extensions.openoffice.org/en/project/magenta-lorem-ipsum-generator Magenta Lorem Ipsum generator] - reported to be incompatible, author should have been informed. | ||
* [https://extensions.openoffice.org/en/node/2017 Duden Korrektor] - reported to be incompatible, author is informed. | * [https://extensions.openoffice.org/en/node/2017 Duden Korrektor] - reported to be incompatible, author is informed. | ||
Line 43: | Line 43: | ||
== Information for Developers == | == Information for Developers == | ||
− | + | {{AOo}} 4.0 brings some significant changes to the API used in Extensions. | |
=== Technical details === | === Technical details === | ||
Line 55: | Line 55: | ||
* All dictionaries will work with no modifications in version 4.0. | * All dictionaries will work with no modifications in version 4.0. | ||
* If your Extension does not contain an <tt>addons.xcu</tt> file, it will work with no modifications too. | * If your Extension does not contain an <tt>addons.xcu</tt> file, it will work with no modifications too. | ||
− | * If your Extension contains an <tt>addons.xcu</tt> file, you will usually have to make some small changes for it to run in | + | * If your Extension contains an <tt>addons.xcu</tt> file, you will usually have to make some small changes for it to run in {{AOo}} 4.0, see this example by [[User:Hanya|Hanya]]: |
Here is an example add-on toolbar in old structure: | Here is an example add-on toolbar in old structure: | ||
− | < | + | <syntaxhighlight lang="xml"> |
<?xml version='1.0' encoding='UTF-8'?> | <?xml version='1.0' encoding='UTF-8'?> | ||
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" | <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" | ||
Line 85: | Line 85: | ||
</node> | </node> | ||
</oor:component-data> | </oor:component-data> | ||
− | </ | + | </syntaxhighlight> |
with its name: | with its name: | ||
− | < | + | <syntaxhighlight lang="xml"> |
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" | <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" | ||
Line 103: | Line 103: | ||
</node> | </node> | ||
</oor:component-data> | </oor:component-data> | ||
− | </ | + | </syntaxhighlight> |
It should be converted into the following structure: | It should be converted into the following structure: | ||
− | < | + | <syntaxhighlight lang="xml"> |
<?xml version='1.0' encoding='UTF-8'?> | <?xml version='1.0' encoding='UTF-8'?> | ||
<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" | <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" | ||
Line 137: | Line 137: | ||
</node> | </node> | ||
</oor:component-data> | </oor:component-data> | ||
− | </ | + | </syntaxhighlight> |
Add | Add | ||
Line 148: | Line 148: | ||
and new one into the same package as the following list of contents, | 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 | the toolbar of the package is shown on both Apache OpenOffice 3.4 and | ||
− | 4.0 (I | + | 4.0 (I tested 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 | 4.0 on Linux environment. I thought configuration data has been checked | ||
to match with installed schema during the installation of the package | to match with installed schema during the installation of the package | ||
in the past but I forgot version that has been changed.). | in the past but I forgot version that has been changed.). | ||
− | < | + | <syntaxhighlight lang="xml"> |
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<manifest:manifest> | <manifest:manifest> | ||
Line 163: | Line 163: | ||
manifest:media-type="application/vnd.sun.star.configuration-data"/> | manifest:media-type="application/vnd.sun.star.configuration-data"/> | ||
</manifest:manifest> | </manifest:manifest> | ||
− | </ | + | </syntaxhighlight> |
=== Good practices === | === Good practices === | ||
− | ==== Specify both a minimal and maximal version of | + | ==== Specify both a minimal and maximal version of {{AOo}} for compatibility ==== |
This is to be done when you create a new Extension release, within the <tt>description.xml</tt> file. | This is to be done when you create a new Extension release, within the <tt>description.xml</tt> file. | ||
Typical (minimal version only) configuration: | Typical (minimal version only) configuration: | ||
− | + | <syntaxhighlight lang="xml"> | |
<dependencies> | <dependencies> | ||
<OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0" /> | <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0" /> | ||
</dependencies> | </dependencies> | ||
− | + | </syntaxhighlight> | |
Recommended (both minimal and maximal version) configuration: | Recommended (both minimal and maximal version) configuration: | ||
− | + | <syntaxhighlight lang="xml"> | |
<dependencies> | <dependencies> | ||
<OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0" /> | <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" /> | <OpenOffice.org-maximal-version value="4.0" d:name="OpenOffice.org 4.0" /> | ||
</dependencies> | </dependencies> | ||
+ | </syntaxhighlight> | ||
− | ==== Test your Extension with | + | ==== Test your Extension with {{AOo}} 4.0 ==== |
− | Download | + | Download {{AOo}} 4.0 from https://www.openoffice.org/download/index.html 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 | + | In general, if you want to test with the latest bleeding-edge development version, download a recent {{AOo}} snapshot from [https://cwiki.apache.org/confluence/display/OOOUSERS/Development+Snapshot+Builds#DevelopmentSnapshotBuilds-AOOSnapshotfullsets 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. | Check that everything works, especially toolbar integration. |
Latest revision as of 18:17, 1 February 2021
Introduction
Apache OpenOffice 4.0 introduces new handling mechanisms and new APIs for Extensions.
Extensions compatible with OpenOffice.org 3.x may or may not work in Apache OpenOffice 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.org 3.x won't be automatically available in Apache OpenOffice 4.0 when you upgrade from OpenOffice 3.x to Apache OpenOffice 4.0. During the first start of installed Apache OpenOffice 4.0 you can leave the migration of your personal data from OpenOffice 3.x enabled and then Apache OpenOffice 4.0 will install your user-installed extensions from OpenOffice.org 3.x to Apache OpenOffice 4.0. These are not all extensions you might have installed in your OpenOffice.org 3.x as you could have shared-installed extensions and also bundled extensions.
It is recommended that, before installing Apache OpenOffice 4.0, you take note of the installed Extensions with: Tools → Manage Extensions.
You can then check the site you downloaded the Extensions from (usually https://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 File → Open in Apache 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.
Extensions known to be working
Popular Extensions that are reported to work correctly with Apache OpenOffice 4.0 are:
- All dictionaries
- PDF Import - NEW VERSION (use this one by Ariel, not the old "Oracle" one)
- MySQL Driver for Apache OpenOffice - NEW VERSION (use this one by Ariel, not the old "Sun MySQL Connector")
Extensions known not to be working
The following Extensions do not have a release compatible with OpenOffice 4.0:
- Oracle PDF Import - needs to be updated for Apache OpenOffice 4.0 on Windows, Mac, 32-bit Linux and the 4.0-compatible update is available at https://extensions.openoffice.org/en/node/17351
- MySQL Connector and Ariel's old version of it - both need to be updated for Apache OpenOffice 4.0 on Windows, Mac, 32-bit Linux and the 4.0-compatible update is available at https://extensions.openoffice.org/en/node/5644
- Magenta Lorem Ipsum generator - reported to be incompatible, author should have been informed.
- Duden Korrektor - reported to be incompatible, author is informed.
Please check the https://extensions.openoffice.org site (or your provider) for the latest information about upgrades.
Information for Developers
Apache 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 Apache 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&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&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 tested 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 Apache 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 Apache OpenOffice 4.0
Download Apache OpenOffice 4.0 from https://www.openoffice.org/download/index.html 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 Apache 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 https://extensions.openoffice.org