diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-06-08 18:31:04 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-08 18:31:04 +0000 |
commit | c268464fffb9b38b65d5392b69bd80a43bba189a (patch) | |
tree | 0937ab2f2bfbb7a8a9975228c297cc6ef7ffbf75 /fpdfsdk/fpdfxfa | |
parent | 1699982f45d01cb18585eba80cce5326a63d3b67 (diff) | |
download | pdfium-c268464fffb9b38b65d5392b69bd80a43bba189a.tar.xz |
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 <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |