Метод Cell:getResolvedBorders
Метод возвращает границы ячейки с учетом границ окружающих ячеек.
Вызов
Borders getResolvedBorders()
Возвращает
- границы ячейки, тип Borders.
Пример
local sheet = document:getBlocks():getTable(0)
local cellBorders = sheet:getCell("B2")
local lineProperties = DocumentAPI.LineProperties()
lineProperties.style = DocumentAPI.LineStyle_Solid
lineProperties.width = 1.5
local borders = DocumentAPI.Borders()
borders:setLeft(lineProperties):setRight(lineProperties)
cellBorders:setBorders(borders)
local cell = sheet:getCell("A2")
print(cell:getBorders():getRight()) -- nil
print(cell:getResolvedBorders():getRight().width) -- 1,5