OpenOffice-OODoc - Re: From 2.035 to 2.102 - Incompatibility?

Posted on Wed May 14 16:23:40 2008 by jmgdoc in response to 7872 (See the whole thread of 5)
Re: From 2.035 to 2.102 - Incompatibility?

OK, the target is locked !

The bug is not related to the spreadsheets. It's located at a deeper level.
The program below should work. The "member" options have just been replaced by "part" options.

The "member" option is about to be deprecated. It should be supported for compatibility reasons, but there is a small bug in 2.102, so the "member" option is wrongly ignored in some situations; this bug will be fixed in 2.103, where "member" will be supported again.
In the mean time, the simplest workaround is the use of "part" instead of "member" each time ooDocument() or odfDocument() is called.

Beware: the "ooXxx" method names are themselves deprecated and replaced by "odfXxx", because the official name of the file format is "Open Document Format" and no longer "OpenOffice.org"; for example ooDocument() should be replaced by odfDocument() and so on. However, the old "ooXxx" form remains supported.

#!/usr/bin/perl -w use OpenOffice::OODoc; use strict; my $oofile=ooFile("./Example-102.ods"); # very basic ODS file with only data at the second sheet. $oofile->{doc}=ooDocument(file=>$oofile,part=>'content'); $oofile->{styles}=ooDocument(file=>$oofile,part=>'styles'); my $sheet2 = $oofile->{doc}->getTable(1, 8, 2); $oofile->{doc}->deleteColumn($sheet2, 0); $oofile->save;
Direct Responses: 7876 | Write a response