protection.py 433 B

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