Description: Calc doesn't allow to modify any cell style when you have a protected sheet in your spreadsheet. But when you try open the Cell style dialog using a context menu in Sidebar Calc silently doesn't show anything! I suggest to add an error message "You can't change any cell styles. You have a protected sheet in your spreadsheet now" for this case Steps to Reproduce: 1. Open a new Calc spreadsheet 2. Add two sheets 3. Protect any one sheet 4. select any unprotected sheet 5. Open Styles section in Sidebar (press F11) 6. Select Cell styles on top of the section 7. Right click on any style in list and select Modify from the context menu => Nothing happens and I as an user just don't understand why I don't see the Cell style dialog. Actual Results: Calc silently doesn't show the Cell style dialog Expected Results: Calc should show to user a some error message for this case like "You can't change any cell styles. You have a protected sheet in your spreadsheet now" Reproducible: Always User Profile Reset: No Additional Info: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 6805efdecb240fad8c82a5c1756a2a0e92f12b7d CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: threaded
You cannot apply a Cell Style to protected sheets, neither per content menu > Styles nor the main menu > Styles or the sidebar via deck Styles. In all cases the messagebox shows up "Protected sheets can not be modified". In addition, it's not possible to modify the styles - otherwise you could turn red cells into green. And this fails silently. However, I don't think the way to go is to pretend it works but show a message box telling the opposite. We should rather disable the Styles commands and the sidebar deck content if the sheet is protected. Code pointer might be ScFormatShell::GetStyleState() in sc/source/ui/view/formatsh.cxx (but not sure).
The patch https://gerrit.libreoffice.org/c/core/+/131665 disables all Cell Styles (no access to the complete tree, selection of cell styles disabled). Would be nice to change the tooltip in this case but no idea how to do that.
Heiko Tietze committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a3cb71ac80c0c2971e97c033d212cf4e464fa8f0 Resolves tdf#143100 - Disable cell style commands when sheet is protected It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Heiko Tietze committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3babbc31bf4bba35924c25c5fbd59e1c314d3627 Revert "Resolves tdf#143100 - Disable cell style commands when sheet is protected" It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Heiko Tietze committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/9d6ae0b8d2ebb3931b3c46147e14939e7ed3f3ed Revert "Resolves tdf#143100 - Disable cell style commands when sheet is protected" It will be available in 7.5.0.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Heiko Tietze committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/bb0ed581a5624a8827ede86658872daca1754675 Revert "Resolves tdf#143100 - Disable cell style commands when sheet is protected" It will be available in 7.4.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.