To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=63564 Issue #:|63564 Summary:|XComponentLoader, asynchronous layout routines Component:|Word processor Version:|OOo 2.0.2 Platform:|PC URL:| OS/Version:|Windows XP Status:|UNCONFIRMED Status whiteboard:| Keywords:| Resolution:| Issue type:|DEFECT Priority:|P4 Subcomponent:|programming Assigned to:|mru Reported by:|apourche
------- Additional comments from [EMAIL PROTECTED] Fri Mar 24 02:11:52 -0800 2006 ------- I want to load and next update an ODT in a java program. To do that, i write this code : Object vDesktop = OoBootstrap.createDesktop(); XComponentLoader vCompLoader = (XComponentLoader) UnoRuntime.queryInterface(XComponentLoader.class, vDesktop); String vUrl = "file://".concat(((File) pSrc).toURL().toExternalForm().substring(5)); PropertyValue vProps[] = new PropertyValue[1]; vProps[0] = new PropertyValue(); vProps[0].Name = "Hidden"; vProps[0].Value = Boolean.TRUE; Object vDocSrc = vCompLoader.loadComponentFromURL(vUrl, "_blank", 0, vProps); XFrame vFrameDoc = ((XModel) UnoRuntime.queryInterface(XModel.class, vDocSrc)).getCurrentController().getFrame(); //Thread.sleep(10000); XDispatchHelper vDipatchHelper = (XDispatchHelper)UnoRuntime.queryInterface(XDispatchHelper.class, OoBootstrap.createService("com.sun.star.frame.DispatchHelper")); vDipatchHelper.executeDispatch((XDispatchProvider)UnoRuntime.queryInterface(XDispatchProvider.class, vFrameDoc), ".uno:UpdateAllIndexes", "", 0, null); In some big documents, this generate a crash of openOffice. "Thread.sleep(10000);" can resolve the problem for some odt. Antoine POURCHEZ [EMAIL PROTECTED] --------------------------------------------------------------------- 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]