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/resource.h" | 7 #include "fpdfsdk/javascript/resource.h" |
8 | 8 |
9 CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT id) { | 9 CFX_WideString JSGetStringFromID(CJS_Context* pContext, FX_UINT 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: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 const CFX_WideString& details) { | 55 const CFX_WideString& details) { |
56 CFX_WideString result = CFX_WideString::FromLocal(class_name); | 56 CFX_WideString result = CFX_WideString::FromLocal(class_name); |
57 if (property_name) { | 57 if (property_name) { |
58 result += L"."; | 58 result += L"."; |
59 result += CFX_WideString::FromLocal(property_name); | 59 result += CFX_WideString::FromLocal(property_name); |
60 } | 60 } |
61 result += L": "; | 61 result += L": "; |
62 result += details; | 62 result += details; |
63 return result; | 63 return result; |
64 } | 64 } |
OLD | NEW |