Hi Stephan,The JNI and Rexx stuff is irrelevant here. Its as simple as this:thank you for your comment. Did find a solution that solved my problem (BSF4Rexx can now be used as an optional Java extension, making setup/installation considerably easy; also I am putting the OOo-support into the base package). Just as a little teaser (it still is in beta), here is some ooRexx code that uses the writer component and which runs unchanged on Windows and Linux (the tilde ~ is the message operator, left of it is the receiving object, right of it the name of the message): This now runs with BSF4Rexx as a Java extension on both tested operating systems from the command line. --- The following is the skeleton Rexx script in OOo for the scripting framework ("template.rex"): That script also runs on both operating systems successfully for a writer document./* Hello World in ooRexx, cf. http://www.ooRexx.org, version: 2006-01-06 */ xScriptContext=uno.getScriptContext() -- get the xScriptContext object oDoc=xScriptContext~getDocument -- get the document service (an XModel object) -- oDesktop=xScriptContext~getDesktop -- get the desktop (an XDesktop object) -- oContext=xScriptContext~getComponentContext -- get the context(an XComponentContext object) xTextDoc=oDoc~XTextDocument -- get the XTextDocument interface from the document hello="Hello World (in ooRexx) " -- define text to add xTextDoc~getText~getEnd~setString(hello) -- add text at the end of the text document ::requires UNO.CLS -- load UNO support for OpenOffice.org Regards, ---rony P.S.: One item on the todo list is to automate the installation of "ScriptProviderForooRexx.jar", which I will tackle when I come back from an external ski-seminar in Styria (they have *great* snow and I will be able to ski in Schladming; starting in the late afternoon until midnight there will be presentations and discussions, one presentation talking about creating nutshell scripts for OOo 2.0 using the OOo scripting framework). P.P.S.: Here is a link to a work of a student who created nutshell examples for ooRexx-OOo scripts: <http://wi.wu-wien.ac.at/rgf/diplomarbeiten/index.html#bakk_07>. |
- Re: [api-dev] OOo 2.0.1: Java-interface on RH FC 3 not f... Stephan Bergmann
- [api-dev] Solved, happily humming along ... ;) (Re:... Rony G. Flatscher
