| 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_INCLUDE_JAVASCRIPT_PUBLICMETHODS_H_ | 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_PUBLICMETHODS_H_ |
| 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_PUBLICMETHODS_H_ | 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_PUBLICMETHODS_H_ |
| 9 | 9 |
| 10 #include "JS_Define.h" | 10 #include "JS_Define.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 JS_STATIC_GLOBAL_FUN(AFParseDateEx); | 63 JS_STATIC_GLOBAL_FUN(AFParseDateEx); |
| 64 JS_STATIC_GLOBAL_FUN(AFExtractNums); | 64 JS_STATIC_GLOBAL_FUN(AFExtractNums); |
| 65 | 65 |
| 66 JS_STATIC_DECLARE_GLOBAL_FUN(); | 66 JS_STATIC_DECLARE_GLOBAL_FUN(); |
| 67 | 67 |
| 68 public: | 68 public: |
| 69 static int ParseStringInteger(const CFX_Wid
eString & string,int nStart,int & nSkip, int nMaxStep); | 69 static int ParseStringInteger(const CFX_Wid
eString & string,int nStart,int & nSkip, int nMaxStep); |
| 70 static CFX_WideString ParseStringString(const CFX_WideString& string,
int nStart, int& nSkip); | 70 static CFX_WideString ParseStringString(const CFX_WideString& string,
int nStart, int& nSkip); |
| 71 static double MakeRegularDate(const CFX_WideString & v
alue,const CFX_WideString & format, FX_BOOL& bWrongFormat); | 71 static double MakeRegularDate(const CFX_WideString & v
alue,const CFX_WideString & format, FX_BOOL& bWrongFormat); |
| 72 static CFX_WideString MakeFormatDate(double dDate,const CFX_WideString
& format); | 72 static CFX_WideString MakeFormatDate(double dDate,const CFX_WideString
& format); |
| 73 » static FX_BOOL» » » ConvertStringToNumber(FX_LPCWSTR swSourc
e, double & dRet, FX_BOOL & bDot); | 73 » static FX_BOOL» » » ConvertStringToNumber(const FX_WCHAR* sw
Source, double & dRet, FX_BOOL & bDot); |
| 74 » static double» » » ParseStringToNumber(FX_LPCWSTR swSource)
; | 74 » static double» » » ParseStringToNumber(const FX_WCHAR* swSo
urce); |
| 75 static double ParseNormalDate(const CFX_WideString & v
alue, FX_BOOL& bWrongFormat); | 75 static double ParseNormalDate(const CFX_WideString & v
alue, FX_BOOL& bWrongFormat); |
| 76 static double MakeInterDate(CFX_WideString strValue); | 76 static double MakeInterDate(CFX_WideString strValue); |
| 77 » static double» » » ParseNumber(FX_LPCWSTR swSource, FX_BOOL
& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS); | 77 » static double» » » ParseNumber(const FX_WCHAR* swSource, FX
_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS); |
| 78 | 78 |
| 79 public: | 79 public: |
| 80 » static CFX_WideString» StrLTrim(FX_LPCWSTR pStr); | 80 » static CFX_WideString» StrLTrim(const FX_WCHAR* pStr); |
| 81 » static CFX_WideString» StrRTrim(FX_LPCWSTR pStr); | 81 » static CFX_WideString» StrRTrim(const FX_WCHAR* pStr); |
| 82 » static CFX_WideString» StrTrim(FX_LPCWSTR pStr); | 82 » static CFX_WideString» StrTrim(const FX_WCHAR* pStr); |
| 83 | 83 |
| 84 » static CFX_ByteString» StrLTrim(FX_LPCSTR pStr); | 84 » static CFX_ByteString» StrLTrim(const FX_CHAR* pStr); |
| 85 » static CFX_ByteString» StrRTrim(FX_LPCSTR pStr); | 85 » static CFX_ByteString» StrRTrim(const FX_CHAR* pStr); |
| 86 » static CFX_ByteString» StrTrim(FX_LPCSTR pStr); | 86 » static CFX_ByteString» StrTrim(const FX_CHAR* pStr); |
| 87 | 87 |
| 88 » static FX_BOOL» » » IsNumber(FX_LPCSTR string); | 88 » static FX_BOOL» » » IsNumber(const FX_CHAR* string); |
| 89 » static FX_BOOL» » » IsNumber(FX_LPCWSTR string); | 89 » static FX_BOOL» » » IsNumber(const FX_WCHAR* string); |
| 90 | 90 |
| 91 static FX_BOOL IsDigit(char ch); | 91 static FX_BOOL IsDigit(char ch); |
| 92 static FX_BOOL IsDigit(wchar_t ch); | 92 static FX_BOOL IsDigit(wchar_t ch); |
| 93 static FX_BOOL IsAlphabetic(wchar_t ch); | 93 static FX_BOOL IsAlphabetic(wchar_t ch); |
| 94 static FX_BOOL IsAlphaNumeric(wchar_t ch); | 94 static FX_BOOL IsAlphaNumeric(wchar_t ch); |
| 95 | 95 |
| 96 static FX_BOOL maskSatisfied(wchar_t c_Change,wchar_t c
_Mask); | 96 static FX_BOOL maskSatisfied(wchar_t c_Change,wchar_t c
_Mask); |
| 97 static FX_BOOL isReservedMaskChar(wchar_t ch); | 97 static FX_BOOL isReservedMaskChar(wchar_t ch); |
| 98 | 98 |
| 99 » static double» » » AF_Simple(FX_LPCWSTR sFuction, double dV
alue1, double dValue2); | 99 » static double» » » AF_Simple(const FX_WCHAR* sFuction, doub
le dValue1, double dValue2); |
| 100 static CJS_Array AF_MakeArrayFromList(v8::Isolate* isolat
e, CJS_Value val); | 100 static CJS_Array AF_MakeArrayFromList(v8::Isolate* isolat
e, CJS_Value val); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_PUBLICMETHODS_H_ | 103 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_PUBLICMETHODS_H_ |
| OLD | NEW |