[Solved] Writing an add-on

Java, C++, C#, Delphi, ??? - Using the UNO bridges

[Solved] Writing an add-on

Postby saleem145 » Mon Jul 30, 2012 2:34 am

Hello,

Is there an example of developing an addon (as opposed to addin). We have developed a charting application within a spreadsheet using python. And now would like to embed the core functionality within an addon.

Also can an addon and and addin be integrated within one OXT file.

Saleem
Last edited by RoryOF on Wed Aug 01, 2012 7:41 am, edited 2 times in total.
Reason: Added green tick (RoryOF, moderator)
OpenOffice 3.4.0
Mac OS X 10.5.8
saleem145
 
Posts: 130
Joined: Mon Jul 02, 2012 4:47 pm

Re: Writing an add-on

Postby hanya » Mon Jul 30, 2012 6:00 pm

See the following thread and links in the page: viewtopic.php?f=47&t=55208
and see also: http://wiki.services.openoffice.org/wiki/Extensions

Also can an addon and and addin be integrated within one OXT file.
Multiple UNO service implementations can be put in an oxt package.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
hanya
Volunteer
 
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Writing an add-on

Postby rjsteele » Mon Jul 30, 2012 9:30 pm

Raymond
Solaris 10 x86 StarrOffice 9 - basis3.1
rjsteele
 
Posts: 23
Joined: Fri Jul 27, 2012 9:20 pm

Re: Writing an add-on

Postby saleem145 » Tue Jul 31, 2012 12:18 am

http://www.linuxjournal.com/content/pyt ... openoffice

Exactly what I am looking for but does not work....something wrong with the xcu file....any ideas?? "Bad Root Element node"

Saleem


Code: Select all   Expand viewCollapse view
<?xml version="1.0" encoding="UTF-8"?>
<oor:node xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Offic
e">
  <node oor:name="AddonUI">
    <node oor:name="AddonMenu">
      <node oor:name="org.openoffice.comp.pyuno.demo.HelloWorld" oor:op="replace">
        <prop oor:name="URL" oor:type="xs:string">
          <value>service:org.openoffice.comp.pyuno.demo.HelloWorld?insert</value>
        </prop>
        <prop oor:name="ImageIdentifier" oor:type="xs:string">
          <value>private:image/3216</value>
        </prop>
        <prop oor:name="Title" oor:type="xs:string">
          <value xml:lang="en-US">Insert Hello World</value>
        </prop>
      </node>
    </node>
  </node>
</oor:node>
OpenOffice 3.4.0
Mac OS X 10.5.8
saleem145
 
Posts: 130
Joined: Mon Jul 02, 2012 4:47 pm

Re: Writing an add-on

Postby hanya » Tue Jul 31, 2012 3:07 am

The root node must be oor:component-data element for configuration data.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
hanya
Volunteer
 
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Writing an add-on

Postby saleem145 » Tue Jul 31, 2012 3:44 am

I changed my Add-on xcu.

Code: Select all   Expand viewCollapse view
<?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="AddonMenu">
      <node oor:name="org.openoffice.comp.pyuno.demo.HelloWorld" oor:op="replace">
        <prop oor:name="URL" oor:type="xs:string">
          <value>service:org.openoffice.comp.pyuno.demo.HelloWorld?insert</value>
        </prop>
        <prop oor:name="ImageIdentifier" oor:type="xs:string">
          <value>private:image/3216</value>
        </prop>
        <prop oor:name="Title" oor:type="xs:string">
          <value xml:lang="en-US">Insert Hello World</value>
        </prop>
      </node>
    </node>
  </node>
</oor:component-data>


The add-on loads correctly and shows up in extension manager. But under Tools menu, there is no subentry for Add-on and no Insert Hello World menu item. So I think there is something else wrong with the xcu as well.

Thanks,

Saleem
OpenOffice 3.4.0
Mac OS X 10.5.8
saleem145
 
Posts: 130
Joined: Mon Jul 02, 2012 4:47 pm

Re: Writing an add-on

Postby hanya » Tue Jul 31, 2012 4:37 am

It works for me installed as configuration data. Add the entry for the configuration file to your META-INF/manifest.xml file.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
hanya
Volunteer
 
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Writing an add-on

Postby saleem145 » Tue Jul 31, 2012 6:21 am

Hi Hanya,

Thanks for your response. I do not have a manifest file.

Please can you post your Addon.xcu and manifest.xml??

Thanks,

Saleem
OpenOffice 3.4.0
Mac OS X 10.5.8
saleem145
 
Posts: 130
Joined: Mon Jul 02, 2012 4:47 pm

Re: Writing an add-on

Postby hanya » Tue Jul 31, 2012 7:47 am

Your Addon.xcu file looks working, here is manifest.xml content:
Code: Select all   Expand viewCollapse view
<?xml version="1.0" encoding="UTF-8"?>
<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
  <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
                       manifest:full-path="Addons.xcu"/>
</manifest:manifest>
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
hanya
Volunteer
 
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Writing an add-on

Postby saleem145 » Tue Jul 31, 2012 10:31 pm

Yes I tried this...no luck though..the menu item is no where to be found??
OpenOffice 3.4.0
Mac OS X 10.5.8
saleem145
 
Posts: 130
Joined: Mon Jul 02, 2012 4:47 pm

Re: Writing an add-on

Postby saleem145 » Wed Aug 01, 2012 2:35 am

This issue is resolved too...I was making a zip file....need to make an oxt. Thanks.
OpenOffice 3.4.0
Mac OS X 10.5.8
saleem145
 
Posts: 130
Joined: Mon Jul 02, 2012 4:47 pm

Re: [Solved] Writing an add-on

Postby dysmas » Tue Feb 19, 2013 8:41 pm

Thanks a lot for the answer @hanya, it works.
OpenOffice 3.4 on Windows XP SP4
dysmas
 
Posts: 1
Joined: Tue Feb 19, 2013 8:39 pm


Return to External Programs

Who is online

Users browsing this forum: No registered users and 1 guest