[Solved] Adding New macro language to OpenOffice/LibreOffice

Java, C++, C#, Delphi, ??? - Using the UNO bridges

[Solved] Adding New macro language to OpenOffice/LibreOffice

Postby harryspier » Wed Jan 22, 2014 7:23 pm

I'd like to try to add the language Racket (previously called PLT Scheme) http://www.racket-lang.org/ as a new macro language to OpenOffice for an application I'm writing on a windows computer. Racket has a "foreign function interface" that allows it to call functions from a DLL compiled from C. To do so it needs to know the name of the DLL that contains the functions its calling and the C representation of the parameters of the function. My application calls only a very very few UNO functions (initial setup, moving a cursor, getting text from a cursor and inserting text at a cursor. I only need to set it up to use these functions only.

The functions I'm using are: (here are the python calls to them)
import uno
ctx = uno.getComponentContext()
desktop = ctx.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop", ctx )
oDoc = desktop.getCurrentComponent()
oText = oDoc.Text
oVC = oDoc.CurrentController.getViewCursor()
oInsertCursor = oText.createTextCursorByRange(oVC.Start)
selection = oDoc.CurrentController.getSelection()
oEnd_of_selection = oText.createTextCursorByRange(oVC.End)
oEnd_of_text = oText.End
----------------------------------

If someone could tell me:
1) the name of the dll in the OpenOffice distribution to windows that contains these functions.
2) How to use the cunomaker tool ( http://www.openoffice.org/udk/cpp/man/s ... _spec.html ) to get the c representation of these function calls
3)Once I create an executable (.exe file) if I can attach this to a button in the toolbar by the "tools->customize" menu option or do I do this another way?

With this information I think I can probably get this working.
Thanks,
Harry Spier
Last edited by Hagar Delest on Fri Jan 24, 2014 9:07 am, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 3.4.1 Windows 8
harryspier
 
Posts: 21
Joined: Fri Feb 01, 2013 9:24 pm

Re: Adding new macro language to OpenOffice/LibreOffice

Postby Villeroy » Wed Jan 22, 2014 10:01 pm

http://en.wikipedia.org/wiki/Universal_Network_Objects
This is not how it works. You call all the functions from a listening instance of the running office suite.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 27393
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding new macro language to OpenOffice/LibreOffice

Postby harryspier » Fri Jan 24, 2014 2:26 am

Thanks Villeroy I'll go through this documentation.
OpenOffice 3.4.1 Windows 8
harryspier
 
Posts: 21
Joined: Fri Feb 01, 2013 9:24 pm

[SOLVED] Adding new macro language to OpenOffice/LibreOffice

Postby harryspier » Fri Jan 24, 2014 5:17 am

This OpenOffice link gives detailed instructions in how to add a new macro language to Openoffice
https://wiki.openoffice.org/wiki/Docume ... om_Scratch
OpenOffice 3.4.1 Windows 8
harryspier
 
Posts: 21
Joined: Fri Feb 01, 2013 9:24 pm


Return to External Programs

Who is online

Users browsing this forum: No registered users and 1 guest