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/javascript/resource.h" | 7 #include "fpdfsdk/javascript/resource.h" |
8 | 8 |
9 CFX_WideString JSGetStringFromID(FX_UINT id) { | 9 CFX_WideString JSGetStringFromID(uint32_t id) { |
10 switch (id) { | 10 switch (id) { |
11 case IDS_STRING_JSALERT: | 11 case IDS_STRING_JSALERT: |
12 return L"Alert"; | 12 return L"Alert"; |
13 case IDS_STRING_JSPARAMERROR: | 13 case IDS_STRING_JSPARAMERROR: |
14 return L"Incorrect number of parameters passed to function."; | 14 return L"Incorrect number of parameters passed to function."; |
15 case IDS_STRING_JSAFNUMBER_KEYSTROKE: | 15 case IDS_STRING_JSAFNUMBER_KEYSTROKE: |
16 return L"The input value is invalid."; | 16 return L"The input value is invalid."; |
17 case IDS_STRING_JSPARAM_TOOLONG: | 17 case IDS_STRING_JSPARAM_TOOLONG: |
18 return L"The input value is too long."; | 18 return L"The input value is too long."; |
19 case IDS_STRING_JSPARSEDATE: | 19 case IDS_STRING_JSPARSEDATE: |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const CFX_WideString& details) { | 59 const CFX_WideString& details) { |
60 CFX_WideString result = CFX_WideString::FromLocal(class_name); | 60 CFX_WideString result = CFX_WideString::FromLocal(class_name); |
61 if (property_name) { | 61 if (property_name) { |
62 result += L"."; | 62 result += L"."; |
63 result += CFX_WideString::FromLocal(property_name); | 63 result += CFX_WideString::FromLocal(property_name); |
64 } | 64 } |
65 result += L": "; | 65 result += L": "; |
66 result += details; | 66 result += details; |
67 return result; | 67 return result; |
68 } | 68 } |
OLD | NEW |