Reviews by GordM



OpenOffice-OODoc (2.125) ****

Spent many frustrating hours trying to get a table style to take.

Would be helpful if there was an example showing how to use an existing base document, making copies of a table and then changing the values of the cells in that table, creating a span within that table and applying text formatting and borders to that table (which get messed up when you change anything).

Here's some additional information everyone should know (the zip file aspect, while obvious to the developer and those familiar with ODF, should be pointed out to the new user so that he/she can resolve issues not covered in the documentation):

# GordM's Notes:
# - an openoffice blah.odt file is actually a zip
# file containing a bunch of files
# you will want to manipulate with OpenOffice::OODoc
# specifically, the files content.xml and styles.xml
# - this zip file can be opened with the unxutils unzip command:
# system("unzip.exe -d result2 result.odt");
# - after manual testing edits have been inserted,
# the odt zip file can be created with the batch file:
# rem must quit out of result2.odt before running...
# rm result2.odt
# cd result2
# zip.exe -r ../blah *
# mv ../ ../result2.odt
# - the unzipped file is very handy for understanding
# why your script is not working and what it would
# take to make it work
# - the unzipped file is very handy for capturing all the
# properties needed from a style you created in writer
# and now wish to create a version of in perl
# - for some reason, certain style definitions do not work
# when stored in the styles.xml file (for me: tweaking
# borders of tables) so they can be stored in the content
# file using:
# $contentX->createStyle(...
# instead of the typical:
# $stylesX ->createStyle(...
# where these were defined previously:
# my $odtfile = "result.odt";
# my $base_OO = ooFile($odtfile);
# my $contentX = odfConnector (container=>$base_OO, part=>'content', readable_XML=>'true') or die "# Unable to get the content\n";
# my $stylesX = odfConnector (container=>$base_OO, part=>'styles', readable_XML=>'true') or die "# Unable to get the styles\n";
#note "readable_xml" formats the output xml making it easy to edit
# (using activeState Perl 5.10, OpenOffice 3.2, ::OODoc 2.124)

GordM - 2010-07-12T10:30:42 (permalink)

Was this review helpful to you?  Yes No