| 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 #ifndef FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_ | 7 #ifndef FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_ |
| 8 #define FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_ | 8 #define FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/cfx_retain_ptr.h" |
| 10 #include "public/fpdfview.h" | 11 #include "public/fpdfview.h" |
| 11 #include "xfa/fxfa/fxfa.h" | 12 #include "xfa/fxfa/fxfa.h" |
| 12 | 13 |
| 13 class CPDFXFA_Context; | 14 class CPDFXFA_Context; |
| 14 class IJS_Context; | 15 class IJS_Context; |
| 15 | 16 |
| 16 class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment { | 17 class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment { |
| 17 public: | 18 public: |
| 18 explicit CPDFXFA_DocEnvironment(CPDFXFA_Context*); | 19 explicit CPDFXFA_DocEnvironment(CPDFXFA_Context*); |
| 19 ~CPDFXFA_DocEnvironment() override; | 20 ~CPDFXFA_DocEnvironment() override; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 */ | 79 */ |
| 79 bool SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) override; | 80 bool SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) override; |
| 80 | 81 |
| 81 bool GetGlobalProperty(CXFA_FFDoc* hDoc, | 82 bool GetGlobalProperty(CXFA_FFDoc* hDoc, |
| 82 const CFX_ByteStringC& szPropName, | 83 const CFX_ByteStringC& szPropName, |
| 83 CFXJSE_Value* pValue) override; | 84 CFXJSE_Value* pValue) override; |
| 84 bool SetGlobalProperty(CXFA_FFDoc* hDoc, | 85 bool SetGlobalProperty(CXFA_FFDoc* hDoc, |
| 85 const CFX_ByteStringC& szPropName, | 86 const CFX_ByteStringC& szPropName, |
| 86 CFXJSE_Value* pValue) override; | 87 CFXJSE_Value* pValue) override; |
| 87 | 88 |
| 88 IFX_SeekableReadStream* OpenLinkedFile(CXFA_FFDoc* hDoc, | 89 CFX_RetainPtr<IFX_SeekableReadStream> OpenLinkedFile( |
| 89 const CFX_WideString& wsLink) override; | 90 CXFA_FFDoc* hDoc, |
| 91 const CFX_WideString& wsLink) override; |
| 90 | 92 |
| 91 private: | 93 private: |
| 92 bool OnBeforeNotifySubmit(); | 94 bool OnBeforeNotifySubmit(); |
| 93 void OnAfterNotifySubmit(); | 95 void OnAfterNotifySubmit(); |
| 94 bool NotifySubmit(bool bPrevOrPost); | 96 bool NotifySubmit(bool bPrevOrPost); |
| 95 bool SubmitDataInternal(CXFA_FFDoc* hDoc, CXFA_Submit submit); | 97 bool SubmitDataInternal(CXFA_FFDoc* hDoc, CXFA_Submit submit); |
| 96 bool MailToInfo(CFX_WideString& csURL, | 98 bool MailToInfo(CFX_WideString& csURL, |
| 97 CFX_WideString& csToAddress, | 99 CFX_WideString& csToAddress, |
| 98 CFX_WideString& csCCAddress, | 100 CFX_WideString& csCCAddress, |
| 99 CFX_WideString& csBCCAddress, | 101 CFX_WideString& csBCCAddress, |
| 100 CFX_WideString& csSubject, | 102 CFX_WideString& csSubject, |
| 101 CFX_WideString& csMsg); | 103 CFX_WideString& csMsg); |
| 102 bool ExportSubmitFile(FPDF_FILEHANDLER* ppFileHandler, | 104 bool ExportSubmitFile(FPDF_FILEHANDLER* ppFileHandler, |
| 103 int fileType, | 105 int fileType, |
| 104 FPDF_DWORD encodeType, | 106 FPDF_DWORD encodeType, |
| 105 FPDF_DWORD flag); | 107 FPDF_DWORD flag); |
| 106 void ToXFAContentFlags(CFX_WideString csSrcContent, FPDF_DWORD& flag); | 108 void ToXFAContentFlags(CFX_WideString csSrcContent, FPDF_DWORD& flag); |
| 107 | 109 |
| 108 CPDFXFA_Context* const m_pContext; // Not owned; | 110 CPDFXFA_Context* const m_pContext; // Not owned; |
| 109 IJS_Context* m_pJSContext; | 111 IJS_Context* m_pJSContext; |
| 110 }; | 112 }; |
| 111 | 113 |
| 112 #endif // FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_ | 114 #endif // FPDFSDK_FPDFXFA_CPDFXFA_DOCENVIRONMENT_H_ |
| OLD | NEW |