OpenOffice-OODoc - Re: No thoughts on table headings?

Posted on Mon Oct 31 18:29:26 2005 by jmgdoc in response to 1251 (See the whole thread of 4)
Re: No thoughts on table headings?

There will be a new getTableHeaderRow(table) in 2.014 (coming this week). It will be described in the OpenOffice::OODoc::Text manual page.
For a short term workaround with previous versions, see below.

Table row/cell access methods generally ignore the table header (if any) and work only with the table body. However, as usual, it's possible to navigate anywhere through the low level API.

Asuming $table is a table element (previously retrieved using getTable), you can get its header using the XML::Twig::Elt first_child method:
my $header = $table->first_child('table:table-header-rows'); my $row = $header->first_child('table:table-row') if $header;
After the sequence above, $row contains the first row of the table header; it can be used as an ordinary table row (for example to retrieve cells).
Direct Responses: 1271 | Write a response