| 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 "../../include/javascript/JavaScript.h" | 7 #include "../../include/javascript/JavaScript.h" | 
| 8 #include "../../include/javascript/IJavaScript.h" | 8 #include "../../include/javascript/IJavaScript.h" | 
| 9 #include "../../include/javascript/JS_Define.h" | 9 #include "../../include/javascript/JS_Define.h" | 
| 10 #include "../../include/javascript/JS_Object.h" | 10 #include "../../include/javascript/JS_Object.h" | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 29 | 29 | 
| 30         return pRuntime->GetIsolate(); | 30         return pRuntime->GetIsolate(); | 
| 31 } | 31 } | 
| 32 | 32 | 
| 33 | 33 | 
| 34 /* -------------------------------- CJS_PublicMethods --------------------------
      ------ */ | 34 /* -------------------------------- CJS_PublicMethods --------------------------
      ------ */ | 
| 35 | 35 | 
| 36 #define DOUBLE_CORRECT  0.000000000000001 | 36 #define DOUBLE_CORRECT  0.000000000000001 | 
| 37 | 37 | 
| 38 BEGIN_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) | 38 BEGIN_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) | 
| 39 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Format,6) | 39 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Format) | 
| 40 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Keystroke,6) | 40 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFNumber_Keystroke) | 
| 41 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Format,2) | 41 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Format) | 
| 42 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Keystroke,2) | 42 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFPercent_Keystroke) | 
| 43 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_FormatEx,1) | 43 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_FormatEx) | 
| 44 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_KeystrokeEx,1) | 44 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_KeystrokeEx) | 
| 45 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_Format,1) | 45 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_Format) | 
| 46 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_Keystroke,1) | 46 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFDate_Keystroke) | 
| 47 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_FormatEx,1) | 47 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_FormatEx) | 
| 48 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_KeystrokeEx,1) | 48 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_KeystrokeEx) | 
| 49 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_Format,1) | 49 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_Format) | 
| 50 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_Keystroke,1) | 50 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFTime_Keystroke) | 
| 51 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_Format,1) | 51 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_Format) | 
| 52 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_Keystroke,1) | 52 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_Keystroke) | 
| 53 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_KeystrokeEx,1) | 53 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSpecial_KeystrokeEx) | 
| 54 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSimple,3) | 54 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSimple) | 
| 55 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFMakeNumber,1) | 55 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFMakeNumber) | 
| 56 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSimple_Calculate,2) | 56 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFSimple_Calculate) | 
| 57 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFRange_Validate,4) | 57 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFRange_Validate) | 
| 58 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFMergeChange,1) | 58 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFMergeChange) | 
| 59 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFParseDateEx,2) | 59 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFParseDateEx) | 
| 60 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFExtractNums,1) | 60 »       JS_STATIC_GLOBAL_FUN_ENTRY(AFExtractNums) | 
| 61 END_JS_STATIC_GLOBAL_FUN() | 61 END_JS_STATIC_GLOBAL_FUN() | 
| 62 | 62 | 
| 63 IMPLEMENT_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) | 63 IMPLEMENT_JS_STATIC_GLOBAL_FUN(CJS_PublicMethods) | 
| 64 | 64 | 
| 65 struct stru_TbConvert | 65 struct stru_TbConvert | 
| 66 { | 66 { | 
| 67         FX_LPCSTR lpszJSMark; | 67         FX_LPCSTR lpszJSMark; | 
| 68         FX_LPCSTR lpszCppMark; | 68         FX_LPCSTR lpszCppMark; | 
| 69 }; | 69 }; | 
| 70 | 70 | 
| (...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2300                 nums.SetElement(nIndex,CJS_Value(isolate,sPart.c_str())); | 2300                 nums.SetElement(nIndex,CJS_Value(isolate,sPart.c_str())); | 
| 2301         } | 2301         } | 
| 2302 | 2302 | 
| 2303         if (nums.GetLength() > 0) | 2303         if (nums.GetLength() > 0) | 
| 2304                 vRet = nums; | 2304                 vRet = nums; | 
| 2305         else | 2305         else | 
| 2306                 vRet.SetNull(); | 2306                 vRet.SetNull(); | 
| 2307 | 2307 | 
| 2308         return TRUE; | 2308         return TRUE; | 
| 2309 } | 2309 } | 
| OLD | NEW | 
|---|