My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Project Information
Members
Links

GroovyUNO is a Groovy expander that simplifies access to methods and properties of UNO classes of OpenOffice/LibreOffice. With GroovyUNO there is no need anymore to query interfaces or cast objects to XPropertySet. All properties and methods of an object are instantly available. Objects which support XNameAccess or XIndexAccess can be accessed conveniently with array operators.

Sample code:

import groovyuno.UNO

UNO.init()

def doc = UNO.desktop.currentComponent
def text = doc.getText()
start = text.getStart()
text.insertString(start, "Hello World!", false)

def cursor = text.createTextCursor()

cursor.gotoStart(false)
cursor.gotoEnd(true)
cursor.setPropertyValue("CharFontName", "Arial")
cursor.CharFontName = "Arial Black"
Powered by Google Project Hosting