I wrote the following code:
Dim oSheet as Object
Dim pDiag as Integer
Dim borderLine As New com.sun.star.table.BorderLine2
Dim tb2 As New com.sun.star.table.TableBorder2
Dim rng as Object
oSheet = ThisComponent.CurrentController.ActiveSheet
rng = ThisComponent.getCurrentSelection()
borderLine.Color = RGB(0, 0, 0)
borderLine.LineStyle = 0
pDiag = 20 ’ 0 in order to erase the diagonal lines
borderLine.LineWidth = pDiag
rng.DiagonalBLTR2 = borderLine
rng.DiagonalTLBR2 = borderLine
It does a X lines in cell.
I would want to know a way to check if there is already diagonal lines in cell.
Thanks for your atttention.