Fix the use of pdfium

FPDF_LoadPage returns FPDF_PAGE and that's also what expected by other APIs. There's no need for conversion.

This works now because FPDF_PAGE is defined as void*. But will fails with new pdfium.

Bug: 155031873
Change-Id: I74381ec8ec36797a5901ea3de845c2b5d798ba0c
Merged-In: I74381ec8ec36797a5901ea3de845c2b5d798ba0c
This commit is contained in:
Haibo Huang
2020-04-28 12:49:51 -07:00
parent 12df9e3d69
commit f63ff6781f

View File

@@ -111,7 +111,7 @@ static void nativeSetTransformAndClip(JNIEnv* env, jclass thiz, jlong documentPt
jlong transformPtr, jint clipLeft, jint clipTop, jint clipRight, jint clipBottom) {
FPDF_DOCUMENT document = reinterpret_cast<FPDF_DOCUMENT>(documentPtr);
FPDF_PAGE* page = (FPDF_PAGE*) FPDF_LoadPage(document, pageIndex);
FPDF_PAGE page = FPDF_LoadPage(document, pageIndex);
if (!page) {
jniThrowException(env, "java/lang/IllegalStateException",
"cannot open page");