| 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_INCLUDE_CPDFSDK_DOCUMENT_H_ | 7 #ifndef FPDFSDK_INCLUDE_CPDFSDK_DOCUMENT_H_ |
| 8 #define FPDFSDK_INCLUDE_CPDFSDK_DOCUMENT_H_ | 8 #define FPDFSDK_INCLUDE_CPDFSDK_DOCUMENT_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 CPDF_Document* pDstDoc); | 75 CPDF_Document* pDstDoc); |
| 76 FX_BOOL InsertPages(int nInsertAt, | 76 FX_BOOL InsertPages(int nInsertAt, |
| 77 const CPDF_Document* pSrcDoc, | 77 const CPDF_Document* pSrcDoc, |
| 78 const std::vector<uint16_t>& arrSrcPages); | 78 const std::vector<uint16_t>& arrSrcPages); |
| 79 FX_BOOL ReplacePages(int nPage, | 79 FX_BOOL ReplacePages(int nPage, |
| 80 const CPDF_Document* pSrcDoc, | 80 const CPDF_Document* pSrcDoc, |
| 81 const std::vector<uint16_t>& arrSrcPages); | 81 const std::vector<uint16_t>& arrSrcPages); |
| 82 | 82 |
| 83 void OnCloseDocument(); | 83 void OnCloseDocument(); |
| 84 | 84 |
| 85 int GetPageCount() { return m_pDoc->GetPageCount(); } | 85 int GetPageCount() { |
| 86 #ifdef PDF_ENABLE_XFA |
| 87 return m_pDoc->GetXFAPageCount(); |
| 88 #else // PDF_ENABLE_XFA |
| 89 return m_pDoc->GetPageCount(); |
| 90 #endif // PDF_ENABLE_XFA |
| 91 } |
| 86 FX_BOOL GetPermissions(int nFlag); | 92 FX_BOOL GetPermissions(int nFlag); |
| 87 FX_BOOL GetChangeMark() { return m_bChangeMask; } | 93 FX_BOOL GetChangeMark() { return m_bChangeMask; } |
| 88 void SetChangeMark() { m_bChangeMask = TRUE; } | 94 void SetChangeMark() { m_bChangeMask = TRUE; } |
| 89 void ClearChangeMark() { m_bChangeMask = FALSE; } | 95 void ClearChangeMark() { m_bChangeMask = FALSE; } |
| 90 CFX_WideString GetPath(); | 96 CFX_WideString GetPath(); |
| 91 UnderlyingPageType* GetPage(int nIndex); | 97 UnderlyingPageType* GetPage(int nIndex); |
| 92 CPDFSDK_Environment* GetEnv() { return m_pEnv; } | 98 CPDFSDK_Environment* GetEnv() { return m_pEnv; } |
| 93 void ProcJavascriptFun(); | 99 void ProcJavascriptFun(); |
| 94 FX_BOOL ProcOpenAction(); | 100 FX_BOOL ProcOpenAction(); |
| 95 CPDF_OCContext* GetOCContext(); | 101 CPDF_OCContext* GetOCContext(); |
| 96 | 102 |
| 97 private: | 103 private: |
| 98 std::map<UnderlyingPageType*, CPDFSDK_PageView*> m_pageMap; | 104 std::map<UnderlyingPageType*, CPDFSDK_PageView*> m_pageMap; |
| 99 UnderlyingDocumentType* m_pDoc; | 105 UnderlyingDocumentType* m_pDoc; |
| 100 std::unique_ptr<CPDFSDK_InterForm> m_pInterForm; | 106 std::unique_ptr<CPDFSDK_InterForm> m_pInterForm; |
| 101 CPDFSDK_Annot* m_pFocusAnnot; | 107 CPDFSDK_Annot* m_pFocusAnnot; |
| 102 CPDFSDK_Environment* m_pEnv; | 108 CPDFSDK_Environment* m_pEnv; |
| 103 std::unique_ptr<CPDF_OCContext> m_pOccontent; | 109 std::unique_ptr<CPDF_OCContext> m_pOccontent; |
| 104 FX_BOOL m_bChangeMask; | 110 FX_BOOL m_bChangeMask; |
| 105 FX_BOOL m_bBeingDestroyed; | 111 FX_BOOL m_bBeingDestroyed; |
| 106 }; | 112 }; |
| 107 | 113 |
| 108 #endif // FPDFSDK_INCLUDE_CPDFSDK_DOCUMENT_H_ | 114 #endif // FPDFSDK_INCLUDE_CPDFSDK_DOCUMENT_H_ |
| OLD | NEW |