Created attachment 133466 [details] protectedSheet.xlsb: binary format reverses protection settings. This .xlsb file was created with sheet protection enabled. Everything is disallowed, EXCEPT for allowing the selection of unlocked cells. It works fine in .xlsx format, but in .xlsb the entire sheet is selection-locked EXCEPT for the locked cells. In other words, the protection works backwards for .xlsb compared to .xlsx. broken in LO4.3 development by author Noel Power 2013-11-21 18:12:50 commit 5728a56b20e01d6c9e86a23f20af64a1b68ad604 fdo#70499 selectn of lock/unlocked cells with worksheet protection reversed https://cgit.freedesktop.org/libreoffice/core/commit/?id=5728a56b20e01d6c9e86a23f20af64a1b68ad604 Steps to reproduce. 1.) Open protectedSheet.xlsb. Try clicking in a white (unlocked) cell. 2.) Notice that you CAN'T select any of these cells. 3.) click on one of the blue cells (A1:B2) which are locked. 4.) Notice that you CAN select these cells. 5.) Disable tools-Protect Sheet, and then re-enable it again to see the dialog. 6.) Notice that the user can do everything except select unprotected cells. That is the opposite of what happens in MSO (and the opposite of what happens when reading the .xlsx/.xlsm form of the file).
Moving to NEW since the problematic commit has been identified.
proposed fix at https://gerrit.libreoffice.org/37952
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=0d3fcbf809852aab0d0f88272bbfd2e8507d1c5e tdf#108017 xlsb import: protection settings were reversed It will be available in 5.5.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-5-4": http://cgit.freedesktop.org/libreoffice/core/commit/?id=47f3d3521c364a9133da26d3202225dc414662fb&h=libreoffice-5-4 tdf#108017 xlsb import: protection settings were reversed It will be available in 5.4.0.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=4fbb8ad023c95266ce0882cd28bdf6703f5b67bf&h=libreoffice-5-3 tdf#108017 xlsb import: protection settings were reversed It will be available in 5.3.4. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I also looked into ::importChartProtection() since it also appears to be backwards. However that one is confusing because it is hard to know what is an "object" on a chart sheet, and what is content. Plus, when you turn off sheet protection and then re-enable it, the lock screen returns to the defaults, and not the previous setting, so that makes it even harder to troubleshoot. Ultimately, at this point LO doesn't support a separate "chartsheets/sheet1.xml" anyway, so it gets converted into normal sheet protection. Also worth noting is that LO doesn't support chartsheet "contents" locking. It uses this value to determine whether to lock the sheet instead. Too confusing and irrelevant to waste any more time on it, so just documenting the fact that I did notice the similar settings in importChartProtection and why I didn't do anything about it.