I've gotten this to work now with add() under TextDocument - thanks! But can someone point out how to use addStyledContent() instead of addContent() on a Paragraph?
When I use addStyledContent() it just adds content just like add(), with the Default style in the document. For example, if addStyledContent("Added Text", "Title"), where Title is a paragraph style defined in my styles.odt document... Any ideas? I can't get this to work... On Thursday, August 1, 2013 at 11:10:57 AM UTC-4, ILM wrote: > > Le 24/07/2013 09:50, Gmail a �crit : > > Hi, > > > > ok fine, > > > > This code does not work anymore : > > > > ODPackage outputDocument = new ODPackage(new File("styles.odt")); > > contentDom = outputDocument.toSingle(); > > final Paragraph paragraph = new Paragraph(); > > contentDom.add(paragraph); > > > > What is the correct way to do it in version 1.3 ? > > The add() method is now in TextDocument. So your second line should be > > TextDocument contentDom = outputDocument.getTextDocument(); > > > HTH, > Sylvain > > -- --- You received this message because you are subscribed to the Google Groups "jOpenDocument" group. To unsubscribe from this group and stop receiving emails from it, send an email to jopendocument+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.