Closed 7lb closed 1 year ago
I still need to implement password protection, but the basic functionality should be there.
I followed the existing pattern of a getter and a setter for each flag, but from a design standpoint I believe using QFlags
should be preferred.
It would at least reduce the amount of boilerplate code, but it would probably need to be done across the whole codebase to maintain consistency, and of course it would be a breaking change API-wise, so it's probably best to leave it to a future version.
I marked the PR as WIP in the meantime.
Edit: I missed your edit about ISO/IEC 29500. I will check it out and change the references in the code when I look at how to implement password protection
Thanks a lot for your work. I agree the original author of this library used bool
s instead of binary flags a lot but I can't find it in me to like this, it screams to be a flag.
This is not a reject of the pull request though
This adds the
Worksheet::isSheetProtected
andWorksheet::setSheetProtected
APIs.It also correctly writes sheet and cell protection data to the xml files inside the xlsx archive.
This is based on
ECMA-376-1:2016
sections18.3.1.84
and18.8.33