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 "PublicMethods.h" | 7 #include "PublicMethods.h" |
8 | 8 |
9 #include "../../include/fsdk_mgr.h" // For CPDFDoc_Environment. | |
10 #include "../../include/javascript/IJavaScript.h" | |
11 #include "Field.h" | 9 #include "Field.h" |
12 #include "JS_Context.h" | 10 #include "JS_Context.h" |
13 #include "JS_Define.h" | 11 #include "JS_Define.h" |
14 #include "JS_EventHandler.h" | 12 #include "JS_EventHandler.h" |
15 #include "JS_Object.h" | 13 #include "JS_Object.h" |
16 #include "JS_Runtime.h" | 14 #include "JS_Runtime.h" |
17 #include "JS_Value.h" | 15 #include "JS_Value.h" |
18 #include "color.h" | 16 #include "color.h" |
| 17 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. |
| 18 #include "fpdfsdk/include/javascript/IJavaScript.h" |
19 #include "resource.h" | 19 #include "resource.h" |
20 #include "util.h" | 20 #include "util.h" |
21 | 21 |
22 #define DOUBLE_CORRECT 0.000000000000001 | 22 #define DOUBLE_CORRECT 0.000000000000001 |
23 | 23 |
24 BEGIN_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) | 24 BEGIN_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) |
25 JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Format) | 25 JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Format) |
26 JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Keystroke) | 26 JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Keystroke) |
27 JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Format) | 27 JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Format) |
28 JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Keystroke) | 28 JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Keystroke) |
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2089 nums.SetElement(nIndex, CJS_Value(pRuntime, sPart.c_str())); | 2089 nums.SetElement(nIndex, CJS_Value(pRuntime, sPart.c_str())); |
2090 } | 2090 } |
2091 | 2091 |
2092 if (nums.GetLength() > 0) | 2092 if (nums.GetLength() > 0) |
2093 vRet = nums; | 2093 vRet = nums; |
2094 else | 2094 else |
2095 vRet.SetNull(); | 2095 vRet.SetNull(); |
2096 | 2096 |
2097 return TRUE; | 2097 return TRUE; |
2098 } | 2098 } |
OLD | NEW |