diff options
Diffstat (limited to 'xfa/fxfa/fm2js')
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp | 28 | ||||
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fmlexer.cpp | 6 | ||||
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp | 4 |
3 files changed, 19 insertions, 19 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp index 0b38fd1fab..b4d070ac7d 100644 --- a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp @@ -2951,7 +2951,7 @@ void CXFA_FM2JSContext::UnitValue(CFXJSE_Value* pThis, return; } - FX_STRSIZE u = 0; + size_t u = 0; while (IsWhitespace(pData[u])) ++u; @@ -2966,7 +2966,7 @@ void CXFA_FM2JSContext::UnitValue(CFXJSE_Value* pThis, while (IsWhitespace(pData[u])) ++u; - FX_STRSIZE uLen = unitspanString.GetLength(); + size_t uLen = unitspanString.GetLength(); ByteString strFirstUnit; while (u < uLen) { if (pData[u] == ' ') @@ -2982,7 +2982,7 @@ void CXFA_FM2JSContext::UnitValue(CFXJSE_Value* pThis, std::unique_ptr<CFXJSE_Value> unitValue = GetSimpleValue(pThis, args, 1); ByteString unitTempString = ValueToUTF8String(unitValue.get()); const char* pChar = unitTempString.c_str(); - FX_STRSIZE uVal = 0; + size_t uVal = 0; while (IsWhitespace(pChar[uVal])) ++uVal; @@ -2994,7 +2994,7 @@ void CXFA_FM2JSContext::UnitValue(CFXJSE_Value* pThis, while (IsWhitespace(pChar[uVal])) ++uVal; - FX_STRSIZE uValLen = unitTempString.GetLength(); + size_t uValLen = unitTempString.GetLength(); while (uVal < uValLen) { if (pChar[uVal] == ' ') break; @@ -3176,7 +3176,7 @@ void CXFA_FM2JSContext::Decode(CFXJSE_Value* pThis, // static WideString CXFA_FM2JSContext::DecodeURL(const WideString& wsURLString) { const wchar_t* pData = wsURLString.c_str(); - FX_STRSIZE i = 0; + size_t i = 0; CFX_WideTextBuf wsResultBuf; while (i < wsURLString.GetLength()) { wchar_t ch = pData[i]; @@ -3213,9 +3213,9 @@ WideString CXFA_FM2JSContext::DecodeURL(const WideString& wsURLString) { // static WideString CXFA_FM2JSContext::DecodeHTML(const WideString& wsHTMLString) { wchar_t strString[9]; - FX_STRSIZE iStrIndex = 0; - FX_STRSIZE iLen = wsHTMLString.GetLength(); - FX_STRSIZE i = 0; + size_t iStrIndex = 0; + size_t iLen = wsHTMLString.GetLength(); + size_t i = 0; int32_t iCode = 0; const wchar_t* pData = wsHTMLString.c_str(); CFX_WideTextBuf wsResultBuf; @@ -3811,7 +3811,7 @@ void CXFA_FM2JSContext::Lower(CFXJSE_Value* pThis, ByteString argString = ValueToUTF8String(argOne.get()); WideString wsArgString = WideString::FromUTF8(argString.AsStringView()); const wchar_t* pData = wsArgString.c_str(); - FX_STRSIZE i = 0; + size_t i = 0; while (i < argString.GetLength()) { int32_t ch = pData[i]; if ((ch >= 0x41 && ch <= 0x5A) || (ch >= 0xC0 && ch <= 0xDE)) @@ -4008,17 +4008,17 @@ void CXFA_FM2JSContext::Replace(CFXJSE_Value* pThis, threeString = ValueToUTF8String(argThree.get()); } - FX_STRSIZE iFindLen = twoString.GetLength(); + size_t iFindLen = twoString.GetLength(); std::ostringstream resultString; - FX_STRSIZE iFindIndex = 0; - for (FX_STRSIZE u = 0; u < oneString.GetLength(); ++u) { + size_t iFindIndex = 0; + for (size_t u = 0; u < oneString.GetLength(); ++u) { char ch = static_cast<char>(oneString[u]); if (ch != static_cast<char>(twoString[iFindIndex])) { resultString << ch; continue; } - FX_STRSIZE iTemp = u + 1; + size_t iTemp = u + 1; ++iFindIndex; while (iFindIndex < iFindLen) { uint8_t chTemp = oneString[iTemp]; @@ -4353,7 +4353,7 @@ void CXFA_FM2JSContext::Upper(CFXJSE_Value* pThis, ByteString argString = ValueToUTF8String(argOne.get()); WideString wsArgString = WideString::FromUTF8(argString.AsStringView()); const wchar_t* pData = wsArgString.c_str(); - FX_STRSIZE i = 0; + size_t i = 0; while (i < wsArgString.GetLength()) { int32_t ch = pData[i]; if ((ch >= 0x61 && ch <= 0x7A) || (ch >= 0xE0 && ch <= 0xFE)) diff --git a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp index f6b2a58944..675abc3046 100644 --- a/xfa/fxfa/fm2js/cxfa_fmlexer.cpp +++ b/xfa/fxfa/fm2js/cxfa_fmlexer.cpp @@ -378,7 +378,7 @@ void CXFA_FMLexer::AdvanceForNumber() { } m_token->m_string = - WideStringView(m_cursor, static_cast<FX_STRSIZE>(end - m_cursor)); + WideStringView(m_cursor, static_cast<size_t>(end - m_cursor)); m_cursor = end; } @@ -395,7 +395,7 @@ void CXFA_FMLexer::AdvanceForString() { // If the end of the input has been reached it was not escaped. if (m_cursor > m_end) { m_token->m_string = - WideStringView(start, static_cast<FX_STRSIZE>(m_cursor - start)); + WideStringView(start, static_cast<size_t>(m_cursor - start)); return; } // If the next character is not a " then the end of the string has been @@ -430,7 +430,7 @@ void CXFA_FMLexer::AdvanceForIdentifier() { ++m_cursor; } m_token->m_string = - WideStringView(start, static_cast<FX_STRSIZE>(m_cursor - start)); + WideStringView(start, static_cast<size_t>(m_cursor - start)); m_token->m_type = TokenizeIdentifier(m_token->m_string); } diff --git a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp index 73dfdd55bc..3cfe0f52d5 100644 --- a/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp +++ b/xfa/fxfa/fm2js/cxfa_fmsimpleexpression.cpp @@ -48,7 +48,7 @@ const wchar_t* const g_BuiltInFuncs[] = { L"Within", L"WordNum", }; -const FX_STRSIZE g_BuiltInFuncsMaxLen = 12; +const size_t g_BuiltInFuncsMaxLen = 12; struct XFA_FMSOMMethod { const wchar_t* m_wsSomMethodName; @@ -133,7 +133,7 @@ bool CXFA_FMStringExpression::ToJavaScript(CFX_WideTextBuf& javascript) { return true; } javascript.AppendChar(L'\"'); - for (FX_STRSIZE i = 1; i < tempStr.GetLength() - 1; i++) { + for (size_t i = 1; i < tempStr.GetLength() - 1; i++) { wchar_t oneChar = tempStr[i]; switch (oneChar) { case L'\"': |