Bug 143349 - Introduce style to unprotect cells
Summary: Introduce style to unprotect cells
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 49437
Blocks: Calc-Styles
  Show dependency treegraph
 
Reported: 2021-07-14 09:15 UTC by bugs.documentfoundation-sammy
Modified: 2021-08-17 09:17 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugs.documentfoundation-sammy 2021-07-14 09:15:10 UTC
Description:
Right now you can only mark cells (and ranges) as unprotected and then protectg the whole sheet.
This is not intuitive.

I would love to see an easy option to protect individual cells in an unprotected sheet.

Steps to Reproduce:
Create a table which contains cells that are automatically calculated and should therefore not be changed as well as cells that require to type in data manually.

Actual Results:
To protect the calculated cells, I have to mark them as unprotected and protect the whole sheet.

Expected Results:
LibreOffice provides a way to protect the calculated cells individually in an unprotected sheet.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: kf5
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Debian package version: 1:7.0.4~rc2-1~bpo10+2
Calc: threaded
Comment 1 Heiko Tietze 2021-07-19 10:48:51 UTC
Currently all cells are protected which becomes effective when the sheet protection is activated (including all options and passwords). If we turn this workflow around and make all cells unprotected and switch the sheet protection on if one or more cells are made protected this particular use case becomes easier. But you may run into problems if all the unprotected cells are made protected later not remembering what password has been set, for example. What's your take Timur, Eike?

See also bug 58873 or bug 60350.
Comment 2 Heiko Tietze 2021-07-19 10:57:07 UTC
Since MSO Excel has the same workflow we better not change this typical behavior. But is it possible to introduce another flag on cell level, let's call it "Editable", that can be used to block accidental input? Of course only if the sheet is not protected and to separate from this _protection_ without any password.
Comment 3 Roman Kuznetsov 2021-07-19 11:02:56 UTC
(In reply to Heiko Tietze from comment #2)
> Since MSO Excel has the same workflow we better not change this typical
> behavior. But is it possible to introduce another flag on cell level, let's
> call it "Editable", that can be used to block accidental input? Of course
> only if the sheet is not protected and to separate from this _protection_
> without any password.

And we'll lose an interoperability with MSO and other spreadsheet software

-1 to the idea
Comment 4 bugs.documentfoundation-sammy 2021-07-19 11:24:50 UTC
Okay.

I didn't know how this is handled internally.

If this is the same way Excel handles this, maybe it's a good idea to stick with the current behaviour.

Introducing another flag would be confusing, I guess.
Comment 5 Timur 2021-07-21 12:00:41 UTC
In general, I'm not in favor of "change well-known existing func. to become vice-verse, because some find it better" as others prefer it like it is. 
I don't see a benefit in "mark cells and enter password to protect them" over "mark cells as unprotected and enter pass to protect sheet".
Note: unprotecting cells is possible via Format or via Cell Styles with creating Unnprotected style.

If we need to unprotect just a few cells and keep other protected, current was is better. 
If we need to protect just a few cells and leave other unprotected (and if it's so often that simple Ctrl+A and unprotect is tedious to use), we my consider *an option* that Cell Protection is left checked for Protected. I guess it could go to Options-Calc-Defaults and be called 'Cell protection Protected status for new sheet' with default value checked.
Heiko, please comment and confirm for that or close as WontFix for general change.
Comment 6 Heiko Tietze 2021-07-22 06:21:47 UTC
(In reply to Timur from comment #5)
> In general, I'm not in favor of "change well-known existing func. to become
> vice-verse... close as WontFix

Yes, but how about an additional "read-only" state per cell? Although no interoperability it solves the trouble for casual users who want to ensure a few formulas not to be overwritten.
Comment 7 Timur 2021-07-22 07:03:07 UTC
I would not go into new concept of read-only cells, which is pf the same purpose as protected without password. 
Improvements are:
1. fix existing bugs on protection 
2. add ranges per bug 134920
3. possibly add option to change default status of Protection per comment 5 (default must stay as it is) 
4. add new pre-defined cell style in Calc with Protection unchecked (so that users don't have to do it each time) and some color changed (so input cells could be easily created and seen). 

Easiest is 4.
Comment 8 Heiko Tietze 2021-08-16 14:05:44 UTC
Let's follow Timur's recommendation. Ideally the protected cells would receive some greyish background - to allow unprotected cells in the common color. Unfortunately we cannot omit attributes since cell styles are stored in the autotbl.fmt which has a binary format, see bug 49437.