diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-10-28 23:03:33 -0700 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-11-03 11:10:11 -0800 |
commit | fdc00a7042d912aafaabddae4d9c84199921ef23 (patch) | |
tree | 32ab8ac91cc68d2cd15b9168782a71b3f3f5e7b9 /fpdfsdk/src/fpdf_dataavail.cpp | |
parent | e9b38fa38de2c95d8260be31c57d9272c4d127ed (diff) | |
download | pdfium-fdc00a7042d912aafaabddae4d9c84199921ef23.tar.xz |
Merge XFA to PDFium master at 4dc95e7 on 10/28/2014
Diffstat (limited to 'fpdfsdk/src/fpdf_dataavail.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_dataavail.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fpdfsdk/src/fpdf_dataavail.cpp b/fpdfsdk/src/fpdf_dataavail.cpp index b5483f9c39..efd12078a4 100644 --- a/fpdfsdk/src/fpdf_dataavail.cpp +++ b/fpdfsdk/src/fpdf_dataavail.cpp @@ -6,6 +6,9 @@ #include "../include/fsdk_define.h" #include "../include/fpdf_dataavail.h" +#include "../include/fpdfxfa/fpdfxfa_doc.h" +#include "../include/fpdfformfill.h" +#include "../include/fpdfxfa/fpdfxfa_app.h" extern void ProcessParseError(FX_DWORD err_code); class CFPDF_FileAvailWrap : public IFX_FileAvail @@ -133,13 +136,19 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDFAvail_GetDocument(FPDF_AVAIL avail, FPDF_BYT } ((CFPDF_DataAvail*)avail)->m_pDataAvail->SetDocument(pParser->GetDocument()); CheckUnSupportError(pParser->GetDocument(), FPDF_ERR_SUCCESS); - return pParser->GetDocument(); + CPDF_Document* pPDFDoc = pParser->GetDocument(); + + CPDFXFA_App* pApp = FPDFXFA_GetApp(); + CPDFXFA_Document* pDocument = FX_NEW CPDFXFA_Document(pPDFDoc, pApp); + //pDocument->LoadXFADoc(); + + return pDocument; } DLLEXPORT int STDCALL FPDFAvail_GetFirstPageNum(FPDF_DOCUMENT doc) { if (doc == NULL) return 0; - CPDF_Document* pDoc = (CPDF_Document*)doc; + CPDF_Document* pDoc = ((CPDFXFA_Document*)doc)->GetPDFDoc(); return ((CPDF_Parser*)pDoc->GetParser())->GetFirstPageNo(); } |