Marco Fioretti wrote: > Back to my training class example: a portable macro embedded into > an .odt file is what you could use to distribute tutorials or any > other interactive educational material where there is scarce bandwidth > and/or PCs not powerful enough to run OO.o. Ditto for CDs attached > to magazines or books.
Yes, that's an interesting approach. Unfortunately the Open Document standard doesn't say anything about macros (or any other "external" content). So what you could achieve now (at best) is an OOo extension of the OD standard, but because we don't want to be Microsoftish, we should call this an OOo feature, not an Open Document feature. To realize your idea (what definitely is possible) *and* make it future-proof we miss the standardization. But OK, this is only a general remark because you emphasized the Open Document relation by yourself. Let's put this aside for the moment. [Personal estimation: In general our way to store macros inside packages is very open and easily portable so that it might have a good chance to enter the OD standard with only minor changes once people want to extend the standard for document macros. At least the conversion effort for you OOo documents should be limited.] Embedding arbitrary content into the packaged OO.o(!) file format is possible, using it needs a component that is able to handle this content. Our Scripting Framework uses this feature of the package file format to allow for embedding macros written in Java, BeanShell or JavaScript by storing "script parcels" inside the package and providing runtime components for them. There is also an integratation of Python/PyUNO into the Scripting Framework. Quoting Jörg Budischewski from dev@udk.openoffice.org: > Subject: [udk-dev] FYI: Integration of python-scripts in Tools/Macro dialog > available since OOo 1.9.m79 > Date: Sat, 19 Feb 2005 21:56:57 +0100 > From: Joerg Budischewski <[EMAIL PROTECTED]> > > Hi, > > since the above mentioned version, pyuno supports the office scripting > framework in the upcoming OOo-2.0 release. > > The support is limited to the 'core' framework, meaning that execution > and assigning of macros works fine, but editing and debugging macros is > not integrated in OpenOffice.org's UI (simply because of the lack of > development resources). Thus, this feature is targeted at more advanced > script developers. Details about the integration can be found at > > http://udk.openoffice.org/python/scriptingframework/index.html > > In case you don't know pyuno, have a look at > > http://udk.openoffice.org/python/python-bridge.html > > Bye, > > Joerg Budischewski I can't say how good this integration works, but I have a lot of confidence in Jörg. :-) Lets's take that for granted, so all you have to do is placing your macro into the right place inside the package where the Scripting Component can find it. I think the links in the quote should show you the ropes. Now you can run your Python macros from the "Run macro" dialog or bind them to document events or buttons, put them into toolbars etc. like you can do with Basic Macros. Your Python macro can be "plain Python" code only and/or it can use the PyUNO bridge to access the OOo API (but I assume the latter is not what you want because it is not "portable" to other OD based applications as long as they don't support the particular API). Of course ATM there is no other application that can work with your macros, even if you don't make use of our API in them. Wether this solution fits to your needs is something you can only judge by sourself. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]