Question about protecting spreadsheets in Calc

I have written an application to create a spreadsheet. I unprotect certain cells, and then protect the entire sheet
Thissheet.protect("")
The only parameter is password. Since I don’t want a password, I give it a blank string, since the parameter is not optional.
This all works. The question is what is the parameter that unchecks the “Select protected cells” option? The IDE shows this option checked. I want to be able to do it through LibreOffice Basic.
It is nothing majour. I could go into the IDE and manually unprotect/protect all the sheets and while protecting the sheets, uncheck “Select protected cells”. I would, however prefer to do it in code.
Any help would be appreciated.

While here I would like to make a comment about LibreOffice. Specifically about developing code. At times I have found it very frustrating to try to find parameters and methods. I have had a lot of help in this forum. One thing that amazes me is the speed that the code executes. The application creates, and formats 13 sheets, and adds 2 charts on each sheet. This takes less than 12 seconds. This is a rewrite of an EXCEL spreadsheet. With disabling screen updating the VBA version still took over a minute.
John

There’s no API for that. Some time ago, as a quick hack for a similar problem (but that needed to remove the protection temporarily, then re-establish, but without changing the properties set previously), I implemented keeping the settings during the session (before that, the protection settings would reset to defaults). For that task, it sufficed (initial settings could be set once manually). As far as I’m aware, there was no new development in the area.

Thank you for your response. In VBA the default is not to check the option. It makes it easier from a developers standpoint.
Oh well, it is not a great pain to do it manually.
BTW when I first started this project I had a concern about the time of execution. As I mentioned, above, it took a long time in Excel, and with the updating not enabled, it took about 3 minutes, and would make you sick looking at the screen. You replied to that and I did download your two routines. However during testing, I hit an error, and since the “Screenupdatingoff” and run, it totally locked the execution. I had to re-boot the machine. Since the execution is so fast now, I see no need to use the routines.
John