this makes the protected cells read-only but does not put the lock icon on the tab
sheet.protect("")
this makes the protected cells read-only and puts the lock icon on the tab but requires user intervention
args1(0).Name = "Protect"
args1(0).Value = true
dispatcher.executeDispatch(frame, ".uno:Protect", "", 0, args1()
i would like to get the lock icon with no user intervention