Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Cannot create TextCursors in text frames, which were tables in MS Word | ||||||
---|---|---|---|---|---|---|---|
Product: | App Dev | Reporter: | ataraxis <ooo> | ||||
Component: | api | Assignee: | AOO issues mailing list <issues> | ||||
Status: | CONFIRMED --- | QA Contact: | |||||
Severity: | Trivial | ||||||
Priority: | P3 | CC: | issues | ||||
Version: | 3.3.0 or older (OOo) | ||||||
Target Milestone: | --- | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Attachments: |
|
Description
ataraxis
2005-07-14 15:52:44 UTC
sw->ataraxis: do you have a sample document where tables are imported as frames ? ... I get tables with all the documents I tried. Created attachment 27927 [details]
test document with frames and tables in word. all are frames in writer.
sw->ataraxis: changing your code like this should solve the problem. xText=xTextFrame.getText(); XEnumerationAccess xEA = (XEnumerationAccess) UnoRuntime.queryInterface(XEnumerationAccess.class, xText); XEnumeration xEnum = xEA.createEnumeration(); boolean isTable = false; try { XPropertySet props = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xEnum.nextElement()); isTable = props.getPropertySetInfo().hasPropertyByName("TextTable"); } catch (Exception e) { } if (isTable) { xTextCursor = xText.createTextCursor(); xTextCursor.gotoStart(false); xTextCursor.gotoEnd(true); text = xTextCursor.getString(); System.out.println(text); } sw->tl: I wonder why the propery texttable is only available when no table is inside the frame. |