Thanks for helping me !
I'm french, and that would explain the number of english errors in
this little text :D
I'm trying to edit a template like the "test.odt".
I'm building a ArrayList to make a OOo list. It's working, but the
char "newline" (\n\r or \r\n I never know...) don't create a newline
in the output ODT.
I check the "content.xml" file in the output file, and the newline
char isn't replaced by a tag for end+begin of the line...
Quote content.xml :
<text:list-item><text:p text:style-name="P1"><text:span
text:description="item.getContent()">Line1
Line2
Line3</text:span></text:p></text:list-item>
How can I make a new line ?
Thanks for all !
JMD
XML "normalizes" whitespace, so putting in a \r or \n won't help. You
need to add a <text:line-break> element.
See http://books.evc-cit.info/odbook/ch03.html#whitespace-section
And in my ODT, I have "<text:line-break>" and not a new line :(
Thanks !
On 28 déc, 18:22, J David Eisenberg <jdavid.eisenb...@gmail.com>
wrote:
> On Mon, Dec 28, 2009 at 8:03 AM, JMD <jeanmatthie...@gmail.com> wrote:
> > Hi !
>
> > Thanks for helping me !
> > I'm french, and that would explain the number of english errors in
> > this little text :D
>
> > I'm trying to edit a template like the "test.odt".
>
> > I'm building a ArrayList to make a OOo list. It's working, but the
> > char "newline" (\n\r or \r\n I never know...) don't create a newline
> > in the output ODT.
> > I check the "content.xml" file in the output file, and the newline
> > char isn't replaced by a tag for end+begin of the line...
>
> > Quote content.xml :
> > <text:list-item><text:p text:style-name="P1"><text:span
> > text:description="item.getContent()">Line1
> > Line2
> > Line3</text:span></text:p></text:list-item>
>
> > How can I make a new line ?
>
> XML "normalizes" whitespace, so putting in a \r or \n won't help. You
> need to add a <text:line-break> element.
>
> Seehttp://books.evc-cit.info/odbook/ch03.html#whitespace-section
To create true elements, don't you need to use a class like
org.jopendocument.model.text.TextLineBreak ? (I don't know; I haven't
used jOpenDocument much.) You're just putting a string into the
content; that doesn't create a real element.
On 28 déc, 23:58, J David Eisenberg <jdavid.eisenb...@gmail.com>
wrote:
I look at the src, with breakpoints everywhere, and the answer is to
add "%enc:" before the expression of the label in the ODT.
For exemple, for a repeated list of items, my expression became
"%enc:m.getContent()".
Thanks for your help !