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_progressive.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_progressive.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_progressive.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdf_progressive.cpp b/fpdfsdk/src/fpdf_progressive.cpp index 2490df8c2f..5226770d48 100644 --- a/fpdfsdk/src/fpdf_progressive.cpp +++ b/fpdfsdk/src/fpdf_progressive.cpp @@ -8,6 +8,8 @@ #include "../include/fsdk_define.h" #include "../include/fpdfview.h" #include "../include/fsdk_rendercontext.h" +#include "../include/fpdfxfa/fpdfxfa_doc.h" +#include "../include/fpdfxfa/fpdfxfa_page.h" extern void (*Func_RenderPage)( CRenderContext*, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags,FX_BOOL bNeedToRestore, IFSDK_PAUSE_Adapter * pause ); @@ -28,7 +30,9 @@ DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start( FPDF_BITMAP bitmap, FPDF_PAGE if (pause->version !=1) return FPDF_RENDER_FAILED; - CPDF_Page* pPage = (CPDF_Page*)page; + CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage(); + if (!pPage) + return FPDF_RENDER_FAILED; // FXMT_CSLOCK_OBJ(&pPage->m_PageLock); @@ -71,7 +75,9 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * paus if (pause->version !=1) return FPDF_RENDER_FAILED; - CPDF_Page* pPage = (CPDF_Page*)page; + CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage(); + if (!pPage) + return FPDF_RENDER_FAILED; // FXMT_CSLOCK_OBJ(&pPage->m_PageLock); @@ -92,7 +98,8 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,IFSDK_PAUSE * paus DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page) { if (page == NULL) return; - CPDF_Page* pPage = (CPDF_Page*)page; + CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage(); + if (!pPage) return; // FXMT_CSLOCK_OBJ(&pPage->m_PageLock); |