diff options
-rw-r--r-- | fpdfsdk/cpdfsdk_formfillenvironment.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_formfillenvironment.h | 5 | ||||
-rw-r--r-- | fxjs/cjs_field.cpp | 3 |
3 files changed, 6 insertions, 10 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; } diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h index eac9067730..697f51e79f 100644 --- a/fpdfsdk/cpdfsdk_formfillenvironment.h +++ b/fpdfsdk/cpdfsdk_formfillenvironment.h @@ -97,12 +97,11 @@ class CPDFSDK_FormFillEnvironment void SetCursor(int nCursorType); int SetTimer(int uElapse, TimerCallback lpTimerFunc); void KillTimer(int nTimerID); + FX_SYSTEMTIME GetLocalTime() const; + FPDF_PAGE GetCurrentPage() const; void OnChange(); - - FPDF_PAGE GetCurrentPage(UnderlyingDocumentType* document); - void ExecuteNamedAction(const char* namedAction); void OnSetFieldInputFocus(FPDF_WIDESTRING focusText, FPDF_DWORD nTextLen, diff --git a/fxjs/cjs_field.cpp b/fxjs/cjs_field.cpp index 3ae40a97a8..1e9e389d84 100644 --- a/fxjs/cjs_field.cpp +++ b/fxjs/cjs_field.cpp @@ -2531,8 +2531,7 @@ CJS_Return CJS_Field::setFocus( pWidget = pInterForm->GetWidget(pFormField->GetControl(0)); } else { UnderlyingPageType* pPage = - UnderlyingFromFPDFPage(m_pFormFillEnv->GetCurrentPage( - m_pFormFillEnv->GetUnderlyingDocument())); + UnderlyingFromFPDFPage(m_pFormFillEnv->GetCurrentPage()); if (!pPage) return CJS_Return(false); if (CPDFSDK_PageView* pCurPageView = |