Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h

Issue 2333413003: Rename CPDFDoc_Environment to CPDFSDK_Environment (Closed)
Patch Set: Review feedback Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/fpdfxfa/include/fpdfxfa_app.h ('k') | fpdfsdk/fpdfxfa/include/fpdfxfa_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ 7 #ifndef FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_
8 #define FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ 8 #define FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "fpdfsdk/fpdfxfa/include/cpdfxfa_docenvironment.h" 12 #include "fpdfsdk/fpdfxfa/include/cpdfxfa_docenvironment.h"
13 #include "xfa/fxfa/include/xfa_ffdoc.h" 13 #include "xfa/fxfa/include/xfa_ffdoc.h"
14 14
15 class CPDFSDK_Document;
16 class CPDFSDK_Environment;
15 class CPDFXFA_App; 17 class CPDFXFA_App;
16 class CPDFXFA_Page; 18 class CPDFXFA_Page;
17 class CPDFSDK_Document;
18 class CPDFDoc_Environment;
19 class CXFA_FFDocHandler; 19 class CXFA_FFDocHandler;
20 class IJS_Runtime;
21 class IJS_Context;
20 22
21 enum LoadStatus { 23 enum LoadStatus {
22 FXFA_LOADSTATUS_PRELOAD = 0, 24 FXFA_LOADSTATUS_PRELOAD = 0,
23 FXFA_LOADSTATUS_LOADING, 25 FXFA_LOADSTATUS_LOADING,
24 FXFA_LOADSTATUS_LOADED, 26 FXFA_LOADSTATUS_LOADED,
25 FXFA_LOADSTATUS_CLOSING, 27 FXFA_LOADSTATUS_CLOSING,
26 FXFA_LOADSTATUS_CLOSED 28 FXFA_LOADSTATUS_CLOSED
27 }; 29 };
28 30
29 class CPDFXFA_Document { 31 class CPDFXFA_Document {
30 public: 32 public:
31 CPDFXFA_Document(std::unique_ptr<CPDF_Document> pPDFDoc, 33 CPDFXFA_Document(std::unique_ptr<CPDF_Document> pPDFDoc,
32 CPDFXFA_App* pProvider); 34 CPDFXFA_App* pProvider);
33 ~CPDFXFA_Document(); 35 ~CPDFXFA_Document();
34 36
35 FX_BOOL LoadXFADoc(); 37 FX_BOOL LoadXFADoc();
36 CPDF_Document* GetPDFDoc() { return m_pPDFDoc.get(); } 38 CPDF_Document* GetPDFDoc() { return m_pPDFDoc.get(); }
37 CXFA_FFDoc* GetXFADoc() { return m_pXFADoc.get(); } 39 CXFA_FFDoc* GetXFADoc() { return m_pXFADoc.get(); }
38 CXFA_FFDocView* GetXFADocView() { return m_pXFADocView; } 40 CXFA_FFDocView* GetXFADocView() { return m_pXFADocView; }
39 41
40 int GetPageCount(); 42 int GetPageCount();
41 CPDFXFA_Page* GetPage(int page_index); 43 CPDFXFA_Page* GetPage(int page_index);
42 CPDFXFA_Page* GetPage(CXFA_FFPageView* pPage); 44 CPDFXFA_Page* GetPage(CXFA_FFPageView* pPage);
43 45
44 void DeletePage(int page_index); 46 void DeletePage(int page_index);
45 void RemovePage(CPDFXFA_Page* page); 47 void RemovePage(CPDFXFA_Page* page);
46 int GetDocType() { return m_iDocType; } 48 int GetDocType() { return m_iDocType; }
47 49
48 CPDFSDK_Document* GetSDKDocument(CPDFDoc_Environment* pFormFillEnv); 50 CPDFSDK_Document* GetSDKDocument(CPDFSDK_Environment* pFormFillEnv);
49 51
50 void ClearChangeMark(); 52 void ClearChangeMark();
51 53
52 protected: 54 protected:
53 friend class CPDFXFA_DocEnvironment; 55 friend class CPDFXFA_DocEnvironment;
54 56
55 CPDFSDK_Document* GetSDKDoc() { return m_pSDKDoc.get(); } 57 CPDFSDK_Document* GetSDKDoc() { return m_pSDKDoc.get(); }
56 int GetOriginalPageCount() const { return m_nPageCount; } 58 int GetOriginalPageCount() const { return m_nPageCount; }
57 void SetOriginalPageCount(int count) { 59 void SetOriginalPageCount(int count) {
58 m_nPageCount = count; 60 m_nPageCount = count;
(...skipping 24 matching lines...) Expand all
83 CPDFXFA_App* const m_pApp; 85 CPDFXFA_App* const m_pApp;
84 CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList; 86 CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList;
85 LoadStatus m_nLoadStatus; 87 LoadStatus m_nLoadStatus;
86 int m_nPageCount; 88 int m_nPageCount;
87 89
88 // Must be destroy before |m_pSDKDoc|. 90 // Must be destroy before |m_pSDKDoc|.
89 CPDFXFA_DocEnvironment m_DocEnv; 91 CPDFXFA_DocEnvironment m_DocEnv;
90 }; 92 };
91 93
92 #endif // FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ 94 #endif // FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfxfa/include/fpdfxfa_app.h ('k') | fpdfsdk/fpdfxfa/include/fpdfxfa_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698