我设法创建了一个表:
//I create the table here and the default name is table1
XTextTable xTT = (XTextTable) UnoRuntime.queryInterface(XTextTable.class, oInt);
xTT.initialize(1, 1);
但是,这会创建具有默认边框的表格。我想在没有它的情况下创建这个表。
此属性由图像
设置答案 0 :(得分:1)
创建表,然后将边框宽度设置为0.这是来自https://www.mail-archive.com/dev@api.openoffice.org/msg07317.html的Python示例:
borderLine = BorderLine()
borderLine.OuterLineWidth = 0
tableBorder = table.getPropertyValue("TableBorder")
tableBorder.VerticalLine = borderLine
tableBorder.HorizontalLine = borderLine
tableBorder.LeftLine = borderLine
tableBorder.RightLine = borderLine
tableBorder.TopLine = borderLine
tableBorder.BottomLine = borderLine
table.setPropertyValue("TableBorder", tableBorder)
对于相关的Java示例,请在此页面上搜索“TableBorder”:http://api.libreoffice.org/examples/DevelopersGuide/FirstSteps/HelloTextTableShape.java