On Mar 25, 2005, at 14:04, sos wrote:

At 12:24 25/03/05, you wrote:
I'd like to open an HTML file as an OpenOffice.org Writer document using the Java API. I'm using the code from ConversionServlet example. If I open a Word file, I can save it as an OpenOffice.org Writer file without problems. However, it appears that an HTML file is opened as an OpenOffice.org Writer/Web document and OpenOffice.org Writer/Web does not support an sxw export filter.
We do the same job with this smale peice of dispacht code:

dispatcher.executeDispatch(document, ".uno:InsertDoc", "", 0, args6())

We where leasy and uses the Dispacther but the filter name "HTML (StarWriter)" is the clue of the story.

Thanks. I ended up using the XDocumentInsertable interface instead of event dispatching. The filter name made the insertion fail. It works without properties, though.


Whe endup with a very good "copy" of the html file and the html styles (if present in the html document) are copyed as OOstyles into the new OOwriter document, a behaviour you not becomes with copy/pasting.

I want the styles of the template to apply to the HTML content. It works that way now.


--
Henri Sivonen
[EMAIL PROTECTED]
http://hsivonen.iki.fi/


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to