| OLD | NEW |
| 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 XFA_FXFA_INCLUDE_XFA_FFDOC_H_ | 7 #ifndef XFA_FXFA_INCLUDE_XFA_FFDOC_H_ |
| 8 #define XFA_FXFA_INCLUDE_XFA_FFDOC_H_ | 8 #define XFA_FXFA_INCLUDE_XFA_FFDOC_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 IXFA_DocProvider* GetDocProvider() { return m_pDocProvider; } | 31 IXFA_DocProvider* GetDocProvider() { return m_pDocProvider; } |
| 32 uint32_t GetDocType(); | 32 uint32_t GetDocType(); |
| 33 int32_t StartLoad(); | 33 int32_t StartLoad(); |
| 34 int32_t DoLoad(IFX_Pause* pPause = nullptr); | 34 int32_t DoLoad(IFX_Pause* pPause = nullptr); |
| 35 void StopLoad(); | 35 void StopLoad(); |
| 36 CXFA_FFDocView* CreateDocView(uint32_t dwView = 0); | 36 CXFA_FFDocView* CreateDocView(uint32_t dwView = 0); |
| 37 FX_BOOL OpenDoc(IFX_FileRead* pStream, FX_BOOL bTakeOverFile); | 37 FX_BOOL OpenDoc(IFX_FileRead* pStream, FX_BOOL bTakeOverFile); |
| 38 FX_BOOL OpenDoc(CPDF_Document* pPDFDoc); | 38 FX_BOOL OpenDoc(CPDF_Document* pPDFDoc); |
| 39 FX_BOOL CloseDoc(); | 39 FX_BOOL CloseDoc(); |
| 40 void SetDocType(uint32_t dwType); | 40 void SetDocType(uint32_t dwType); |
| 41 CXFA_Document* GetXFADoc() { return m_pDocument; } | 41 CXFA_Document* GetXFADoc() { return m_pDocumentParser->GetDocument(); } |
| 42 CXFA_FFApp* GetApp() { return m_pApp; } | 42 CXFA_FFApp* GetApp() { return m_pApp; } |
| 43 CXFA_FFDocView* GetDocView(CXFA_LayoutProcessor* pLayout); | 43 CXFA_FFDocView* GetDocView(CXFA_LayoutProcessor* pLayout); |
| 44 CXFA_FFDocView* GetDocView(); | 44 CXFA_FFDocView* GetDocView(); |
| 45 CPDF_Document* GetPDFDoc(); | 45 CPDF_Document* GetPDFDoc(); |
| 46 CFX_DIBitmap* GetPDFNamedImage(const CFX_WideStringC& wsName, | 46 CFX_DIBitmap* GetPDFNamedImage(const CFX_WideStringC& wsName, |
| 47 int32_t& iImageXDpi, | 47 int32_t& iImageXDpi, |
| 48 int32_t& iImageYDpi); | 48 int32_t& iImageYDpi); |
| 49 | 49 |
| 50 bool SavePackage(XFA_HashCode code, | 50 bool SavePackage(XFA_HashCode code, |
| 51 IFX_FileWrite* pFile, | 51 IFX_FileWrite* pFile, |
| 52 CXFA_ChecksumContext* pCSContext); | 52 CXFA_ChecksumContext* pCSContext); |
| 53 FX_BOOL ImportData(IFX_FileRead* pStream, FX_BOOL bXDP = TRUE); | 53 FX_BOOL ImportData(IFX_FileRead* pStream, FX_BOOL bXDP = TRUE); |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 IXFA_DocProvider* m_pDocProvider; | 56 IXFA_DocProvider* m_pDocProvider; |
| 57 CXFA_Document* m_pDocument; | 57 std::unique_ptr<CXFA_DocumentParser> m_pDocumentParser; |
| 58 IFX_FileRead* m_pStream; | 58 IFX_FileRead* m_pStream; |
| 59 CXFA_FFApp* m_pApp; | 59 CXFA_FFApp* m_pApp; |
| 60 CXFA_FFNotify* m_pNotify; | 60 std::unique_ptr<CXFA_FFNotify> m_pNotify; |
| 61 CPDF_Document* m_pPDFDoc; | 61 CPDF_Document* m_pPDFDoc; |
| 62 std::map<uint32_t, FX_IMAGEDIB_AND_DPI> m_HashToDibDpiMap; | 62 std::map<uint32_t, FX_IMAGEDIB_AND_DPI> m_HashToDibDpiMap; |
| 63 std::map<uint32_t, std::unique_ptr<CXFA_FFDocView>> m_TypeToDocViewMap; | 63 std::map<uint32_t, std::unique_ptr<CXFA_FFDocView>> m_TypeToDocViewMap; |
| 64 uint32_t m_dwDocType; | 64 uint32_t m_dwDocType; |
| 65 FX_BOOL m_bOwnStream; | 65 FX_BOOL m_bOwnStream; |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 #endif // XFA_FXFA_INCLUDE_XFA_FFDOC_H_ | 68 #endif // XFA_FXFA_INCLUDE_XFA_FFDOC_H_ |
| OLD | NEW |