To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=109492
------- Additional comments from l...@openoffice.org Wed Jan 26 11:15:43 +0000 2011 ------- This is my work around. I don't know if works for each content. private void insertDocumentFromStreamWorkAround(XTextDocument xTextDocument, XTextRange xSearchTextRange, XInputStream xInputStream) throws IOException, IllegalArgumentException, CloseVetoException, UnsupportedFlavorException { OODocumentHelper insertingDocumentHelper = new OODocumentHelper(ooConnection, xInputStream); XTextDocument insertingTextDocument = (XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, insertingDocumentHelper.getDocument()); XController insertingController = insertingTextDocument.getCurrentController(); XTextViewCursorSupplier insertingSupplier = (XTextViewCursorSupplier)UnoRuntime.queryInterface(XTextViewCursorSupplier.class, insertingController); XTextViewCursor insertingCursor = insertingSupplier.getViewCursor(); insertingCursor.gotoStart(false); // Select all insertingCursor.gotoEnd(true); XTransferableSupplier insertingTransferSupplier = (XTransferableSupplier)UnoRuntime.queryInterface(XTransferableSupplier.class, insertingController); XTransferable xTransferable = insertingTransferSupplier.getTransferable(); XController targetController = xTextDocument.getCurrentController(); XTextViewCursorSupplier targetSupplier = (XTextViewCursorSupplier)UnoRuntime.queryInterface(XTextViewCursorSupplier.class, targetController); XTextViewCursor targetCursor = targetSupplier.getViewCursor(); targetCursor.gotoRange(xSearchTextRange.getStart(), false); // Select my searched piece. targetCursor.gotoRange(xSearchTextRange.getEnd(), true); XTransferableSupplier targetTransferSupplier = (XTransferableSupplier)UnoRuntime.queryInterface(XTransferableSupplier.class, targetController); targetTransferSupplier.insertTransferable(xTransferable); insertingDocumentHelper.closeDocumentUploaded(); } OODocumentHelper is a class of mine to manage documents. It opens an odt with a loadDocumentFromUrl. I hope this can help. --------------------------------------------------------------------- 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: issues-unsubscr...@api.openoffice.org For additional commands, e-mail: issues-h...@api.openoffice.org --------------------------------------------------------------------- To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org For additional commands, e-mail: allbugs-h...@openoffice.org