https://bugs.documentfoundation.org/show_bug.cgi?id=151840

--- Comment #3 from Lionel Elie Mamane <lio...@mamane.lu> ---
(In reply to Mike Kaganski from comment #2)

> I'd say - having a TextTable property, and implementing
> com::sun::star::container::XEnumerationAccess to
> iterate cells, would possibly cover the majority of problems?

This is a table, it has a 2D structure. That structure should be accessible as
such in the API. From the general cursor point of view, I'd say the bare
minimum is to get the current position, and "jump" to a position, with two
integers being row number and column number. Plus, since cells can be merged,
need some way to know which (row, column) pairs are valid cells and which are
not (because they have been merged and they not the "first" (top/left-most)
cell in the merge).

The API seems to be already defined in our idl files, but not actually exposed?

css:Text:TableRows, which exposes the same css:table:XTableRows that the
service css:table:TableRows exposes (but no XEnurmerationAccess, while
css:table:TableRows does, so your idea to add that makes sense there at least).

css:text:CellRange exposes css:table:XCellRange, like css:table:CellRange does.
One might believe this may be an API design error, since
css:table:XCellRange:getCellByPosition() returns a css:table:XCell (and one
might believe a text table cell cannot necessarily provide that interface), but
actually the css:text:Cell service provides the css:table:XCell interface, so
at least it is consistent.

To me, it looks like the API is there, we "just" need to implement it (if that
is not already done?), and provide the objects that implement it where
reasonable.

For example, for my initial use case which prompted me to start this
discussion, it looks like if ThisComponent.getCurrentSelection() returned an
object that implements css:text:CellRange I would be (mostly?) happy.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to