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


Hi :)
I thought macros were automatically embedded in documents?

That it might not work all the time and needs a big nudge once in a while made intuitive sense to 
me so i thought i was trying to help with that.  However i don't know about macros and usually push 
people to the various chapters and book, which i have already done recently.  So i thought we were 
just dealing with a one-off hiccup.  

How do you get a macro in a document or do you have to send it as a separate file?  
Regards from 
Tom :)  





________________________________
From: Andrew Douglas Pitonyak <andrew@pitonyak.org>
To: users@global.libreoffice.org 
Sent: Thursday, 16 May 2013, 2:12
Subject: Re: [libreoffice-users] deploy java macro with document


On 05/15/2013 05:25 AM, Vieri wrote:
Hi,

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

Can you do that? You can do this with JavaScript, but Java, really? I 
had no idea.

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?

Oh, yuck, feels dangerous. I know that Mr. Davies commented on this, so 
I will not expound on what he said, but, if you unzip your document and 
then start manually creating things and then re-zip the file, that feels 
rather arduous.

I can't help but wonder if there is a way to access the internal storage 
structures directly do to this from a macro (which still would be ugly).

If you do make this work, I am interested to hear about it.


I tried the following:
I saved the ODT file within a subdir and placed my Java macro (and descriptor file) within 
subdir/Scripts/java/MYJAVAMACRO.
If I load the document and go to Tools->Macros->Run macros, I can't see my Java macro under the 
"document" tree.

What am I doing wrong?

Eventually I'd like to store my odt + java macros within a webdav directory so that the dir 
structure would be something like this:
https://server.com/webdav/docs/doc1.odt
https://server.com/webdav/docs/Scripts/java/MYJAVAMACRO/parcel-descriptor.xml
https://server.com/webdav/docs/Scripts/java/MYJAVAMACRO/MYJAVAMACRO.jar

Clients would open the ODT files like this:

soffice -o https://server.com/webdav/docs/doc1.odt

I can't seem to load the Java macro in my webdav setup but I'd first like to see if I can load 
it in my "local" setup.

Thanks,

Vieri



-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


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



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