Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I'm trying to deploy macros within a custom oxt extension.
I successfully deployed a Basic library by doing the following:

in META-INF\manifest.xml I added:

 <manifest:file-entry manifest:full-path="CO_SaveDoc/" 
manifest:media-type="application/vnd.sun.star.basic-library"/>
 
 <manifest:file-entry manifest:full-path="CO_SaveDoc/COSaveDoc.xcu" 
manifest:media-type="application/vnd.sun.star.configuration-data"/>
 
 <manifest:file-entry manifest:full-path="CO_SaveDoc/COSaveDoc.xcs" 
manifest:media-type="application/vnd.sun.star.configuration-schema"/>


The "CO_SaveDoc" subdir contains several xba files as well as the script.xlb and dialog.xlb files.

If I install my custom oxt extension, I can see all my custom Basic macros within LO.

However, I'm failing to add my custom Java macros.

in META-INF\manifest.xml I added:

 <manifest:file-entry manifest:full-path="CO_SaveDoc_Java/parcel-descriptor.xml" 
manifest:media-type="text/xml"/>

 <manifest:file-entry manifest:full-path="CO_SaveDoc_Java/COj1.jar" 
manifest:media-type="application/vnd.sun.star.uno-component;type=Java"/>


and the "CO_SaveDoc_Java" subdir contains both files of which parcel-descriptor.xml has the 
following:

<parcel language="Java" xmlns:parcel="scripting.dtd">
    <script language="Java">
        <locale lang="en">
            <displayname value="COj1.CO"/>
            <description>
                CO macro.
            </description>
        </locale>
        <functionname value="CO.COSaveDoc"/>
        <logicalname value="CO.COSaveDoc"/>
        <languagedepprops>
            <prop name="classpath" value="CO_SaveDoc_Java/COj1.jar"/>
        </languagedepprops>
    </script>
</parcel>

If I zip that all up and try to install it as an .oxt then I get the following error:

----
%PROGRAMFILES%\LibreOffice 4.0\program>unopkg add --shared 
"Z:\LibreOffice\extensions\CO_SaveDoc-1.0.0.oxt"

ERROR: An error occurred while enabling: COj1.jar
       Cause: com.sun.star.registry.CannotRegisterImplementationException: Cannot determine 
registration class!

unopkg failed.
----

I don't know what the above message means and how to fix it.

I then tried this instead of the above in META-INF\manifest.xml:

 <manifest:file-entry manifest:full-path="CO_SaveDoc_Java/parcel-descriptor.xml" 
manifest:media-type="text/xml"/>
 <manifest:file-entry manifest:full-path="CO_SaveDoc_Java/COj1.jar" 
manifest:media-type="application/vnd.sun.star.uno-typelibrary;type=Java"/>

and I don't get any errors while installing the oxt extension. However, if I open LO I can't find 
my Java macro library.

What could I be doing wrong?

I'm trying to follow several guides on the web, among others, this one:
http://wiki.openoffice.org/wiki/Documentation/DevGuide/Extensions/File_Format#Uno_Jar_Components

Does anyone know of an extension out there (http://extensions.libreoffice.org) that I could 
download that actually has Java macros?

Thanks,

Vieri


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.