source: OpenRLabs-Git/deploy/rlabs-docker/web2py-rlabs/gluon/contrib/pyrtf/Constants.py

main
Last change on this file was 42bd667, checked in by David Fuertes <dfuertes@…>, 4 years ago

Historial Limpio

  • Property mode set to 100755
File size: 4.0 KB
Line 
1import sys
2
3PY2 = sys.version_info[0] == 2
4
5class ViewKind :
6    """An integer (0-5) that represents the view mode of the document."""
7
8    NONE           = 0
9    PageLayout     = 1
10    Outline        = 2
11    MasterDocument = 3
12    Normal         = 4
13    OnlineLayout   = 5
14
15    DEFAULT = PageLayout
16
17    def _IsValid( cls, value ) :
18        return value in [ 0, 1, 2, 3, 4, 5 ]
19    IsValid = classmethod( _IsValid )
20
21class ViewScale :
22    """Zoom level of the document; the N argument is a value representing a percentage (the default is 100)."""
23
24    def _IsValid( cls, value ) :
25        return value is None or (0 < value < 101)
26    IsValid = classmethod( _IsValid )
27
28class ViewZoomKind :
29    """An integer (0 to 2) that represents the zoom kind of the document."""
30
31    NONE     = 0
32    FullPage = 1
33    BestFit  = 2
34
35    def _IsValid( cls, value ) :
36        return value in [ None, 0, 1, 2 ]
37    IsValid = classmethod( _IsValid )
38
39
40class Languages :
41    NoLanguage            = 1024
42    Albanian              = 1052
43    Arabic                = 1025
44    Bahasa                = 1057
45    BelgianDutch          = 2067
46    BelgianFrench         = 2060
47    BrazilianPortuguese   = 1046
48    Bulgarian             = 1026
49    Catalan               = 1027
50    CroatoSerbianLatin    = 1050
51    Czech                 = 1029
52    Danish                = 1030
53    Dutch                 = 1043
54    EnglishAustralian     = 3081
55    EnglishUK             = 2057
56    EnglishUS             = 1033
57    Finnish               = 1035
58    French                = 1036
59    FrenchCanadian        = 3084
60    German                = 1031
61    Greek                 = 1032
62    Hebrew                = 1037
63    Hungarian             = 1038
64    Icelandic             = 1039
65    Italian               = 1040
66    Japanese              = 1041
67    Korean                = 1042
68    NorwegianBokmal       = 1044
69    NorwegianNynorsk      = 2068
70    Polish                = 1045
71    Portuguese            = 2070
72    RhaetoRomanic         = 1047
73    Romanian              = 1048
74    Russian               = 1049
75    SerboCroatianCyrillic = 2074
76    SimplifiedChinese     = 2052
77    Slovak                = 1051
78    SpanishCastilian      = 1034
79    SpanishMexican        = 2058
80    Swedish               = 1053
81    SwissFrench           = 4108
82    SwissGerman           = 2055
83    SwissItalian          = 2064
84    Thai                  = 1054
85    TraditionalChinese    = 1028
86    Turkish               = 1055
87    Urdu                  = 1056
88    SesothoSotho          = 1072
89    Afrikaans             = 1078
90    Zulu                  = 1077
91    Xhosa                 = 1076
92    Venda                 = 1075
93    Tswana                = 1074
94    Tsonga                = 1073
95    FarsiPersian          = 1065
96
97    Codes = [ 1024,
98              1052,
99              1025,
100              1057,
101              2067,
102              2060,
103              1046,
104              1026,
105              1027,
106              1050,
107              1029,
108              1030,
109              1043,
110              3081,
111              2057,
112              1033,
113              1035,
114              1036,
115              3084,
116              1031,
117              1032,
118              1037,
119              1038,
120              1039,
121              1040,
122              1041,
123              1042,
124              1044,
125              2068,
126              1045,
127              2070,
128              1047,
129              1048,
130              1049,
131              2074,
132              2052,
133              1051,
134              1034,
135              2058,
136              1053,
137              4108,
138              2055,
139              2064,
140              1054,
141              1028,
142              1055,
143              1056,
144              1072,
145              1078,
146              1077,
147              1076,
148              1075,
149              1074,
150              1073,
151              1065 ]
152
153    #  make it Australian as that is what I use most of the time
154    DEFAULT = EnglishAustralian
155
156    def _IsValid( cls, value ) :
157        return value in cls.Codes
158    IsValid = classmethod( _IsValid )
159
160if __name__ == '__main__' :
161    PrintHexTable()
162
Note: See TracBrowser for help on using the repository browser.