【表格样式功能之绘制边框】
//获取目标单元格区域
xTableCellRanges = xCellRange->getCellRangeByName(rtl::OUString("E7:G10"));
//获取单元格区域的属性设置接口
Reference<CSS_BEAMS::XPropertySet> xPropSetTable(xTableCellRanges,UNO_QUERY);
//设置边框结构体属性值,假设设置区域的上边界边框
com::sun::star::table::TableBorder STB;
STB.TopLine.Color = RGB(0,0,255);
STB.TopLine.OuterLineWidth = 20;
xPropSetTable->setPropertyValue(OUString("TableBorder"),Any(STB));
PS:更多的边框属性参考:: com :: sun :: star :: table ::CellProperties
转载请注明原文地址: https://ju.6miu.com/read-4068.html