protection.py 394 B

1234567891011121314151617
  1. # Copyright (c) 2010-2024 openpyxl
  2. from openpyxl.descriptors import Bool
  3. from openpyxl.descriptors.serialisable import Serialisable
  4. class Protection(Serialisable):
  5. """Protection options for use in styles."""
  6. tagname = "protection"
  7. locked = Bool()
  8. hidden = Bool()
  9. def __init__(self, locked=True, hidden=False):
  10. self.locked = locked
  11. self.hidden = hidden