diff options
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_fm2jscontext.h')
-rw-r--r-- | xfa/fxfa/fm2js/xfa_fm2jscontext.h | 95 |
1 files changed, 38 insertions, 57 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.h b/xfa/fxfa/fm2js/xfa_fm2jscontext.h index d7f00091ed..33f739f1cc 100644 --- a/xfa/fxfa/fm2js/xfa_fm2jscontext.h +++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.h @@ -118,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, @@ -412,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); @@ -440,8 +422,7 @@ class CXFA_FM2JSContext : public CFXJSE_HostObject { static int32_t ValueToInteger(CFXJSE_Value* pThis, CFXJSE_Value* pValue); static float ValueToFloat(CFXJSE_Value* pThis, CFXJSE_Value* pValue); static double ValueToDouble(CFXJSE_Value* pThis, CFXJSE_Value* pValue); - static void ValueToUTF8String(CFXJSE_Value* pValue, - CFX_ByteString& outputValue); + static CFX_ByteString ValueToUTF8String(CFXJSE_Value* pValue); static double ExtractDouble(CFXJSE_Value* pThis, CFXJSE_Value* src, bool* ret); |