Index: fpdfsdk/src/fpdfformfill.cpp |
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp |
index e86a47be5551c91992bc1039fb19bdec5dfb30cc..7b1c021971db69dd01ba4264f95865cdbe703221 100644 |
--- a/fpdfsdk/src/fpdfformfill.cpp |
+++ b/fpdfsdk/src/fpdfformfill.cpp |
@@ -42,10 +42,9 @@ DLLEXPORT int STDCALL FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle, |
FPDF_PAGE page, |
double page_x, |
double page_y) { |
- if (!page || !hHandle) |
+ if (!hHandle) |
return -1; |
- |
- CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage(); |
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page); |
if (pPage) { |
CPDF_InterForm interform(pPage->m_pDocument, FALSE); |
CPDF_FormControl* pFormCtrl = interform.GetControlAtPoint( |
@@ -115,10 +114,11 @@ DLLEXPORT int STDCALL FPDFPage_FormFieldZOrderAtPoint(FPDF_FORMHANDLE hHandle, |
FPDF_PAGE page, |
double page_x, |
double page_y) { |
- if (!page || !hHandle) |
+ if (!hHandle) |
+ return -1; |
+ CPDF_Page* pPage = CPDFPageFromFPDFPage(page); |
+ if (!pPage) |
return -1; |
- |
- CPDF_Page* pPage = (CPDF_Page*)page; |
CPDF_InterForm interform(pPage->m_pDocument, FALSE); |
int z_order = -1; |
(void)interform.GetControlAtPoint(pPage, (FX_FLOAT)page_x, (FX_FLOAT)page_y, |
@@ -269,7 +269,7 @@ DLLEXPORT void STDCALL FPDF_FFLDraw(FPDF_FORMHANDLE hHandle, |
if (!hHandle || !page) |
return; |
- CPDFXFA_Page* pPage = (CPDFXFA_Page*)page; |
+ CPDFXFA_Page* pPage = (CPDFXFA_Page*)pPage; |
Lei Zhang
2015/10/16 20:20:28
This is wrong still?
Tom Sepez
2015/10/16 20:38:45
ugh. Done.
|
CPDFXFA_Document* pDocument = pPage->GetDocument(); |
if (!pDocument) |
return; |