summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/PublicMethods.h
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-03-15 13:55:12 -0700
committerWei Li <weili@chromium.org>2016-03-15 13:55:12 -0700
commit614d20a64195e64c047432251e3fb3e7b5142425 (patch)
tree6e23743b19bb501defd07146c3164168a5520908 /fpdfsdk/javascript/PublicMethods.h
parent744da70149c450d2f387a1fa325a3074ac2edb0c (diff)
downloadpdfium-614d20a64195e64c047432251e3fb3e7b5142425.tar.xz
Fix CJS_PublicMethods::IsNumber() with unit test and some cleanup
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1797423002 .
Diffstat (limited to 'fpdfsdk/javascript/PublicMethods.h')
-rw-r--r--fpdfsdk/javascript/PublicMethods.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.h b/fpdfsdk/javascript/PublicMethods.h
index 8961c5abc8..16cc5bc21a 100644
--- a/fpdfsdk/javascript/PublicMethods.h
+++ b/fpdfsdk/javascript/PublicMethods.h
@@ -18,7 +18,6 @@ class CJS_PublicMethods : public CJS_Object {
: CJS_Object(pObject) {}
~CJS_PublicMethods() override {}
- public:
static FX_BOOL AFNumber_Format(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
@@ -108,7 +107,6 @@ class CJS_PublicMethods : public CJS_Object {
CJS_Value& vRet,
CFX_WideString& sError);
- public:
JS_STATIC_GLOBAL_FUN(AFNumber_Format);
JS_STATIC_GLOBAL_FUN(AFNumber_Keystroke);
JS_STATIC_GLOBAL_FUN(AFPercent_Format);
@@ -134,7 +132,6 @@ class CJS_PublicMethods : public CJS_Object {
JS_STATIC_DECLARE_GLOBAL_FUN();
- public:
static int ParseStringInteger(const CFX_WideString& string,
int nStart,
int& nSkip,
@@ -151,7 +148,6 @@ class CJS_PublicMethods : public CJS_Object {
bool* bWrongFormat);
static double MakeInterDate(CFX_WideString strValue);
- public:
static CFX_WideString StrLTrim(const FX_WCHAR* pStr);
static CFX_WideString StrRTrim(const FX_WCHAR* pStr);
static CFX_WideString StrTrim(const FX_WCHAR* pStr);
@@ -160,11 +156,10 @@ class CJS_PublicMethods : public CJS_Object {
static CFX_ByteString StrRTrim(const FX_CHAR* pStr);
static CFX_ByteString StrTrim(const FX_CHAR* pStr);
- static FX_BOOL IsNumber(const FX_CHAR* string);
- static FX_BOOL IsNumber(const FX_WCHAR* string);
+ static bool IsNumber(const FX_WCHAR* string);
- static FX_BOOL maskSatisfied(wchar_t c_Change, wchar_t c_Mask);
- static FX_BOOL isReservedMaskChar(wchar_t ch);
+ static bool maskSatisfied(wchar_t c_Change, wchar_t c_Mask);
+ static bool isReservedMaskChar(wchar_t ch);
static double AF_Simple(const FX_WCHAR* sFuction,
double dValue1,