Ask Your Question
0

Is the "create my first extension" tutorial up-to-date

asked 2020-09-29 19:05:36 +0200

cve60069 gravatar image

I am trying to get the "Development/Create a Hello World LibreOffice extension" to work on Libre Office. In a previous question that I asked, it was discovered that the Manifest File had an error in its path (pkg-desc should have read pkg-description). With this error fixed, the helloworld extension worked first time in Open Office but not Libre Office.

My question is this. Are the paths in the Addons.xcu up to date. The scripts are <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">

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-09-29 20:07:47 +0200

updated 2020-09-29 20:22:01 +0200

Yes...

Look example for most simple extension:

<?xml version="1.0" encoding="utf-8"?>
<oor:component-data xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oor="http://openoffice.org/2001/registry" oor:name="Addons" oor:package="org.openoffice.Office">
  <node oor:name="AddonUI">
    <node oor:name="OfficeMenuBar">
      <node oor:name="org.myfirstextension.test" oor:op="replace">
        <prop oor:name="Title" oor:type="xs:string">
          <value xml:lang="en">My extension</value>
          <value xml:lang="es">Mi extensión</value>
        </prop>
        <prop oor:name="Target" oor:type="xs:string">
          <value>_self</value>
        </prop>
        <node oor:name="Submenu">
          <node oor:name="m0" oor:op="replace">
            <prop oor:name="Title" oor:type="xs:string">
              <value xml:lang="en">Say hello</value>
              <value xml:lang="es">Di hola</value>
            </prop>
            <prop oor:name="Context" oor:type="xs:string">
              <value/>
            </prop>
            <prop oor:name="URL" oor:type="xs:string">
              <value>service:org.myfirstextension.test?hello</value>
            </prop>
            <prop oor:name="Target" oor:type="xs:string">
              <value>_self</value>
            </prop>
          </node>
        </node>
      </node>
    </node>
  </node>
</oor:component-data>

You can see the most basic example: https://gitlab.com/mauriciobaeza/libr...

edit flag offensive delete link more

Comments

Thank you. This is just what I wanted. I will break this code down line by line.

Regards

cve60069 gravatar imagecve60069 ( 2020-09-30 15:15:40 +0200 )edit

Mauricio. I have loaded your example into Calc and worked seemlessly. Your example is far better than the LibrOffice tutorial. It works and it is readable. Well done.

cve60069 gravatar imagecve60069 ( 2020-09-30 19:20:30 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-09-29 19:05:36 +0200

Seen: 58 times

Last updated: Sep 29 '20