Looking for macro to show/hide column/row headers SOLVED

I use Calc to show absolutely full-screen displays. This means turning off scroll-bars, sheet names and column/row headers. I can do all this from Tools->Options, but I would prefer to have it all in a macro so that I can readily switch from full-screen to normal. I have this so far …

ThisComponent.CurrentController.VerticalScrollBar = false
ThisComponent.CurrentController.HorizontalScrollBar = false
ThisComponent.CurrentController.SheetTabs = false

Is there an equivalent for Column/Row Headers?

https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sheet_1_1SpreadsheetViewSettings.html#a8e1cad7cc78662ab6ac55e2bb846761e

def toggle_Row_Column_headers(*_):
    doc = XSCRIPTCONTEXT.getDocument()
    ctrl = doc.CurrentController
    ctrl.HasColumnRowHeaders = not ctrl.HasColumnRowHeaders

Thanks for the earlier solution - it fitted in with some of the other code and does exactly what I needed.