diff options
Diffstat (limited to 'chromium/third_party/pdfium/xfa/fxfa/fm2js/xfa_fm2jscontext.h')
-rw-r--r-- | chromium/third_party/pdfium/xfa/fxfa/fm2js/xfa_fm2jscontext.h | 109 |
1 files changed, 46 insertions, 63 deletions
diff --git a/chromium/third_party/pdfium/xfa/fxfa/fm2js/xfa_fm2jscontext.h b/chromium/third_party/pdfium/xfa/fxfa/fm2js/xfa_fm2jscontext.h index 0f802fe65e4..33f739f1cc5 100644 --- a/chromium/third_party/pdfium/xfa/fxfa/fm2js/xfa_fm2jscontext.h +++ b/chromium/third_party/pdfium/xfa/fxfa/fm2js/xfa_fm2jscontext.h @@ -14,6 +14,8 @@ #include "fxjs/cfxjse_context.h" #include "xfa/fxfa/parser/xfa_resolvenode_rs.h" +class CXFA_Document; + class CXFA_FM2JSContext : public CFXJSE_HostObject { public: CXFA_FM2JSContext(v8::Isolate* pScriptIsolate, @@ -91,13 +93,13 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject { const CFX_ByteStringC& szFuncName, CFXJSE_Arguments& args); - static bool IsIsoDateFormat(const FX_CHAR* pData, + static bool IsIsoDateFormat(const char* pData, int32_t iLength, int32_t& iStyle, int32_t& iYear, int32_t& iMonth, int32_t& iDay); - static bool IsIsoTimeFormat(const FX_CHAR* pData, + static bool IsIsoTimeFormat(const char* pData, int32_t iLength, int32_t& iHour, int32_t& iMinute, @@ -105,7 +107,7 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject { int32_t& iMilliSecond, int32_t& iZoneHour, int32_t& iZoneMinute); - static bool IsIsoDateTimeFormat(const FX_CHAR* pData, + static bool IsIsoDateTimeFormat(const char* pData, int32_t iLength, int32_t& iYear, int32_t& iMonth, @@ -116,57 +118,40 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject { int32_t& iMillionSecond, int32_t& iZoneHour, int32_t& iZoneMinute); - static bool Local2IsoDate(CFXJSE_Value* pThis, - const CFX_ByteStringC& szDate, - const CFX_ByteStringC& szFormat, - const CFX_ByteStringC& szLocale, - CFX_ByteString& strIsoDate); - static bool Local2IsoTime(CFXJSE_Value* pThis, - const CFX_ByteStringC& szTime, - const CFX_ByteStringC& szFormat, - const CFX_ByteStringC& szLocale, - CFX_ByteString& strIsoTime); - static bool IsoDate2Local(CFXJSE_Value* pThis, - const CFX_ByteStringC& szDate, - const CFX_ByteStringC& szFormat, - const CFX_ByteStringC& szLocale, - CFX_ByteString& strLocalDate); - static bool IsoTime2Local(CFXJSE_Value* pThis, - const CFX_ByteStringC& szTime, - const CFX_ByteStringC& szFormat, - const CFX_ByteStringC& szLocale, - CFX_ByteString& strLocalTime); - static bool GetGMTTime(CFXJSE_Value* pThis, - const CFX_ByteStringC& szTime, - const CFX_ByteStringC& szFormat, - const CFX_ByteStringC& szLocale, - CFX_ByteString& strGMTTime); + static CFX_ByteString Local2IsoDate(CFXJSE_Value* pThis, + const CFX_ByteStringC& szDate, + const CFX_ByteStringC& szFormat, + const CFX_ByteStringC& szLocale); + static CFX_ByteString IsoDate2Local(CFXJSE_Value* pThis, + const CFX_ByteStringC& szDate, + const CFX_ByteStringC& szFormat, + const CFX_ByteStringC& szLocale); + static CFX_ByteString IsoTime2Local(CFXJSE_Value* pThis, + const CFX_ByteStringC& szTime, + const CFX_ByteStringC& szFormat, + const CFX_ByteStringC& szLocale); static int32_t DateString2Num(const CFX_ByteStringC& szDateString); - static void GetLocalDateFormat(CFXJSE_Value* pThis, - int32_t iStyle, - const CFX_ByteStringC& szLocalStr, - CFX_ByteString& strFormat, - bool bStandard); - static void GetLocalTimeFormat(CFXJSE_Value* pThis, - int32_t iStyle, - const CFX_ByteStringC& szLocalStr, - CFX_ByteString& strFormat, - bool bStandard); - static void GetStandardDateFormat(CFXJSE_Value* pThis, - int32_t iStyle, - const CFX_ByteStringC& szLocalStr, - CFX_ByteString& strFormat); - static void GetStandardTimeFormat(CFXJSE_Value* pThis, - int32_t iStyle, - const CFX_ByteStringC& szLocalStr, - CFX_ByteString& strFormat); - - static void Num2AllTime(CFXJSE_Value* pThis, - int32_t iTime, - const CFX_ByteStringC& szFormat, - const CFX_ByteStringC& szLocale, - bool bGM, - CFX_ByteString& strTime); + static CFX_ByteString GetLocalDateFormat(CFXJSE_Value* pThis, + int32_t iStyle, + const CFX_ByteStringC& szLocalStr, + bool bStandard); + static CFX_ByteString GetLocalTimeFormat(CFXJSE_Value* pThis, + int32_t iStyle, + const CFX_ByteStringC& szLocalStr, + bool bStandard); + static CFX_ByteString GetStandardDateFormat( + CFXJSE_Value* pThis, + int32_t iStyle, + const CFX_ByteStringC& szLocalStr); + static CFX_ByteString GetStandardTimeFormat( + CFXJSE_Value* pThis, + int32_t iStyle, + const CFX_ByteStringC& szLocalStr); + static CFX_ByteString Num2AllTime(CFXJSE_Value* pThis, + int32_t iTime, + const CFX_ByteStringC& szFormat, + const CFX_ByteStringC& szLocale, + bool bGM); static void GetLocalTimeZone(int32_t& iHour, int32_t& iMin, int32_t& iSec); static void Apr(CFXJSE_Value* pThis, @@ -410,11 +395,10 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject { CFXJSE_Value* pDefaultValue); static bool SetObjectDefaultValue(CFXJSE_Value* pObjectValue, CFXJSE_Value* pNewValue); - static void GenerateSomExpression(const CFX_ByteStringC& szName, - int32_t iIndexFlags, - int32_t iIndexValue, - bool bIsStar, - CFX_ByteString& szSomExp); + static CFX_ByteString GenerateSomExpression(const CFX_ByteStringC& szName, + int32_t iIndexFlags, + int32_t iIndexValue, + bool bIsStar); static bool GetObjectForName(CFXJSE_Value* pThis, CFXJSE_Value* accessorValue, const CFX_ByteStringC& szAccessorName); @@ -436,10 +420,9 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject { uint32_t index); static bool ValueIsNull(CFXJSE_Value* pThis, CFXJSE_Value* pValue); static int32_t ValueToInteger(CFXJSE_Value* pThis, CFXJSE_Value* pValue); - static FX_FLOAT ValueToFloat(CFXJSE_Value* pThis, CFXJSE_Value* pValue); - static FX_DOUBLE ValueToDouble(CFXJSE_Value* pThis, CFXJSE_Value* pValue); - static void ValueToUTF8String(CFXJSE_Value* pValue, - CFX_ByteString& outputValue); + static float ValueToFloat(CFXJSE_Value* pThis, CFXJSE_Value* pValue); + static double ValueToDouble(CFXJSE_Value* pThis, CFXJSE_Value* pValue); + static CFX_ByteString ValueToUTF8String(CFXJSE_Value* pValue); static double ExtractDouble(CFXJSE_Value* pThis, CFXJSE_Value* src, bool* ret); @@ -462,7 +445,7 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject { const CFX_WideString& exp) const; void ThrowArgumentMismatchException() const; void ThrowParamCountMismatchException(const CFX_WideString& method) const; - void ThrowException(const FX_WCHAR* str, ...) const; + void ThrowException(const wchar_t* str, ...) const; v8::Isolate* m_pIsolate; CFXJSE_Class* m_pFMClass; |