I've refactored ooo.ijs to make it simpler and more compatible with wd commands.
I think that the infrastructure including SAFEARRAY needed is more or less
complete. You may use reflection or Bridge_GetStruct to create any array
arguments needed by OOo.
Examples of using OOo from various programming language,
official document: http://udk.openoffice.org/common/man/spec/ole_bridge.html
Code Snippets: http://www.oooforum.org/forum/viewtopic.phtml?t=9815
This includes JScript, but I've disable wsh so that I cannot test it.
Oleg Kobchenko wrote:
--- bill lam <[EMAIL PROTECTED]> wrote:
Oleg Kobchenko wrote:
Yes, pcall is definitely a way to go.
I recommend using the "disp" class. Try its "info".
However, I think it does not directly support arrays.
But the good news is that it is all open, and you
can use the debugger to trace the "invoke" and the
part where it converts variants to J objects.
You should be able to user "oleaut" functions to
iterate SAFEARRAY and apply variant conversion getting
J boxed array memberwise.
I upload an simple script to open OOo calc to jwiki. I use my bu2.dll vtable
but the general idea is same as your pcall.dll. It requires more work to make
it useful.
bu2 is interesting as another look and excercise at the same pointer
and v-table calling idea and the power of J to perform such calls easily.
Otherwise, the "disp" class should be able to perform the same access
to OpenOffice with a higher level API. However, more argument understanding
may be needed. Such as SAFEARRAY.
Is it possible to provide a small JScript (or VBScript) script
(runnable with cscript.exe) that does the same thing as the example
in ooo.ijs?
Note: to test COM calling API, it is easy to create small COM components
from JScript or VBScript using the WSC (Windows Script Component) feature.
I've been told that files saved by Excel 2007 cannot be opened by Excel 97-2003
although it is still possible to save as the Excel 97-2003 format. I'm not
willing to spend money to buy MS Office 2007 so that Tara will not be enhanced
to work with Excel 2007's native format. Future work will be done on OOo calc.
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
regards,
bill
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm