Skip Menu |

This queue is for tickets about the ODF-lpOD CPAN distribution.

Report information
The Basics
Id: 127322
Status: new
Priority: 0/
Queue: ODF-lpOD

People
Owner: jmgdoc [...] cpan.org
Requestors: cnighs [...] cpan.org
Cc:
AdminCc:

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



Subject: Instantiating a new ODF text document automatically inserts a paragraph element as well
When a new ODF text document is created, a paragraph is automatically inserted into the new document resulting in a blank line at the top of the document. If one does not desire this behavior, one must get the paragraph object and delete it. This can be reproduced by executing the helloworld example provided in the docs[1] and then dumping the XML of the resulting content. The resulting XML looks like this: <office:body> <office:text> <office:forms form:apply-design-mode="false" form:automatic-focus="false"/> <text:sequence-decls> <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/> <text:sequence-decl text:display-outline-level="0" text:name="Table"/> <text:sequence-decl text:display-outline-level="0" text:name="Text"/> <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/> </text:sequence-decls> <text:p text:style-name="Standard"/> <text:p text:style-name="Standard">Hello World !</text:p> </office:text> </office:body> Notice that whereas the code only appends one paragraph containing the text "Hello World!" the XML clearly shows a paragraph before that added upon creation of the original document. This behavior is undesirable. [1] https://metacpan.org/pod/ODF::lpOD#The-%22Hello-Word%22-example
This is related to the use of text.odt template which has paragraph contained in it. I'm not sure how to get around this. But the issue should at least be raised in the documentation. https://metacpan.org/source/JMGDOC/ODF-lpOD-1.126/lpOD/templates/text.odt