How to apply style to a Table via LibreOffice API?

MUNOZ JULHO Yupanqui Yupanqui.MUNOZJULHO at cea.fr
Fri Jan 18 13:00:02 UTC 2019


Hello everybody,

I have defined a new table style in my template and I would like programmatically to apply this new style when a table is added on a generated document.

I found this code example for applying style to a paragraph

XTextRange xTextRange = doc.getText().getStart();
XPropertySet props = UnoRuntime.queryInterface(XPropertySet.class, xTextRange);
props.setProperty("ParaStyleName", "NewParagraphStyle");

But I do not have idea how to do for table case.

Best regards,

Yupanqui


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20190118/f163006c/attachment.html>


More information about the LibreOffice mailing list