summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/PublicMethods.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-21 11:12:20 -0800
committerLei Zhang <thestig@chromium.org>2015-12-21 11:12:20 -0800
commit9559b7ad8b897abefca605098b424c9351622226 (patch)
tree42ba385740c27604a1321b8192a78cf0a2b2896f /fpdfsdk/src/javascript/PublicMethods.h
parent1ac47ebfc2d106e25c3e13062cae2132daa49348 (diff)
downloadpdfium-9559b7ad8b897abefca605098b424c9351622226.tar.xz
Merge to XFA: Cleanup CJS_PublicMethods:
- Use FXSYS_iswdigit() instead of CJS_PublicMethods::IsDigit(). - Ditto for FXSYS_iswalpha() and FXSYS_iswalnum(). - Change CJS_PublicMethods::ParseNormalDate() and CJS_PublicMethods::MakeRegularDate() to take an out parameter by ptr. TBR=ochang@chromium.org Review URL: https://codereview.chromium.org/1539113002 . (cherry picked from commit f84fd2b1dac1fcca41db84d162995c38af650614) Review URL: https://codereview.chromium.org/1542693002 .
Diffstat (limited to 'fpdfsdk/src/javascript/PublicMethods.h')
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/PublicMethods.h b/fpdfsdk/src/javascript/PublicMethods.h
index 80465035ea..013c4ce1a4 100644
--- a/fpdfsdk/src/javascript/PublicMethods.h
+++ b/fpdfsdk/src/javascript/PublicMethods.h
@@ -11,7 +11,8 @@
class CJS_PublicMethods : public CJS_Object {
public:
- CJS_PublicMethods(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
+ explicit CJS_PublicMethods(v8::Local<v8::Object> pObject)
+ : CJS_Object(pObject) {}
~CJS_PublicMethods() override {}
public:
@@ -140,7 +141,7 @@ class CJS_PublicMethods : public CJS_Object {
int& nSkip);
static double MakeRegularDate(const CFX_WideString& value,
const CFX_WideString& format,
- FX_BOOL& bWrongFormat);
+ bool* bWrongFormat);
static CFX_WideString MakeFormatDate(double dDate,
const CFX_WideString& format);
static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource,
@@ -148,7 +149,7 @@ class CJS_PublicMethods : public CJS_Object {
FX_BOOL& bDot);
static double ParseStringToNumber(const FX_WCHAR* swSource);
static double ParseNormalDate(const CFX_WideString& value,
- FX_BOOL& bWrongFormat);
+ bool* bWrongFormat);
static double MakeInterDate(CFX_WideString strValue);
static double ParseNumber(const FX_WCHAR* swSource,
FX_BOOL& bAllDigits,
@@ -168,11 +169,6 @@ class CJS_PublicMethods : public CJS_Object {
static FX_BOOL IsNumber(const FX_CHAR* string);
static FX_BOOL IsNumber(const FX_WCHAR* string);
- static FX_BOOL IsDigit(char ch);
- static FX_BOOL IsDigit(wchar_t ch);
- static FX_BOOL IsAlphabetic(wchar_t ch);
- static FX_BOOL IsAlphaNumeric(wchar_t ch);
-
static FX_BOOL maskSatisfied(wchar_t c_Change, wchar_t c_Mask);
static FX_BOOL isReservedMaskChar(wchar_t ch);