Bug 156793 - Can't remove cell protection from all cells (steps in comment 10)
Summary: Can't remove cell protection from all cells (steps in comment 10)
Status: RESOLVED DUPLICATE of bug 153527
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Cell-Sheet-Protection
  Show dependency treegraph
 
Reported: 2023-08-16 20:46 UTC by software.v9onn
Modified: 2024-01-21 05:19 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Protect sheet and cell protection cannot be undone (35.79 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-08-16 20:46 UTC, software.v9onn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description software.v9onn 2023-08-16 20:46:02 UTC
Created attachment 189000 [details]
Protect sheet and  cell protection cannot be undone

See attached file. The ok button in the protect sheet menu is grayed out when you try to cancel protection. I didn't use a password.
Comment 1 m_a_riosv 2023-08-17 09:25:26 UTC
The attachment has not a protected sheet.
Version: 7.6.0.3 (X86_64) / LibreOffice Community
Build ID: 69edd8b8ebc41d00b4de3915dc82f8f0fc3b6265
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Comment 2 raal 2023-08-17 15:29:29 UTC
Maybe wrong attachment?
Comment 3 software.v9onn 2023-08-17 22:16:06 UTC
There is a cell protection. If you highlight all cells and try to remove the cell protection, it doesn't work. I guess this is because there is a matrix formula in it and it may be automatically protected?

The sheet protection was my misunderstanding: if the check box "protect this sheet and the contents of the protected cells" is checked, then I thought it is already protected. So I tried to uncheck it to unprotect. Wrong logic.
Comment 4 QA Administrators 2023-08-19 03:19:56 UTC Comment hidden (obsolete)
Comment 5 LeroyG 2023-08-20 23:32:32 UTC
(In reply to software.v9onn from comment #0)
> The ok button in the protect sheet menu is grayed out when you try to cancel
> protection.

"Protect" was not yet applied, so if unmarked, there is nothing to accept. Correct behavior.

(In reply to software.v9onn from comment #3)
> The sheet protection was my misunderstanding: if the check box "protect this
> sheet and the contents of the protected cells" is checked, then I thought it
> is already protected. So I tried to uncheck it to unprotect. Wrong logic.

Yes, the prefilled checkbox could be a bit confusing, but the text points clearly to a future action (Protect), and not to a state (Protected).
Compare with menu Sheet - Clear Cells (same that Backspace key).

Menu Tools has a checkbox next to Protect Sheet to show if the spreadsheet is already protected.

> There is a cell protection.

Yes, all the spreadsheet, except A1:AB200.

> If you highlight all cells and try to remove the cell protection, it doesn't
> work.

Unmarking Protected, works for me.

Not a bug with:
Version: 7.4.3.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 1; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: es-MX (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 software.v9onn 2023-08-21 15:05:18 UTC
Thanks for the quick reply.
there is a cell protection, but I forgot which cells. So LeroyG is right, all is protected except A1:AB200. I don't know, how he found the protected area.

If I highlight only the protected cells, then I can unprotect it again. But if I choose all cells, it does not unprotect.

So if I highlight an area: shouldn't it unprotect everything within the highlighted area?
Comment 7 software.v9onn 2023-08-21 15:13:41 UTC Comment hidden (obsolete)
Comment 8 software.v9onn 2023-08-22 06:57:44 UTC
Again wrong. Cell protection should be from column P to AB.
No matter which column(s) I choose, I can unprotect it, but not if I choose everything. This is a bug, but I can live with it, now I found out how to unprotect.

Perhaps it would make sense if we have an indicator for protected cells?
Comment 9 LeroyG 2023-08-24 12:50:35 UTC
(In reply to software.v9onn from comment #8)
> Perhaps it would make sense if we have an indicator for protected cells?
Protect the spreadsheet, and choose menu View - Value Highlighting: cells protected are shown with gray background.

(In reply to software.v9onn from comment #8)
> Cell protection should be from column P to AB.
In this case, select P1:AB200, and mark as Protected. Rows 201 and downward are protected already.
Comment 10 Stéphane Guillou (stragu) 2023-08-31 06:46:52 UTC
Steps:
1. Open attachment 189000 [details]
2. Turn on View > Value Highlighting
3. Tools > Protect Sheet... > OK: see the protected cells in grey
4. Tools > Protect Sheet... to turn it off
5. Select all cells, toggle Edit > Cell Protection to turn it off for all cells
6. Tools > Protect Sheet... > OK

Result: not all cells are unprotected.
Expected: all cells are unprotected (no grey cells)

Reproduced in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 642f2d7177ea3e6c365da2c2082a50a5137cd988
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Works fine in LO 7.4.7.2

This is another impact of:

commit ac859a4c6a7fce4efee9cdd45821a0c9e40e9e9a
author	Noel Grandin  Mon Oct 17 16:36:23 2022 +0200
committer	Noel Grandin 	Tue Oct 18 09:35:01 2022 +0200
tdf#147842 shrink selection to data area when applying to entire sheet
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141463
Comment 11 Mike Kaganski 2024-01-21 05:19:46 UTC

*** This bug has been marked as a duplicate of bug 153527 ***