tuno - a Tcl-OpenOffice.org Bridge

PDF Version

Research Theme: Knowledge Management

An ability to capture graphical output of specialised software in office applications is important for creating reports and presentations. This can be achieved either by copying and pasting a screenshot or by creating a drawing programmatically through an API of the office application. The latter way is preferable when large amount of text should be accurately captured.

Motivation

The Design Rationale Editor (DRed) software by Rob Bracewell is well received in industry. The main impediment to its use in the CUED design teaching and allowing its potential inclusion on the Multidisciplinary Design Project (MPD) Knoppix CD has been the absence of the Linux version of the software.

On Windows, DRed supports exporting graphs in MS Windows Metafile format. Following porting this software from Windows to Linux, this functionality had to be replicated on Linux.

Objectives

To be able to open MS Office and OpenOffice.org bookmarked documents programmatically from Tcl/Tk on Linux.

To be able to export the layout and images of the Tcl/Tk canvas items to OpenOffice.org as vector graphics drawings.

Method

A Tcl-OpenOffice.org bridge tuno is based on UNO (Universal Network Objects) interface to OpenOffice.org and implemented as a Tcl package containing a C++ dynamic library and a Tcl module. The connection to the UNO server is persistent. A Tcl wrapper for this library is generated with the help of SWIG. The tuno package has been tested on Knoppix 4.0 with Tcl/Tk 8.4.11 and OpenOffice.org 2.1.

Findings

An implementation of the Tcl binding for the UNO OpenOffice.org interface on Linux has been created. The Tcl binding can be replaced easily by a binding to any other scripting language. The source code is available from the authors.

Acknowledgements

Support for this project was provided by the EPSRC.

Key References