Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Jean-Marie Gouarné
August 5, 2004, 5:54 pm
rate this thread
This pure Perl module allows direct read/write access to OpenOffice.org
files, without using the OpenOffice.org API. It provides an object
representation of the OOo documents, with a lot of methods to get,
create, update or delete any content or presentation element.
The most recent new features are:
- While the previous releases allowed only read/write operations in
previously existing documents, the present one can create new OOo
documents from scratch; the user has just to provide an additional
"create" option giving the document class in the main object
constructor. For ex, to create a new spreadsheet (i.e. OpenOffice Calc)
document that will be stored in a "doc.sxc" file, the constructor is:
my $doc = ooDocument
file => "doc.sxc",
create => "spreadsheet"
The new documents are generated from a set of XML templates; if needed,
each application can select user-provided templates instead of the
- The createImageElement() method has been improved to allow easy image
import in drawing and presentation documents as well as in text or
spreadsheet documents. Ex:
description => "The Kilimanjaro",
page => 3,
position => "4.2cm, 5cm"
size => "3cm, 4cm",
style => "MyGraphics"
- The OOo date fields (stored in ISO-8601 format) can be easily
translated to/from Perl localtime() dates, due to new conversion functions;
- Symbolic color names (like "blue" or "yellow") and not only raw
hexadecimal RGB codes, are allowed for text and background colors. So,
to color in dark blue with a yellow background every paragraph or item
matching "OpenOffice" (or any other string or regex), the code is more
# define the colored style
'fo:color' => rgb2oo("dark blue"),
'fo:background-color' => rgb2oo("yellow")
# give the colored style to the selected elements
- Bug fixes and functional improvements in the localization; the local
character sets seems to be properly supported; the user's local
character (iso-8859-1 by default) can be selected either at the
installation level or separately in each application.
The previous text-focused methods (search/replace/create/remove) are
Please see http://search.cpan.org/dist/OpenOffice-OODoc for details
Thanks for comments
- » Help Required : Not able install Win32::OLE module .......
- — Next thread in » PERL Modules Announcements