| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #include "xfa/fxfa/parser/xfa_script_hostpseudomodel.h" | 7 #include "xfa/fxfa/parser/xfa_script_hostpseudomodel.h" |
| 8 | 8 |
| 9 #include "xfa/fxfa/app/xfa_ffnotify.h" | 9 #include "xfa/fxfa/app/xfa_ffnotify.h" |
| 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 10 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 static int32_t XFA_FilterName(const CFX_WideStringC& wsExpression, | 407 static int32_t XFA_FilterName(const CFX_WideStringC& wsExpression, |
| 408 int32_t nStart, | 408 int32_t nStart, |
| 409 CFX_WideString& wsFilter) { | 409 CFX_WideString& wsFilter) { |
| 410 FXSYS_assert(nStart > -1); | 410 FXSYS_assert(nStart > -1); |
| 411 int32_t iLength = wsExpression.GetLength(); | 411 int32_t iLength = wsExpression.GetLength(); |
| 412 if (nStart >= iLength) { | 412 if (nStart >= iLength) { |
| 413 return iLength; | 413 return iLength; |
| 414 } | 414 } |
| 415 FX_WCHAR* pBuf = wsFilter.GetBuffer(iLength - nStart); | 415 FX_WCHAR* pBuf = wsFilter.GetBuffer(iLength - nStart); |
| 416 int32_t nCount = 0; | 416 int32_t nCount = 0; |
| 417 const FX_WCHAR* pSrc = wsExpression.GetPtr(); | 417 const FX_WCHAR* pSrc = wsExpression.raw_str(); |
| 418 FX_WCHAR wCur; | 418 FX_WCHAR wCur; |
| 419 while (nStart < iLength) { | 419 while (nStart < iLength) { |
| 420 wCur = pSrc[nStart++]; | 420 wCur = pSrc[nStart++]; |
| 421 if (wCur == ',') { | 421 if (wCur == ',') { |
| 422 break; | 422 break; |
| 423 } | 423 } |
| 424 pBuf[nCount++] = wCur; | 424 pBuf[nCount++] = wCur; |
| 425 } | 425 } |
| 426 wsFilter.ReleaseBuffer(nCount); | 426 wsFilter.ReleaseBuffer(nCount); |
| 427 wsFilter.TrimLeft(); | 427 wsFilter.TrimLeft(); |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 if (!pNotify) { | 799 if (!pNotify) { |
| 800 return; | 800 return; |
| 801 } | 801 } |
| 802 CFX_WideString wsDataTime = pNotify->GetCurrentDateTime(); | 802 CFX_WideString wsDataTime = pNotify->GetCurrentDateTime(); |
| 803 FXJSE_HVALUE hValue = pArguments->GetReturnValue(); | 803 FXJSE_HVALUE hValue = pArguments->GetReturnValue(); |
| 804 if (hValue) { | 804 if (hValue) { |
| 805 FXJSE_Value_SetUTF8String(hValue, | 805 FXJSE_Value_SetUTF8String(hValue, |
| 806 FX_UTF8Encode(wsDataTime).AsByteStringC()); | 806 FX_UTF8Encode(wsDataTime).AsByteStringC()); |
| 807 } | 807 } |
| 808 } | 808 } |
| OLD | NEW |