Version: 24.2.7.2
すべてのボタンの「クリック時にフォーカス」を無効化する例。
Dim sheet As Object
Dim shape As Object
For Each sheet In ThisComponent.Sheets
For Each shape In sheet.DrawPage
If shape.ShapeType = "com.sun.star.drawing.ControlShape" Then
If shape.Control.DefaultControl = "com.sun.star.form.control.CommandButton" Then
shape.Control.FocusOnClick = false
End If
End If
Next shape
Next sheet