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

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

Issue 2353303004: Make creation of CPDFSDK_Document clearer (Closed)
Patch Set: Review updates 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/fpdfxfa_doc.cpp ('k') | fpdfsdk/include/cpdfsdk_environment.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>
(...skipping 20 matching lines...) Expand all
31 class CPDFXFA_Document { 31 class CPDFXFA_Document {
32 public: 32 public:
33 CPDFXFA_Document(std::unique_ptr<CPDF_Document> pPDFDoc, 33 CPDFXFA_Document(std::unique_ptr<CPDF_Document> pPDFDoc,
34 CPDFXFA_App* pProvider); 34 CPDFXFA_App* pProvider);
35 ~CPDFXFA_Document(); 35 ~CPDFXFA_Document();
36 36
37 FX_BOOL LoadXFADoc(); 37 FX_BOOL LoadXFADoc();
38 CPDF_Document* GetPDFDoc() { return m_pPDFDoc.get(); } 38 CPDF_Document* GetPDFDoc() { return m_pPDFDoc.get(); }
39 CXFA_FFDoc* GetXFADoc() { return m_pXFADoc.get(); } 39 CXFA_FFDoc* GetXFADoc() { return m_pXFADoc.get(); }
40 CXFA_FFDocView* GetXFADocView() { return m_pXFADocView; } 40 CXFA_FFDocView* GetXFADocView() { return m_pXFADocView; }
41 CPDFSDK_Document* GetSDKDocument(CPDFSDK_Environment* pFormFillEnv);
42 int GetDocType() const { return m_iDocType; } 41 int GetDocType() const { return m_iDocType; }
43 42
43 CPDFSDK_Document* GetSDKDoc() const { return m_pSDKDoc.get(); }
44 void SetSDKDoc(std::unique_ptr<CPDFSDK_Document> pSDKDoc);
45
44 void DeletePage(int page_index); 46 void DeletePage(int page_index);
45 int GetPageCount() const; 47 int GetPageCount() const;
46 48
47 CPDFXFA_Page* GetXFAPage(int page_index); 49 CPDFXFA_Page* GetXFAPage(int page_index);
48 CPDFXFA_Page* GetXFAPage(CXFA_FFPageView* pPage) const; 50 CPDFXFA_Page* GetXFAPage(CXFA_FFPageView* pPage) const;
49 51
50 void RemovePage(CPDFXFA_Page* page); 52 void RemovePage(CPDFXFA_Page* page);
51 53
52 void ClearChangeMark(); 54 void ClearChangeMark();
53 55
54 protected: 56 protected:
55 friend class CPDFXFA_DocEnvironment; 57 friend class CPDFXFA_DocEnvironment;
56 58
57 CPDFSDK_Document* GetSDKDoc() { return m_pSDKDoc.get(); }
58 int GetOriginalPageCount() const { return m_nPageCount; } 59 int GetOriginalPageCount() const { return m_nPageCount; }
59 void SetOriginalPageCount(int count) { 60 void SetOriginalPageCount(int count) {
60 m_nPageCount = count; 61 m_nPageCount = count;
61 m_XFAPageList.SetSize(count); 62 m_XFAPageList.SetSize(count);
62 } 63 }
63 64
64 LoadStatus GetLoadStatus() const { return m_nLoadStatus; } 65 LoadStatus GetLoadStatus() const { return m_nLoadStatus; }
65 66
66 CFX_ArrayTemplate<CPDFXFA_Page*>* GetXFAPageList() { return &m_XFAPageList; } 67 CFX_ArrayTemplate<CPDFXFA_Page*>* GetXFAPageList() { return &m_XFAPageList; }
67 68
(...skipping 17 matching lines...) Expand all
85 CPDFXFA_App* const m_pApp; 86 CPDFXFA_App* const m_pApp;
86 CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList; 87 CFX_ArrayTemplate<CPDFXFA_Page*> m_XFAPageList;
87 LoadStatus m_nLoadStatus; 88 LoadStatus m_nLoadStatus;
88 int m_nPageCount; 89 int m_nPageCount;
89 90
90 // Must be destroy before |m_pSDKDoc|. 91 // Must be destroy before |m_pSDKDoc|.
91 CPDFXFA_DocEnvironment m_DocEnv; 92 CPDFXFA_DocEnvironment m_DocEnv;
92 }; 93 };
93 94
94 #endif // FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_ 95 #endif // FPDFSDK_FPDFXFA_INCLUDE_FPDFXFA_DOC_H_
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp ('k') | fpdfsdk/include/cpdfsdk_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698