I only can see two vertical red (left) lines in b2 > b6 and c2 > c6
I think that:
- Libreoffice has made changes to the API and the borders are treated differently,
Modifying a macro (by Bernard Marcelly) I have managed to draw all the borders, but something is missing.
Sub BorduresDeCellule() 'CellBorders
Dim oDoc As Object, oShets As Object
Dim oShet As Object, oCell As Object
Dim oBorder As New com.sun.star.table.BorderLine
' oDoc = ThisComponent
oDoc = StarDesktop.loadComponentFromURL("private:factory/scalc", "_default", 0, Array())
oShets = oDoc.Sheets
oShet = oShets.getByName("Sheet1")
oCell = oShet.getCellRangeByName("C2")
' xray oCell
With oBorder
.Color = RGB(200,0,0)
.InnerLineWidth = 0 'For vertical borders must be = 0
.OuterLineWidth = 30 ' Can set for vertical borders
oCell.LeftBorder = oBorder' ligne simple, rouge
.OuterLineWidth = 100
oCell.RightBorder = oBorder ' ligne simple, rouge
.OuterLineWidth = 0 ' for Horizontal lines must be = 0
.InnerLineWidth = 60
' .LineDistance = 0 ' for horizontal or vertical lines must be 0
.Color = RGB(0,120,0)
oCell.TopBorder = oBorder ' ligne double, verte
.Color = RGB(0,0,120)
oCell.BottomBorder = oBorder ' ligne double, bleue
.InnerLineWidth = 0
.OuterLineWidth = 50
.LineDistance = 0
.Color = RGB(100,100,100)
oCell.DiagonalBLTR = oBorder ' ligne simple, grise
End With
End Sub
Later I have found another macro in the help of LibreOffice
https://help.libreoffice.org/latest/en-us/text/sbasic/guide/calc_borders.html