Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Product:||App Dev||Reporter:||ms7777 <ms777>|
|Component:||api||Assignee:||AOO issues mailing list <issues>|
|Status:||CONFIRMED ---||QA Contact:|
|Version:||3.3.0 or older (OOo)|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description ms7777 2007-04-13 21:36:14 UTC
It is impossible to acces by code the columns of a text table, although getByIndex should be supported. The getByIndex call does not show an error, but simply returns a null object. Thus it is impossible to e.g. modify column width by code. Run this in an empty writer document: Sub Main xText = ThisComponent.Text xTextTable = ThisComponent.createInstance("com.sun.star.text.TextTable") xTextTable.initialize(4, 4) xCursor = xText.createTextCursor xText.insertTextContent(xCursor, xTextTable, False) xTableColumns = xTextTable.getColumns() xTableColumn = xTableColumns.getByIndex(0) msgbox IsNull(xTableColumn) End Sub
Comment 1 kpalagin 2007-04-16 14:47:12 UTC
Confirming with 2.2m7 on WinXP - IsNull(xTableColumn) returns True.
Comment 2 jsc 2007-04-25 14:17:46 UTC
your snippet is correct but the problem is that columns are not supported objects in text tables. The used interface doesn't reflect this because it is to generic. You can say that it is a bad design and i would tend to agree but anyway, getByIndex returns always a null interface in the context of XTableColumns This is an invalid issue and it can't be fixed. But of course it should be reflected in the documentation -> change subcomponent to documentation
Comment 3 ms7777 2007-04-25 21:58:16 UTC
I can live with that ...
Comment 4 jsc 2008-05-20 14:58:33 UTC
jsc -> tl: i think we should extend the docu, what do you think? You are the expert of the writer API here and i would like to ask you if you can insert a note in the IDL docu if you think that make sense. Otherwise close the issue.
Comment 5 Mathias_Bauer 2008-06-09 11:29:42 UTC