How do it check if there are a diagonal line in cell?

I wrote the following code:

Sub MakeAX

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

End Sub

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.

wrong question, because there is a DiagonalBLTR2-object in any cell, you need to check if any of its Properties is NOT 0

I thank you a lot…Please, do you know how I check that Properties?

I found it…“msgbox rng.DiagonalTLBR2.LineWidth” gives me the actual value.
Very good…Thanks a million.