| 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 #ifndef FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_ | 7 #ifndef FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_ |
| 8 #define FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_ | 8 #define FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_ |
| 9 | 9 |
| 10 #include "JS_Define.h" | 10 #include "JS_Define.h" |
| 11 | 11 |
| 12 class CJS_PublicMethods : public CJS_Object { | 12 class CJS_PublicMethods : public CJS_Object { |
| 13 public: | 13 public: |
| 14 CJS_PublicMethods(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} | 14 CJS_PublicMethods(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} |
| 15 ~CJS_PublicMethods() override {} | 15 ~CJS_PublicMethods() override {} |
| 16 | 16 |
| 17 public: | 17 public: |
| 18 static FX_BOOL AFNumber_Format(IFXJS_Context* cc, | 18 static FX_BOOL AFNumber_Format(IJS_Context* cc, |
| 19 const CJS_Parameters& params, | 19 const CJS_Parameters& params, |
| 20 CJS_Value& vRet, | 20 CJS_Value& vRet, |
| 21 CFX_WideString& sError); | 21 CFX_WideString& sError); |
| 22 static FX_BOOL AFNumber_Keystroke(IFXJS_Context* cc, | 22 static FX_BOOL AFNumber_Keystroke(IJS_Context* cc, |
| 23 const CJS_Parameters& params, | 23 const CJS_Parameters& params, |
| 24 CJS_Value& vRet, | 24 CJS_Value& vRet, |
| 25 CFX_WideString& sError); | 25 CFX_WideString& sError); |
| 26 static FX_BOOL AFPercent_Format(IFXJS_Context* cc, | 26 static FX_BOOL AFPercent_Format(IJS_Context* cc, |
| 27 const CJS_Parameters& params, | 27 const CJS_Parameters& params, |
| 28 CJS_Value& vRet, | 28 CJS_Value& vRet, |
| 29 CFX_WideString& sError); | 29 CFX_WideString& sError); |
| 30 static FX_BOOL AFPercent_Keystroke(IFXJS_Context* cc, | 30 static FX_BOOL AFPercent_Keystroke(IJS_Context* cc, |
| 31 const CJS_Parameters& params, | 31 const CJS_Parameters& params, |
| 32 CJS_Value& vRet, | 32 CJS_Value& vRet, |
| 33 CFX_WideString& sError); | 33 CFX_WideString& sError); |
| 34 static FX_BOOL AFDate_FormatEx(IFXJS_Context* cc, | 34 static FX_BOOL AFDate_FormatEx(IJS_Context* cc, |
| 35 const CJS_Parameters& params, | 35 const CJS_Parameters& params, |
| 36 CJS_Value& vRet, | 36 CJS_Value& vRet, |
| 37 CFX_WideString& sError); | 37 CFX_WideString& sError); |
| 38 static FX_BOOL AFDate_KeystrokeEx(IFXJS_Context* cc, | 38 static FX_BOOL AFDate_KeystrokeEx(IJS_Context* cc, |
| 39 const CJS_Parameters& params, | 39 const CJS_Parameters& params, |
| 40 CJS_Value& vRet, | 40 CJS_Value& vRet, |
| 41 CFX_WideString& sError); | 41 CFX_WideString& sError); |
| 42 static FX_BOOL AFDate_Format(IFXJS_Context* cc, | 42 static FX_BOOL AFDate_Format(IJS_Context* cc, |
| 43 const CJS_Parameters& params, | 43 const CJS_Parameters& params, |
| 44 CJS_Value& vRet, | 44 CJS_Value& vRet, |
| 45 CFX_WideString& sError); | 45 CFX_WideString& sError); |
| 46 static FX_BOOL AFDate_Keystroke(IFXJS_Context* cc, | 46 static FX_BOOL AFDate_Keystroke(IJS_Context* cc, |
| 47 const CJS_Parameters& params, | 47 const CJS_Parameters& params, |
| 48 CJS_Value& vRet, | 48 CJS_Value& vRet, |
| 49 CFX_WideString& sError); | 49 CFX_WideString& sError); |
| 50 static FX_BOOL AFTime_FormatEx(IFXJS_Context* cc, | 50 static FX_BOOL AFTime_FormatEx(IJS_Context* cc, |
| 51 const CJS_Parameters& params, | 51 const CJS_Parameters& params, |
| 52 CJS_Value& vRet, | 52 CJS_Value& vRet, |
| 53 CFX_WideString& sError); // | 53 CFX_WideString& sError); // |
| 54 static FX_BOOL AFTime_KeystrokeEx(IFXJS_Context* cc, | 54 static FX_BOOL AFTime_KeystrokeEx(IJS_Context* cc, |
| 55 const CJS_Parameters& params, | 55 const CJS_Parameters& params, |
| 56 CJS_Value& vRet, | 56 CJS_Value& vRet, |
| 57 CFX_WideString& sError); | 57 CFX_WideString& sError); |
| 58 static FX_BOOL AFTime_Format(IFXJS_Context* cc, | 58 static FX_BOOL AFTime_Format(IJS_Context* cc, |
| 59 const CJS_Parameters& params, | 59 const CJS_Parameters& params, |
| 60 CJS_Value& vRet, | 60 CJS_Value& vRet, |
| 61 CFX_WideString& sError); | 61 CFX_WideString& sError); |
| 62 static FX_BOOL AFTime_Keystroke(IFXJS_Context* cc, | 62 static FX_BOOL AFTime_Keystroke(IJS_Context* cc, |
| 63 const CJS_Parameters& params, | 63 const CJS_Parameters& params, |
| 64 CJS_Value& vRet, | 64 CJS_Value& vRet, |
| 65 CFX_WideString& sError); | 65 CFX_WideString& sError); |
| 66 static FX_BOOL AFSpecial_Format(IFXJS_Context* cc, | 66 static FX_BOOL AFSpecial_Format(IJS_Context* cc, |
| 67 const CJS_Parameters& params, | 67 const CJS_Parameters& params, |
| 68 CJS_Value& vRet, | 68 CJS_Value& vRet, |
| 69 CFX_WideString& sError); | 69 CFX_WideString& sError); |
| 70 static FX_BOOL AFSpecial_Keystroke(IFXJS_Context* cc, | 70 static FX_BOOL AFSpecial_Keystroke(IJS_Context* cc, |
| 71 const CJS_Parameters& params, | 71 const CJS_Parameters& params, |
| 72 CJS_Value& vRet, | 72 CJS_Value& vRet, |
| 73 CFX_WideString& sError); | 73 CFX_WideString& sError); |
| 74 static FX_BOOL AFSpecial_KeystrokeEx(IFXJS_Context* cc, | 74 static FX_BOOL AFSpecial_KeystrokeEx(IJS_Context* cc, |
| 75 const CJS_Parameters& params, | 75 const CJS_Parameters& params, |
| 76 CJS_Value& vRet, | 76 CJS_Value& vRet, |
| 77 CFX_WideString& sError); // | 77 CFX_WideString& sError); // |
| 78 static FX_BOOL AFSimple(IFXJS_Context* cc, | 78 static FX_BOOL AFSimple(IJS_Context* cc, |
| 79 const CJS_Parameters& params, | 79 const CJS_Parameters& params, |
| 80 CJS_Value& vRet, | 80 CJS_Value& vRet, |
| 81 CFX_WideString& sError); | 81 CFX_WideString& sError); |
| 82 static FX_BOOL AFMakeNumber(IFXJS_Context* cc, | 82 static FX_BOOL AFMakeNumber(IJS_Context* cc, |
| 83 const CJS_Parameters& params, | 83 const CJS_Parameters& params, |
| 84 CJS_Value& vRet, | 84 CJS_Value& vRet, |
| 85 CFX_WideString& sError); | 85 CFX_WideString& sError); |
| 86 static FX_BOOL AFSimple_Calculate(IFXJS_Context* cc, | 86 static FX_BOOL AFSimple_Calculate(IJS_Context* cc, |
| 87 const CJS_Parameters& params, | 87 const CJS_Parameters& params, |
| 88 CJS_Value& vRet, | 88 CJS_Value& vRet, |
| 89 CFX_WideString& sError); | 89 CFX_WideString& sError); |
| 90 static FX_BOOL AFRange_Validate(IFXJS_Context* cc, | 90 static FX_BOOL AFRange_Validate(IJS_Context* cc, |
| 91 const CJS_Parameters& params, | 91 const CJS_Parameters& params, |
| 92 CJS_Value& vRet, | 92 CJS_Value& vRet, |
| 93 CFX_WideString& sError); | 93 CFX_WideString& sError); |
| 94 static FX_BOOL AFMergeChange(IFXJS_Context* cc, | 94 static FX_BOOL AFMergeChange(IJS_Context* cc, |
| 95 const CJS_Parameters& params, | 95 const CJS_Parameters& params, |
| 96 CJS_Value& vRet, | 96 CJS_Value& vRet, |
| 97 CFX_WideString& sError); | 97 CFX_WideString& sError); |
| 98 static FX_BOOL AFParseDateEx(IFXJS_Context* cc, | 98 static FX_BOOL AFParseDateEx(IJS_Context* cc, |
| 99 const CJS_Parameters& params, | 99 const CJS_Parameters& params, |
| 100 CJS_Value& vRet, | 100 CJS_Value& vRet, |
| 101 CFX_WideString& sError); | 101 CFX_WideString& sError); |
| 102 static FX_BOOL AFExtractNums(IFXJS_Context* cc, | 102 static FX_BOOL AFExtractNums(IJS_Context* cc, |
| 103 const CJS_Parameters& params, | 103 const CJS_Parameters& params, |
| 104 CJS_Value& vRet, | 104 CJS_Value& vRet, |
| 105 CFX_WideString& sError); | 105 CFX_WideString& sError); |
| 106 | 106 |
| 107 public: | 107 public: |
| 108 JS_STATIC_GLOBAL_FUN(AFNumber_Format); | 108 JS_STATIC_GLOBAL_FUN(AFNumber_Format); |
| 109 JS_STATIC_GLOBAL_FUN(AFNumber_Keystroke); | 109 JS_STATIC_GLOBAL_FUN(AFNumber_Keystroke); |
| 110 JS_STATIC_GLOBAL_FUN(AFPercent_Format); | 110 JS_STATIC_GLOBAL_FUN(AFPercent_Format); |
| 111 JS_STATIC_GLOBAL_FUN(AFPercent_Keystroke); | 111 JS_STATIC_GLOBAL_FUN(AFPercent_Keystroke); |
| 112 JS_STATIC_GLOBAL_FUN(AFDate_FormatEx); | 112 JS_STATIC_GLOBAL_FUN(AFDate_FormatEx); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 static FX_BOOL maskSatisfied(wchar_t c_Change, wchar_t c_Mask); | 176 static FX_BOOL maskSatisfied(wchar_t c_Change, wchar_t c_Mask); |
| 177 static FX_BOOL isReservedMaskChar(wchar_t ch); | 177 static FX_BOOL isReservedMaskChar(wchar_t ch); |
| 178 | 178 |
| 179 static double AF_Simple(const FX_WCHAR* sFuction, | 179 static double AF_Simple(const FX_WCHAR* sFuction, |
| 180 double dValue1, | 180 double dValue1, |
| 181 double dValue2); | 181 double dValue2); |
| 182 static CJS_Array AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Value val); | 182 static CJS_Array AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Value val); |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 #endif // FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_ | 185 #endif // FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_ |
| OLD | NEW |