summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_formfillenvironment.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-27 19:31:48 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-27 19:31:48 +0000
commit2b053ce82e921984ee191b26fe9a760ba1508a66 (patch)
tree208b644713ee6341bc89f010f3798242bd08db61 /fpdfsdk/cpdfsdk_formfillenvironment.cpp
parent96723705bfa2f569d1b67541f08c8fbc86a18ec7 (diff)
downloadpdfium-2b053ce82e921984ee191b26fe9a760ba1508a66.tar.xz
Remove argument from CPDFSDK_FormFillEnvironment::GetCurrentPage
Small tidying. The form fill environment is 1:1 with documents, and already knows its underlying document. The callers all first obtain this from the FFE and then pass it back into it. Change-Id: I33835c1dc847ca67f2cc633c87af2f6e003ef58a Reviewed-on: https://pdfium-review.googlesource.com/31591 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_formfillenvironment.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_formfillenvironment.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index a115355d9c..b9dbfe7785 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -287,10 +287,9 @@ void CPDFSDK_FormFillEnvironment::OnChange() {
m_pInfo->FFI_OnChange(m_pInfo);
}
-FPDF_PAGE CPDFSDK_FormFillEnvironment::GetCurrentPage(
- UnderlyingDocumentType* document) {
+FPDF_PAGE CPDFSDK_FormFillEnvironment::GetCurrentPage() const {
if (m_pInfo && m_pInfo->FFI_GetCurrentPage)
- return m_pInfo->FFI_GetCurrentPage(m_pInfo, document);
+ return m_pInfo->FFI_GetCurrentPage(m_pInfo, m_pUnderlyingDoc.Get());
return nullptr;
}
@@ -545,8 +544,7 @@ CPDFSDK_PageView* CPDFSDK_FormFillEnvironment::GetPageView(
}
CPDFSDK_PageView* CPDFSDK_FormFillEnvironment::GetCurrentView() {
- UnderlyingPageType* pPage =
- UnderlyingFromFPDFPage(GetCurrentPage(m_pUnderlyingDoc.Get()));
+ UnderlyingPageType* pPage = UnderlyingFromFPDFPage(GetCurrentPage());
return pPage ? GetPageView(pPage, true) : nullptr;
}