summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/PublicMethods.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
committerNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
commitb048f791a15f2da781a01eba5b09eb9d389f9c11 (patch)
tree6850a73c18bbc41eaf4b1fdc6b3c96646d45587b /fpdfsdk/include/javascript/PublicMethods.h
parentc8eeed31f217d99a706b0cbf5e4ce0bcc12beb64 (diff)
downloadpdfium-b048f791a15f2da781a01eba5b09eb9d389f9c11.tar.xz
clang-format all pdfium code.
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 .
Diffstat (limited to 'fpdfsdk/include/javascript/PublicMethods.h')
-rw-r--r--fpdfsdk/include/javascript/PublicMethods.h240
1 files changed, 161 insertions, 79 deletions
diff --git a/fpdfsdk/include/javascript/PublicMethods.h b/fpdfsdk/include/javascript/PublicMethods.h
index cff9e11479..c5d5ea6d46 100644
--- a/fpdfsdk/include/javascript/PublicMethods.h
+++ b/fpdfsdk/include/javascript/PublicMethods.h
@@ -9,95 +9,177 @@
#include "JS_Define.h"
-class CJS_PublicMethods : public CJS_Object
-{
-public:
- CJS_PublicMethods(JSFXObject pObject) : CJS_Object(pObject) {};
- virtual ~CJS_PublicMethods(void){};
+class CJS_PublicMethods : public CJS_Object {
+ public:
+ CJS_PublicMethods(JSFXObject pObject) : CJS_Object(pObject){};
+ virtual ~CJS_PublicMethods(void){};
-public:
- static FX_BOOL AFNumber_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFNumber_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFPercent_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFPercent_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFDate_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFDate_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFDate_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFDate_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFTime_FormatEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError); //
- static FX_BOOL AFTime_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFTime_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFTime_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFSpecial_Format(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFSpecial_Keystroke(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFSpecial_KeystrokeEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);//
- static FX_BOOL AFSimple(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFMakeNumber(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFSimple_Calculate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFRange_Validate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFMergeChange(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFParseDateEx(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
- static FX_BOOL AFExtractNums(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
+ public:
+ static FX_BOOL AFNumber_Format(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFNumber_Keystroke(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFPercent_Format(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFPercent_Keystroke(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFDate_FormatEx(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFDate_KeystrokeEx(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFDate_Format(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFDate_Keystroke(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFTime_FormatEx(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError); //
+ static FX_BOOL AFTime_KeystrokeEx(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFTime_Format(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFTime_Keystroke(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFSpecial_Format(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFSpecial_Keystroke(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFSpecial_KeystrokeEx(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError); //
+ static FX_BOOL AFSimple(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFMakeNumber(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFSimple_Calculate(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFRange_Validate(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFMergeChange(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFParseDateEx(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ CJS_Value& vRet,
+ CFX_WideString& sError);
+ static FX_BOOL AFExtractNums(IFXJS_Context* cc,
+ const CJS_Parameters& params,
+ 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);
- JS_STATIC_GLOBAL_FUN(AFPercent_Keystroke);
- JS_STATIC_GLOBAL_FUN(AFDate_FormatEx);
- JS_STATIC_GLOBAL_FUN(AFDate_KeystrokeEx);
- JS_STATIC_GLOBAL_FUN(AFDate_Format);
- JS_STATIC_GLOBAL_FUN(AFDate_Keystroke);
- JS_STATIC_GLOBAL_FUN(AFTime_FormatEx);
- JS_STATIC_GLOBAL_FUN(AFTime_KeystrokeEx);
- JS_STATIC_GLOBAL_FUN(AFTime_Format);
- JS_STATIC_GLOBAL_FUN(AFTime_Keystroke);
- JS_STATIC_GLOBAL_FUN(AFSpecial_Format);
- JS_STATIC_GLOBAL_FUN(AFSpecial_Keystroke);
- JS_STATIC_GLOBAL_FUN(AFSpecial_KeystrokeEx);
- JS_STATIC_GLOBAL_FUN(AFSimple);
- JS_STATIC_GLOBAL_FUN(AFMakeNumber);
- JS_STATIC_GLOBAL_FUN(AFSimple_Calculate);
- JS_STATIC_GLOBAL_FUN(AFRange_Validate);
- JS_STATIC_GLOBAL_FUN(AFMergeChange);
- JS_STATIC_GLOBAL_FUN(AFParseDateEx);
- JS_STATIC_GLOBAL_FUN(AFExtractNums);
+ public:
+ JS_STATIC_GLOBAL_FUN(AFNumber_Format);
+ JS_STATIC_GLOBAL_FUN(AFNumber_Keystroke);
+ JS_STATIC_GLOBAL_FUN(AFPercent_Format);
+ JS_STATIC_GLOBAL_FUN(AFPercent_Keystroke);
+ JS_STATIC_GLOBAL_FUN(AFDate_FormatEx);
+ JS_STATIC_GLOBAL_FUN(AFDate_KeystrokeEx);
+ JS_STATIC_GLOBAL_FUN(AFDate_Format);
+ JS_STATIC_GLOBAL_FUN(AFDate_Keystroke);
+ JS_STATIC_GLOBAL_FUN(AFTime_FormatEx);
+ JS_STATIC_GLOBAL_FUN(AFTime_KeystrokeEx);
+ JS_STATIC_GLOBAL_FUN(AFTime_Format);
+ JS_STATIC_GLOBAL_FUN(AFTime_Keystroke);
+ JS_STATIC_GLOBAL_FUN(AFSpecial_Format);
+ JS_STATIC_GLOBAL_FUN(AFSpecial_Keystroke);
+ JS_STATIC_GLOBAL_FUN(AFSpecial_KeystrokeEx);
+ JS_STATIC_GLOBAL_FUN(AFSimple);
+ JS_STATIC_GLOBAL_FUN(AFMakeNumber);
+ JS_STATIC_GLOBAL_FUN(AFSimple_Calculate);
+ JS_STATIC_GLOBAL_FUN(AFRange_Validate);
+ JS_STATIC_GLOBAL_FUN(AFMergeChange);
+ JS_STATIC_GLOBAL_FUN(AFParseDateEx);
+ JS_STATIC_GLOBAL_FUN(AFExtractNums);
- JS_STATIC_DECLARE_GLOBAL_FUN();
+ JS_STATIC_DECLARE_GLOBAL_FUN();
-public:
- static int ParseStringInteger(const CFX_WideString & string,int nStart,int & nSkip, int nMaxStep);
- static CFX_WideString ParseStringString(const CFX_WideString& string, int nStart, int& nSkip);
- static double MakeRegularDate(const CFX_WideString & value,const CFX_WideString & format, FX_BOOL& bWrongFormat);
- static CFX_WideString MakeFormatDate(double dDate,const CFX_WideString & format);
- static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource, double & dRet, FX_BOOL & bDot);
- static double ParseStringToNumber(const FX_WCHAR* swSource);
- static double ParseNormalDate(const CFX_WideString & value, FX_BOOL& bWrongFormat);
- static double MakeInterDate(CFX_WideString strValue);
- static double ParseNumber(const FX_WCHAR* swSource, FX_BOOL& bAllDigits, FX_BOOL& bDot, FX_BOOL& bSign, FX_BOOL& bKXJS);
+ public:
+ static int ParseStringInteger(const CFX_WideString& string,
+ int nStart,
+ int& nSkip,
+ int nMaxStep);
+ static CFX_WideString ParseStringString(const CFX_WideString& string,
+ int nStart,
+ int& nSkip);
+ static double MakeRegularDate(const CFX_WideString& value,
+ const CFX_WideString& format,
+ FX_BOOL& bWrongFormat);
+ static CFX_WideString MakeFormatDate(double dDate,
+ const CFX_WideString& format);
+ static FX_BOOL ConvertStringToNumber(const FX_WCHAR* swSource,
+ double& dRet,
+ FX_BOOL& bDot);
+ static double ParseStringToNumber(const FX_WCHAR* swSource);
+ static double ParseNormalDate(const CFX_WideString& value,
+ FX_BOOL& bWrongFormat);
+ static double MakeInterDate(CFX_WideString strValue);
+ static double ParseNumber(const FX_WCHAR* swSource,
+ FX_BOOL& bAllDigits,
+ FX_BOOL& bDot,
+ FX_BOOL& bSign,
+ FX_BOOL& bKXJS);
-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);
+ 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);
- static CFX_ByteString StrLTrim(const FX_CHAR* pStr);
- static CFX_ByteString StrRTrim(const FX_CHAR* pStr);
- static CFX_ByteString StrTrim(const FX_CHAR* pStr);
+ static CFX_ByteString StrLTrim(const FX_CHAR* pStr);
+ 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 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 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);
+ static FX_BOOL maskSatisfied(wchar_t c_Change, wchar_t c_Mask);
+ static FX_BOOL isReservedMaskChar(wchar_t ch);
- static double AF_Simple(const FX_WCHAR* sFuction, double dValue1, double dValue2);
- static CJS_Array AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Value val);
+ static double AF_Simple(const FX_WCHAR* sFuction,
+ double dValue1,
+ double dValue2);
+ static CJS_Array AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Value val);
};
#endif // FPDFSDK_INCLUDE_JAVASCRIPT_PUBLICMETHODS_H_