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