LibreOffice Calc Macro for the Excel Macro

I used the following Macro Code in MS-Excel to insert = sign.

Sub MakeFmla()
Dim c As Range
For Each c In Selection
    c.Formula = "=" & c.Value
Next c
End Sub

Whats LibreOffice Macro Code should I use to achieve the expected result?

Edited code for readability