OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_FXFA_APP_XFA_FFDOC_H_ | |
8 #define XFA_FXFA_APP_XFA_FFDOC_H_ | |
9 | |
10 #include "xfa/fxfa/parser/xfa_document.h" | |
11 #include "xfa/include/fxfa/fxfa.h" | |
12 | |
13 class CXFA_FFApp; | |
14 class CXFA_FFNotify; | |
15 class CXFA_FFDocView; | |
16 | |
17 struct FX_IMAGEDIB_AND_DPI { | |
18 CFX_DIBSource* pDibSource; | |
19 int32_t iImageXDpi; | |
20 int32_t iImageYDpi; | |
21 }; | |
22 | |
23 class CXFA_FFDoc : public IXFA_Doc { | |
24 public: | |
25 CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocProvider* pDocProvider); | |
26 ~CXFA_FFDoc(); | |
27 IXFA_DocProvider* GetDocProvider() { return m_pDocProvider; } | |
28 uint32_t GetDocType(); | |
29 int32_t StartLoad(); | |
30 int32_t DoLoad(IFX_Pause* pPause = NULL); | |
31 void StopLoad(); | |
32 IXFA_DocView* CreateDocView(uint32_t dwView = 0); | |
33 FX_BOOL OpenDoc(IFX_FileRead* pStream, FX_BOOL bTakeOverFile); | |
34 FX_BOOL OpenDoc(CPDF_Document* pPDFDoc); | |
35 FX_BOOL CloseDoc(); | |
36 void SetDocType(uint32_t dwType); | |
37 CXFA_Document* GetXFADoc() { return m_pDocument; } | |
38 CXFA_FFApp* GetApp() { return m_pApp; } | |
39 CXFA_FFDocView* GetDocView(IXFA_DocLayout* pLayout); | |
40 CXFA_FFDocView* GetDocView(); | |
41 CPDF_Document* GetPDFDoc(); | |
42 CFX_DIBitmap* GetPDFNamedImage(const CFX_WideStringC& wsName, | |
43 int32_t& iImageXDpi, | |
44 int32_t& iImageYDpi); | |
45 CFDE_XMLElement* GetPackageData(const CFX_WideStringC& wsPackage); | |
46 FX_BOOL SavePackage(const CFX_WideStringC& wsPackage, | |
47 IFX_FileWrite* pFile, | |
48 IXFA_ChecksumContext* pCSContext = NULL); | |
49 FX_BOOL ImportData(IFX_FileRead* pStream, FX_BOOL bXDP = TRUE); | |
50 | |
51 protected: | |
52 IXFA_DocProvider* m_pDocProvider; | |
53 CXFA_Document* m_pDocument; | |
54 IFX_FileRead* m_pStream; | |
55 CXFA_FFApp* m_pApp; | |
56 CXFA_FFNotify* m_pNotify; | |
57 CPDF_Document* m_pPDFDoc; | |
58 CFX_MapPtrToPtr m_mapNamedImages; | |
59 CFX_MapPtrToPtr m_mapTypeToDocView; | |
60 uint32_t m_dwDocType; | |
61 FX_BOOL m_bOwnStream; | |
62 }; | |
63 | |
64 #endif // XFA_FXFA_APP_XFA_FFDOC_H_ | |
OLD | NEW |