OLD | NEW |
---|---|
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" |
8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" |
9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" |
10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" |
11 #include "../../include/javascript/JS_Value.h" | 11 #include "../../include/javascript/JS_Value.h" |
12 #include "../../include/javascript/Consts.h" | 12 #include "../../include/javascript/Consts.h" |
13 | 13 |
14 /* ------------------------------ border ------------------------------ */ | 14 /* ------------------------------ border ------------------------------ */ |
15 | 15 |
16 BEGIN_JS_STATIC_CONST(CJS_Border) | 16 BEGIN_JS_STATIC_CONST(CJS_Border) |
17 » JS_STATIC_CONST_ENTRY_STRING(s,»solid) | 17 JS_STATIC_CONST_ENTRY_STRING(s, solid) |
18 » JS_STATIC_CONST_ENTRY_STRING(b,»beveled) | 18 JS_STATIC_CONST_ENTRY_STRING(b, beveled) |
19 » JS_STATIC_CONST_ENTRY_STRING(d,»dashed) | 19 JS_STATIC_CONST_ENTRY_STRING(d, dashed) |
20 » JS_STATIC_CONST_ENTRY_STRING(i,»inset) | 20 JS_STATIC_CONST_ENTRY_STRING(i, inset) |
21 » JS_STATIC_CONST_ENTRY_STRING(u,»underline) | 21 JS_STATIC_CONST_ENTRY_STRING(u, underline) |
22 END_JS_STATIC_CONST() | 22 END_JS_STATIC_CONST() |
23 | 23 |
24 IMPLEMENT_JS_CLASS_CONST(CJS_Border,border) | 24 IMPLEMENT_JS_CLASS_CONST(CJS_Border, border) |
25 | 25 |
26 /* ------------------------------ display ------------------------------ */ | 26 /* ------------------------------ display ------------------------------ */ |
27 | 27 |
28 BEGIN_JS_STATIC_CONST(CJS_Display) | 28 BEGIN_JS_STATIC_CONST(CJS_Display) |
29 » JS_STATIC_CONST_ENTRY_NUMBER(visible,» 0) | 29 JS_STATIC_CONST_ENTRY_NUMBER(visible, 0) |
30 » JS_STATIC_CONST_ENTRY_NUMBER(hidden,» 1) | 30 JS_STATIC_CONST_ENTRY_NUMBER(hidden, 1) |
31 » JS_STATIC_CONST_ENTRY_NUMBER(noPrint,» 2) | 31 JS_STATIC_CONST_ENTRY_NUMBER(noPrint, 2) |
32 » JS_STATIC_CONST_ENTRY_NUMBER(noView,» 3) | 32 JS_STATIC_CONST_ENTRY_NUMBER(noView, 3) |
33 END_JS_STATIC_CONST() | 33 END_JS_STATIC_CONST() |
34 | 34 |
35 IMPLEMENT_JS_CLASS_CONST(CJS_Display,display) | 35 IMPLEMENT_JS_CLASS_CONST(CJS_Display, display) |
36 | 36 |
37 /* ------------------------------ font ------------------------------ */ | 37 /* ------------------------------ font ------------------------------ */ |
38 | 38 |
39 BEGIN_JS_STATIC_CONST(CJS_Font) | 39 BEGIN_JS_STATIC_CONST(CJS_Font) |
40 » JS_STATIC_CONST_ENTRY_STRING(Times,» » Times-Roman) | 40 JS_STATIC_CONST_ENTRY_STRING(Times, Times - Roman) |
Lei Zhang
2015/08/04 19:44:11
BTW, this caused the failure on http://build.chrom
Nico
2015/08/04 19:48:22
Ah, thanks. (I was still debugging.)
I guess we'l
| |
41 » JS_STATIC_CONST_ENTRY_STRING(TimesB,» Times-Bold) | 41 JS_STATIC_CONST_ENTRY_STRING(TimesB, Times - Bold) |
42 » JS_STATIC_CONST_ENTRY_STRING(TimesI,» Times-Italic) | 42 JS_STATIC_CONST_ENTRY_STRING(TimesI, Times - Italic) |
43 » JS_STATIC_CONST_ENTRY_STRING(TimesBI,» Times-BoldItalic) | 43 JS_STATIC_CONST_ENTRY_STRING(TimesBI, Times - BoldItalic) |
44 » JS_STATIC_CONST_ENTRY_STRING(Helv,» » Helvetica) | 44 JS_STATIC_CONST_ENTRY_STRING(Helv, Helvetica) |
45 » JS_STATIC_CONST_ENTRY_STRING(HelvB,» » Helvetica-Bold) | 45 JS_STATIC_CONST_ENTRY_STRING(HelvB, Helvetica - Bold) |
46 » JS_STATIC_CONST_ENTRY_STRING(HelvI,» » Helvetica-Oblique) | 46 JS_STATIC_CONST_ENTRY_STRING(HelvI, Helvetica - Oblique) |
47 » JS_STATIC_CONST_ENTRY_STRING(HelvBI,» Helvetica-BoldOblique) | 47 JS_STATIC_CONST_ENTRY_STRING(HelvBI, Helvetica - BoldOblique) |
48 » JS_STATIC_CONST_ENTRY_STRING(Cour,» » Courier) | 48 JS_STATIC_CONST_ENTRY_STRING(Cour, Courier) |
49 » JS_STATIC_CONST_ENTRY_STRING(CourB,» » Courier-Bold) | 49 JS_STATIC_CONST_ENTRY_STRING(CourB, Courier - Bold) |
50 » JS_STATIC_CONST_ENTRY_STRING(CourI,» » Courier-Oblique) | 50 JS_STATIC_CONST_ENTRY_STRING(CourI, Courier - Oblique) |
51 » JS_STATIC_CONST_ENTRY_STRING(CourBI,» Courier-BoldOblique) | 51 JS_STATIC_CONST_ENTRY_STRING(CourBI, Courier - BoldOblique) |
52 » JS_STATIC_CONST_ENTRY_STRING(Symbol,» Symbol) | 52 JS_STATIC_CONST_ENTRY_STRING(Symbol, Symbol) |
53 » JS_STATIC_CONST_ENTRY_STRING(ZapfD,» » ZapfDingbats) | 53 JS_STATIC_CONST_ENTRY_STRING(ZapfD, ZapfDingbats) |
54 END_JS_STATIC_CONST() | 54 END_JS_STATIC_CONST() |
55 | 55 |
56 IMPLEMENT_JS_CLASS_CONST(CJS_Font,font) | 56 IMPLEMENT_JS_CLASS_CONST(CJS_Font, font) |
57 | 57 |
58 /* ------------------------------ highlight ------------------------------ */ | 58 /* ------------------------------ highlight ------------------------------ */ |
59 | 59 |
60 BEGIN_JS_STATIC_CONST(CJS_Highlight) | 60 BEGIN_JS_STATIC_CONST(CJS_Highlight) |
61 » JS_STATIC_CONST_ENTRY_STRING(n,»none) | 61 JS_STATIC_CONST_ENTRY_STRING(n, none) |
62 » JS_STATIC_CONST_ENTRY_STRING(i,»invert) | 62 JS_STATIC_CONST_ENTRY_STRING(i, invert) |
63 » JS_STATIC_CONST_ENTRY_STRING(p,»push) | 63 JS_STATIC_CONST_ENTRY_STRING(p, push) |
64 » JS_STATIC_CONST_ENTRY_STRING(o,»outline) | 64 JS_STATIC_CONST_ENTRY_STRING(o, outline) |
65 END_JS_STATIC_CONST() | 65 END_JS_STATIC_CONST() |
66 | 66 |
67 IMPLEMENT_JS_CLASS_CONST(CJS_Highlight,highlight) | 67 IMPLEMENT_JS_CLASS_CONST(CJS_Highlight, highlight) |
68 | 68 |
69 /* ------------------------------ position ------------------------------ */ | 69 /* ------------------------------ position ------------------------------ */ |
70 | 70 |
71 BEGIN_JS_STATIC_CONST(CJS_Position) | 71 BEGIN_JS_STATIC_CONST(CJS_Position) |
72 » JS_STATIC_CONST_ENTRY_NUMBER(textOnly,» » 0) | 72 JS_STATIC_CONST_ENTRY_NUMBER(textOnly, 0) |
73 » JS_STATIC_CONST_ENTRY_NUMBER(iconOnly,» » 1) | 73 JS_STATIC_CONST_ENTRY_NUMBER(iconOnly, 1) |
74 » JS_STATIC_CONST_ENTRY_NUMBER(iconTextV,»» 2) | 74 JS_STATIC_CONST_ENTRY_NUMBER(iconTextV, 2) |
75 » JS_STATIC_CONST_ENTRY_NUMBER(textIconV,»» 3) | 75 JS_STATIC_CONST_ENTRY_NUMBER(textIconV, 3) |
76 » JS_STATIC_CONST_ENTRY_NUMBER(iconTextH,»» 4) | 76 JS_STATIC_CONST_ENTRY_NUMBER(iconTextH, 4) |
77 » JS_STATIC_CONST_ENTRY_NUMBER(textIconH,»» 5) | 77 JS_STATIC_CONST_ENTRY_NUMBER(textIconH, 5) |
78 » JS_STATIC_CONST_ENTRY_NUMBER(overlay,» » 6) | 78 JS_STATIC_CONST_ENTRY_NUMBER(overlay, 6) |
79 END_JS_STATIC_CONST() | 79 END_JS_STATIC_CONST() |
80 | 80 |
81 IMPLEMENT_JS_CLASS_CONST(CJS_Position,position) | 81 IMPLEMENT_JS_CLASS_CONST(CJS_Position, position) |
82 | 82 |
83 /* ------------------------------ scaleHow ------------------------------ */ | 83 /* ------------------------------ scaleHow ------------------------------ */ |
84 | 84 |
85 BEGIN_JS_STATIC_CONST(CJS_ScaleHow) | 85 BEGIN_JS_STATIC_CONST(CJS_ScaleHow) |
86 » JS_STATIC_CONST_ENTRY_NUMBER(proportional,» 0) | 86 JS_STATIC_CONST_ENTRY_NUMBER(proportional, 0) |
87 » JS_STATIC_CONST_ENTRY_NUMBER(anamorphic,» 1) | 87 JS_STATIC_CONST_ENTRY_NUMBER(anamorphic, 1) |
88 END_JS_STATIC_CONST() | 88 END_JS_STATIC_CONST() |
89 | 89 |
90 IMPLEMENT_JS_CLASS_CONST(CJS_ScaleHow,scaleHow) | 90 IMPLEMENT_JS_CLASS_CONST(CJS_ScaleHow, scaleHow) |
91 | 91 |
92 /* ------------------------------ scaleWhen ------------------------------ */ | 92 /* ------------------------------ scaleWhen ------------------------------ */ |
93 | 93 |
94 BEGIN_JS_STATIC_CONST(CJS_ScaleWhen) | 94 BEGIN_JS_STATIC_CONST(CJS_ScaleWhen) |
95 » JS_STATIC_CONST_ENTRY_NUMBER(always,» 0) | 95 JS_STATIC_CONST_ENTRY_NUMBER(always, 0) |
96 » JS_STATIC_CONST_ENTRY_NUMBER(never,» » 1) | 96 JS_STATIC_CONST_ENTRY_NUMBER(never, 1) |
97 » JS_STATIC_CONST_ENTRY_NUMBER(tooBig,» 2) | 97 JS_STATIC_CONST_ENTRY_NUMBER(tooBig, 2) |
98 » JS_STATIC_CONST_ENTRY_NUMBER(tooSmall,» 3) | 98 JS_STATIC_CONST_ENTRY_NUMBER(tooSmall, 3) |
99 END_JS_STATIC_CONST() | 99 END_JS_STATIC_CONST() |
100 | 100 |
101 IMPLEMENT_JS_CLASS_CONST(CJS_ScaleWhen,scaleWhen) | 101 IMPLEMENT_JS_CLASS_CONST(CJS_ScaleWhen, scaleWhen) |
102 | 102 |
103 /* ------------------------------ style ------------------------------ */ | 103 /* ------------------------------ style ------------------------------ */ |
104 | 104 |
105 BEGIN_JS_STATIC_CONST(CJS_Style) | 105 BEGIN_JS_STATIC_CONST(CJS_Style) |
106 » JS_STATIC_CONST_ENTRY_STRING(ch,» check) | 106 JS_STATIC_CONST_ENTRY_STRING(ch, check) |
107 » JS_STATIC_CONST_ENTRY_STRING(cr,» cross) | 107 JS_STATIC_CONST_ENTRY_STRING(cr, cross) |
108 » JS_STATIC_CONST_ENTRY_STRING(di,» diamond) | 108 JS_STATIC_CONST_ENTRY_STRING(di, diamond) |
109 » JS_STATIC_CONST_ENTRY_STRING(ci,» circle) | 109 JS_STATIC_CONST_ENTRY_STRING(ci, circle) |
110 » JS_STATIC_CONST_ENTRY_STRING(st,» star) | 110 JS_STATIC_CONST_ENTRY_STRING(st, star) |
111 » JS_STATIC_CONST_ENTRY_STRING(sq,» square) | 111 JS_STATIC_CONST_ENTRY_STRING(sq, square) |
112 END_JS_STATIC_CONST() | 112 END_JS_STATIC_CONST() |
113 | 113 |
114 IMPLEMENT_JS_CLASS_CONST(CJS_Style,style) | 114 IMPLEMENT_JS_CLASS_CONST(CJS_Style, style) |
115 | |
116 | 115 |
117 /* ------------------------------ zoomtype ------------------------------ */ | 116 /* ------------------------------ zoomtype ------------------------------ */ |
118 | 117 |
119 BEGIN_JS_STATIC_CONST(CJS_Zoomtype) | 118 BEGIN_JS_STATIC_CONST(CJS_Zoomtype) |
120 » JS_STATIC_CONST_ENTRY_STRING(none,» NoVary) | 119 JS_STATIC_CONST_ENTRY_STRING(none, NoVary) |
121 » JS_STATIC_CONST_ENTRY_STRING(fitP,» FitPage) | 120 JS_STATIC_CONST_ENTRY_STRING(fitP, FitPage) |
122 » JS_STATIC_CONST_ENTRY_STRING(fitW,» FitWidth) | 121 JS_STATIC_CONST_ENTRY_STRING(fitW, FitWidth) |
123 » JS_STATIC_CONST_ENTRY_STRING(fitH,» FitHeight) | 122 JS_STATIC_CONST_ENTRY_STRING(fitH, FitHeight) |
124 » JS_STATIC_CONST_ENTRY_STRING(fitV,» FitVisibleWidth) | 123 JS_STATIC_CONST_ENTRY_STRING(fitV, FitVisibleWidth) |
125 » JS_STATIC_CONST_ENTRY_STRING(pref,» Preferred) | 124 JS_STATIC_CONST_ENTRY_STRING(pref, Preferred) |
126 » JS_STATIC_CONST_ENTRY_STRING(refW,» ReflowWidth) | 125 JS_STATIC_CONST_ENTRY_STRING(refW, ReflowWidth) |
127 END_JS_STATIC_CONST() | 126 END_JS_STATIC_CONST() |
128 | 127 |
129 IMPLEMENT_JS_CLASS_CONST(CJS_Zoomtype,zoomtype) | 128 IMPLEMENT_JS_CLASS_CONST(CJS_Zoomtype, zoomtype) |
130 | 129 |
131 /* ------------------------------ CJS_GlobalConsts ----------------------------- - */ | 130 /* ------------------------------ CJS_GlobalConsts |
132 | 131 * ------------------------------ */ |
133 int» CJS_GlobalConsts::Init(IJS_Runtime* pRuntime) | 132 |
134 { | 133 int CJS_GlobalConsts::Init(IJS_Runtime* pRuntime) { |
135 » DEFINE_GLOBAL_CONST(pRuntime, IDS_GREATER_THAN , Invalid value: must be greater than or equal to %s.); | 134 DEFINE_GLOBAL_CONST(pRuntime, IDS_GREATER_THAN, Invalid value |
136 » DEFINE_GLOBAL_CONST(pRuntime, IDS_GT_AND_LT,Invalid value: must be great er than or equal to %s and less than or equal to %s.); | 135 : must be greater than or equal to % s.); |
137 » DEFINE_GLOBAL_CONST(pRuntime, IDS_LESS_THAN,Invalid value: must be less than or equal to %s.); | 136 DEFINE_GLOBAL_CONST( |
138 » DEFINE_GLOBAL_CONST(pRuntime, IDS_INVALID_MONTH,** Invalid **); | 137 pRuntime, IDS_GT_AND_LT, Invalid value |
139 » DEFINE_GLOBAL_CONST(pRuntime, IDS_INVALID_DATE,Invalid date/time: please ensure that the date/time exists. Field); | 138 : must be greater than or equal to % s and less than or equal to % s.); |
140 » DEFINE_GLOBAL_CONST(pRuntime, IDS_INVALID_VALUE,The value entered does n ot match the format of the field); | 139 DEFINE_GLOBAL_CONST(pRuntime, IDS_LESS_THAN, Invalid value |
141 » DEFINE_GLOBAL_CONST(pRuntime, IDS_AM,am); | 140 : must be less than or equal to % s.); |
142 » DEFINE_GLOBAL_CONST(pRuntime, IDS_PM,pm); | 141 DEFINE_GLOBAL_CONST(pRuntime, IDS_INVALID_MONTH, **Invalid**); |
143 » DEFINE_GLOBAL_CONST(pRuntime, IDS_MONTH_INFO,January[1]February[2]March[ 3]April[4]May[5]June[6]July[7]August[8]September[9]October[10]November[11]Decemb er[12]Sept[9]Jan[1]Feb[2]Mar[3]Apr[4]Jun[6]Jul[7]Aug[8]Sep[9]Oct[10]Nov[11]Dec[1 2]); | 142 DEFINE_GLOBAL_CONST(pRuntime, IDS_INVALID_DATE, Invalid date / time |
144 » DEFINE_GLOBAL_CONST(pRuntime, IDS_STARTUP_CONSOLE_MSG, ** ^_^ **); | 143 : please ensure that the date / time exists.Field); |
145 | 144 DEFINE_GLOBAL_CONST(pRuntime, IDS_INVALID_VALUE, |
146 » return 0; | 145 The value entered does not match the format of the field); |
146 DEFINE_GLOBAL_CONST(pRuntime, IDS_AM, am); | |
147 DEFINE_GLOBAL_CONST(pRuntime, IDS_PM, pm); | |
148 DEFINE_GLOBAL_CONST( | |
149 pRuntime, IDS_MONTH_INFO, | |
150 January[1] February[2] March[3] April[4] May[5] June[6] July[7] August | |
151 [8] September[9] October[10] November[11] December[12] Sept[9] Jan | |
152 [1] Feb[2] Mar[3] Apr[4] Jun[6] Jul[7] Aug[8] Sep[9] Oct[10] Nov | |
153 [11] Dec[12]); | |
154 DEFINE_GLOBAL_CONST(pRuntime, IDS_STARTUP_CONSOLE_MSG, ** ^ _ ^ **); | |
155 | |
156 return 0; | |
147 } | 157 } |
148 | 158 |
149 /* ------------------------------ CJS_GlobalArrays ----------------------------- - */ | 159 /* ------------------------------ CJS_GlobalArrays |
150 | 160 * ------------------------------ */ |
151 int» CJS_GlobalArrays::Init(IJS_Runtime* pRuntime) | 161 |
152 { | 162 int CJS_GlobalArrays::Init(IJS_Runtime* pRuntime) { |
153 » { | 163 { |
154 » » const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP"; | 164 const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP"; |
155 » » const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"}; | 165 const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"}; |
156 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 166 DEFINE_GLOBAL_ARRAY(pRuntime); |
157 » } | 167 } |
158 | 168 |
159 » { | 169 { |
160 » » const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP"; | 170 const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP"; |
161 » » const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */ | 171 const FX_WCHAR* ArrayContent[] = { |
162 » » » » » » » » » L"[+-] ?\\.\\d+", /* -.1 */ | 172 L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */ |
163 » » » » » » » » » L"[+-] ?\\d+\\." /* -1. */ | 173 L"[+-]?\\.\\d+", /* -.1 */ |
164 » » » » » » » » » }; | 174 L"[+-]?\\d+\\." /* -1. */ |
165 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 175 }; |
166 » } | 176 DEFINE_GLOBAL_ARRAY(pRuntime); |
167 | 177 } |
168 » { | 178 |
169 » » const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP"; | 179 { |
170 » » const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*,?\\d*"}; | 180 const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_COMMA_SEP"; |
171 | 181 const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*,?\\d*"}; |
172 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 182 |
173 » } | 183 DEFINE_GLOBAL_ARRAY(pRuntime); |
174 | 184 } |
175 » { | 185 |
176 » » const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP"; | 186 { |
177 » » const FX_WCHAR* ArrayContent[] = { L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */ | 187 const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_COMMA_SEP"; |
178 » » » » » » » » » L"[+-] ?[.,]\\d+", /* -,1 */ | 188 const FX_WCHAR* ArrayContent[] = { |
179 L"[+-]?\\d+[.,]" /* -1, */ | 189 L"[+-]?\\d+([.,]\\d+)?", /* -1,0 or -1 */ |
180 }; | 190 L"[+-]?[.,]\\d+", /* -,1 */ |
181 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 191 L"[+-]?\\d+[.,]" /* -1, */ |
182 » } | 192 }; |
183 | 193 DEFINE_GLOBAL_ARRAY(pRuntime); |
184 » { | 194 } |
185 » » const FX_WCHAR* ArrayName = L"RE_ZIP_ENTRY"; | 195 |
186 const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}"}; | 196 { |
187 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 197 const FX_WCHAR* ArrayName = L"RE_ZIP_ENTRY"; |
188 » } | 198 const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}"}; |
189 | 199 DEFINE_GLOBAL_ARRAY(pRuntime); |
190 » { | 200 } |
191 » » const FX_WCHAR* ArrayName = L"RE_ZIP_COMMIT"; | 201 |
192 » » const FX_WCHAR* ArrayContent[] = {L"\\d{5}"}; | 202 { |
193 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 203 const FX_WCHAR* ArrayName = L"RE_ZIP_COMMIT"; |
194 » } | 204 const FX_WCHAR* ArrayContent[] = {L"\\d{5}"}; |
195 | 205 DEFINE_GLOBAL_ARRAY(pRuntime); |
196 » { | 206 } |
197 » » const FX_WCHAR* ArrayName = L"RE_ZIP4_ENTRY"; | 207 |
198 » » const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}" }; | 208 { |
199 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 209 const FX_WCHAR* ArrayName = L"RE_ZIP4_ENTRY"; |
200 » } | 210 const FX_WCHAR* ArrayContent[] = {L"\\d{0,5}(\\.|[- ])?\\d{0,4}"}; |
201 | 211 DEFINE_GLOBAL_ARRAY(pRuntime); |
202 » { | 212 } |
203 » » const FX_WCHAR* ArrayName = L"RE_ZIP4_COMMIT"; | 213 |
204 » » const FX_WCHAR* ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"}; | 214 { |
205 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 215 const FX_WCHAR* ArrayName = L"RE_ZIP4_COMMIT"; |
206 » } | 216 const FX_WCHAR* ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"}; |
207 | 217 DEFINE_GLOBAL_ARRAY(pRuntime); |
208 » { | 218 } |
209 » » const FX_WCHAR* ArrayName = L"RE_PHONE_ENTRY"; | 219 |
210 » » const FX_WCHAR* ArrayContent[] = { | 220 { |
211 » » » » L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4} ",» » /* 555-1234 or 408 555-1234 */ | 221 const FX_WCHAR* ArrayName = L"RE_PHONE_ENTRY"; |
212 » » » » L"\\(\\d{0,3}",»» » » » » » » » » » /* (408 */ | 222 const FX_WCHAR* ArrayContent[] = { |
213 » » » » L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\ d{0,4}",» /* (408) 555-1234 */ | 223 L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 555-1234 or 408 |
214 » » » » » /* (allow the addition of parens as an a fterthought) */ | 224 555-1234 */ |
215 » » » » L"\\(\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0 ,4}",» /* (408 555-1234 */ | 225 L"\\(\\d{0,3}", /* (408 */ |
216 » » » » L"\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0 ,4}",» /* 408) 555-1234 */ | 226 L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408) |
217 » » » » L"011(\\.|[- \\d])*"» » » » » » » » » » /* international */ | 227 555-1234 */ |
218 » » » }; | 228 /* (allow the addition of parens as an afterthought) */ |
219 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 229 L"\\(\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408 555-1234 |
220 » } | 230 */ |
221 | 231 L"\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 408) 555-1234 |
222 » { | 232 */ |
223 » » const FX_WCHAR* ArrayName = L"RE_PHONE_COMMIT"; | 233 L"011(\\.|[- \\d])*" /* international */ |
224 » » const FX_WCHAR* ArrayContent[] = { | 234 }; |
225 » » » » » L"\\d{3}(\\.|[- ])?\\d{4}",» » » » » » » /* 555-1234 */ | 235 DEFINE_GLOBAL_ARRAY(pRuntime); |
226 » » » » » L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{ 4}",» » » /* 408 555-1234 */ | 236 } |
227 » » » » » L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ] )?\\d{4}",» /* (408) 555-1234 */ | 237 |
228 » » » » » L"011(\\.|[- \\d])*"» » » » » » » » » /* international */ | 238 { |
229 » » » » }; | 239 const FX_WCHAR* ArrayName = L"RE_PHONE_COMMIT"; |
230 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 240 const FX_WCHAR* ArrayContent[] = { |
231 » } | 241 L"\\d{3}(\\.|[- ])?\\d{4}", /* 555-1234 */ |
232 | 242 L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* 408 555-1234 */ |
233 » { | 243 L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* (408) 555-1234 */ |
234 » » const FX_WCHAR* ArrayName = L"RE_SSN_ENTRY"; | 244 L"011(\\.|[- \\d])*" /* international */ |
235 » » const FX_WCHAR* ArrayContent[] = {L"\\d{0,3}(\\.|[- ])?\\d{0,2}( \\.|[- ])?\\d{0,4}"}; | 245 }; |
236 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 246 DEFINE_GLOBAL_ARRAY(pRuntime); |
237 » } | 247 } |
238 | 248 |
239 » { | 249 { |
240 » » const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT"; | 250 const FX_WCHAR* ArrayName = L"RE_SSN_ENTRY"; |
241 » » const FX_WCHAR* ArrayContent[] = {L"\\d{3}(\\.|[- ])?\\d{2}(\\.| [- ])?\\d{4}"}; | 251 const FX_WCHAR* ArrayContent[] = { |
242 » » DEFINE_GLOBAL_ARRAY(pRuntime); | 252 L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"}; |
243 » } | 253 DEFINE_GLOBAL_ARRAY(pRuntime); |
244 | 254 } |
245 » return 0; | 255 |
256 { | |
257 const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT"; | |
258 const FX_WCHAR* ArrayContent[] = { | |
259 L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"}; | |
260 DEFINE_GLOBAL_ARRAY(pRuntime); | |
261 } | |
262 | |
263 return 0; | |
246 } | 264 } |
247 | |
OLD | NEW |