| 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" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 int& nSkip, | 137 int& nSkip, |
| 138 int nMaxStep); | 138 int nMaxStep); |
| 139 static CFX_WideString ParseStringString(const CFX_WideString& string, | 139 static CFX_WideString ParseStringString(const CFX_WideString& string, |
| 140 int nStart, | 140 int nStart, |
| 141 int& nSkip); | 141 int& nSkip); |
| 142 static double MakeRegularDate(const CFX_WideString& value, | 142 static double MakeRegularDate(const CFX_WideString& value, |
| 143 const CFX_WideString& format, | 143 const CFX_WideString& format, |
| 144 bool* bWrongFormat); | 144 bool* bWrongFormat); |
| 145 static CFX_WideString MakeFormatDate(double dDate, | 145 static CFX_WideString MakeFormatDate(double dDate, |
| 146 const CFX_WideString& format); | 146 const CFX_WideString& format); |
| 147 static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource, double& dRet); | 147 static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource, |
| 148 double& dRet, |
| 149 FX_BOOL& bDot); |
| 148 static double ParseStringToNumber(const FX_WCHAR* swSource); | 150 static double ParseStringToNumber(const FX_WCHAR* swSource); |
| 149 static double ParseNormalDate(const CFX_WideString& value, | 151 static double ParseNormalDate(const CFX_WideString& value, |
| 150 bool* bWrongFormat); | 152 bool* bWrongFormat); |
| 151 static double MakeInterDate(CFX_WideString strValue); | 153 static double MakeInterDate(CFX_WideString strValue); |
| 154 static double ParseNumber(const FX_WCHAR* swSource, |
| 155 FX_BOOL& bAllDigits, |
| 156 FX_BOOL& bDot, |
| 157 FX_BOOL& bSign, |
| 158 FX_BOOL& bKXJS); |
| 152 | 159 |
| 153 public: | 160 public: |
| 154 static CFX_WideString StrLTrim(const FX_WCHAR* pStr); | 161 static CFX_WideString StrLTrim(const FX_WCHAR* pStr); |
| 155 static CFX_WideString StrRTrim(const FX_WCHAR* pStr); | 162 static CFX_WideString StrRTrim(const FX_WCHAR* pStr); |
| 156 static CFX_WideString StrTrim(const FX_WCHAR* pStr); | 163 static CFX_WideString StrTrim(const FX_WCHAR* pStr); |
| 157 | 164 |
| 158 static CFX_ByteString StrLTrim(const FX_CHAR* pStr); | 165 static CFX_ByteString StrLTrim(const FX_CHAR* pStr); |
| 159 static CFX_ByteString StrRTrim(const FX_CHAR* pStr); | 166 static CFX_ByteString StrRTrim(const FX_CHAR* pStr); |
| 160 static CFX_ByteString StrTrim(const FX_CHAR* pStr); | 167 static CFX_ByteString StrTrim(const FX_CHAR* pStr); |
| 161 | 168 |
| 162 static FX_BOOL IsNumber(const FX_CHAR* string); | 169 static FX_BOOL IsNumber(const FX_CHAR* string); |
| 163 static FX_BOOL IsNumber(const FX_WCHAR* string); | 170 static FX_BOOL IsNumber(const FX_WCHAR* string); |
| 164 | 171 |
| 165 static FX_BOOL maskSatisfied(wchar_t c_Change, wchar_t c_Mask); | 172 static FX_BOOL maskSatisfied(wchar_t c_Change, wchar_t c_Mask); |
| 166 static FX_BOOL isReservedMaskChar(wchar_t ch); | 173 static FX_BOOL isReservedMaskChar(wchar_t ch); |
| 167 | 174 |
| 168 static double AF_Simple(const FX_WCHAR* sFuction, | 175 static double AF_Simple(const FX_WCHAR* sFuction, |
| 169 double dValue1, | 176 double dValue1, |
| 170 double dValue2); | 177 double dValue2); |
| 171 static CJS_Array AF_MakeArrayFromList(CJS_Runtime* pRuntime, CJS_Value val); | 178 static CJS_Array AF_MakeArrayFromList(CJS_Runtime* pRuntime, CJS_Value val); |
| 172 }; | 179 }; |
| 173 | 180 |
| 174 #endif // FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_ | 181 #endif // FPDFSDK_SRC_JAVASCRIPT_PUBLICMETHODS_H_ |
| OLD | NEW |