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


Thanks to both Brian and Tom.
I didn't know the odt files were compressed files.

So now I have to re-think my webdav solution because I was hoping to deploy just one copy of my 
java macro via HTTP. This would allow me to publish my java macro updates on a web server and also 
publish many odt docs and templates that use this macro. So I guess I'll need to do a basic macro 
within the document which in turn downloads an updated copy of the Java macro and places it in, 
say, the user's LO appdata dir. The trick would be to reload/restart LO so it can correctly load 
the newly downloaded macro.

Anyway, thanks for the odt/zip info.

Vieri

--- On Wed, 5/15/13, Brian Barker <b.m.barker@btinternet.com> wrote:

I'd like to deploy a compiled Java macro with an ODT
document.

According to http://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Writing_Macros:

"If you want to deploy the macro to a document you need
to place it in a Scripts/java directory within the document
zip file."

What does that mean exactly?

I'm guessing, but I'm pretty sure I know the answer.

Open Document Format files are zip archives; so the
"document zip file" is the .odt document file itself.
o Rename the ,odt file to change its extension to .zip.
o Double-click to unzip the archive.
o Create a new folder named Scripts in the same folder as
the unzipped material and another named java within it.
o Copy your macro into .../java.
o Select all the files and rezip them into an archive.
o Rename the archive to change the extension back to .odt.
o Double-click to test.

Depending on your operating system and file associations,
you may be able to unzip and zip without renaming the
files.  Once you have embedded your macro, you will not
need to do anything special when distributing your document
file to others.

I trust this helps.

Brian Barker - privately



-- 
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.