Hello, is there somebody out here who can help me with this problem. Or is this maybe the wrong mailinglist / newsgroup, so I will post it in a another one. Which mailinglist / newsgroup will be the right one for this question.
Regards Markus "Markus Buch" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Hello, > > I'm trying to insert an RTF stream to a "OpenOffice" instance running > inside the "OOoBean". Here is the code for this. > > XDocumentInsertable xDocInsertable = (XDocumentInsertable) > UnoRuntime.queryInterface(XDocumentInsertable.class, xTextCursor); > > PropertyValue[] loadProps = new PropertyValue[1]; > loadProps[0] = new PropertyValue(); > loadProps[0].Name = "FilterName"; > loadProps[0].Value = "Rich Text Format"; > > loadProps[1] = new PropertyValue(); > loadProps[1].Name = "InputStream"; > loadProps[1].Value = new ByteArrayToXInputStreamAdapter(data); > > xDocInsertable.insertDocumentFromURL("private:stream", loadProps); > > But I always get an "com.sun.star.lang.IllegalArgumentException" and don't > understand what's the problem. When I'm using the function > XComponentLoader.loadComponentFromURL("private:stream", "_blank", 0, > loadProps) instead of > XDocumentInsertable.insertDocumentFromURL("private:stream", loadProps) > everything works fine. > > But the problem is I'd like to insert some RTF formatted text in a running > "OpenOffice" instance at the current position of the cursor. So I think > the function insertDocumentFromURL is the better choice, because with this > I can insert it at the current position of the cursor. So please can > someone help me trying to fix the problem. > > Regards Markus --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
