From c268464fffb9b38b65d5392b69bd80a43bba189a Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Fri, 8 Jun 2018 18:31:04 +0000 Subject: Allow setting current page on Foreground XFA docs This changes the check from being for a Full XFA document to any XFA document. Though the value correctly ends up in Chrome, adjusting the current page appears to not be working correctly in Chrome, so this doesn't fully resolve the related bug. BUG=pdfium:1108 Change-Id: I2a5c37e2c64db96cabe8b5b1c277698ebca21949 Reviewed-on: https://pdfium-review.googlesource.com/34650 Reviewed-by: Henrique Nakashima Commit-Queue: Ryan Harrison --- fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index 81e5fd08f4..faa2fa5e42 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -363,7 +363,7 @@ int32_t CPDFXFA_DocEnvironment::GetCurrentPage(CXFA_FFDoc* hDoc) { void CPDFXFA_DocEnvironment::SetCurrentPage(CXFA_FFDoc* hDoc, int32_t iCurPage) { if (hDoc != m_pContext->GetXFADoc() || !m_pContext->GetFormFillEnv() || - m_pContext->GetFormType() != FormType::kXFAFull || iCurPage < 0 || + !m_pContext->ContainsXFAForm() || iCurPage < 0 || iCurPage >= m_pContext->GetFormFillEnv()->GetPageCount()) { return; } -- cgit v1.2.3