| 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 #define IDD_JS_MSGBOX 25600 | 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_RESOURCE_H_ |
| 8 #define IDD_RESPONSE 25601 | 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_RESOURCE_H_ |
| 9 #define IDC_JS_MSG_TEXT 25602 | 9 |
| 10 #define ID_JS_MSG_OK 25603 | 10 #include "../../../core/include/fxcrt/fx_basic.h" // For CFX_WideString. |
| 11 #define ID_JS_MSG_CANCEL 25604 | 11 #include "../fsdk_define.h" // For FX_UINT. |
| 12 #define IDC_JS_MSG_ICON 25605 | 12 |
| 13 #define ID_JS_MSG_YES 25606 | 13 class CJS_Context; |
| 14 #define ID_JS_MSG_NO 25607 | 14 |
| 15 #define IDC_JS_QUESTION 25608 | |
| 16 #define ID_JS_OK 25609 | |
| 17 #define ID_JS_CANCEL 25610 | |
| 18 #define IDC_JS_ANSWER 25611 | |
| 19 #define IDC_JS_EDIT 25612 | |
| 20 #define IDS_STRING_JSALERT 25613 | 15 #define IDS_STRING_JSALERT 25613 |
| 21 #define IDS_STRING_JSPARAMERROR 25614 | 16 #define IDS_STRING_JSPARAMERROR 25614 |
| 22 #define IDS_STRING_JSAFNUMBER_KEYSTROKE 25615 | 17 #define IDS_STRING_JSAFNUMBER_KEYSTROKE 25615 |
| 23 #define IDS_STRING_JSINPUTERROR 25616 | |
| 24 #define IDS_STRING_JSPARAM_TOOLONG 25617 | 18 #define IDS_STRING_JSPARAM_TOOLONG 25617 |
| 25 #define IDS_STRING_JSPARSEDATE 25618 | 19 #define IDS_STRING_JSPARSEDATE 25618 |
| 26 #define IDS_STRING_JSRANGE1 25619 | 20 #define IDS_STRING_JSRANGE1 25619 |
| 27 #define IDS_STRING_JSRANGE2 25620 | 21 #define IDS_STRING_JSRANGE2 25620 |
| 28 #define IDS_STRING_JSRANGE3 25621 | 22 #define IDS_STRING_JSRANGE3 25621 |
| 29 #define IDS_STRING_JSRANGE4 25622 | |
| 30 #define IDS_STRING_FILEOPENFAIL 25623 | |
| 31 #define IDS_STRING_JSATTENTION 25624 | |
| 32 #define IDS_STRING_JSSUBMITS 25625 | |
| 33 #define IDS_STRING_JSSUBMITF 25626 | |
| 34 #define IDS_STRING_NOTSUPPORT 25627 | 23 #define IDS_STRING_NOTSUPPORT 25627 |
| 35 #define IDS_STRING_JSBUSY 25628 | 24 #define IDS_STRING_JSBUSY 25628 |
| 36 #define IDS_STRING_JSEVENT 25629 | 25 #define IDS_STRING_JSEVENT 25629 |
| 37 #define IDS_STRING_RUN 25630 | 26 #define IDS_STRING_RUN 25630 |
| 38 #define IDS_STRING_UNHANDLED 25631 | |
| 39 #define IDS_STRING_JSPRINT1 25632 | 27 #define IDS_STRING_JSPRINT1 25632 |
| 40 #define IDS_STRING_JSPRINT2 25633 | 28 #define IDS_STRING_JSPRINT2 25633 |
| 41 #define IDS_STRING_LAUNCHURL 25634 | |
| 42 #define IDS_JSPARAM_INCORRECT 25635 | 29 #define IDS_JSPARAM_INCORRECT 25635 |
| 43 #define IDD_JS_CONSOLE 25636 | |
| 44 #define IDS_STRING_SAFEMODEL 25636 | |
| 45 #define IDC_EDTSCRIPT 25637 | |
| 46 #define IDC_BTNCLEAR 25638 | |
| 47 #define IDC_EDTOUTPUT 25639 | |
| 48 #define IDC_CHECK_TIPS 25640 | |
| 49 #define IDC_BTNRUN 25641 | |
| 50 | 30 |
| 31 CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id); |
| 51 | 32 |
| 52 | 33 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_RESOURCE_H_ |
| 53 static CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT ID) | |
| 54 { | |
| 55 » switch(ID) | |
| 56 » { | |
| 57 » case IDS_STRING_JSALERT: | |
| 58 » » return L"Alert"; | |
| 59 » case IDS_STRING_JSPARAMERROR: | |
| 60 return L"The amount of parameters is not correct !";» | |
| 61 » case IDS_STRING_JSAFNUMBER_KEYSTROKE: | |
| 62 » » return L"The input value is invalid."; | |
| 63 » case» IDS_STRING_JSINPUTERROR: | |
| 64 return L"Input error !"; | |
| 65 » case» IDS_STRING_JSPARAM_TOOLONG: | |
| 66 » » return L"The value you are going to input is too long."; | |
| 67 » case» IDS_STRING_JSPARSEDATE: | |
| 68 » » return L"The input string can't be parsed to a valid date time (
%s)."; | |
| 69 » case» IDS_STRING_JSRANGE1: | |
| 70 » » return L"Invalid value: must be greater or equal to %s and less
than or equal to %s.";» | |
| 71 » case» IDS_STRING_JSRANGE2: | |
| 72 » » return L"Invalid value: must be greater or equal to %s."; | |
| 73 » case» IDS_STRING_JSRANGE3: | |
| 74 » » return L"Invalid value: must be less than or equal to %s."; | |
| 75 » case» IDS_STRING_JSRANGE4: | |
| 76 » » return L"Range Error";» | |
| 77 » case» IDS_STRING_FILEOPENFAIL: | |
| 78 return L"Opening file failed."; | |
| 79 » case» IDS_STRING_JSATTENTION: | |
| 80 » » return L"Attention";» | |
| 81 » case» IDS_STRING_JSSUBMITS: | |
| 82 » » return L"Submit form successfully!"; | |
| 83 » case» IDS_STRING_JSSUBMITF: | |
| 84 » » return L"Submit form failed!";» | |
| 85 » case» IDS_STRING_NOTSUPPORT: | |
| 86 » » return L"Not supported."; | |
| 87 » case» IDS_STRING_JSBUSY: | |
| 88 » » return L"System is busy!";» | |
| 89 » case» IDS_STRING_JSEVENT: | |
| 90 » » return L"The event of the formfield exists!";» | |
| 91 » case» IDS_STRING_RUN: | |
| 92 » » return L"It runs successfully."; | |
| 93 » case» IDS_STRING_UNHANDLED: | |
| 94 » » return L"An unhandled error!"; | |
| 95 » case» IDS_STRING_JSPRINT1: | |
| 96 » » return L"The second parameter can't convert to Date!"; | |
| 97 » case» IDS_STRING_JSPRINT2: | |
| 98 » » return L"The second parameter isn't a valid Date!"; | |
| 99 » case» IDS_STRING_LAUNCHURL: | |
| 100 » » return L"The Document is trying to connect to \r\n%s\r\nIf you t
rust the site, choose OK. If you don't trust the site, choose Cancel.";» | |
| 101 » case» IDS_JSPARAM_INCORRECT: | |
| 102 » » return L"The parameter you inputted is incorrect!"; | |
| 103 » case» IDS_STRING_SAFEMODEL: | |
| 104 » » return L"Secure reading mode"; | |
| 105 » default: | |
| 106 » » return L""; | |
| 107 | |
| 108 » } | |
| 109 } | |
| 110 | |
| OLD | NEW |