Assume that the cursor is inside a Text Table in Writer. What I want is to get the width of the Cell the cursor is in using a macro. I can do this to get the cell itself:
Cursor = ThisComponent.getCurrentController().getViewCursor() If NOT IsEmpty(Cursor.TextTable) Then oCell = Cursor.Cell
– but I can’t get any closer to what I want from there.
I’d be happy if I could just get the width of the appropriate column from the text table. You can see these values if you right-click on the table, select Table Properties and then select the Columns tab.
I’ve done a great deal of online searching but have found nothing. I’ve also used the DBG_Properties and DBG_Methods on a table, but didn’t see anything that would give me what I’m looking for.
It might be possible to get the width by inspecting the table’s TableColumnSeparators and then stepping through all the column values one at a time, but I was wondering if there was an easier way to do this. It certainly seems like the kind of information you’d want to be able to get at easily.