Created attachment 181112 [details] Style Test.ods Steps to Reproduce: 1. Protect Sheet1. 2. Leave Sheet 2 unprotected, save and reopen. 3. Go to sheet 2, click one cell, try to visit the Cell Styles sidebar pane. Or, open the attached test file and following step 3. Current Result: Cell Styles pane is grayed out. Expected Result: Cell Styles pane is not grayed out and I should be able to view or apply cell styles to cells in Sheet 2 since that sheet is not protected. Version: 7.4.0.0.beta1+ / LibreOffice Community Build ID: adab2c204f43e0e5b2eaf70a55bdb41ba260574f CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN Calc: threaded Ubuntu 22.04. Also in current master.
Bug does not exist in Version: 7.3.4.2 / LibreOffice Community Build ID: 30(Build:2) CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: zh-CN (zh_CN.UTF-8); UI: zh-CN Ubuntu package version: 1:7.3.4-0ubuntu0.22.04.1 Calc: threaded Thus this is a regression and need bibisection.
Works for me Version: 7.3.4.2 (x64) / LibreOffice Community Build ID: 728fec16bd5f605073805c3c9e7c4212a0120dc5 CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: es-ES (es_ES); UI: en-US Calc: CL
Reproduced in Version: 7.4.0.3 / LibreOffice Community Build ID: f85e47c08ddd19c015c0114a68350214f7066f5a CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: gtk3 Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP Calc: threaded There was a report that encountered the same problem on Ask (Japanese) https://ask.libreoffice.org/t/topic/81418/
This seems to have begun at the below commit. Adding Cc: to Heiko Tietze ; Could you possibly take a look at this one? Thanks 0f09d5fafdb0d0a66b0137649c500445aa8d854c is the first bad commit commit 0f09d5fafdb0d0a66b0137649c500445aa8d854c Author: Jenkins Build User <tdf@pollux.tdf> Date: Wed Mar 16 19:43:12 2022 +0100 source a3cb71ac80c0c2971e97c033d212cf4e464fa8f0 https://git.libreoffice.org/core/+/a3cb71ac80c0c2971e97c033d212cf4e464fa8f0
(In reply to raal from comment #4) I think disabling the cell styles was inspired that since the sheets are protected editing a style may force the cells within the protected sheets to be changed. If we do not allow the styles (used by the protected sheets) to be modified, then we need to: 1. Detect which styles are used by the protected sheets. 2. Disable the modifying of such styles, but still allow to apply such styles to other cells outside the protected sheets. 3. Allow the modifying of other styles which are not used by any protected sheets.
"Regression" by design, see bug 143100. (In reply to Kevin Suo from comment #5) > 1. Detect which styles are used by the protected sheets. > 2. Disable the modifying of such styles, but still allow to apply such > styles to other cells outside the protected sheets. > 3. Allow the modifying of other styles which are not used by any protected > sheets. For simplicity I think it's acceptable to disable the Cell Styles view for protected sheets. But switching to a normal, unprotected sheet should re-enable it, at least. Feel free to improve my patch - or to revert and implement some better solution.
Problem exists in ver. 7.4.2.3. In ver. 7.3.6.2 function as expected A protected sheet can contain unprotected cells. It should be possible to apply style to those unprotected cells although sheet is protected.
Set the version back to 7.4.0.0 beta1+, as this field should reflect the earliest version the bug appears.
(In reply to Heiko Tietze from comment #6) > For simplicity I think it's acceptable to disable the Cell Styles view for > protected sheets. But switching to a normal, unprotected sheet should > re-enable it, at least. Feel free to improve my patch - or to revert and > implement some better solution. From my point of view, and for simplicity, it would be better to return to the operation prior to 7.4, while waiting to make a more suitable patch. When building complex workbooks, we need to be able to work on one sheet and apply existing cell styles or create new ones while keeping other sheets protected from inadvertent changes.
I reproduce in Version: 7.4.3.2 / LibreOffice Community Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890 CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR Calc: threaded Protect cells, sheets, is different than protect styles. I understand that when you change a style in use in a protect sheet, this may be effect on the sheet, but this comportment not seems good. If style in use in a protect sheet need editing, an alert may be use but I'm not sure that editing should be disabled. Maybe it's a new option to have for the protect sheet diag ?
Enough people disagreeing with the modification (compared to one asking for it). Going to revert the patch.
Reverted the patch with https://gerrit.libreoffice.org/c/core/+/145118