Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/openpyxl/chartsheet/protection.py: 65%
23 statements
« prev ^ index » next coverage.py v7.3.3, created at 2023-12-20 06:34 +0000
« prev ^ index » next coverage.py v7.3.3, created at 2023-12-20 06:34 +0000
1import hashlib
3from openpyxl.descriptors import (Bool, Integer, String)
4from openpyxl.descriptors.excel import Base64Binary
5from openpyxl.descriptors.serialisable import Serialisable
7from openpyxl.worksheet.protection import (
8 hash_password,
9 _Protected
10)
13class ChartsheetProtection(Serialisable, _Protected):
14 tagname = "sheetProtection"
16 algorithmName = String(allow_none=True)
17 hashValue = Base64Binary(allow_none=True)
18 saltValue = Base64Binary(allow_none=True)
19 spinCount = Integer(allow_none=True)
20 content = Bool(allow_none=True)
21 objects = Bool(allow_none=True)
23 __attrs__ = ("content", "objects", "password", "hashValue", "spinCount", "saltValue", "algorithmName")
25 def __init__(self,
26 content=None,
27 objects=None,
28 hashValue=None,
29 spinCount=None,
30 saltValue=None,
31 algorithmName=None,
32 password=None,
33 ):
34 self.content = content
35 self.objects = objects
36 self.hashValue = hashValue
37 self.spinCount = spinCount
38 self.saltValue = saltValue
39 self.algorithmName = algorithmName
40 if password is not None:
41 self.password = password