After some searches on this forum and in the dev guide, I do not have find the solution to my problem.
I want to specify a name to my table, so that I will be able to retrive it without problems with an other program.
I have modify the name using the following way:
Code: Select all
XTextTable xTextTable = (XTextTable)((XMultiServiceFactory)TextDocument).createInstance("com.sun.star.text.TextTable");
xTextTable.initialize(4, 2);
unoidl.com.sun.star.text.XTextTable xTextTable1 = (unoidl.com.sun.star.text.XTextTable)((XMultiServiceFactory)TextDocument).createInstance("com.sun.star.text.TextTable");
xTextTable1.initialize(2, 4);
TextDocument.getText().insertTextContent(cursor, xTextTable, false);
TextDocument.getText().insertString(cursor, "\n", false);
TextDocument.getText().insertTextContent(cursor, xTextTable1, false);
XPropertySet xTableProps1 = (XPropertySet)xTextTable;
xTableProps1.setPropertyValue("TableName",new uno.Any("NomduTableau"));
The second should have the "NomduTableau" name, isn't it?
I do not understand the problem.
Best regards,