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 "fpdfsdk/src/javascript/PublicMethods.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "Field.h" | 11 #include "fpdfsdk/src/javascript/Field.h" |
12 #include "JS_Context.h" | 12 #include "fpdfsdk/src/javascript/JS_Context.h" |
13 #include "JS_Define.h" | 13 #include "fpdfsdk/src/javascript/JS_Define.h" |
14 #include "JS_EventHandler.h" | 14 #include "fpdfsdk/src/javascript/JS_EventHandler.h" |
15 #include "JS_Object.h" | 15 #include "fpdfsdk/src/javascript/JS_Object.h" |
16 #include "JS_Runtime.h" | 16 #include "fpdfsdk/src/javascript/JS_Runtime.h" |
17 #include "JS_Value.h" | 17 #include "fpdfsdk/src/javascript/JS_Value.h" |
18 #include "color.h" | 18 #include "fpdfsdk/src/javascript/color.h" |
19 #include "core/include/fxcrt/fx_ext.h" | 19 #include "core/include/fxcrt/fx_ext.h" |
Tom Sepez
2016/02/17 21:32:28
*
dsinclair
2016/02/17 21:54:01
Done.
| |
20 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. | 20 #include "fpdfsdk/include/fsdk_mgr.h" // For CPDFDoc_Environment. |
21 #include "fpdfsdk/include/javascript/IJavaScript.h" | 21 #include "fpdfsdk/include/javascript/IJavaScript.h" |
22 #include "resource.h" | 22 #include "fpdfsdk/src/javascript/resource.h" |
23 #include "util.h" | 23 #include "fpdfsdk/src/javascript/util.h" |
24 | 24 |
25 #define DOUBLE_CORRECT 0.000000000000001 | 25 #define DOUBLE_CORRECT 0.000000000000001 |
26 | 26 |
27 BEGIN_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) | 27 BEGIN_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) |
28 JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Format) | 28 JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Format) |
29 JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Keystroke) | 29 JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Keystroke) |
30 JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Format) | 30 JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Format) |
31 JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Keystroke) | 31 JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Keystroke) |
32 JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_FormatEx) | 32 JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_FormatEx) |
33 JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_KeystrokeEx) | 33 JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_KeystrokeEx) |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1906 nums.SetElement(nIndex, CJS_Value(pRuntime, sPart.c_str())); | 1906 nums.SetElement(nIndex, CJS_Value(pRuntime, sPart.c_str())); |
1907 } | 1907 } |
1908 | 1908 |
1909 if (nums.GetLength() > 0) | 1909 if (nums.GetLength() > 0) |
1910 vRet = nums; | 1910 vRet = nums; |
1911 else | 1911 else |
1912 vRet.SetNull(); | 1912 vRet.SetNull(); |
1913 | 1913 |
1914 return TRUE; | 1914 return TRUE; |
1915 } | 1915 } |
OLD | NEW |