diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-04-11 14:37:17 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-12 22:37:48 +0000 |
commit | 5eb58cd552c184998ed24634db4b2e6e770f39bd (patch) | |
tree | b2ab8230ae957d0b0534ecc6a33141f7b7471076 /xfa/fxfa/fm2js/xfa_fm2jscontext.h | |
parent | f6baf6b1d101a889d2cfc7cb925e726dbffb89db (diff) | |
download | pdfium-5eb58cd552c184998ed24634db4b2e6e770f39bd.tar.xz |
Fix string passing coventions in xfa_fm2jscontext.hchromium/3070
Change-Id: Ibcb3a95a52ab67c4c9c397ff9c4eab483ef1fcc3
Reviewed-on: https://pdfium-review.googlesource.com/3954
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
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); |