i can't load DXF-files into OpenOffice as input stream. Last line in the program return xComponent=null .
With other file types is no problem (png, jpeg).
I tryed this code with different implemetations of input stream (e.g. http://user.services.openoffice.org/en/ ... =44&t=3801)
and different OpenOffice version with same result.
DXF-File loading directly from url works properly.
Can anybody help me to solve this problem?
Thanks
Code: Select all
XComponentLoader xComponentLoader = (XComponentLoader)UnoRuntime.queryInterface(
XComponentLoader.class, desktop);
OOFileInputStream in=new OOFileInputStream(new File("/home/dga/tmp/sotest/blum.dxf"));
PropertyValue[] loadProps = new PropertyValue[2];
loadProps[0] = new PropertyValue();
loadProps[0].Name = "InputStream";
loadProps[0].Value = in;
loadProps[1] = new PropertyValue();
loadProps[1].Name = "FilterName";
loadProps[1].Value = "DXF - AutoCAD Interchange Format";
XComponent xComponent = xComponentLoader.loadComponentFromURL(
"private:stream", "_blank", 0, loadProps);