1 message in org.openoffice.fr.prog[prog] xml file to sxd file
FromSent OnAttachments
msch...@alensia.frFeb 13, 2004 7:00 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[prog] xml file to sxd fileActions...
From:msch...@alensia.fr (msch@alensia.fr)
Date:Feb 13, 2004 7:00:41 am
List:org.openoffice.fr.prog

Bonjour,

A partir d'un fichier xml décrivant un document draw, j'essai de générer un document sxd en java, mais cela me crer un fichier sxd vide. Est-ce que quelqu'un aurait ue idée du problème de mon implémentation ?

Voici mon code :

L'inputStream représente mon fichier xml et l'outputStream le fichier .sxd

public synchronized void storeDocAsSXD(InputStream intputStream, OutputStream outputStream) throws java.lang.Exception {

PropertyValue[] loadProps = new PropertyValue[1];

loadProps[0] = new PropertyValue(); loadProps[0].Name = "InputStream"; loadProps[0].Value = new XInputStreamWrapper(inputStream);

xDoc = xComponentLoader.loadComponentFromURL("private:stream/", "_blank", 0, loadProps);

XStorable xStorable = (XStorable) UnoRuntime.queryInterface(XStorable.class, xDoc);

PropertyValue[] storeProps = new PropertyValue[2];

storeProps[0] = new PropertyValue(); storeProps[0].Name = "FilterName"; storeProps[0].Value = "StarOffice XML (Draw)";

storeProps[1] = new PropertyValue(); storeProps[1].Name = "OutputStream"; storeProps[1].Value = new XOutputStreamWrapper(outputStream);

//store xStorable.storeToURL("private:stream", storeProps);

Merci d'avance Mathieu Schmitt