lol the class TextLineBreak is empty

On 29 déc, 00:21, JMD <[email protected]> wrote:
> I found it but I really don't know how to use it in the
> template.setField(). Maybe i can try to modify the content.xml, but
> without an example...
>
> On 28 déc, 23:58, J David Eisenberg <[email protected]>
> wrote:
>
> > On Mon, Dec 28, 2009 at 1:04 PM, JMD <[email protected]> wrote:
> > > And how do I add this element ?
> > > I tried :
> > > List<Step> steps = new ArrayList<Step>();
> > >                        Iterator<Step> iter = 
> > > recette.getSteps().iterator();
> > >                        while(iter.hasNext()) {
> > >                                Step myStep = iter.next();
> > >                                
> > > myStep.setContent(myStep.getContent().replaceAll("\n", "<text:line-
> > > break>"));
> > >                                steps.add(myStep);
> > >                        }
> > >                        template.setField("steps", steps);
>
> > > And in my ODT, I have "<text:line-break>" and not a new line :(
>
> > 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.

Reply via email to