diff options
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp')
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp index 1910e60e3e..84064efb45 100644 --- a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp @@ -1139,7 +1139,7 @@ void CXFA_FM2JSContext::IsoTime2Num(CFXJSE_Value* pThis, CXFA_LocaleMgr* pMgr = pDoc->GetLocalMgr(); CFX_ByteString szArgString = ValueToUTF8String(argOne.get()); FX_STRSIZE pos = szArgString.Find('T', 0); - szArgString = szArgString.Mid(pos + 1, szArgString.GetLength() - (pos + 1)); + szArgString = szArgString.Right(szArgString.GetLength() - (pos + 1)); if (szArgString.IsEmpty()) { args.GetReturnValue()->SetInteger(0); return; @@ -3694,8 +3694,7 @@ void CXFA_FM2JSContext::Format(CFXJSE_Value* pThis, CFX_WideString wsTimePattern(L"time{"); wsTimePattern += - wsPattern.Mid(iTChar + 1, wsPattern.GetLength() - (iTChar + 1)) + - L"}"; + wsPattern.Right(wsPattern.GetLength() - (iTChar + 1)) + L"}"; wsPattern = wsDatePattern + wsTimePattern; } break; case XFA_VT_DATE: { @@ -3881,8 +3880,7 @@ void CXFA_FM2JSContext::Parse(CFXJSE_Value* pThis, FX_STRSIZE iTChar = wsPattern.Find(L'T'); CFX_WideString wsDatePattern(L"date{" + wsPattern.Left(iTChar) + L"} "); CFX_WideString wsTimePattern( - L"time{" + - wsPattern.Mid(iTChar + 1, wsPattern.GetLength() - (iTChar + 1)) + + L"time{" + wsPattern.Right(wsPattern.GetLength() - (iTChar + 1)) + L"}"); wsPattern = wsDatePattern + wsTimePattern; CXFA_LocaleValue localeValue(patternType, wsValue, wsPattern, pLocale, |