Skip Menu |

This queue is for tickets about the OpenOffice-OODoc CPAN distribution.

Report information
The Basics
Id: 24433
Status: resolved
Priority: 0/
Queue: OpenOffice-OODoc

People
Owner: Nobody in particular
Requestors: gw [...] green-stores.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.032



Subject: getCellValue and getTableText fail to deliver zero as cell content
Date: Thu, 18 Jan 2007 17:04:40 +0100
To: bug-OpenOffice-OODoc [...] rt.cpan.org
From: Gerrit Wichert <gw [...] green-stores.de>
Hi, i've just stumbled about something what i consider a bug. When trying to extract the content of a table via @var = getTableText( $table) all data is delivered correctly unless cells that contain a single '0'. In this case '' is delivered for a cell containing '0'. This makes it impossible to distinguish empty cells from those containing a '0'. Same thing happens using getCellValue when the cell type is string. When cell type is float the '0' is delivered correctly via getCellValue but not via getTableText. I've added a little test program and ods file that demonstrate this behaviour. uname -a Linux jupiter 2.6.16.13-4-smp #1 SMP Wed May 3 04:53:23 UTC 2006 i686 athlon i386 GNU/Linux perl --version This is perl, v5.8.8 built for i586-linux-thread-multi Document.pm:our $VERSION = 2.021; File.pm:our $VERSION = 2.113; Image.pm:our $VERSION = 2.016; Manifest.pm:our $VERSION = 2.003; Meta.pm:our $VERSION = 2.008; Styles.pm:our $VERSION = 2.021; Text.pm:our $VERSION = 2.228; XPath.pm:our $VERSION = 2.219; this behaviour even occurs on WinXP using Active-Perl regards, Gerrit Wichert
Download test.ods
application/vnd.oasis.opendocument.spreadsheet 7.2k

Message body not shown because it is not plain text.

use strict; use warnings; use OpenOffice::OODoc; use Data::Dumper; my $doc = ooDocument( file => "./test.ods"); my $table = $doc->getTable( 'Tabelle1'); $doc->normalizeTable( $table, 4, 2); my $cell = $doc->getCell($table, 1, 1); print "type: '", $doc->cellValueType($cell),"', value: '",$doc->getCellValue($cell), "'\n"; my $cell = $doc->getCell($table, 2, 1); print "type: '", $doc->cellValueType($cell),"', value: '",$doc->getCellValue($cell), "'\n"; my @aData = $doc->getTableText( $table); print Dumper( @aData); exit;
From: JMGDOC [...] cpan.org
The bug is now pinpointed. It will be fixed in 2.032 Thanks for the report
The bug is fixed in 2.032, uploaded today