Bug 156750

Summary: Add "Sort" as a protection property to allow sorting on protected/locked sheet
Product: LibreOffice Reporter: jeremy.d
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: enhancement    
Priority: medium    
Version: 7.5.5.2 release   
Hardware: All   
OS: All   
Whiteboard: QA:needsComment
Crash report or crash signature: Regression By:

Description jeremy.d 2023-08-12 17:04:50 UTC
Description:


Adding the autofilter to a column header allow users to easily sort columns. This feature doesn't work when the sheet is protected (also known as locked).

I suggest adding a "Sort" protection property to the "Protect sheet" dialog that, if checked, would allow users to use the autofilter "Sort ascending" and "Sort Descending" feature on locked or protected sheets.

See forum post:
- https://ask.libreoffice.org/t/lo-calc-sorting-protected-cells-with-autofilter/54779

See external link explaining this feature for Excel: 
- https://blog.softartisans.com/2013/10/01/kb-sorting-locked-cells-in-protected-worksheets/

Steps to Reproduce:
1. Create a column with a header/title and some values under it
2. Add the autofilter on the header
3. Protect the sheet
4. Try sorting the column

Actual Results:
Information dialog "Protected cells can not be modified."

Expected Results:
Allow sorting when allowed on protected sheets.


Reproducible: Always


User Profile Reset: No

Additional Info:
This feature is a nice addition that would help protect complex documents while allowing general users to easily sort newly added rows.

Let's say I have a Calc document with all the employees, their salaries, job description, etc, and I ask someone to add new employees. That person will add those at the end of the document (which is allowed in this use case) and then try to sort them, so they are in alphabetical order and therefore can be easily found later on.

The way this is working now, the sheet needs to be unprotected, but then said person adding data to it will try and sort it themselves and end up doing something wrong and breaking the sheet and the relation between that sheet's data and formulas on other sheets.