Cesar Frantz Cesar Frantz - 5 months ago 12
Java Question

How to set XTextTable name dynamically

I can't find how to set the name property of a table.

//I create the table here and the default name is table1
XTextTable xTT = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oInt);
xTT.initialize(1, 1);


How do I proceed to change this name that was set by default?

Answer

Get the XNamed interface of xTT and call setName().

See https://forum.openoffice.org/en/forum/viewtopic.php?f=44&t=41424.