Tcluno Packages (Release 0.2)

The current release of tcluno contains 5 packages with pure Tcl code. (The C/C++ library of the previous release is no longer necessary).
Tcluno has been tested on Linux (SuSE) and Windows, but should also run on Macintosh (we had no such machine for testing)

Installation: We suggest to use a version of ActiveTcl (because the vfs and memchan packages are used!) and to unpack all the packages besides tclunodocs in the lib directory of that installation. The tclunodocs "docs.zip" file has to be copied into the unospection-0.2 directory.

The packages are:
  1. tclurtp
  2. tcluno
  3. itcluno
  4. tclunodocs
  5. unospection

tclurtp


The tclurtp package is the "low" level package which handles the connection to a running OpenOffice.org server process using the urp socket protocoll of OpenOffice.org and provides the administration part for the connection. OpenOffice has to be started with the command line options:
PathToYourOpenOfficeInstallation/program/soffice "-accept=socket,host=localhost,port=2002;urp;"
host=localhost allows only connections from the same host, otherwise use host=0. The port number can be different. The quotes are mandatory to prevent the shell from interpreting the semicolons !

The routines in this package are not intended for use for "normal" users.

tcluno


The tcluno package is built on top of tclurtp and is the "middle" ware. The routines in this package use the low level routines of tclurtp and provide routines to get interface objects and get and set properties of OpenOffice.org.

That can be done by calling interface method from the UNO OpenOffice.org API. The calls return either handles (similar to objects) which can be used for further API method calls or the values for properties.

Setting properties is done the same way by using a handle and calling an interface method for setting properties with the appropriate values as parameters.

The routines in this package are intended for experienced users, which want to use advanced access to the API.

itcluno


The itcluno package is built on top of the tcluno package and provides "high" level access to the OpenOffice.org UNO API.

It is implemented with Itcl and contains classes for (hopefully) easily accessing writer, scalc, and simpress documents using classes which handle the low and middle level calls for accessing the API automaticly. It is based on tclurtp and tcluno

In this package you can find a lot of demos, which show the use of the classes and provide examples on how to use these classes. There is also a docs directory, which contains the documentation for these demos.

Our idea is, that most users should use these classes for accessing the API and they only have to dowload the tclurtp and tcluno packages as base for itcluno.

tclunodocs


The tclunodocs contains the SDK 1.x documentation of OpenOffice.org in a format useable for the unospection package (see below). The SDK 2.x documentation will be added soon.

unospection


The unospection package contains a tool unospection.tcl. Unospection is a GUI for introspecting a running OpenOffice.org server process and for driving that process using the urp socket interface from Openoffice.org. It is an application built on top of tclurtp and tcluno

One use of unospection is to get the interfaces and methods including parameter infos (formal names and types) and return infos (type) of the methods, as well as the property names and types of the different parts of the OpenOffice.org components (documents, models, pages, tables etc.)

The second use of unospection is to use the results of introspection calls and to actively drive the OpenOffice.org server process in selecting methods typing in values for the parameters and execute the method calls. The results of the calls can directly be seen in the documents of the OpenOffice.org server process. That includes also setting of properties.

An aspect of using unnospection is to interactively figure out how to set for examle a property and use the automaticly logged calling sequence for adding it to some Tcl program, where you want to use that feature. The executed code in unospection can be saved to a file and you can cut and paste from that file to your progam.

Using unospection you can get the (SDK) documentation for every interface/method or property you find in the appropriate window by just clicking on the method/interface or property.

In the parameter window for calling a method you can also see the types of the parameters, in order to help you entering the correct values.

Another feature of unospection is, that you can search for a topic using regular expression search and you can get all the methods/properties whith respect to that pattern.

Some hints on how to use the unospection tool can be found here

SourceForge.net Logo