On Tue, May 6, 2008 at 3:30 PM, Andreas Martens <[EMAIL PROTECTED]> wrote:

Hi Andreas,

> > 1) XTextTable.getCellNames()

>  I think getCellNames() should only deliver 'visible' cells. Please submit
> an issue, if there is no objection against, we will fix it.

http://sw.openoffice.org/issues/show_bug.cgi?id=89068

>  In OOo3.0 you are able to query the "RowSpan" property. If the value is
> negative, it is an invisible cell.

Hmm, this sounds good, but what about this small modification. Merge
A4:A6 cells and it would be nice if RowSpan can contain these values
...

A4.RowSpan = 2
A5.RowSpan = -1
A6.RowSpan = -2

... it gives you a possibility to say that master cell of hidden cell
A6 is A[6 - 2 = 4]. So, final logic of RowSpan in this case is ...

 - RowSpan = 1 => simple cell,
 - RowSpan >= 1 => cell spanned over rows,
 - RowSpan = 0 => invisible cell, master cell is on the same row
(ColumnSpan says where)
 - RowSpan < 0 => invisible cell, master cell is Abs( RowSpan) rows up.

And it would be nice if there will be introduced ColumnSpan property
too with the same logic.

> > 2) XTextTable.createCursorByCellName( name )

>  Yes, that's the current behavior. After merging you get the cellcursor of
> an invisible cell but if you travel (goUp, goDown) you will leave this
> invisible cell and you will not enter it again.

IMHO this is not consistent behavior of all methods. If I can access
invisible cells, why I can't travel over invisible cells with go*()
methods too? Rhetorical questions, ignore it ;-)

> There are two possibilities, we could deny the createCursor for an
> invisible cell or we could deliver the cellCursor for the "master" cell.
> I prefer the first solution, what do you think?

Me too.

http://sw.openoffice.org/issues/show_bug.cgi?id=89069

>  BTW: if you have only 1 column and 6 rows, you will not be able to create a
> cursor for A6 because A6 vanishes if you merge A4:A6, doesn't it?

Yes, sorry, at least two columns.

I work a lot of with complex tables, spreadsheet components, etc. The
ideal API for tables should allow me to ...

 - retrieve RowSpan, ColumnSpan as I described (not only -1, but -3,
-4, -5, ...)
 - getCellNames() should return all cell names (even invisible)
 - travel over all cells, even invisible

... then I can easily reconstruct table structure, find master cells,
check if cell is hidden or not, ...

I have a questions. Is there a plan (document) which describes future
work in this area (complex text tables)? I would like to see it if it
exists and if it is possible.

-- 
Robert Vojta

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to