To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=63821
------- Additional comments from [EMAIL PROTECTED] Thu Mar 30 23:42:31 -0800
2006 -------
This is the code that i use:
...
1) First i create the blank document
PropertyValue[] loadProps = new PropertyValue[0];
xComponent=xComponentLoader.loadComponentFromURL("private:factory/swriter",
"_blank", 0, loadProps);
2) Then i insert some RTF in it with the insertDocumentFromURL()
3) Then i look for a string in the final document, and if i find it, i would
replace it with a file *.odt
XReplaceable xReplaceable=(XReplaceable)
UnoRuntime.queryInterface(XReplaceable.class,xTextDocument);
XSearchDescriptor xSearchDesc=xReplaceable.createSearchDescriptor();
XPropertyReplace xProps =(XPropertyReplace) UnoRuntime.queryInterface(
XPropertyReplace.class, xSearchDesc);
xProps.setPropertyValue("SearchRegularExpression",new Boolean(true));
xSearchDesc.setSearchString("#iniobj.*#finobj#");
vFoundAll=xReplaceable.findAll(xSearchDesc);
Object vFoundd=xReplaceable.findFirst(xSearchDesc);
xt=(XTextRange) UnoRuntime.queryInterface(XTextRange.class,vFoundd);
xText=xTextDocument.getText();
XTextCursor textCursor = xText.createTextCursorByRange(xt);
xd=(XDocumentInsertable)UnoRuntime.queryInterface(XDocumentInsertable.class,textCursor);
textCursor.gotoEnd(false);
PropertyValue[] loadPropsODT= new PropertyValue[0];
xd.insertDocumentFromURL("file:///D:/prova.odt",loadPropsODT);
and during the last istruction OO crash...
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]