Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: fpdfsdk/src/javascript/Consts.cpp

Issue 1335763002: Rename Init methods to more accurately describe purpose (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 JS_STATIC_CONST_ENTRY_STRING(L"fitV", L"FitVisibleWidth") 123 JS_STATIC_CONST_ENTRY_STRING(L"fitV", L"FitVisibleWidth")
124 JS_STATIC_CONST_ENTRY_STRING(L"pref", L"Preferred") 124 JS_STATIC_CONST_ENTRY_STRING(L"pref", L"Preferred")
125 JS_STATIC_CONST_ENTRY_STRING(L"refW", L"ReflowWidth") 125 JS_STATIC_CONST_ENTRY_STRING(L"refW", L"ReflowWidth")
126 END_JS_STATIC_CONST() 126 END_JS_STATIC_CONST()
127 127
128 IMPLEMENT_JS_CLASS_CONST(CJS_Zoomtype, zoomtype) 128 IMPLEMENT_JS_CLASS_CONST(CJS_Zoomtype, zoomtype)
129 129
130 /* ------------------------------ CJS_GlobalConsts 130 /* ------------------------------ CJS_GlobalConsts
131 * ------------------------------ */ 131 * ------------------------------ */
132 132
133 int CJS_GlobalConsts::Init(v8::Isolate* pIsolate) { 133 int CJS_GlobalConsts::DefineJSObjects(v8::Isolate* pIsolate) {
134 DEFINE_GLOBAL_CONST(pIsolate, IDS_GREATER_THAN, Invalid value 134 DEFINE_GLOBAL_CONST(pIsolate, IDS_GREATER_THAN, Invalid value
135 : must be greater than or equal to % s.); 135 : must be greater than or equal to % s.);
136 DEFINE_GLOBAL_CONST( 136 DEFINE_GLOBAL_CONST(
137 pIsolate, IDS_GT_AND_LT, Invalid value 137 pIsolate, IDS_GT_AND_LT, Invalid value
138 : must be greater than or equal to % s and less than or equal to % s.); 138 : must be greater than or equal to % s and less than or equal to % s.);
139 DEFINE_GLOBAL_CONST(pIsolate, IDS_LESS_THAN, Invalid value 139 DEFINE_GLOBAL_CONST(pIsolate, IDS_LESS_THAN, Invalid value
140 : must be less than or equal to % s.); 140 : must be less than or equal to % s.);
141 DEFINE_GLOBAL_CONST(pIsolate, IDS_INVALID_MONTH, **Invalid**); 141 DEFINE_GLOBAL_CONST(pIsolate, IDS_INVALID_MONTH, **Invalid**);
142 DEFINE_GLOBAL_CONST(pIsolate, IDS_INVALID_DATE, Invalid date / time 142 DEFINE_GLOBAL_CONST(pIsolate, IDS_INVALID_DATE, Invalid date / time
143 : please ensure that the date / time exists.Field); 143 : please ensure that the date / time exists.Field);
144 DEFINE_GLOBAL_CONST(pIsolate, IDS_INVALID_VALUE, 144 DEFINE_GLOBAL_CONST(pIsolate, IDS_INVALID_VALUE,
145 The value entered does not match the format of the field); 145 The value entered does not match the format of the field);
146 DEFINE_GLOBAL_CONST(pIsolate, IDS_AM, am); 146 DEFINE_GLOBAL_CONST(pIsolate, IDS_AM, am);
147 DEFINE_GLOBAL_CONST(pIsolate, IDS_PM, pm); 147 DEFINE_GLOBAL_CONST(pIsolate, IDS_PM, pm);
148 DEFINE_GLOBAL_CONST( 148 DEFINE_GLOBAL_CONST(
149 pIsolate, IDS_MONTH_INFO, 149 pIsolate, IDS_MONTH_INFO,
150 January[1] February[2] March[3] April[4] May[5] June[6] July[7] August 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 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 152 [1] Feb[2] Mar[3] Apr[4] Jun[6] Jul[7] Aug[8] Sep[9] Oct[10] Nov
153 [11] Dec[12]); 153 [11] Dec[12]);
154 DEFINE_GLOBAL_CONST(pIsolate, IDS_STARTUP_CONSOLE_MSG, ** ^ _ ^ **); 154 DEFINE_GLOBAL_CONST(pIsolate, IDS_STARTUP_CONSOLE_MSG, ** ^ _ ^ **);
155 155
156 return 0; 156 return 0;
157 } 157 }
158 158
159 /* ------------------------------ CJS_GlobalArrays 159 /* ------------------------------ CJS_GlobalArrays
160 * ------------------------------ */ 160 * ------------------------------ */
161 161
162 int CJS_GlobalArrays::Init(v8::Isolate* pIsolate) { 162 int CJS_GlobalArrays::DefineJSObjects(v8::Isolate* pIsolate) {
163 { 163 {
164 const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP"; 164 const FX_WCHAR* ArrayName = L"RE_NUMBER_ENTRY_DOT_SEP";
165 const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"}; 165 const FX_WCHAR* ArrayContent[] = {L"[+-]?\\d*\\.?\\d*"};
166 DEFINE_GLOBAL_ARRAY(pIsolate); 166 DEFINE_GLOBAL_ARRAY(pIsolate);
167 } 167 }
168 168
169 { 169 {
170 const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP"; 170 const FX_WCHAR* ArrayName = L"RE_NUMBER_COMMIT_DOT_SEP";
171 const FX_WCHAR* ArrayContent[] = { 171 const FX_WCHAR* ArrayContent[] = {
172 L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */ 172 L"[+-]?\\d+(\\.\\d+)?", /* -1.0 or -1 */
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 { 256 {
257 const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT"; 257 const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT";
258 const FX_WCHAR* ArrayContent[] = { 258 const FX_WCHAR* ArrayContent[] = {
259 L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"}; 259 L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"};
260 DEFINE_GLOBAL_ARRAY(pIsolate); 260 DEFINE_GLOBAL_ARRAY(pIsolate);
261 } 261 }
262 262
263 return 0; 263 return 0;
264 } 264 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698