문제

I would like to write a macro that works on the selected table.

Selection in a table

When I select a table, the object that ThisComponent.CurrentSelection returns is of type SwXTextTableCursor. I will refer to it generically as TextTableCursor.

According to DBG_methods it provides methods to traverse through the selected cells and merge or split the cells, but it doesn't seem to provide a way to access the actual table itself. Conversely, ThisComponent.TextTables returns the tables.

As far as I can tell, there is no way to determine if some cells or all of a table is selected.

Question

Is there any way to retrieve the TextTable(s) from TextTableCursor?

도움이 되었습니까?

해결책

To get current selected TextTable use

ThisComponent.CurrentController.ViewCursor.TextTable
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top