Creating a calc addin on Ubuntu with OOo 2.4.1?

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
jdpipe
Posts: 52
Joined: Wed Jun 04, 2008 8:02 am

Creating a calc addin on Ubuntu with OOo 2.4.1?

Post by jdpipe »

Hi all

I have been trying to create the 'Simple Calc Add-In' for OpenOffice using the standard Ubuntu packages for OpenOffice on on Ubuntu 8.10 with Open Office version 1:2.4.1-11ubuntu2.1.

Here is the source material:
http://wiki.services.openoffice.org/wik ... alc_Add-In

I have written a SCons script in which I attempted to translate the arguments to the local directories on my 32-bit system, see attached.

However, I get an error from cppumaker saying:
john@thunder:~/oooaddin$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/usr/lib/openoffice/sdk/linux/bin/idlc -C -I/usr/lib/openoffice/sdk/idl RNG.idl
/usr/lib/openoffice/sdk/linux/bin/idlc.bin: compile 'RNG.idl' ...
/usr/lib/openoffice/sdk/linux/bin/idlc.bin: returned successful
Sun Microsystems (R) /usr/lib/openoffice/sdk/linux/bin/idlc.bin Version 1.1

/usr/lib/openoffice/sdk/linux/bin/regmerge RNG.rdb /UCR RNG.urd
/usr/lib/openoffice/sdk/linux/bin/cppumaker -BUCR -Torg.openoffice.sheet.addin.XRNG -Tcom.sun.star.sheet.XAddIn -Tcom.sun.star.lang.XServiceName -Tcom.sun.star.lang.XServiceInfo -Tcom.sun.star.lang.XTypeProvider -Tcom.sun.star.uno.XWeak -Tcom.sun.star.uno.XAggregation -Tcom.sun.star.lang.XMultiServiceFactory -Tcom.sun.star.uno.XComponentContext -Tcom.sun.star.lang.XSingleComponentFactory -Tcom.sun.star.lang.XSingleServiceFactory -Tcom.sun.star.registry.XRegistryKey /usr/lib/openoffice/sdk/program/oovbapi.rdb /usr/lib/openoffice/sdk/program/types.rdb RNG.rdb
/usr/lib/openoffice/sdk/linux/bin/cppumaker.bin : init registries failed, check your registry files.
scons: *** [RNG] Error 99
scons: building terminated because of errors.
john@thunder:~/oooaddin$
As far as I can tell, the RDB file "offapi.rdb" is not present in my system. Should that file be present in this 2.4.1 version of OpenOffice, or is that something new? Can anyone give me some suggestions for how I can adapt this build script so that it works with OOo 2.4.1, being the version that I have available to me?

Also, is there any simple cross-platform way of discovering the locations of all these special folders, such as a 'pkg-config' type script that returns the suitable locations of the library/headerfile/IDL/RDB files that I need to use?

Cheers
JP

PS in above output, I tried 'oovbapi.rdb' (present on my system), as well as 'oooapi.rdb' (not present); neither worked.
Attachments
oooaddin.tar.bz2
Demonstration code, needs fixing
(2.9 KiB) Downloaded 594 times
OOo 3.1.1 on Mac OS X 10.5, OOo 3.0.1 on Ubuntu 9.04
jdpipe
Posts: 52
Joined: Wed Jun 04, 2008 8:02 am

Re: Creating a calc addin on Ubuntu with OOo 2.4.1?

Post by jdpipe »

I have resolved the building problems and have now created an addin that OpenOffice will allow to be 'registered' but currently I can't make anything execute successfully. If anyone has any hints about why specifically this sample code might be failing under OOo 2.4.1, please let me know.

See revised code, attached.
Attachments
oooaddin.tar.bz2
Revised tarball
(2.97 KiB) Downloaded 604 times
OOo 3.1.1 on Mac OS X 10.5, OOo 3.0.1 on Ubuntu 9.04
Post Reply