Description: When a (Basic) macro sets a sheet protection, the sheet lock icon is not updated (removed or added) Steps to Reproduce: 1. Open the attached spreadsheet (accept macro execution) The Sheet3 is currently protected. A lock icon is displayed in the tab. 2. In the Welcome sheet, click the "Unprotect" button 3. Enter the current password (test) 4. A message says that Sheet3 was unprotected. Actual Results: The lock icon remains in the tab after the sheet has been unlocked. Expected Results: The lock icon should be removed from the tab after the sheet has been unlocked. Reproducible: Always User Profile Reset: No Additional Info: Same bug also backwards: click the "Protect" button and set a password. The icon is not displayed if the protection was not present beforehand.
Created attachment 167241 [details] A Calc file showing the problem
The lock icon has been removed from the tab after the sheet has been unlocked. I can not reproduce bug in Version: 7.2.0.0.alpha0+ (x64) Build ID: 761a672d62df1891b9f4f367a499b220ab2b33fa CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL Version: 7.0.3.1 (x64) Build ID: d7547858d014d4cf69878db179d326fc3483e082 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL
Repro with LO 6.4.7 No repro master 7.2+. So WFM, meaning it was fixed.
I bibisected this to bug 133257, exact duplicate. I noticed that this macro doesn't work with empty password. *** This bug has been marked as a duplicate of bug 133257 ***
The bug is still present in: Version: 7.1.3.2 / LibreOffice Community Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1 CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: (Un)Setting a protection is not immediately shown in the UI tabs. Reloading the document actually shows the new status. BTW: the reason why an empty password is not accepted is because of the way the OnProtectSheetsBtnClick() and OnUnprotectSheetsBtnClick() are set.
Ooops! Saw the referenced bug https://bugs.documentfoundation.org/show_bug.cgi?id=138168 Seeems like this is fixed. I'll check under 7.2 which I'm not using at this moment and report there if necessary.