| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 "fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h" | 7 #include "fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/parser/cpdf_array.h" | 9 #include "core/fpdfapi/parser/cpdf_array.h" |
| 10 #include "core/fpdfapi/parser/cpdf_stream_acc.h" | 10 #include "core/fpdfapi/parser/cpdf_stream_acc.h" |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 CXFA_Submit submit) { | 697 CXFA_Submit submit) { |
| 698 if (!NotifySubmit(TRUE) || !m_pDocument->GetXFADocView()) | 698 if (!NotifySubmit(TRUE) || !m_pDocument->GetXFADocView()) |
| 699 return FALSE; | 699 return FALSE; |
| 700 | 700 |
| 701 m_pDocument->GetXFADocView()->UpdateDocView(); | 701 m_pDocument->GetXFADocView()->UpdateDocView(); |
| 702 FX_BOOL ret = SubmitDataInternal(hDoc, submit); | 702 FX_BOOL ret = SubmitDataInternal(hDoc, submit); |
| 703 NotifySubmit(FALSE); | 703 NotifySubmit(FALSE); |
| 704 return ret; | 704 return ret; |
| 705 } | 705 } |
| 706 | 706 |
| 707 IFX_FileRead* CPDFXFA_DocEnvironment::OpenLinkedFile( | 707 IFX_SeekableReadStream* CPDFXFA_DocEnvironment::OpenLinkedFile( |
| 708 CXFA_FFDoc* hDoc, | 708 CXFA_FFDoc* hDoc, |
| 709 const CFX_WideString& wsLink) { | 709 const CFX_WideString& wsLink) { |
| 710 CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pDocument->GetFormFillEnv(); | 710 CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pDocument->GetFormFillEnv(); |
| 711 if (!pFormFillEnv) | 711 if (!pFormFillEnv) |
| 712 return FALSE; | 712 return FALSE; |
| 713 | 713 |
| 714 CFX_ByteString bs = wsLink.UTF16LE_Encode(); | 714 CFX_ByteString bs = wsLink.UTF16LE_Encode(); |
| 715 int len = bs.GetLength(); | 715 int len = bs.GetLength(); |
| 716 FPDF_FILEHANDLER* pFileHandler = | 716 FPDF_FILEHANDLER* pFileHandler = |
| 717 pFormFillEnv->OpenFile(0, (FPDF_WIDESTRING)bs.GetBuffer(len), "rb"); | 717 pFormFillEnv->OpenFile(0, (FPDF_WIDESTRING)bs.GetBuffer(len), "rb"); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1025 !m_pDocument->GetFormFillEnv()->GetJSRuntime()) { | 1025 !m_pDocument->GetFormFillEnv()->GetJSRuntime()) { |
| 1026 return FALSE; | 1026 return FALSE; |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pDocument->GetFormFillEnv(); | 1029 CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pDocument->GetFormFillEnv(); |
| 1030 if (!m_pJSContext) | 1030 if (!m_pJSContext) |
| 1031 m_pJSContext = pFormFillEnv->GetJSRuntime()->NewContext(); | 1031 m_pJSContext = pFormFillEnv->GetJSRuntime()->NewContext(); |
| 1032 | 1032 |
| 1033 return pFormFillEnv->GetJSRuntime()->GetValueByName(szPropName, pValue); | 1033 return pFormFillEnv->GetJSRuntime()->GetValueByName(szPropName, pValue); |
| 1034 } | 1034 } |
| OLD | NEW |