summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfformfill.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-25 15:15:31 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-25 15:15:31 -0800
commit1b2462846b5deee5b142251cbe2bb7d7c07df41b (patch)
tree4338992c2fe5d005c0cbbd5d1a68b54eb3fe1709 /fpdfsdk/src/fpdfformfill.cpp
parent5c4c193fd4b6dd0657abf5e74125f9887f91d720 (diff)
downloadpdfium-1b2462846b5deee5b142251cbe2bb7d7c07df41b.tar.xz
XFA: More underlying types
Precursor to https://codereview.chromium.org/1477583002/ Also: whitespace in fxjs_v8.h Merge where possible. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1472363003 .
Diffstat (limited to 'fpdfsdk/src/fpdfformfill.cpp')
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index 5dcfb47890..0798c4e190 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -269,13 +269,17 @@ DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,
int size_y,
int rotate,
int flags) {
- if (!hHandle || !page)
+ if (!hHandle)
+ return;
+
+ UnderlyingPageType* pPage = UnderlyingFromFPDFPage(page);
+ if (!pPage)
return;
- CPDFXFA_Page* pPage = (CPDFXFA_Page*)page;
CPDFXFA_Document* pDocument = pPage->GetDocument();
if (!pDocument)
return;
+
CPDF_Document* pPDFDoc = pDocument->GetPDFDoc();
if (!pPDFDoc)
return;
@@ -321,7 +325,7 @@ DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle,
options.m_AddFlags = flags >> 8;
options.m_pOCContext = new CPDF_OCContext(pPDFDoc);
- if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView((CPDFXFA_Page*)page))
+ if (CPDFSDK_PageView* pPageView = pFXDoc->GetPageView(pPage))
pPageView->PageView_OnDraw(pDevice.get(), &matrix, &options, clip);
pDevice->RestoreState();