summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/cfx_systemhandler.cpp19
-rw-r--r--fpdfsdk/cpdfsdk_annothandlermgr.cpp4
-rw-r--r--fpdfsdk/cpdfsdk_document.cpp8
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp12
-rw-r--r--fpdfsdk/cpdfsdk_pageview.cpp6
-rw-r--r--fpdfsdk/formfiller/cffl_combobox.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_iformfiller.cpp52
-rw-r--r--fpdfsdk/formfiller/cffl_textfield.cpp8
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp44
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_app.cpp35
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_util.cpp4
-rw-r--r--fpdfsdk/fpdfxfa/include/fpdfxfa_app.h3
-rw-r--r--fpdfsdk/fsdk_actionhandler.cpp6
-rw-r--r--fpdfsdk/include/cpdfsdk_environment.h328
-rw-r--r--fpdfsdk/javascript/Document.cpp4
-rw-r--r--fpdfsdk/javascript/Field.cpp2
-rw-r--r--fpdfsdk/javascript/app.cpp4
-rw-r--r--public/fpdf_formfill.h2
-rw-r--r--xfa/fxfa/include/fxfa.h3
-rw-r--r--xfa/fxfa/parser/cscript_hostpseudomodel.cpp20
21 files changed, 259 insertions, 313 deletions
diff --git a/fpdfsdk/cfx_systemhandler.cpp b/fpdfsdk/cfx_systemhandler.cpp
index eb9cff28df..784ed4ebd9 100644
--- a/fpdfsdk/cfx_systemhandler.cpp
+++ b/fpdfsdk/cfx_systemhandler.cpp
@@ -35,7 +35,7 @@ int CharSet2CP(int charset) {
} // namespace
void CFX_SystemHandler::SetCursor(int32_t nCursorType) {
- m_pEnv->FFI_SetCursor(nCursorType);
+ m_pEnv->SetCursor(nCursorType);
}
void CFX_SystemHandler::InvalidateRect(FX_HWND hWnd, FX_RECT rect) {
@@ -56,8 +56,7 @@ void CFX_SystemHandler::InvalidateRect(FX_HWND hWnd, FX_RECT rect) {
CFX_FloatRect rcPDF(left, bottom, right, top);
rcPDF.Normalize();
- m_pEnv->FFI_Invalidate(pPage, rcPDF.left, rcPDF.top, rcPDF.right,
- rcPDF.bottom);
+ m_pEnv->Invalidate(pPage, rcPDF.left, rcPDF.top, rcPDF.right, rcPDF.bottom);
}
void CFX_SystemHandler::OutputSelectedRect(void* pFormFiller,
@@ -74,7 +73,7 @@ void CFX_SystemHandler::OutputSelectedRect(void* pFormFiller,
UnderlyingPageType* pPage = pAnnot->GetUnderlyingPage();
ASSERT(pPage);
- m_pEnv->FFI_OutputSelectedRect(pPage, ptA.x, ptB.y, ptB.x, ptA.y);
+ m_pEnv->OutputSelectedRect(pPage, ptA.x, ptB.y, ptB.x, ptA.y);
}
bool CFX_SystemHandler::IsSelectionImplemented() const {
@@ -120,25 +119,25 @@ CPDF_Font* CFX_SystemHandler::AddNativeTrueTypeFontToPDF(
int32_t CFX_SystemHandler::SetTimer(int32_t uElapse,
TimerCallback lpTimerFunc) {
- return m_pEnv->FFI_SetTimer(uElapse, lpTimerFunc);
+ return m_pEnv->SetTimer(uElapse, lpTimerFunc);
}
void CFX_SystemHandler::KillTimer(int32_t nID) {
- m_pEnv->FFI_KillTimer(nID);
+ m_pEnv->KillTimer(nID);
}
FX_SYSTEMTIME CFX_SystemHandler::GetLocalTime() {
- return m_pEnv->FFI_GetLocalTime();
+ return m_pEnv->GetLocalTime();
}
bool CFX_SystemHandler::IsSHIFTKeyDown(uint32_t nFlag) const {
- return !!m_pEnv->FFI_IsSHIFTKeyDown(nFlag);
+ return !!m_pEnv->IsSHIFTKeyDown(nFlag);
}
bool CFX_SystemHandler::IsCTRLKeyDown(uint32_t nFlag) const {
- return !!m_pEnv->FFI_IsCTRLKeyDown(nFlag);
+ return !!m_pEnv->IsCTRLKeyDown(nFlag);
}
bool CFX_SystemHandler::IsALTKeyDown(uint32_t nFlag) const {
- return !!m_pEnv->FFI_IsALTKeyDown(nFlag);
+ return !!m_pEnv->IsALTKeyDown(nFlag);
}
diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
index 347328ec5a..443ee05bb6 100644
--- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp
+++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
@@ -193,14 +193,14 @@ FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot,
FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnKeyDown(CPDFSDK_Annot* pAnnot,
int nKeyCode,
int nFlag) {
- if (m_pApp->FFI_IsCTRLKeyDown(nFlag) || m_pApp->FFI_IsALTKeyDown(nFlag))
+ if (m_pApp->IsCTRLKeyDown(nFlag) || m_pApp->IsALTKeyDown(nFlag))
return GetAnnotHandler(pAnnot)->OnKeyDown(pAnnot, nKeyCode, nFlag);
CPDFSDK_PageView* pPage = pAnnot->GetPageView();
CPDFSDK_Annot* pFocusAnnot = pPage->GetFocusAnnot();
if (pFocusAnnot && (nKeyCode == FWL_VKEY_Tab)) {
CPDFSDK_Annot* pNext =
- GetNextAnnot(pFocusAnnot, !m_pApp->FFI_IsSHIFTKeyDown(nFlag));
+ GetNextAnnot(pFocusAnnot, !m_pApp->IsSHIFTKeyDown(nFlag));
if (pNext && pNext != pFocusAnnot) {
CPDFSDK_Document* pDocument = pPage->GetSDKDocument();
diff --git a/fpdfsdk/cpdfsdk_document.cpp b/fpdfsdk/cpdfsdk_document.cpp
index c175089b0e..fc09e8a796 100644
--- a/fpdfsdk/cpdfsdk_document.cpp
+++ b/fpdfsdk/cpdfsdk_document.cpp
@@ -66,13 +66,13 @@ CPDFSDK_PageView* CPDFSDK_Document::GetPageView(
CPDFSDK_PageView* CPDFSDK_Document::GetCurrentView() {
UnderlyingPageType* pPage =
- UnderlyingFromFPDFPage(m_pEnv->FFI_GetCurrentPage(m_pDoc));
+ UnderlyingFromFPDFPage(m_pEnv->GetCurrentPage(m_pDoc));
return pPage ? GetPageView(pPage, true) : nullptr;
}
CPDFSDK_PageView* CPDFSDK_Document::GetPageView(int nIndex) {
UnderlyingPageType* pTempPage =
- UnderlyingFromFPDFPage(m_pEnv->FFI_GetPage(m_pDoc, nIndex));
+ UnderlyingFromFPDFPage(m_pEnv->GetPage(m_pDoc, nIndex));
if (!pTempPage)
return nullptr;
@@ -154,7 +154,7 @@ void CPDFSDK_Document::RemovePageView(UnderlyingPageType* pUnderlyingPage) {
}
UnderlyingPageType* CPDFSDK_Document::GetPage(int nIndex) {
- return UnderlyingFromFPDFPage(m_pEnv->FFI_GetPage(m_pDoc, nIndex));
+ return UnderlyingFromFPDFPage(m_pEnv->GetPage(m_pDoc, nIndex));
}
CPDFSDK_InterForm* CPDFSDK_Document::GetInterForm() {
@@ -231,7 +231,7 @@ FX_BOOL CPDFSDK_Document::KillFocusAnnot(FX_UINT nFlag) {
int nFieldType = pWidget->GetFieldType();
if (FIELDTYPE_TEXTFIELD == nFieldType ||
FIELDTYPE_COMBOBOX == nFieldType) {
- m_pEnv->FFI_OnSetFieldInputFocus(nullptr, nullptr, 0, FALSE);
+ m_pEnv->OnSetFieldInputFocus(nullptr, nullptr, 0, FALSE);
}
}
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index 405a419b86..12def4ca28 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -347,8 +347,8 @@ void CPDFSDK_InterForm::UpdateField(CPDF_FormField* pFormField) {
CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage, false);
FX_RECT rcBBox = pIFormFiller->GetViewBBox(pPageView, pWidget);
- pEnv->FFI_Invalidate(pPage, rcBBox.left, rcBBox.top, rcBBox.right,
- rcBBox.bottom);
+ pEnv->Invalidate(pPage, rcBBox.left, rcBBox.top, rcBBox.right,
+ rcBBox.bottom);
}
}
}
@@ -366,8 +366,8 @@ FX_BOOL CPDFSDK_InterForm::OnKeyStrokeCommit(CPDF_FormField* pFormField,
CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
CPDFSDK_ActionHandler* pActionHandler = pEnv->GetActionHander();
PDFSDK_FieldAction fa;
- fa.bModifier = pEnv->FFI_IsCTRLKeyDown(0);
- fa.bShift = pEnv->FFI_IsSHIFTKeyDown(0);
+ fa.bModifier = pEnv->IsCTRLKeyDown(0);
+ fa.bShift = pEnv->IsSHIFTKeyDown(0);
fa.sValue = csValue;
pActionHandler->DoAction_FieldJavaScript(action, CPDF_AAction::KeyStroke,
m_pDocument, pFormField, fa);
@@ -387,8 +387,8 @@ FX_BOOL CPDFSDK_InterForm::OnValidate(CPDF_FormField* pFormField,
CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
CPDFSDK_ActionHandler* pActionHandler = pEnv->GetActionHander();
PDFSDK_FieldAction fa;
- fa.bModifier = pEnv->FFI_IsCTRLKeyDown(0);
- fa.bShift = pEnv->FFI_IsSHIFTKeyDown(0);
+ fa.bModifier = pEnv->IsCTRLKeyDown(0);
+ fa.bShift = pEnv->IsSHIFTKeyDown(0);
fa.sValue = csValue;
pActionHandler->DoAction_FieldJavaScript(action, CPDF_AAction::Validate,
m_pDocument, pFormField, fa);
diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp
index a3049a265a..7fed794d28 100644
--- a/fpdfsdk/cpdfsdk_pageview.cpp
+++ b/fpdfsdk/cpdfsdk_pageview.cpp
@@ -524,14 +524,14 @@ void CPDFSDK_PageView::ClearFXAnnots() {
void CPDFSDK_PageView::UpdateRects(const std::vector<CFX_FloatRect>& rects) {
CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
for (const auto& rc : rects)
- pEnv->FFI_Invalidate(m_page, rc.left, rc.top, rc.right, rc.bottom);
+ pEnv->Invalidate(m_page, rc.left, rc.top, rc.right, rc.bottom);
}
void CPDFSDK_PageView::UpdateView(CPDFSDK_Annot* pAnnot) {
CFX_FloatRect rcWindow = pAnnot->GetRect();
CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
- pEnv->FFI_Invalidate(m_page, rcWindow.left, rcWindow.top, rcWindow.right,
- rcWindow.bottom);
+ pEnv->Invalidate(m_page, rcWindow.left, rcWindow.top, rcWindow.right,
+ rcWindow.bottom);
}
int CPDFSDK_PageView::GetPageIndex() const {
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp
index 7ff09b7948..448b0d94b9 100644
--- a/fpdfsdk/formfiller/cffl_combobox.cpp
+++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -271,8 +271,8 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
- m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer,
- nCharacters, TRUE);
+ m_pApp->OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer,
+ nCharacters, TRUE);
}
}
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 99fc0808ff..3248c3b6c5 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -565,7 +565,7 @@ FX_BOOL CFFL_FormFiller::IsFieldFull(CPDFSDK_PageView* pPageView) {
#endif // PDF_ENABLE_XFA
void CFFL_FormFiller::SetChangeMark() {
- m_pApp->FFI_OnChange();
+ m_pApp->OnChange();
}
void CFFL_FormFiller::GetActionData(CPDFSDK_PageView* pPageView,
@@ -615,7 +615,7 @@ void CFFL_FormFiller::InvalidateRect(double left,
double right,
double bottom) {
UnderlyingPageType* pPage = m_pWidget->GetUnderlyingPage();
- m_pApp->FFI_Invalidate(pPage, left, top, right, bottom);
+ m_pApp->Invalidate(pPage, left, top, right, bottom);
}
CFFL_Button::CFFL_Button(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pWidget)
diff --git a/fpdfsdk/formfiller/cffl_iformfiller.cpp b/fpdfsdk/formfiller/cffl_iformfiller.cpp
index 09e0109d79..5bbc6aff9c 100644
--- a/fpdfsdk/formfiller/cffl_iformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_iformfiller.cpp
@@ -138,8 +138,8 @@ void CFFL_IFormFiller::OnMouseEnter(CPDFSDK_PageView* pPageView,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorEnter, fa, pPageView);
m_bNotifying = FALSE;
@@ -173,8 +173,8 @@ void CFFL_IFormFiller::OnMouseExit(CPDFSDK_PageView* pPageView,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView);
m_bNotifying = FALSE;
@@ -211,8 +211,8 @@ FX_BOOL CFFL_IFormFiller::OnLButtonDown(CPDFSDK_PageView* pPageView,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlags);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlags);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlags);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlags);
pWidget->OnAAction(CPDF_AAction::ButtonDown, fa, pPageView);
m_bNotifying = FALSE;
@@ -292,8 +292,8 @@ void CFFL_IFormFiller::OnButtonUp(CPDFSDK_Widget* pWidget,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
pWidget->OnAAction(CPDF_AAction::ButtonUp, fa, pPageView);
m_bNotifying = FALSE;
@@ -426,8 +426,8 @@ FX_BOOL CFFL_IFormFiller::OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) {
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, TRUE);
if (!pFormFiller)
@@ -469,8 +469,8 @@ FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) {
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa);
@@ -648,8 +648,8 @@ void CFFL_IFormFiller::OnKeyStrokeCommit(CPDFSDK_Widget* pWidget,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
fa.bWillCommit = TRUE;
fa.bKeyDown = TRUE;
fa.bRC = TRUE;
@@ -679,8 +679,8 @@ void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget,
ASSERT(pPageView);
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
fa.bKeyDown = TRUE;
fa.bRC = TRUE;
@@ -747,8 +747,8 @@ void CFFL_IFormFiller::OnClick(CPDFSDK_Widget* pWidget,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_Click, fa, pPageView);
m_bNotifying = FALSE;
@@ -782,8 +782,8 @@ void CFFL_IFormFiller::OnFull(CPDFSDK_Widget* pWidget,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_Full, fa, pPageView);
m_bNotifying = FALSE;
@@ -849,8 +849,8 @@ void CFFL_IFormFiller::OnPreOpen(CPDFSDK_Widget* pWidget,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_PreOpen, fa, pPageView);
m_bNotifying = FALSE;
@@ -884,8 +884,8 @@ void CFFL_IFormFiller::OnPostOpen(CPDFSDK_Widget* pWidget,
int nValueAge = pWidget->GetValueAge();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, fa, pPageView);
m_bNotifying = FALSE;
@@ -952,8 +952,8 @@ void CFFL_IFormFiller::OnBeforeKeyStroke(void* pPrivateData,
CPDFSDK_Document* pDocument = pData->pPageView->GetSDKDocument();
PDFSDK_FieldAction fa;
- fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag);
- fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag);
+ fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag);
+ fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag);
fa.sChange = strChange;
fa.sChangeEx = strChangeEx;
fa.bKeyDown = bKeyDown;
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index 842c37bbf9..f7a2740bd8 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -113,8 +113,8 @@ FX_BOOL CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot,
ASSERT(pPageView);
m_bValid = !m_bValid;
CFX_FloatRect rcAnnot = pAnnot->GetRect();
- m_pApp->FFI_Invalidate(pAnnot->GetUnderlyingPage(), rcAnnot.left,
- rcAnnot.top, rcAnnot.right, rcAnnot.bottom);
+ m_pApp->Invalidate(pAnnot->GetUnderlyingPage(), rcAnnot.left,
+ rcAnnot.top, rcAnnot.right, rcAnnot.bottom);
if (m_bValid) {
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, TRUE))
@@ -280,7 +280,7 @@ void CFFL_TextField::OnSetFocus(CPWL_Wnd* pWnd) {
int nCharacters = wsText.GetLength();
CFX_ByteString bsUTFText = wsText.UTF16LE_Encode();
unsigned short* pBuffer = (unsigned short*)bsUTFText.c_str();
- m_pApp->FFI_OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer,
- nCharacters, TRUE);
+ m_pApp->OnSetFieldInputFocus(m_pWidget->GetFormField(), pBuffer,
+ nCharacters, TRUE);
}
}
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index f6332cdc86..17e94ff8e2 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -70,8 +70,8 @@ void CPDFXFA_DocEnvironment::InvalidateRect(CXFA_FFPageView* pPageView,
return;
CFX_FloatRect rcPage = CFX_FloatRect::FromCFXRectF(rt);
- pEnv->FFI_Invalidate((FPDF_PAGE)pPage, rcPage.left, rcPage.bottom,
- rcPage.right, rcPage.top);
+ pEnv->Invalidate((FPDF_PAGE)pPage, rcPage.left, rcPage.bottom, rcPage.right,
+ rcPage.top);
}
void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget,
@@ -102,8 +102,8 @@ void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget,
return;
CFX_FloatRect rcCaret = CFX_FloatRect::FromCFXRectF(*pRtAnchor);
- pEnv->FFI_DisplayCaret((FPDF_PAGE)pPage, bVisible, rcCaret.left, rcCaret.top,
- rcCaret.right, rcCaret.bottom);
+ pEnv->DisplayCaret((FPDF_PAGE)pPage, bVisible, rcCaret.left, rcCaret.top,
+ rcCaret.right, rcCaret.bottom);
}
FX_BOOL CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
@@ -129,7 +129,7 @@ FX_BOOL CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
return FALSE;
FS_RECTF pageViewRect = {0.0f, 0.0f, 0.0f, 0.0f};
- pEnv->FFI_GetPageViewRect(pPage, pageViewRect);
+ pEnv->GetPageViewRect(pPage, pageViewRect);
int t1;
int t2;
@@ -253,7 +253,7 @@ FX_BOOL CPDFXFA_DocEnvironment::PopupMenu(CXFA_FFWidget* hWidget,
if (hWidget->CanSelectAll())
menuFlag |= FXFA_MENU_SELECTALL;
- return pEnv->FFI_PopupMenu(pPage, hWidget, menuFlag, ptPopup, nullptr);
+ return pEnv->PopupMenu(pPage, hWidget, menuFlag, ptPopup, nullptr);
}
void CPDFXFA_DocEnvironment::PageViewEvent(CXFA_FFPageView* pPageView,
@@ -290,7 +290,7 @@ void CPDFXFA_DocEnvironment::PageViewEvent(CXFA_FFPageView* pPageView,
: FXFA_PAGEVIEWEVENT_POSTADDED;
int count = FXSYS_abs(nNewCount - m_pDocument->GetOriginalPageCount());
m_pDocument->SetOriginalPageCount(nNewCount);
- pEnv->FFI_PageEvent(count, flag);
+ pEnv->PageEvent(count, flag);
}
void CPDFXFA_DocEnvironment::WidgetPostAdd(CXFA_FFWidget* hWidget,
@@ -344,7 +344,7 @@ int32_t CPDFXFA_DocEnvironment::GetCurrentPage(CXFA_FFDoc* hDoc) {
if (!pEnv)
return -1;
- return pEnv->FFI_GetCurrentPageIndex(this);
+ return pEnv->GetCurrentPageIndex(this);
}
void CPDFXFA_DocEnvironment::SetCurrentPage(CXFA_FFDoc* hDoc,
@@ -358,7 +358,7 @@ void CPDFXFA_DocEnvironment::SetCurrentPage(CXFA_FFDoc* hDoc,
CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return;
- pEnv->FFI_SetCurrentPage(this, iCurPage);
+ pEnv->SetCurrentPage(this, iCurPage);
}
FX_BOOL CPDFXFA_DocEnvironment::IsCalculationsEnabled(CXFA_FFDoc* hDoc) {
@@ -425,8 +425,8 @@ void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc,
}
int len = bs.GetLength();
FPDF_FILEHANDLER* pFileHandler =
- pEnv->FFI_OpenFile(bXDP ? FXFA_SAVEAS_XDP : FXFA_SAVEAS_XML,
- (FPDF_WIDESTRING)bs.GetBuffer(len), "wb");
+ pEnv->OpenFile(bXDP ? FXFA_SAVEAS_XDP : FXFA_SAVEAS_XML,
+ (FPDF_WIDESTRING)bs.GetBuffer(len), "wb");
bs.ReleaseBuffer(len);
if (!pFileHandler)
return;
@@ -514,7 +514,7 @@ void CPDFXFA_DocEnvironment::GotoURL(CXFA_FFDoc* hDoc,
CFX_WideStringC str(bsURL.c_str());
- pEnv->FFI_GotoURL(this, str, bAppend);
+ pEnv->GotoURL(this, str, bAppend);
}
FX_BOOL CPDFXFA_DocEnvironment::IsValidationsEnabled(CXFA_FFDoc* hDoc) {
@@ -640,8 +640,8 @@ FX_BOOL CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() {
ws.FromLocal(IDS_XFA_Validate_Input);
CFX_ByteString bs = ws.UTF16LE_Encode();
int len = bs.GetLength();
- pEnv->FFI_Alert((FPDF_WIDESTRING)bs.GetBuffer(len), (FPDF_WIDESTRING)L"",
- 0, 1);
+ pEnv->Alert((FPDF_WIDESTRING)bs.GetBuffer(len), (FPDF_WIDESTRING)L"", 0,
+ 1);
bs.ReleaseBuffer(len);
return FALSE;
}
@@ -701,7 +701,7 @@ IFX_FileRead* CPDFXFA_DocEnvironment::OpenLinkedFile(
CFX_ByteString bs = wsLink.UTF16LE_Encode();
int len = bs.GetLength();
FPDF_FILEHANDLER* pFileHandler =
- pEnv->FFI_OpenFile(0, (FPDF_WIDESTRING)bs.GetBuffer(len), "rb");
+ pEnv->OpenFile(0, (FPDF_WIDESTRING)bs.GetBuffer(len), "rb");
bs.ReleaseBuffer(len);
if (!pFileHandler)
@@ -900,8 +900,7 @@ FX_BOOL CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
ws.FromLocal("Submit cancelled.");
CFX_ByteString bs = ws.UTF16LE_Encode();
int len = bs.GetLength();
- pEnv->FFI_Alert((FPDF_WIDESTRING)bs.GetBuffer(len), (FPDF_WIDESTRING)L"", 0,
- 4);
+ pEnv->Alert((FPDF_WIDESTRING)bs.GetBuffer(len), (FPDF_WIDESTRING)L"", 0, 4);
bs.ReleaseBuffer(len);
return FALSE;
}
@@ -925,20 +924,20 @@ FX_BOOL CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
flag |= FXFA_PDF;
ToXFAContentFlags(csContent, flag);
- pFileHandler = pEnv->FFI_OpenFile(FXFA_SAVEAS_XDP, nullptr, "wb");
+ pFileHandler = pEnv->OpenFile(FXFA_SAVEAS_XDP, nullptr, "wb");
fileFlag = FXFA_SAVEAS_XDP;
ExportSubmitFile(pFileHandler, FXFA_SAVEAS_XDP, 0, flag);
break;
}
case XFA_ATTRIBUTEENUM_Xml:
- pFileHandler = pEnv->FFI_OpenFile(FXFA_SAVEAS_XML, nullptr, "wb");
+ pFileHandler = pEnv->OpenFile(FXFA_SAVEAS_XML, nullptr, "wb");
fileFlag = FXFA_SAVEAS_XML;
ExportSubmitFile(pFileHandler, FXFA_SAVEAS_XML, 0, FXFA_XFA_ALL);
break;
case XFA_ATTRIBUTEENUM_Pdf:
break;
case XFA_ATTRIBUTEENUM_Urlencoded:
- pFileHandler = pEnv->FFI_OpenFile(FXFA_SAVEAS_XML, nullptr, "wb");
+ pFileHandler = pEnv->OpenFile(FXFA_SAVEAS_XML, nullptr, "wb");
fileFlag = FXFA_SAVEAS_XML;
ExportSubmitFile(pFileHandler, FXFA_SAVEAS_XML, 0, FXFA_XFA_ALL);
break;
@@ -969,7 +968,7 @@ FX_BOOL CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
FPDF_WIDESTRING pSubject =
(FPDF_WIDESTRING)bsSubject.GetBuffer(bsSubject.GetLength());
FPDF_WIDESTRING pMsg = (FPDF_WIDESTRING)bsMsg.GetBuffer(bsMsg.GetLength());
- pEnv->FFI_EmailTo(pFileHandler, pTo, pSubject, pCC, pBcc, pMsg);
+ pEnv->EmailTo(pFileHandler, pTo, pSubject, pCC, pBcc, pMsg);
bsTo.ReleaseBuffer();
bsCC.ReleaseBuffer();
bsBcc.ReleaseBuffer();
@@ -980,8 +979,7 @@ FX_BOOL CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
CFX_WideString ws;
CFX_ByteString bs = csURL.UTF16LE_Encode();
int len = bs.GetLength();
- pEnv->FFI_UploadTo(pFileHandler, fileFlag,
- (FPDF_WIDESTRING)bs.GetBuffer(len));
+ pEnv->UploadTo(pFileHandler, fileFlag, (FPDF_WIDESTRING)bs.GetBuffer(len));
bs.ReleaseBuffer(len);
}
return bRet;
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
index 5cdd903877..6295494621 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
@@ -99,15 +99,14 @@ void CPDFXFA_App::SetAppType(const CFX_WideStringC& wsAppType) {
void CPDFXFA_App::GetLanguage(CFX_WideString& wsLanguage) {
CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
- if (pEnv) {
- wsLanguage = pEnv->FFI_GetLanguage();
- }
+ if (pEnv)
+ wsLanguage = pEnv->GetLanguage();
}
void CPDFXFA_App::GetPlatform(CFX_WideString& wsPlatform) {
CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
- wsPlatform = pEnv->FFI_GetPlatform();
+ wsPlatform = pEnv->GetPlatform();
}
}
@@ -204,26 +203,9 @@ CFX_WideString CPDFXFA_App::Response(const CFX_WideString& wsQuestion,
return wsAnswer;
}
-int32_t CPDFXFA_App::GetCurDocumentInBatch() {
- CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
- if (pEnv) {
- return pEnv->FFI_GetCurDocument();
- }
- return 0;
-}
-
-int32_t CPDFXFA_App::GetDocumentCountInBatch() {
- CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
- if (pEnv) {
- return pEnv->FFI_GetDocumentCount();
- }
-
- return 0;
-}
-
IFX_FileRead* CPDFXFA_App::DownloadURL(const CFX_WideString& wsURL) {
CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
- return pEnv ? pEnv->FFI_DownloadFromURL(wsURL.c_str()) : nullptr;
+ return pEnv ? pEnv->DownloadFromURL(wsURL.c_str()) : nullptr;
}
FX_BOOL CPDFXFA_App::PostRequestURL(const CFX_WideString& wsURL,
@@ -236,9 +218,9 @@ FX_BOOL CPDFXFA_App::PostRequestURL(const CFX_WideString& wsURL,
if (!pEnv)
return FALSE;
- wsResponse = pEnv->FFI_PostRequestURL(wsURL.c_str(), wsData.c_str(),
- wsContentType.c_str(), wsEncode.c_str(),
- wsHeader.c_str());
+ wsResponse =
+ pEnv->PostRequestURL(wsURL.c_str(), wsData.c_str(), wsContentType.c_str(),
+ wsEncode.c_str(), wsHeader.c_str());
return TRUE;
}
@@ -247,8 +229,7 @@ FX_BOOL CPDFXFA_App::PutRequestURL(const CFX_WideString& wsURL,
const CFX_WideString& wsEncode) {
CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
return pEnv &&
- pEnv->FFI_PutRequestURL(wsURL.c_str(), wsData.c_str(),
- wsEncode.c_str());
+ pEnv->PutRequestURL(wsURL.c_str(), wsData.c_str(), wsEncode.c_str());
}
void CPDFXFA_App::LoadString(int32_t iStringID, CFX_WideString& wsString) {
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp
index aa6c2d4e9d..5b050afa35 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp
@@ -20,7 +20,7 @@ FWL_Error CXFA_FWLAdapterTimerMgr::Start(IFWL_Timer* pTimer,
if (!m_pEnv)
return FWL_Error::Indefinite;
- int32_t id_event = m_pEnv->FFI_SetTimer(dwElapse, TimerProc);
+ int32_t id_event = m_pEnv->SetTimer(dwElapse, TimerProc);
if (!s_TimerArray)
s_TimerArray = new std::vector<CFWL_TimerInfo*>;
@@ -34,7 +34,7 @@ FWL_Error CXFA_FWLAdapterTimerMgr::Stop(IFWL_TimerInfo* pTimerInfo) {
return FWL_Error::Indefinite;
CFWL_TimerInfo* pInfo = static_cast<CFWL_TimerInfo*>(pTimerInfo);
- m_pEnv->FFI_KillTimer(pInfo->idEvent);
+ m_pEnv->KillTimer(pInfo->idEvent);
if (s_TimerArray) {
auto it = std::find(s_TimerArray->begin(), s_TimerArray->end(), pInfo);
if (it != s_TimerArray->end()) {
diff --git a/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h b/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h
index 0274acb2cc..fefe088507 100644
--- a/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h
+++ b/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h
@@ -53,9 +53,6 @@ class CPDFXFA_App : public IXFA_AppProvider {
const CFX_WideString& wsDefaultAnswer,
FX_BOOL bMark) override;
- int32_t GetDocumentCountInBatch() override;
- int32_t GetCurDocumentInBatch() override;
-
IFX_FileRead* DownloadURL(const CFX_WideString& wsURL) override;
FX_BOOL PostRequestURL(const CFX_WideString& wsURL,
const CFX_WideString& wsData,
diff --git a/fpdfsdk/fsdk_actionhandler.cpp b/fpdfsdk/fsdk_actionhandler.cpp
index 64fbe17961..672221f02b 100644
--- a/fpdfsdk/fsdk_actionhandler.cpp
+++ b/fpdfsdk/fsdk_actionhandler.cpp
@@ -439,7 +439,7 @@ void CPDFSDK_ActionHandler::DoAction_GoTo(CPDFSDK_Document* pDocument,
}
CPDFSDK_Environment* pApp = pDocument->GetEnv();
- pApp->FFI_DoGoToAction(nPageIndex, nFitType, pPosAry, sizeOfAry);
+ pApp->DoGoToAction(nPageIndex, nFitType, pPosAry, sizeOfAry);
delete[] pPosAry;
}
@@ -455,7 +455,7 @@ void CPDFSDK_ActionHandler::DoAction_URI(CPDFSDK_Document* pDocument,
CPDFSDK_Environment* pApp = pDocument->GetEnv();
CFX_ByteString sURI = action.GetURI(pDocument->GetPDFDocument());
- pApp->FFI_DoURIAction(sURI.c_str());
+ pApp->DoURIAction(sURI.c_str());
}
void CPDFSDK_ActionHandler::DoAction_Named(CPDFSDK_Document* pDocument,
@@ -463,7 +463,7 @@ void CPDFSDK_ActionHandler::DoAction_Named(CPDFSDK_Document* pDocument,
ASSERT(action.GetDict());
CFX_ByteString csName = action.GetNamedAction();
- pDocument->GetEnv()->FFI_ExecuteNamedAction(csName.c_str());
+ pDocument->GetEnv()->ExecuteNamedAction(csName.c_str());
}
void CPDFSDK_ActionHandler::DoAction_SetOCGState(CPDFSDK_Document* pDocument,
diff --git a/fpdfsdk/include/cpdfsdk_environment.h b/fpdfsdk/include/cpdfsdk_environment.h
index 7fd146a043..fe63ecad13 100644
--- a/fpdfsdk/include/cpdfsdk_environment.h
+++ b/fpdfsdk/include/cpdfsdk_environment.h
@@ -30,41 +30,41 @@ class CPDFSDK_Environment final {
CPDFSDK_Environment(UnderlyingDocumentType* pDoc, FPDF_FORMFILLINFO* pFFinfo);
~CPDFSDK_Environment();
- void FFI_Invalidate(FPDF_PAGE page,
- double left,
- double top,
- double right,
- double bottom) {
+ void Invalidate(FPDF_PAGE page,
+ double left,
+ double top,
+ double right,
+ double bottom) {
if (m_pInfo && m_pInfo->FFI_Invalidate)
m_pInfo->FFI_Invalidate(m_pInfo, page, left, top, right, bottom);
}
- void FFI_OutputSelectedRect(FPDF_PAGE page,
- double left,
- double top,
- double right,
- double bottom) {
+ void OutputSelectedRect(FPDF_PAGE page,
+ double left,
+ double top,
+ double right,
+ double bottom) {
if (m_pInfo && m_pInfo->FFI_OutputSelectedRect)
m_pInfo->FFI_OutputSelectedRect(m_pInfo, page, left, top, right, bottom);
}
- void FFI_SetCursor(int nCursorType) {
+ void SetCursor(int nCursorType) {
if (m_pInfo && m_pInfo->FFI_SetCursor)
m_pInfo->FFI_SetCursor(m_pInfo, nCursorType);
}
- int FFI_SetTimer(int uElapse, TimerCallback lpTimerFunc) {
+ int SetTimer(int uElapse, TimerCallback lpTimerFunc) {
if (m_pInfo && m_pInfo->FFI_SetTimer)
return m_pInfo->FFI_SetTimer(m_pInfo, uElapse, lpTimerFunc);
return -1;
}
- void FFI_KillTimer(int nTimerID) {
+ void KillTimer(int nTimerID) {
if (m_pInfo && m_pInfo->FFI_KillTimer)
m_pInfo->FFI_KillTimer(m_pInfo, nTimerID);
}
- FX_SYSTEMTIME FFI_GetLocalTime() const {
+ FX_SYSTEMTIME GetLocalTime() const {
FX_SYSTEMTIME fxtime;
if (m_pInfo && m_pInfo->FFI_GetLocalTime) {
FPDF_SYSTEMTIME systime = m_pInfo->FFI_GetLocalTime(m_pInfo);
@@ -80,120 +80,114 @@ class CPDFSDK_Environment final {
return fxtime;
}
- void FFI_OnChange() {
+ void OnChange() {
if (m_pInfo && m_pInfo->FFI_OnChange)
m_pInfo->FFI_OnChange(m_pInfo);
}
- FX_BOOL FFI_IsSHIFTKeyDown(uint32_t nFlag) const {
+ FX_BOOL IsSHIFTKeyDown(uint32_t nFlag) const {
return (nFlag & FWL_EVENTFLAG_ShiftKey) != 0;
}
- FX_BOOL FFI_IsCTRLKeyDown(uint32_t nFlag) const {
+ FX_BOOL IsCTRLKeyDown(uint32_t nFlag) const {
return (nFlag & FWL_EVENTFLAG_ControlKey) != 0;
}
- FX_BOOL FFI_IsALTKeyDown(uint32_t nFlag) const {
+ FX_BOOL IsALTKeyDown(uint32_t nFlag) const {
return (nFlag & FWL_EVENTFLAG_AltKey) != 0;
}
- FPDF_PAGE FFI_GetPage(FPDF_DOCUMENT document, int nPageIndex) {
+ FPDF_PAGE GetPage(FPDF_DOCUMENT document, int nPageIndex) {
if (m_pInfo && m_pInfo->FFI_GetPage)
return m_pInfo->FFI_GetPage(m_pInfo, document, nPageIndex);
return nullptr;
}
- FPDF_PAGE FFI_GetCurrentPage(FPDF_DOCUMENT document) {
+ FPDF_PAGE GetCurrentPage(FPDF_DOCUMENT document) {
if (m_pInfo && m_pInfo->FFI_GetCurrentPage)
return m_pInfo->FFI_GetCurrentPage(m_pInfo, document);
return nullptr;
}
- int FFI_GetRotation(FPDF_PAGE page) {
- if (m_pInfo && m_pInfo->FFI_GetRotation)
- return m_pInfo->FFI_GetRotation(m_pInfo, page);
- return 0;
- }
-
- void FFI_ExecuteNamedAction(const FX_CHAR* namedAction) {
+ void ExecuteNamedAction(const FX_CHAR* namedAction) {
if (m_pInfo && m_pInfo->FFI_ExecuteNamedAction)
m_pInfo->FFI_ExecuteNamedAction(m_pInfo, namedAction);
}
- void FFI_OnSetFieldInputFocus(void* field,
- FPDF_WIDESTRING focusText,
- FPDF_DWORD nTextLen,
- FX_BOOL bFocus) {
+ void OnSetFieldInputFocus(void* field,
+ FPDF_WIDESTRING focusText,
+ FPDF_DWORD nTextLen,
+ FX_BOOL bFocus) {
if (m_pInfo && m_pInfo->FFI_SetTextFieldFocus)
m_pInfo->FFI_SetTextFieldFocus(m_pInfo, focusText, nTextLen, bFocus);
}
- void FFI_DoURIAction(const FX_CHAR* bsURI) {
+ void DoURIAction(const FX_CHAR* bsURI) {
if (m_pInfo && m_pInfo->FFI_DoURIAction)
m_pInfo->FFI_DoURIAction(m_pInfo, bsURI);
}
- void FFI_DoGoToAction(int nPageIndex,
- int zoomMode,
- float* fPosArray,
- int sizeOfArray) {
+ void DoGoToAction(int nPageIndex,
+ int zoomMode,
+ float* fPosArray,
+ int sizeOfArray) {
if (m_pInfo && m_pInfo->FFI_DoGoToAction)
m_pInfo->FFI_DoGoToAction(m_pInfo, nPageIndex, zoomMode, fPosArray,
sizeOfArray);
}
#ifdef PDF_ENABLE_XFA
- void FFI_DisplayCaret(FPDF_PAGE page,
- FPDF_BOOL bVisible,
- double left,
- double top,
- double right,
- double bottom) {
+ void DisplayCaret(FPDF_PAGE page,
+ FPDF_BOOL bVisible,
+ double left,
+ double top,
+ double right,
+ double bottom) {
if (m_pInfo && m_pInfo->FFI_DisplayCaret)
m_pInfo->FFI_DisplayCaret(m_pInfo, page, bVisible, left, top, right,
bottom);
}
- int FFI_GetCurrentPageIndex(FPDF_DOCUMENT document) {
- if (!m_pInfo || !m_pInfo->FFI_GetCurrentPageIndex) {
+ int GetCurrentPageIndex(FPDF_DOCUMENT document) {
+ if (!m_pInfo || !m_pInfo->FFI_GetCurrentPageIndex)
return -1;
- }
return m_pInfo->FFI_GetCurrentPageIndex(m_pInfo, document);
}
- void FFI_SetCurrentPage(FPDF_DOCUMENT document, int iCurPage) {
+ void SetCurrentPage(FPDF_DOCUMENT document, int iCurPage) {
if (m_pInfo && m_pInfo->FFI_SetCurrentPage)
m_pInfo->FFI_SetCurrentPage(m_pInfo, document, iCurPage);
}
+ // TODO(dsinclair): This should probably change to PDFium?
CFX_WideString FFI_GetAppName() const { return CFX_WideString(L"Acrobat"); }
- CFX_WideString FFI_GetPlatform() {
- if (m_pInfo && m_pInfo->FFI_GetPlatform) {
- int nRequiredLen = m_pInfo->FFI_GetPlatform(m_pInfo, nullptr, 0);
- if (nRequiredLen <= 0)
- return L"";
-
- char* pbuff = new char[nRequiredLen];
- memset(pbuff, 0, nRequiredLen);
- int nActualLen = m_pInfo->FFI_GetPlatform(m_pInfo, pbuff, nRequiredLen);
- if (nActualLen <= 0 || nActualLen > nRequiredLen) {
- delete[] pbuff;
- return L"";
- }
- CFX_ByteString bsRet = CFX_ByteString(pbuff, nActualLen);
- CFX_WideString wsRet = CFX_WideString::FromUTF16LE(
- (unsigned short*)bsRet.GetBuffer(bsRet.GetLength()),
- bsRet.GetLength() / sizeof(unsigned short));
+ CFX_WideString GetPlatform() {
+ if (!m_pInfo || !m_pInfo->FFI_GetPlatform)
+ return L"";
+
+ int nRequiredLen = m_pInfo->FFI_GetPlatform(m_pInfo, nullptr, 0);
+ if (nRequiredLen <= 0)
+ return L"";
+
+ char* pbuff = new char[nRequiredLen];
+ memset(pbuff, 0, nRequiredLen);
+ int nActualLen = m_pInfo->FFI_GetPlatform(m_pInfo, pbuff, nRequiredLen);
+ if (nActualLen <= 0 || nActualLen > nRequiredLen) {
delete[] pbuff;
- return wsRet;
+ return L"";
}
- return L"";
+ CFX_ByteString bsRet = CFX_ByteString(pbuff, nActualLen);
+ CFX_WideString wsRet = CFX_WideString::FromUTF16LE(
+ (unsigned short*)bsRet.GetBuffer(bsRet.GetLength()),
+ bsRet.GetLength() / sizeof(unsigned short));
+ delete[] pbuff;
+ return wsRet;
}
- void FFI_GotoURL(FPDF_DOCUMENT document,
- const CFX_WideStringC& wsURL,
- FX_BOOL bAppend) {
+ void GotoURL(FPDF_DOCUMENT document,
+ const CFX_WideStringC& wsURL,
+ FX_BOOL bAppend) {
if (m_pInfo && m_pInfo->FFI_GotoURL) {
CFX_ByteString bsTo = CFX_WideString(wsURL).UTF16LE_Encode();
FPDF_WIDESTRING pTo = (FPDF_WIDESTRING)bsTo.GetBuffer(wsURL.GetLength());
@@ -202,7 +196,7 @@ class CPDFSDK_Environment final {
}
}
- void FFI_GetPageViewRect(FPDF_PAGE page, FS_RECTF& dstRect) {
+ void GetPageViewRect(FPDF_PAGE page, FS_RECTF& dstRect) {
if (m_pInfo && m_pInfo->FFI_GetPageViewRect) {
double left;
double top;
@@ -217,157 +211,147 @@ class CPDFSDK_Environment final {
}
}
- FX_BOOL FFI_PopupMenu(FPDF_PAGE page,
- FPDF_WIDGET hWidget,
- int menuFlag,
- CFX_PointF ptPopup,
- const CFX_PointF* pRectExclude) {
+ FX_BOOL PopupMenu(FPDF_PAGE page,
+ FPDF_WIDGET hWidget,
+ int menuFlag,
+ CFX_PointF ptPopup,
+ const CFX_PointF* pRectExclude) {
if (m_pInfo && m_pInfo->FFI_PopupMenu)
return m_pInfo->FFI_PopupMenu(m_pInfo, page, hWidget, menuFlag, ptPopup.x,
ptPopup.y);
return FALSE;
}
- void FFI_Alert(FPDF_WIDESTRING Msg,
- FPDF_WIDESTRING Title,
- int Type,
- int Icon) {
+ void Alert(FPDF_WIDESTRING Msg, FPDF_WIDESTRING Title, int Type, int Icon) {
if (m_pInfo && m_pInfo->m_pJsPlatform && m_pInfo->m_pJsPlatform->app_alert)
m_pInfo->m_pJsPlatform->app_alert(m_pInfo->m_pJsPlatform, Msg, Title,
Type, Icon);
}
- void FFI_EmailTo(FPDF_FILEHANDLER* fileHandler,
- FPDF_WIDESTRING pTo,
- FPDF_WIDESTRING pSubject,
- FPDF_WIDESTRING pCC,
- FPDF_WIDESTRING pBcc,
- FPDF_WIDESTRING pMsg) {
+ void EmailTo(FPDF_FILEHANDLER* fileHandler,
+ FPDF_WIDESTRING pTo,
+ FPDF_WIDESTRING pSubject,
+ FPDF_WIDESTRING pCC,
+ FPDF_WIDESTRING pBcc,
+ FPDF_WIDESTRING pMsg) {
if (m_pInfo && m_pInfo->FFI_EmailTo)
m_pInfo->FFI_EmailTo(m_pInfo, fileHandler, pTo, pSubject, pCC, pBcc,
pMsg);
}
- void FFI_UploadTo(FPDF_FILEHANDLER* fileHandler,
- int fileFlag,
- FPDF_WIDESTRING uploadTo) {
+ void UploadTo(FPDF_FILEHANDLER* fileHandler,
+ int fileFlag,
+ FPDF_WIDESTRING uploadTo) {
if (m_pInfo && m_pInfo->FFI_UploadTo)
m_pInfo->FFI_UploadTo(m_pInfo, fileHandler, fileFlag, uploadTo);
}
- FPDF_FILEHANDLER* FFI_OpenFile(int fileType,
- FPDF_WIDESTRING wsURL,
- const char* mode) {
+ FPDF_FILEHANDLER* OpenFile(int fileType,
+ FPDF_WIDESTRING wsURL,
+ const char* mode) {
if (m_pInfo && m_pInfo->FFI_OpenFile)
return m_pInfo->FFI_OpenFile(m_pInfo, fileType, wsURL, mode);
return nullptr;
}
- CFX_WideString FFI_GetFilePath(FPDF_FILEHANDLER* pFileHandler) const {
- return L"";
- }
-
- int FFI_GetDocumentCount() const { return 0; }
- int FFI_GetCurDocument() const { return 0; }
+ IFX_FileRead* DownloadFromURL(const FX_WCHAR* url) {
+ if (!m_pInfo || !m_pInfo->FFI_DownloadFromURL)
+ return nullptr;
- IFX_FileRead* FFI_DownloadFromURL(const FX_WCHAR* url) {
- if (m_pInfo && m_pInfo->FFI_DownloadFromURL) {
- CFX_ByteString bstrURL = CFX_WideString(url).UTF16LE_Encode();
- FPDF_WIDESTRING wsURL =
- (FPDF_WIDESTRING)bstrURL.GetBuffer(bstrURL.GetLength());
+ CFX_ByteString bstrURL = CFX_WideString(url).UTF16LE_Encode();
+ FPDF_WIDESTRING wsURL =
+ (FPDF_WIDESTRING)bstrURL.GetBuffer(bstrURL.GetLength());
- FPDF_LPFILEHANDLER fileHandler =
- m_pInfo->FFI_DownloadFromURL(m_pInfo, wsURL);
+ FPDF_LPFILEHANDLER fileHandler =
+ m_pInfo->FFI_DownloadFromURL(m_pInfo, wsURL);
- return new CFPDF_FileStream(fileHandler);
- }
- return nullptr;
+ return new CFPDF_FileStream(fileHandler);
}
- CFX_WideString FFI_PostRequestURL(const FX_WCHAR* wsURL,
- const FX_WCHAR* wsData,
- const FX_WCHAR* wsContentType,
- const FX_WCHAR* wsEncode,
- const FX_WCHAR* wsHeader) {
- if (m_pInfo && m_pInfo->FFI_PostRequestURL) {
- CFX_ByteString bsURL = CFX_WideString(wsURL).UTF16LE_Encode();
- FPDF_WIDESTRING URL = (FPDF_WIDESTRING)bsURL.GetBuffer(bsURL.GetLength());
+ CFX_WideString PostRequestURL(const FX_WCHAR* wsURL,
+ const FX_WCHAR* wsData,
+ const FX_WCHAR* wsContentType,
+ const FX_WCHAR* wsEncode,
+ const FX_WCHAR* wsHeader) {
+ if (!m_pInfo || !m_pInfo->FFI_PostRequestURL)
+ return L"";
- CFX_ByteString bsData = CFX_WideString(wsData).UTF16LE_Encode();
- FPDF_WIDESTRING data =
- (FPDF_WIDESTRING)bsData.GetBuffer(bsData.GetLength());
+ CFX_ByteString bsURL = CFX_WideString(wsURL).UTF16LE_Encode();
+ FPDF_WIDESTRING URL = (FPDF_WIDESTRING)bsURL.GetBuffer(bsURL.GetLength());
- CFX_ByteString bsContentType =
- CFX_WideString(wsContentType).UTF16LE_Encode();
- FPDF_WIDESTRING contentType =
- (FPDF_WIDESTRING)bsContentType.GetBuffer(bsContentType.GetLength());
+ CFX_ByteString bsData = CFX_WideString(wsData).UTF16LE_Encode();
+ FPDF_WIDESTRING data =
+ (FPDF_WIDESTRING)bsData.GetBuffer(bsData.GetLength());
- CFX_ByteString bsEncode = CFX_WideString(wsEncode).UTF16LE_Encode();
- FPDF_WIDESTRING encode =
- (FPDF_WIDESTRING)bsEncode.GetBuffer(bsEncode.GetLength());
+ CFX_ByteString bsContentType =
+ CFX_WideString(wsContentType).UTF16LE_Encode();
+ FPDF_WIDESTRING contentType =
+ (FPDF_WIDESTRING)bsContentType.GetBuffer(bsContentType.GetLength());
- CFX_ByteString bsHeader = CFX_WideString(wsHeader).UTF16LE_Encode();
- FPDF_WIDESTRING header =
- (FPDF_WIDESTRING)bsHeader.GetBuffer(bsHeader.GetLength());
+ CFX_ByteString bsEncode = CFX_WideString(wsEncode).UTF16LE_Encode();
+ FPDF_WIDESTRING encode =
+ (FPDF_WIDESTRING)bsEncode.GetBuffer(bsEncode.GetLength());
- FPDF_BSTR response;
- FPDF_BStr_Init(&response);
- m_pInfo->FFI_PostRequestURL(m_pInfo, URL, data, contentType, encode,
- header, &response);
+ CFX_ByteString bsHeader = CFX_WideString(wsHeader).UTF16LE_Encode();
+ FPDF_WIDESTRING header =
+ (FPDF_WIDESTRING)bsHeader.GetBuffer(bsHeader.GetLength());
- CFX_WideString wsRet = CFX_WideString::FromUTF16LE(
- (unsigned short*)response.str, response.len / sizeof(unsigned short));
- FPDF_BStr_Clear(&response);
+ FPDF_BSTR response;
+ FPDF_BStr_Init(&response);
+ m_pInfo->FFI_PostRequestURL(m_pInfo, URL, data, contentType, encode, header,
+ &response);
- return wsRet;
- }
- return L"";
+ CFX_WideString wsRet = CFX_WideString::FromUTF16LE(
+ (unsigned short*)response.str, response.len / sizeof(unsigned short));
+ FPDF_BStr_Clear(&response);
+
+ return wsRet;
}
- FPDF_BOOL FFI_PutRequestURL(const FX_WCHAR* wsURL,
- const FX_WCHAR* wsData,
- const FX_WCHAR* wsEncode) {
- if (m_pInfo && m_pInfo->FFI_PutRequestURL) {
- CFX_ByteString bsURL = CFX_WideString(wsURL).UTF16LE_Encode();
- FPDF_WIDESTRING URL = (FPDF_WIDESTRING)bsURL.GetBuffer(bsURL.GetLength());
+ FPDF_BOOL PutRequestURL(const FX_WCHAR* wsURL,
+ const FX_WCHAR* wsData,
+ const FX_WCHAR* wsEncode) {
+ if (!m_pInfo || !m_pInfo->FFI_PutRequestURL)
+ return FALSE;
- CFX_ByteString bsData = CFX_WideString(wsData).UTF16LE_Encode();
- FPDF_WIDESTRING data =
- (FPDF_WIDESTRING)bsData.GetBuffer(bsData.GetLength());
+ CFX_ByteString bsURL = CFX_WideString(wsURL).UTF16LE_Encode();
+ FPDF_WIDESTRING URL = (FPDF_WIDESTRING)bsURL.GetBuffer(bsURL.GetLength());
- CFX_ByteString bsEncode = CFX_WideString(wsEncode).UTF16LE_Encode();
- FPDF_WIDESTRING encode =
- (FPDF_WIDESTRING)bsEncode.GetBuffer(bsEncode.GetLength());
+ CFX_ByteString bsData = CFX_WideString(wsData).UTF16LE_Encode();
+ FPDF_WIDESTRING data =
+ (FPDF_WIDESTRING)bsData.GetBuffer(bsData.GetLength());
- return m_pInfo->FFI_PutRequestURL(m_pInfo, URL, data, encode);
- }
- return FALSE;
+ CFX_ByteString bsEncode = CFX_WideString(wsEncode).UTF16LE_Encode();
+ FPDF_WIDESTRING encode =
+ (FPDF_WIDESTRING)bsEncode.GetBuffer(bsEncode.GetLength());
+
+ return m_pInfo->FFI_PutRequestURL(m_pInfo, URL, data, encode);
}
- CFX_WideString FFI_GetLanguage() {
- if (m_pInfo && m_pInfo->FFI_GetLanguage) {
- int nRequiredLen = m_pInfo->FFI_GetLanguage(m_pInfo, nullptr, 0);
- if (nRequiredLen <= 0)
- return L"";
-
- char* pbuff = new char[nRequiredLen];
- memset(pbuff, 0, nRequiredLen);
- int nActualLen = m_pInfo->FFI_GetLanguage(m_pInfo, pbuff, nRequiredLen);
- if (nActualLen <= 0 || nActualLen > nRequiredLen) {
- delete[] pbuff;
- return L"";
- }
- CFX_ByteString bsRet = CFX_ByteString(pbuff, nActualLen);
- CFX_WideString wsRet = CFX_WideString::FromUTF16LE(
- (unsigned short*)bsRet.GetBuffer(bsRet.GetLength()),
- bsRet.GetLength() / sizeof(unsigned short));
+ CFX_WideString GetLanguage() {
+ if (!m_pInfo || !m_pInfo->FFI_GetLanguage)
+ return L"";
+
+ int nRequiredLen = m_pInfo->FFI_GetLanguage(m_pInfo, nullptr, 0);
+ if (nRequiredLen <= 0)
+ return L"";
+
+ char* pbuff = new char[nRequiredLen];
+ memset(pbuff, 0, nRequiredLen);
+ int nActualLen = m_pInfo->FFI_GetLanguage(m_pInfo, pbuff, nRequiredLen);
+ if (nActualLen <= 0 || nActualLen > nRequiredLen) {
delete[] pbuff;
- return wsRet;
+ return L"";
}
- return L"";
+ CFX_ByteString bsRet = CFX_ByteString(pbuff, nActualLen);
+ CFX_WideString wsRet = CFX_WideString::FromUTF16LE(
+ (unsigned short*)bsRet.GetBuffer(bsRet.GetLength()),
+ bsRet.GetLength() / sizeof(unsigned short));
+ delete[] pbuff;
+ return wsRet;
}
- void FFI_PageEvent(int iPageCount, uint32_t dwEventType) const {
+ void PageEvent(int iPageCount, uint32_t dwEventType) const {
if (m_pInfo && m_pInfo->FFI_PageEvent)
m_pInfo->FFI_PageEvent(m_pInfo, iPageCount, dwEventType);
}
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 9fc99f5e10..d1b6148776 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -1695,8 +1695,8 @@ FX_BOOL Document::gotoNamedDest(IJS_Context* cc,
pRuntime->BeginBlock();
CPDFSDK_Environment* pApp = m_pDocument->GetEnv();
- pApp->FFI_DoGoToAction(dest.GetPageIndex(pDocument), dest.GetZoomMode(),
- scrollPositionArray.get(), scrollPositionArraySize);
+ pApp->DoGoToAction(dest.GetPageIndex(pDocument), dest.GetZoomMode(),
+ scrollPositionArray.get(), scrollPositionArraySize);
pRuntime->EndBlock();
return TRUE;
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 33c724095c..3abf0ecc7e 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -3204,7 +3204,7 @@ FX_BOOL Field::setFocus(IJS_Context* cc,
} else {
CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
UnderlyingPageType* pPage = UnderlyingFromFPDFPage(
- pEnv->FFI_GetCurrentPage(m_pDocument->GetUnderlyingDocument()));
+ pEnv->GetCurrentPage(m_pDocument->GetUnderlyingDocument()));
if (!pPage)
return FALSE;
if (CPDFSDK_PageView* pCurPageView =
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index 0f11609fe7..6e5dc4a2c7 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -325,7 +325,7 @@ FX_BOOL app::platform(IJS_Context* cc,
static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp();
if (!pEnv)
return FALSE;
- CFX_WideString platfrom = pEnv->FFI_GetPlatform();
+ CFX_WideString platfrom = pEnv->GetPlatform();
if (!platfrom.IsEmpty()) {
vp << platfrom;
return TRUE;
@@ -345,7 +345,7 @@ FX_BOOL app::language(IJS_Context* cc,
static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp();
if (!pEnv)
return FALSE;
- CFX_WideString language = pEnv->FFI_GetLanguage();
+ CFX_WideString language = pEnv->GetLanguage();
if (!language.IsEmpty()) {
vp << language;
return TRUE;
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h
index d6fddf19bd..e11f85c89f 100644
--- a/public/fpdf_formfill.h
+++ b/public/fpdf_formfill.h
@@ -610,6 +610,8 @@ typedef struct _FPDF_FORMFILLINFO {
* Return value:
* The page rotation. Should be 0(0 degree),1(90 degree),2(180
* degree),3(270 degree), in a clockwise direction.
+ *
+ * Note: Unused.
* */
int (*FFI_GetRotation)(struct _FPDF_FORMFILLINFO* pThis, FPDF_PAGE page);
diff --git a/xfa/fxfa/include/fxfa.h b/xfa/fxfa/include/fxfa.h
index fde8d0f6c6..04fabeec11 100644
--- a/xfa/fxfa/include/fxfa.h
+++ b/xfa/fxfa/include/fxfa.h
@@ -243,9 +243,6 @@ class IXFA_AppProvider {
const CFX_WideString& wsDefaultAnswer = L"",
FX_BOOL bMask = TRUE) = 0;
- virtual int32_t GetDocumentCountInBatch() = 0;
- virtual int32_t GetCurDocumentInBatch() = 0;
-
/**
* Download something from somewhere.
* @param[in] wsURL - http, ftp, such as
diff --git a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
index 680defc0b6..5ca550aae8 100644
--- a/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
+++ b/xfa/fxfa/parser/cscript_hostpseudomodel.cpp
@@ -328,14 +328,8 @@ void CScript_HostPseudoModel::Response(CFXJSE_Arguments* pArguments) {
}
void CScript_HostPseudoModel::DocumentInBatch(CFXJSE_Arguments* pArguments) {
- CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
- if (!pNotify) {
- return;
- }
- int32_t iCur = pNotify->GetAppProvider()->GetCurDocumentInBatch();
- CFXJSE_Value* pValue = pArguments->GetReturnValue();
- if (pValue)
- pValue->SetInteger(iCur);
+ if (CFXJSE_Value* pValue = pArguments->GetReturnValue())
+ pValue->SetInteger(0);
}
static int32_t XFA_FilterName(const CFX_WideStringC& wsExpression,
int32_t nStart,
@@ -552,14 +546,8 @@ FX_BOOL CScript_HostPseudoModel::ValidateArgsForMsg(
}
void CScript_HostPseudoModel::DocumentCountInBatch(
CFXJSE_Arguments* pArguments) {
- CXFA_FFNotify* pNotify = m_pDocument->GetNotify();
- if (!pNotify) {
- return;
- }
- int32_t iValue = pNotify->GetAppProvider()->GetDocumentCountInBatch();
- CFXJSE_Value* pValue = pArguments->GetReturnValue();
- if (pValue)
- pValue->SetInteger(iValue);
+ if (CFXJSE_Value* pValue = pArguments->GetReturnValue())
+ pValue->SetInteger(0);
}
void CScript_HostPseudoModel::Print(CFXJSE_Arguments* pArguments) {
if (!m_pDocument->GetScriptContext()->IsRunAtClient()) {