Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# Copyright (c) 2010-2020 openpyxl 

2 

3from openpyxl.descriptors.serialisable import Serialisable 

4from openpyxl.descriptors import ( 

5 Sequence, 

6 String, 

7 Bool, 

8 NoneSet, 

9 

10) 

11 

12class SmartTag(Serialisable): 

13 

14 tagname = "smartTagType" 

15 

16 namespaceUri = String(allow_none=True) 

17 name = String(allow_none=True) 

18 url = String(allow_none=True) 

19 

20 def __init__(self, 

21 namespaceUri=None, 

22 name=None, 

23 url=None, 

24 ): 

25 self.namespaceUri = namespaceUri 

26 self.name = name 

27 self.url = url 

28 

29 

30class SmartTagList(Serialisable): 

31 

32 tagname = "smartTagTypes" 

33 

34 smartTagType = Sequence(expected_type=SmartTag, allow_none=True) 

35 

36 __elements__ = ('smartTagType',) 

37 

38 def __init__(self, 

39 smartTagType=(), 

40 ): 

41 self.smartTagType = smartTagType 

42 

43 

44class SmartTagProperties(Serialisable): 

45 

46 tagname = "smartTagPr" 

47 

48 embed = Bool(allow_none=True) 

49 show = NoneSet(values=(['all', 'noIndicator'])) 

50 

51 def __init__(self, 

52 embed=None, 

53 show=None, 

54 ): 

55 self.embed = embed 

56 self.show = show