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 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2081 nums.SetElement(nIndex, CJS_Value(pRuntime, sPart.c_str())); | 2081 nums.SetElement(nIndex, CJS_Value(pRuntime, sPart.c_str())); |
2082 } | 2082 } |
2083 | 2083 |
2084 if (nums.GetLength() > 0) | 2084 if (nums.GetLength() > 0) |
2085 vRet = nums; | 2085 vRet = nums; |
2086 else | 2086 else |
2087 vRet.SetNull(); | 2087 vRet.SetNull(); |
2088 | 2088 |
2089 return TRUE; | 2089 return TRUE; |
2090 } | 2090 } |
OLD | NEW |