Skip Menu |

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

Report information
The Basics
Id: 110420
Status: open
Priority: 0/
Queue: OpenOffice-OODoc

People
Owner: jmgdoc [...] cpan.org
Requestors: dchu [...] ambarella.com
Cc:
AdminCc:

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



Subject: FW: report a OpenOffice::OODoc suspect OpenOffice::OOdoc bug, please help
Date: Fri, 18 Dec 2015 03:54:58 +0000
To: "bug-OpenOffice-OODoc [...] rt.cpan.org" <bug-OpenOffice-OODoc [...] rt.cpan.org>
From: Dino Chu <dchu [...] ambarella.com>
Dear Webmaster I want to report a bug, please help. * perl version v5.10.1 * OpenOffice::OODoc version v2.125 * OpenOffice vesion v3.3 * Distribution Red Hat Enterprise Linux Server release 6.3 (Santiago) * Bug Description: While I use OpenOffice::OODoc v2.125, I encounter one problem. would you kindly help me. My intention is to modify existing odt file with OpenOffice::OODoc, here is my code. Show quoted text
>>> use OpenOffice::OODoc; >>> >>> my $archive = ooFile("aaa.odt"); >>> my $doc = ooDocument(archive => $archive, >>> member => 'content'); >>> >>> my $table = $doc->getTable(0); >>> my ($h, $l) = $doc->getTableSize(0); >>> my $row = $i < $h ? $doc->getRow(0, $i) : >>> $doc->appendRow(0); >>> for (my $j = 0; $j < $l; $j++) >>> { >>> $doc->cellValue($row, $j, 123); >>> } >>> $archive->save;
but I can't open with OpenOffice, it complain [cid:image001.png@01D1398A.5C546580] after investigate the content.xml of modified odt file, I found that the red mark content 'Times New Roman' should be &apos;Times new Roman&apos; would you kindly help me to resolve this problem. best regards Dino Chu content of context.xml of modified odt file <office:document-content grddl:transformation="http://docs.oasis-open.org/office/1.2/xslt/odf2rdf.xsl" office:version="1.2" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#<http://www.w3.org/2003/g/data-view>" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:rpt="http://openoffice.org/2005/report" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><office:scripts/><office:font-face-decls><style:font-face style:name="StarSymbol" svg:font-family="StarSymbol"/><style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/><style:font-face style:font-family-generic="roman" style:font-pitch="variable" style:name="Times New Roman" svg:font-family="'Times New Roman'"/><style:font-face style:font-family-generic="swiss" style:font-pitch="variable" style:name="Arial" svg:font-family="Arial"/><style:font-face style:font-family-generic="system" style:font-pitch="variable" style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'"/><style:font-face style:font-family-generic="system" style:font-pitch="variable" style:name="Tahoma" svg:font-family="Tahoma"/></office:font-face-decls><office:automatic-styles><style:style style:display-name="Test Table 1" style:family="table" style:name="Test_20_Table_20_1"><style:table-properties fo:margin-left="0.5903in" fo:margin-right="2.4368in" style:width="3.6653in" table:align="margins"/></style:style><style:style style:display-name="Test Table 1.A" style:family="table-column" style:name="Test_20_Table_20_1.A"><style:table-column-properties style:column-width="0.7493in" style:rel-column-width="13397*"/></style:style><style:style style:display-name="Test Table 1.B" style NOTE: This email (including attachments) contain Ambarella Proprietary and/or Confidential Information and is intended solely for the use of the individual(s) to whom it is addressed. Any unauthorized review, use, disclosure, distribute, copy, or print is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.

Message body is not shown because it is too large.

Download image001.png
image/png 19.2k
image001.png
Le 2015-12-17 22:55:26, dchu@ambarella.com a écrit :
Show quoted text
> Dear Webmaster
>
> I want to report a bug, please help.
>
> * perl version
> v5.10.1
>
> * OpenOffice::OODoc version
> v2.125
>
> * OpenOffice vesion
> v3.3
>
> * Distribution
> Red Hat Enterprise Linux Server release 6.3 (Santiago)
>
> * Bug Description:
> While I use OpenOffice::OODoc v2.125, I encounter one problem.
> would you kindly help me.
>
> My intention is to modify existing odt file with OpenOffice::OODoc,
> here is my code.
> >>> use OpenOffice::OODoc;
> >>>
> >>> my $archive = ooFile("aaa.odt");
> >>> my $doc = ooDocument(archive => $archive,
> >>> member => 'content');
> >>>
> >>> my $table = $doc->getTable(0);
> >>> my ($h, $l) = $doc->getTableSize(0);
> >>> my $row = $i < $h ? $doc->getRow(0, $i) :
> >>> $doc->appendRow(0);
> >>> for (my $j = 0; $j < $l; $j++)
> >>> {
> >>> $doc->cellValue($row, $j, 123);
> >>> }
> >>> $archive->save;
>
> but I can't open with OpenOffice, it complain
> [cid:image001.png@01D1398A.5C546580]
>
> after investigate the content.xml of modified odt file, I found that
> the red mark content 'Times New Roman' should be &apos;Times new
> Roman&apos;
>
> would you kindly help me to resolve this problem.
>
> best regards
> Dino Chu
>
>
>
>
> content of context.xml of modified odt file
> <office:document-content grddl:transformation="http://docs.oasis-
> open.org/office/1.2/xslt/odf2rdf.xsl" office:version="1.2"
> xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
> xmlns:dc="http://purl.org/dc/elements/1.1/&quot;
> xmlns:dom="http://www.w3.org/2001/xml-events&quot;
> xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
> xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
> xmlns:field="urn:openoffice:names:experimental:ooo-ms-
> interop:xmlns:field:1.0"
> xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
> xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
> xmlns:grddl="http://www.w3.org/2003/g/data-
> view#<http://www.w3.org/2003/g/data-view&gt;&quot;
> xmlns:math="http://www.w3.org/1998/Math/MathML&quot;
> xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
> xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
> xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
> xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
> xmlns:ooo="http://openoffice.org/2004/office&quot;
> xmlns:oooc="http://openoffice.org/2004/calc&quot;
> xmlns:ooow="http://openoffice.org/2004/writer&quot;
> xmlns:rpt="http://openoffice.org/2005/report&quot;
> xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
> xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
> xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
> xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
> xmlns:tableooo="http://openoffice.org/2009/table&quot;
> xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
> xmlns:xforms="http://www.w3.org/2002/xforms&quot;
> xmlns:xhtml="http://www.w3.org/1999/xhtml&quot;
> xmlns:xlink="http://www.w3.org/1999/xlink&quot;
> xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot;
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-
> instance"><office:scripts/><office:font-face-decls><style:font-face
> style:name="StarSymbol" svg:font-family="StarSymbol"/><style:font-face
> style:name="Tahoma1" svg:font-family="Tahoma"/><style:font-face
> style:font-family-generic="roman" style:font-pitch="variable"
> style:name="Times New Roman" svg:font-family="'Times New
> Roman'"/><style:font-face style:font-family-generic="swiss"
> style:font-pitch="variable" style:name="Arial" svg:font-
> family="Arial"/><style:font-face style:font-family-generic="system"
> style:font-pitch="variable" style:name="DejaVu Sans" svg:font-
> family="'DejaVu Sans'"/><style:font-face style:font-family-
> generic="system" style:font-pitch="variable" style:name="Tahoma"
> svg:font-family="Tahoma"/></office:font-face-decls><office:automatic-
> styles><style:style style:display-name="Test Table 1"
> style:family="table" style:name="Test_20_Table_20_1"><style:table-
> properties fo:margin-left="0.5903in" fo:margin-right="2.4368in"
> style:width="3.6653in"
> table:align="margins"/></style:style><style:style style:display-
> name="Test Table 1.A" style:family="table-column"
> style:name="Test_20_Table_20_1.A"><style:table-column-properties
> style:column-width="0.7493in" style:rel-column-
> width="13397*"/></style:style><style:style style:display-name="Test
> Table 1.B" style
> NOTE: This email (including attachments) contain Ambarella Proprietary
> and/or Confidential Information and is intended solely for the use of
> the individual(s) to whom it is addressed. Any unauthorized review,
> use, disclosure, distribute, copy, or print is prohibited. If you are
> not an intended recipient, please contact the sender by reply email
> and destroy all copies of the original message. Thank you.


Your application apparently runs an insert/update operation against a un-normalized spreadsheet.

OpenOffice::OOdoc allows read-only requests against un-normalized tables, but any updates of such tables can produce inconsistencies.

In order to avoid such inconsistencies with Calc spreadsheets, the application must do a normalizeSheet() before any update.

Could you have a look at http://search.cpan.org/dist/OpenOffice-OODoc/OODoc/Text.pod
then try to fix the issue accordingly and report the result here.

Thx

Note: for applications that make intensive spreadsheet processing, a switch to ODF::lpOD (that's more efficient and user-friendly than OpenOffice::OODoc) should be considered.