| 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 "fpdfsdk/src/javascript/Consts.h" | 7 #include "fpdfsdk/src/javascript/Consts.h" |
| 8 | 8 |
| 9 #include "fpdfsdk/include/javascript/IJavaScript.h" | 9 #include "fpdfsdk/include/javascript/IJavaScript.h" |
| 10 #include "fpdfsdk/src/javascript/JS_Define.h" | 10 #include "fpdfsdk/src/javascript/JS_Define.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 { | 242 { |
| 243 const FX_WCHAR* ArrayName = L"RE_ZIP4_COMMIT"; | 243 const FX_WCHAR* ArrayName = L"RE_ZIP4_COMMIT"; |
| 244 const FX_WCHAR* ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"}; | 244 const FX_WCHAR* ArrayContent[] = {L"\\d{5}(\\.|[- ])?\\d{4}"}; |
| 245 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, | 245 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, |
| 246 FX_ArraySize(ArrayContent)); | 246 FX_ArraySize(ArrayContent)); |
| 247 } | 247 } |
| 248 | 248 |
| 249 { | 249 { |
| 250 const FX_WCHAR* ArrayName = L"RE_PHONE_ENTRY"; | 250 const FX_WCHAR* ArrayName = L"RE_PHONE_ENTRY"; |
| 251 const FX_WCHAR* ArrayContent[] = { | 251 const FX_WCHAR* ArrayContent[] = { |
| 252 L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 555-1234 or 408 | 252 L"\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", // 555-1234 or 408 |
| 253 555-1234 */ | 253 // 555-1234 |
| 254 L"\\(\\d{0,3}", /* (408 */ | 254 L"\\(\\d{0,3}", // (408 |
| 255 L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408) | 255 L"\\(\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", // (408) |
| 256 555-1234 */ | 256 // 555-1234 |
| 257 /* (allow the addition of parens as an afterthought) */ | 257 // (allow the addition of parens as an afterthought) |
| 258 L"\\(\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* (408 555-1234 | 258 L"\\(\\d{0,3}(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", // (408 555-1234 |
| 259 */ | 259 |
| 260 L"\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", /* 408) 555-1234 | 260 L"\\d{0,3}\\)(\\.|[- ])?\\d{0,3}(\\.|[- ])?\\d{0,4}", // 408) 555-1234 |
| 261 */ | 261 |
| 262 L"011(\\.|[- \\d])*" /* international */ | 262 L"011(\\.|[- \\d])*" // international |
| 263 }; | 263 }; |
| 264 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, | 264 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, |
| 265 FX_ArraySize(ArrayContent)); | 265 FX_ArraySize(ArrayContent)); |
| 266 } | 266 } |
| 267 | 267 |
| 268 { | 268 { |
| 269 const FX_WCHAR* ArrayName = L"RE_PHONE_COMMIT"; | 269 const FX_WCHAR* ArrayName = L"RE_PHONE_COMMIT"; |
| 270 const FX_WCHAR* ArrayContent[] = { | 270 const FX_WCHAR* ArrayContent[] = { |
| 271 L"\\d{3}(\\.|[- ])?\\d{4}", /* 555-1234 */ | 271 L"\\d{3}(\\.|[- ])?\\d{4}", // 555-1234 |
| 272 L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* 408 555-1234 */ | 272 L"\\d{3}(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", // 408 555-1234 |
| 273 L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", /* (408) 555-1234 */ | 273 L"\\(\\d{3}\\)(\\.|[- ])?\\d{3}(\\.|[- ])?\\d{4}", // (408) 555-1234 |
| 274 L"011(\\.|[- \\d])*" /* international */ | 274 L"011(\\.|[- \\d])*" // international |
| 275 }; | 275 }; |
| 276 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, | 276 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, |
| 277 FX_ArraySize(ArrayContent)); | 277 FX_ArraySize(ArrayContent)); |
| 278 } | 278 } |
| 279 | 279 |
| 280 { | 280 { |
| 281 const FX_WCHAR* ArrayName = L"RE_SSN_ENTRY"; | 281 const FX_WCHAR* ArrayName = L"RE_SSN_ENTRY"; |
| 282 const FX_WCHAR* ArrayContent[] = { | 282 const FX_WCHAR* ArrayContent[] = { |
| 283 L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"}; | 283 L"\\d{0,3}(\\.|[- ])?\\d{0,2}(\\.|[- ])?\\d{0,4}"}; |
| 284 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, | 284 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, |
| 285 FX_ArraySize(ArrayContent)); | 285 FX_ArraySize(ArrayContent)); |
| 286 } | 286 } |
| 287 | 287 |
| 288 { | 288 { |
| 289 const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT"; | 289 const FX_WCHAR* ArrayName = L"RE_SSN_COMMIT"; |
| 290 const FX_WCHAR* ArrayContent[] = { | 290 const FX_WCHAR* ArrayContent[] = { |
| 291 L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"}; | 291 L"\\d{3}(\\.|[- ])?\\d{2}(\\.|[- ])?\\d{4}"}; |
| 292 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, | 292 DefineGlobalConstStringArray(pRuntime, ArrayName, ArrayContent, |
| 293 FX_ArraySize(ArrayContent)); | 293 FX_ArraySize(ArrayContent)); |
| 294 } | 294 } |
| 295 } | 295 } |
| OLD | NEW |