To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=51971 Issue #:|51971 Summary:|Cannot create TextCursors in text frames, which were |tables in MS Word Component:|api Version:|680m113 Platform:|All URL:| OS/Version:|All Status:|UNCONFIRMED Status whiteboard:| Keywords:| Resolution:| Issue type:|DEFECT Priority:|P3 Subcomponent:|code Assigned to:|sw Reported by:|ataraxis
------- Additional comments from [EMAIL PROTECTED] Thu Jul 14 07:52:44 -0700 2005 ------- The following code goes through all text frames and dumps the text on the command line. When I open a MS Word document which tables in it, OOo converts those tables into text frames and i get an exception. OOo tables are no problems. The exception i get: Exception in thread "main" com.sun.star.uno.RuntimeException: no text available The code line where i get the exception: xTextCursor = xText.createTextCursor(); This is the complete code: XTextFramesSupplier xTextFrames = (XTextFramesSupplier)UnoRuntime.queryInterface( XTextFramesSupplier.class, xTextDocument); String[] names = xTextFrames.getTextFrames().getElementNames(); XTextFrame xTextFrame = null; XText xText = null; XTextCursor xTextCursor = null; Object o=null; String text=""; for (int i=0; i<names.length; i++){ try { o= xTextFrames.getTextFrames().getByName(names[i]); xTextFrame = (XTextFrame) UnoRuntime.queryInterface( XTextFrame.class, o); } catch (NoSuchElementException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (WrappedTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } xText=xTextFrame.getText(); xTextCursor = xText.createTextCursor(); xTextCursor.gotoStart(false); xTextCursor.gotoEnd(true); text = xTextCursor.getString(); System.out.println(text); } --------------------------------------------------------------------- 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]