summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn4
-rw-r--r--fpdfsdk/cfx_systemhandler.cpp2
-rw-r--r--fpdfsdk/cfx_systemhandler.h6
-rw-r--r--fpdfsdk/cpdfsdk_annothandlermgr.cpp4
-rw-r--r--fpdfsdk/cpdfsdk_document.cpp6
-rw-r--r--fpdfsdk/cpdfsdk_environment.cpp (renamed from fpdfsdk/cpdfdoc_environment.cpp)32
-rw-r--r--fpdfsdk/cpdfsdk_interform.cpp16
-rw-r--r--fpdfsdk/cpdfsdk_pageview.cpp38
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp14
-rw-r--r--fpdfsdk/cpdfsdk_widgethandler.cpp4
-rw-r--r--fpdfsdk/cpdfsdk_xfawidgethandler.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_checkbox.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_checkbox.h2
-rw-r--r--fpdfsdk/formfiller/cffl_combobox.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_combobox.h2
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.cpp6
-rw-r--r--fpdfsdk/formfiller/cffl_formfiller.h10
-rw-r--r--fpdfsdk/formfiller/cffl_iformfiller.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_iformfiller.h6
-rw-r--r--fpdfsdk/formfiller/cffl_listbox.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_listbox.h2
-rw-r--r--fpdfsdk/formfiller/cffl_pushbutton.cpp2
-rw-r--r--fpdfsdk/formfiller/cffl_pushbutton.h2
-rw-r--r--fpdfsdk/formfiller/cffl_radiobutton.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_radiobutton.h2
-rw-r--r--fpdfsdk/formfiller/cffl_textfield.cpp4
-rw-r--r--fpdfsdk/formfiller/cffl_textfield.h2
-rw-r--r--fpdfsdk/fpdfformfill.cpp23
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp30
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_app.cpp30
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp4
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_util.cpp2
-rw-r--r--fpdfsdk/fpdfxfa/include/fpdfxfa_app.h8
-rw-r--r--fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h8
-rw-r--r--fpdfsdk/fpdfxfa/include/fpdfxfa_util.h4
-rw-r--r--fpdfsdk/fsdk_actionhandler.cpp20
-rw-r--r--fpdfsdk/include/cpdfsdk_annothandlermgr.h6
-rw-r--r--fpdfsdk/include/cpdfsdk_baannothandler.h2
-rw-r--r--fpdfsdk/include/cpdfsdk_document.h8
-rw-r--r--fpdfsdk/include/cpdfsdk_environment.h (renamed from fpdfsdk/include/cpdfdoc_environment.h)12
-rw-r--r--fpdfsdk/include/cpdfsdk_widgethandler.h6
-rw-r--r--fpdfsdk/include/cpdfsdk_xfawidgethandler.h6
-rw-r--r--fpdfsdk/javascript/Document.cpp12
-rw-r--r--fpdfsdk/javascript/Field.cpp6
-rw-r--r--fpdfsdk/javascript/JS_GlobalData.cpp2
-rw-r--r--fpdfsdk/javascript/JS_GlobalData.h4
-rw-r--r--fpdfsdk/javascript/JS_Object.h2
-rw-r--r--fpdfsdk/javascript/JS_Runtime_Stub.cpp2
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp4
-rw-r--r--fpdfsdk/javascript/app.cpp28
-rw-r--r--fpdfsdk/javascript/cjs_context.cpp2
-rw-r--r--fpdfsdk/javascript/cjs_context.h4
-rw-r--r--fpdfsdk/javascript/cjs_runtime.cpp6
-rw-r--r--fpdfsdk/javascript/cjs_runtime.h6
-rw-r--r--fpdfsdk/javascript/global.cpp2
-rw-r--r--fpdfsdk/javascript/global.h4
-rw-r--r--fpdfsdk/javascript/ijs_runtime.h4
57 files changed, 227 insertions, 220 deletions
diff --git a/BUILD.gn b/BUILD.gn
index bdefb73dd4..ccb1e0cca3 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -65,7 +65,6 @@ static_library("pdfium") {
"fpdfsdk/cba_annotiterator.cpp",
"fpdfsdk/cfx_systemhandler.cpp",
"fpdfsdk/cfx_systemhandler.h",
- "fpdfsdk/cpdfdoc_environment.cpp",
"fpdfsdk/cpdfsdk_annot.cpp",
"fpdfsdk/cpdfsdk_annothandlermgr.cpp",
"fpdfsdk/cpdfsdk_annotiterator.cpp",
@@ -73,6 +72,7 @@ static_library("pdfium") {
"fpdfsdk/cpdfsdk_baannothandler.cpp",
"fpdfsdk/cpdfsdk_datetime.cpp",
"fpdfsdk/cpdfsdk_document.cpp",
+ "fpdfsdk/cpdfsdk_environment.cpp",
"fpdfsdk/cpdfsdk_interform.cpp",
"fpdfsdk/cpdfsdk_pageview.cpp",
"fpdfsdk/cpdfsdk_widget.cpp",
@@ -95,7 +95,6 @@ static_library("pdfium") {
"fpdfsdk/fsdk_actionhandler.cpp",
"fpdfsdk/fsdk_pauseadapter.cpp",
"fpdfsdk/include/cba_annotiterator.h",
- "fpdfsdk/include/cpdfdoc_environment.h",
"fpdfsdk/include/cpdfsdk_annot.h",
"fpdfsdk/include/cpdfsdk_annothandlermgr.h",
"fpdfsdk/include/cpdfsdk_annotiterator.h",
@@ -103,6 +102,7 @@ static_library("pdfium") {
"fpdfsdk/include/cpdfsdk_baannothandler.h",
"fpdfsdk/include/cpdfsdk_datetime.h",
"fpdfsdk/include/cpdfsdk_document.h",
+ "fpdfsdk/include/cpdfsdk_environment.h",
"fpdfsdk/include/cpdfsdk_interform.h",
"fpdfsdk/include/cpdfsdk_pageview.h",
"fpdfsdk/include/cpdfsdk_widget.h",
diff --git a/fpdfsdk/cfx_systemhandler.cpp b/fpdfsdk/cfx_systemhandler.cpp
index 25895655f6..eb9cff28df 100644
--- a/fpdfsdk/cfx_systemhandler.cpp
+++ b/fpdfsdk/cfx_systemhandler.cpp
@@ -13,9 +13,9 @@
#include "core/fxge/include/cfx_fontmgr.h"
#include "core/fxge/include/cfx_gemodule.h"
#include "fpdfsdk/formfiller/cffl_formfiller.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_annot.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
namespace {
diff --git a/fpdfsdk/cfx_systemhandler.h b/fpdfsdk/cfx_systemhandler.h
index 76da223310..a1c277d04b 100644
--- a/fpdfsdk/cfx_systemhandler.h
+++ b/fpdfsdk/cfx_systemhandler.h
@@ -45,11 +45,11 @@ struct FX_SYSTEMTIME {
class CPDF_Document;
class CPDF_Font;
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CFX_SystemHandler {
public:
- explicit CFX_SystemHandler(CPDFDoc_Environment* pEnv) : m_pEnv(pEnv) {}
+ explicit CFX_SystemHandler(CPDFSDK_Environment* pEnv) : m_pEnv(pEnv) {}
~CFX_SystemHandler() {}
void InvalidateRect(FX_HWND hWnd, FX_RECT rect);
@@ -71,7 +71,7 @@ class CFX_SystemHandler {
FX_SYSTEMTIME GetLocalTime();
private:
- CPDFDoc_Environment* const m_pEnv;
+ CPDFSDK_Environment* const m_pEnv;
};
#endif // FPDFSDK_CFX_SYSTEMHANDLER_H_
diff --git a/fpdfsdk/cpdfsdk_annothandlermgr.cpp b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
index 1f88e16211..347328ec5a 100644
--- a/fpdfsdk/cpdfsdk_annothandlermgr.cpp
+++ b/fpdfsdk/cpdfsdk_annothandlermgr.cpp
@@ -8,12 +8,12 @@
#include "core/fpdfdoc/include/cpdf_annot.h"
#include "fpdfsdk/include/cba_annotiterator.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_annot.h"
#include "fpdfsdk/include/cpdfsdk_baannot.h"
#include "fpdfsdk/include/cpdfsdk_baannothandler.h"
#include "fpdfsdk/include/cpdfsdk_datetime.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/cpdfsdk_widgethandler.h"
@@ -24,7 +24,7 @@
#include "xfa/fxfa/include/xfa_ffwidget.h"
#endif // PDF_ENABLE_XFA
-CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp)
+CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(CPDFSDK_Environment* pApp)
: m_pBAAnnotHandler(new CPDFSDK_BAAnnotHandler()),
m_pWidgetHandler(new CPDFSDK_WidgetHandler(pApp)),
#ifdef PDF_ENABLE_XFA
diff --git a/fpdfsdk/cpdfsdk_document.cpp b/fpdfsdk/cpdfsdk_document.cpp
index 232adbaba5..c175089b0e 100644
--- a/fpdfsdk/cpdfsdk_document.cpp
+++ b/fpdfsdk/cpdfsdk_document.cpp
@@ -13,9 +13,9 @@
#include "core/fpdfdoc/include/cpdf_action.h"
#include "core/fpdfdoc/include/cpdf_docjsactions.h"
#include "core/fpdfdoc/include/cpdf_occontext.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_annot.h"
#include "fpdfsdk/include/cpdfsdk_annothandlermgr.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
@@ -24,12 +24,12 @@
// static
CPDFSDK_Document* CPDFSDK_Document::FromFPDFFormHandle(
FPDF_FORMHANDLE hHandle) {
- CPDFDoc_Environment* pEnv = static_cast<CPDFDoc_Environment*>(hHandle);
+ CPDFSDK_Environment* pEnv = static_cast<CPDFSDK_Environment*>(hHandle);
return pEnv ? pEnv->GetSDKDocument() : nullptr;
}
CPDFSDK_Document::CPDFSDK_Document(UnderlyingDocumentType* pDoc,
- CPDFDoc_Environment* pEnv)
+ CPDFSDK_Environment* pEnv)
: m_pDoc(pDoc),
m_pFocusAnnot(nullptr),
m_pEnv(pEnv),
diff --git a/fpdfsdk/cpdfdoc_environment.cpp b/fpdfsdk/cpdfsdk_environment.cpp
index ddc9917361..34f11d4142 100644
--- a/fpdfsdk/cpdfdoc_environment.cpp
+++ b/fpdfsdk/cpdfsdk_environment.cpp
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "fpdfsdk/include/cpdfdoc_environment.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/formfiller/cffl_iformfiller.h"
#include "fpdfsdk/include/cpdfsdk_annothandlermgr.h"
@@ -26,13 +26,13 @@ FPDF_WIDESTRING AsFPDFWideString(CFX_ByteString* bsUTF16LE) {
} // namespace
-CPDFDoc_Environment::CPDFDoc_Environment(UnderlyingDocumentType* pDoc,
+CPDFSDK_Environment::CPDFSDK_Environment(UnderlyingDocumentType* pDoc,
FPDF_FORMFILLINFO* pFFinfo)
: m_pInfo(pFFinfo), m_pSDKDoc(nullptr), m_pUnderlyingDoc(pDoc) {
m_pSysHandler.reset(new CFX_SystemHandler(this));
}
-CPDFDoc_Environment::~CPDFDoc_Environment() {
+CPDFSDK_Environment::~CPDFSDK_Environment() {
#ifdef PDF_ENABLE_XFA
CPDFXFA_App* pProvider = CPDFXFA_App::GetInstance();
if (pProvider->m_pEnvList.GetSize() == 0)
@@ -42,7 +42,7 @@ CPDFDoc_Environment::~CPDFDoc_Environment() {
m_pInfo->Release(m_pInfo);
}
-int CPDFDoc_Environment::JS_appAlert(const FX_WCHAR* Msg,
+int CPDFSDK_Environment::JS_appAlert(const FX_WCHAR* Msg,
const FX_WCHAR* Title,
FX_UINT Type,
FX_UINT Icon) {
@@ -57,7 +57,7 @@ int CPDFDoc_Environment::JS_appAlert(const FX_WCHAR* Msg,
AsFPDFWideString(&bsTitle), Type, Icon);
}
-int CPDFDoc_Environment::JS_appResponse(const FX_WCHAR* Question,
+int CPDFSDK_Environment::JS_appResponse(const FX_WCHAR* Question,
const FX_WCHAR* Title,
const FX_WCHAR* Default,
const FX_WCHAR* cLabel,
@@ -78,7 +78,7 @@ int CPDFDoc_Environment::JS_appResponse(const FX_WCHAR* Question,
AsFPDFWideString(&bsLabel), bPassword, response, length);
}
-void CPDFDoc_Environment::JS_appBeep(int nType) {
+void CPDFSDK_Environment::JS_appBeep(int nType) {
if (!m_pInfo || !m_pInfo->m_pJsPlatform ||
!m_pInfo->m_pJsPlatform->app_beep) {
return;
@@ -86,7 +86,7 @@ void CPDFDoc_Environment::JS_appBeep(int nType) {
m_pInfo->m_pJsPlatform->app_beep(m_pInfo->m_pJsPlatform, nType);
}
-CFX_WideString CPDFDoc_Environment::JS_fieldBrowse() {
+CFX_WideString CPDFSDK_Environment::JS_fieldBrowse() {
if (!m_pInfo || !m_pInfo->m_pJsPlatform ||
!m_pInfo->m_pJsPlatform->Field_browse) {
return CFX_WideString();
@@ -106,7 +106,7 @@ CFX_WideString CPDFDoc_Environment::JS_fieldBrowse() {
return CFX_WideString::FromLocal(CFX_ByteStringC(pBuff.get(), nActualLen));
}
-CFX_WideString CPDFDoc_Environment::JS_docGetFilePath() {
+CFX_WideString CPDFSDK_Environment::JS_docGetFilePath() {
if (!m_pInfo || !m_pInfo->m_pJsPlatform ||
!m_pInfo->m_pJsPlatform->Doc_getFilePath) {
return CFX_WideString();
@@ -126,7 +126,7 @@ CFX_WideString CPDFDoc_Environment::JS_docGetFilePath() {
return CFX_WideString::FromLocal(CFX_ByteStringC(pBuff.get(), nActualLen));
}
-void CPDFDoc_Environment::JS_docSubmitForm(void* formData,
+void CPDFSDK_Environment::JS_docSubmitForm(void* formData,
int length,
const FX_WCHAR* URL) {
if (!m_pInfo || !m_pInfo->m_pJsPlatform ||
@@ -139,7 +139,7 @@ void CPDFDoc_Environment::JS_docSubmitForm(void* formData,
AsFPDFWideString(&bsDestination));
}
-void CPDFDoc_Environment::JS_docmailForm(void* mailData,
+void CPDFSDK_Environment::JS_docmailForm(void* mailData,
int length,
FPDF_BOOL bUI,
const FX_WCHAR* To,
@@ -162,7 +162,7 @@ void CPDFDoc_Environment::JS_docmailForm(void* mailData,
AsFPDFWideString(&bsBcc), AsFPDFWideString(&bsMsg));
}
-void CPDFDoc_Environment::JS_docprint(FPDF_BOOL bUI,
+void CPDFSDK_Environment::JS_docprint(FPDF_BOOL bUI,
int nStart,
int nEnd,
FPDF_BOOL bSilent,
@@ -179,7 +179,7 @@ void CPDFDoc_Environment::JS_docprint(FPDF_BOOL bUI,
bReverse, bAnnotations);
}
-void CPDFDoc_Environment::JS_docgotoPage(int nPageNum) {
+void CPDFSDK_Environment::JS_docgotoPage(int nPageNum) {
if (!m_pInfo || !m_pInfo->m_pJsPlatform ||
!m_pInfo->m_pJsPlatform->Doc_gotoPage) {
return;
@@ -187,7 +187,7 @@ void CPDFDoc_Environment::JS_docgotoPage(int nPageNum) {
m_pInfo->m_pJsPlatform->Doc_gotoPage(m_pInfo->m_pJsPlatform, nPageNum);
}
-IJS_Runtime* CPDFDoc_Environment::GetJSRuntime() {
+IJS_Runtime* CPDFSDK_Environment::GetJSRuntime() {
if (!IsJSInitiated())
return nullptr;
if (!m_pJSRuntime)
@@ -195,19 +195,19 @@ IJS_Runtime* CPDFDoc_Environment::GetJSRuntime() {
return m_pJSRuntime.get();
}
-CPDFSDK_AnnotHandlerMgr* CPDFDoc_Environment::GetAnnotHandlerMgr() {
+CPDFSDK_AnnotHandlerMgr* CPDFSDK_Environment::GetAnnotHandlerMgr() {
if (!m_pAnnotHandlerMgr)
m_pAnnotHandlerMgr.reset(new CPDFSDK_AnnotHandlerMgr(this));
return m_pAnnotHandlerMgr.get();
}
-CPDFSDK_ActionHandler* CPDFDoc_Environment::GetActionHander() {
+CPDFSDK_ActionHandler* CPDFSDK_Environment::GetActionHander() {
if (!m_pActionHandler)
m_pActionHandler.reset(new CPDFSDK_ActionHandler());
return m_pActionHandler.get();
}
-CFFL_IFormFiller* CPDFDoc_Environment::GetIFormFiller() {
+CFFL_IFormFiller* CPDFSDK_Environment::GetIFormFiller() {
if (!m_pIFormFiller)
m_pIFormFiller.reset(new CFFL_IFormFiller(this));
return m_pIFormFiller.get();
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index f762b89d81..405a419b86 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -22,9 +22,9 @@
#include "fpdfsdk/formfiller/cffl_formfiller.h"
#include "fpdfsdk/fxedit/include/fxet_edit.h"
#include "fpdfsdk/include/cba_annotiterator.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_annot.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
#include "fpdfsdk/include/fsdk_actionhandler.h"
@@ -220,7 +220,7 @@ void CPDFSDK_InterForm::SynchronizeField(CPDF_FormField* pFormField,
#endif // PDF_ENABLE_XFA
void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField) {
- CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
ASSERT(pEnv);
if (!pEnv->IsJSInitiated())
return;
@@ -280,7 +280,7 @@ void CPDFSDK_InterForm::OnCalculate(CPDF_FormField* pFormField) {
CFX_WideString CPDFSDK_InterForm::OnFormat(CPDF_FormField* pFormField,
FX_BOOL& bFormatted) {
CFX_WideString sValue = pFormField->GetValue();
- CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
ASSERT(pEnv);
if (!pEnv->IsJSInitiated()) {
bFormatted = FALSE;
@@ -341,7 +341,7 @@ void CPDFSDK_InterForm::UpdateField(CPDF_FormField* pFormField) {
ASSERT(pFormCtrl);
if (CPDFSDK_Widget* pWidget = GetWidget(pFormCtrl, false)) {
- CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
CFFL_IFormFiller* pIFormFiller = pEnv->GetIFormFiller();
UnderlyingPageType* pPage = pWidget->GetUnderlyingPage();
CPDFSDK_PageView* pPageView = m_pDocument->GetPageView(pPage, false);
@@ -363,7 +363,7 @@ FX_BOOL CPDFSDK_InterForm::OnKeyStrokeCommit(CPDF_FormField* pFormField,
if (!action.GetDict())
return TRUE;
- CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
CPDFSDK_ActionHandler* pActionHandler = pEnv->GetActionHander();
PDFSDK_FieldAction fa;
fa.bModifier = pEnv->FFI_IsCTRLKeyDown(0);
@@ -384,7 +384,7 @@ FX_BOOL CPDFSDK_InterForm::OnValidate(CPDF_FormField* pFormField,
if (!action.GetDict())
return TRUE;
- CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
CPDFSDK_ActionHandler* pActionHandler = pEnv->GetActionHander();
PDFSDK_FieldAction fa;
fa.bModifier = pEnv->FFI_IsCTRLKeyDown(0);
@@ -458,7 +458,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitFields(
const std::vector<CPDF_FormField*>& fields,
bool bIncludeOrExclude,
bool bUrlEncoded) {
- CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
CFX_ByteTextBuf textBuf;
ExportFieldsToFDFTextBuf(fields, bIncludeOrExclude, textBuf);
@@ -541,7 +541,7 @@ FX_BOOL CPDFSDK_InterForm::SubmitForm(const CFX_WideString& sDestination,
if (!m_pDocument || !m_pInterForm)
return FALSE;
- CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
CFX_WideString wsPDFFilePath = m_pDocument->GetPath();
CFDF_Document* pFDFDoc = m_pInterForm->ExportToFDF(wsPDFFilePath.AsStringC());
if (!pFDFDoc)
diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp
index ae0d3fa7df..a3049a265a 100644
--- a/fpdfsdk/cpdfsdk_pageview.cpp
+++ b/fpdfsdk/cpdfsdk_pageview.cpp
@@ -10,10 +10,10 @@
#include "core/fpdfapi/fpdf_render/include/cpdf_renderoptions.h"
#include "core/fpdfdoc/include/cpdf_annotlist.h"
#include "core/fpdfdoc/include/cpdf_interform.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_annot.h"
#include "fpdfsdk/include/cpdfsdk_annothandlermgr.h"
#include "fpdfsdk/include/cpdfsdk_annotiterator.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#ifdef PDF_ENABLE_XFA
@@ -61,7 +61,7 @@ CPDFSDK_PageView::~CPDFSDK_PageView() {
m_page->SetView(nullptr);
#endif // PDF_ENABLE_XFA
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray)
pAnnotHandlerMgr->ReleaseAnnot(pAnnot);
@@ -84,7 +84,7 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice,
CPDF_RenderOptions* pOptions) {
#endif // PDF_ENABLE_XFA
m_curMatrix = *pUser2Device;
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
#ifdef PDF_ENABLE_XFA
CPDFXFA_Page* pPage = GetPDFXFAPage();
@@ -153,7 +153,7 @@ const CPDF_Annot* CPDFSDK_PageView::GetPDFWidgetAtPoint(FX_FLOAT pageX,
CPDFSDK_Annot* CPDFSDK_PageView::GetFXAnnotAtPoint(FX_FLOAT pageX,
FX_FLOAT pageY) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotMgr = pEnv->GetAnnotHandlerMgr();
CPDFSDK_AnnotIterator annotIterator(this, false);
while (CPDFSDK_Annot* pSDKAnnot = annotIterator.Next()) {
@@ -169,7 +169,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetFXAnnotAtPoint(FX_FLOAT pageX,
CPDFSDK_Annot* CPDFSDK_PageView::GetFXWidgetAtPoint(FX_FLOAT pageX,
FX_FLOAT pageY) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotMgr = pEnv->GetAnnotHandlerMgr();
CPDFSDK_AnnotIterator annotIterator(this, false);
while (CPDFSDK_Annot* pSDKAnnot = annotIterator.Next()) {
@@ -198,7 +198,7 @@ void CPDFSDK_PageView::KillFocusAnnotIfNeeded() {
}
CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Annot* pPDFAnnot) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
ASSERT(pEnv);
CPDFSDK_AnnotHandlerMgr* pAnnotHandler = pEnv->GetAnnotHandlerMgr();
CPDFSDK_Annot* pSDKAnnot = pAnnotHandler->NewAnnot(pPDFAnnot, this);
@@ -219,7 +219,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CXFA_FFWidget* pPDFAnnot) {
if (pSDKAnnot)
return pSDKAnnot;
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotHandler = pEnv->GetAnnotHandlerMgr();
pSDKAnnot = pAnnotHandler->NewAnnot(pPDFAnnot, this);
if (!pSDKAnnot)
@@ -251,7 +251,7 @@ FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) {
if (GetFocusAnnot() == pAnnot)
KillFocusAnnot();
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotHandler = pEnv->GetAnnotHandlerMgr();
if (pAnnotHandler)
pAnnotHandler->ReleaseAnnot(pAnnot);
@@ -318,7 +318,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByXFAWidget(CXFA_FFWidget* hWidget) {
FX_BOOL CPDFSDK_PageView::OnLButtonDown(const CFX_FloatPoint& point,
FX_UINT nFlag) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
ASSERT(pEnv);
CPDFSDK_Annot* pFXAnnot = GetFXWidgetAtPoint(point.x, point.y);
if (!pFXAnnot) {
@@ -337,7 +337,7 @@ FX_BOOL CPDFSDK_PageView::OnLButtonDown(const CFX_FloatPoint& point,
#ifdef PDF_ENABLE_XFA
FX_BOOL CPDFSDK_PageView::OnRButtonDown(const CFX_FloatPoint& point,
FX_UINT nFlag) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
ASSERT(pEnv);
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
ASSERT(pAnnotHandlerMgr);
@@ -355,7 +355,7 @@ FX_BOOL CPDFSDK_PageView::OnRButtonDown(const CFX_FloatPoint& point,
FX_BOOL CPDFSDK_PageView::OnRButtonUp(const CFX_FloatPoint& point,
FX_UINT nFlag) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
ASSERT(pEnv);
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
@@ -373,7 +373,7 @@ FX_BOOL CPDFSDK_PageView::OnRButtonUp(const CFX_FloatPoint& point,
FX_BOOL CPDFSDK_PageView::OnLButtonUp(const CFX_FloatPoint& point,
FX_UINT nFlag) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
ASSERT(pEnv);
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
CPDFSDK_Annot* pFXAnnot = GetFXWidgetAtPoint(point.x, point.y);
@@ -389,7 +389,7 @@ FX_BOOL CPDFSDK_PageView::OnLButtonUp(const CFX_FloatPoint& point,
}
FX_BOOL CPDFSDK_PageView::OnMouseMove(const CFX_FloatPoint& point, int nFlag) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
if (CPDFSDK_Annot* pFXAnnot = GetFXAnnotAtPoint(point.x, point.y)) {
if (m_CaptureWidget && m_CaptureWidget != pFXAnnot) {
@@ -424,7 +424,7 @@ FX_BOOL CPDFSDK_PageView::OnMouseWheel(double deltaX,
const CFX_FloatPoint& point,
int nFlag) {
if (CPDFSDK_Annot* pAnnot = GetFXWidgetAtPoint(point.x, point.y)) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
return pAnnotHandlerMgr->Annot_OnMouseWheel(this, pAnnot, nFlag,
(int)deltaY, point);
@@ -434,7 +434,7 @@ FX_BOOL CPDFSDK_PageView::OnMouseWheel(double deltaX,
FX_BOOL CPDFSDK_PageView::OnChar(int nChar, FX_UINT nFlag) {
if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
return pAnnotHandlerMgr->Annot_OnChar(pAnnot, nChar, nFlag);
}
@@ -444,7 +444,7 @@ FX_BOOL CPDFSDK_PageView::OnChar(int nChar, FX_UINT nFlag) {
FX_BOOL CPDFSDK_PageView::OnKeyDown(int nKeyCode, int nFlag) {
if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
return pAnnotHandlerMgr->Annot_OnKeyDown(pAnnot, nKeyCode, nFlag);
}
@@ -456,7 +456,7 @@ FX_BOOL CPDFSDK_PageView::OnKeyUp(int nKeyCode, int nFlag) {
}
void CPDFSDK_PageView::LoadFXAnnots() {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr();
SetLock(TRUE);
@@ -522,14 +522,14 @@ void CPDFSDK_PageView::ClearFXAnnots() {
}
void CPDFSDK_PageView::UpdateRects(const std::vector<CFX_FloatRect>& rects) {
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
for (const auto& rc : rects)
pEnv->FFI_Invalidate(m_page, rc.left, rc.top, rc.right, rc.bottom);
}
void CPDFSDK_PageView::UpdateView(CPDFSDK_Annot* pAnnot) {
CFX_FloatRect rcWindow = pAnnot->GetRect();
- CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pSDKDoc->GetEnv();
pEnv->FFI_Invalidate(m_page, rcWindow.left, rcWindow.top, rcWindow.right,
rcWindow.bottom);
}
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 78cb1bf752..3519b06843 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -21,8 +21,8 @@
#include "core/fxge/include/cfx_renderdevice.h"
#include "fpdfsdk/formfiller/cba_fontmap.h"
#include "fpdfsdk/fxedit/include/fxet_edit.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/fsdk_actionhandler.h"
@@ -845,7 +845,7 @@ void CPDFSDK_Widget::DrawShadow(CFX_RenderDevice* pDevice,
CFX_FloatRect rcDevice;
ASSERT(m_pInterForm->GetDocument());
- CPDFDoc_Environment* pEnv = m_pInterForm->GetDocument()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pInterForm->GetDocument()->GetEnv();
if (!pEnv)
return;
CFX_Matrix page2device;
@@ -992,7 +992,7 @@ void CPDFSDK_Widget::ResetAppearance_PushButton() {
CPDF_IconFit iconFit = pControl->GetIconFit();
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
- CPDFDoc_Environment* pEnv = pDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = pDoc->GetEnv();
CBA_FontMap font_map(this, pEnv->GetSysHandler());
font_map.SetAPType("N");
@@ -1370,7 +1370,7 @@ void CPDFSDK_Widget::ResetAppearance_ComboBox(const CFX_WideString* sValue) {
pEdit->EnableRefresh(FALSE);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
- CPDFDoc_Environment* pEnv = pDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = pDoc->GetEnv();
CBA_FontMap font_map(this, pEnv->GetSysHandler());
pEdit->SetFontMap(&font_map);
@@ -1436,7 +1436,7 @@ void CPDFSDK_Widget::ResetAppearance_ListBox() {
pEdit->EnableRefresh(FALSE);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
- CPDFDoc_Environment* pEnv = pDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = pDoc->GetEnv();
CBA_FontMap font_map(this, pEnv->GetSysHandler());
pEdit->SetFontMap(&font_map);
@@ -1523,7 +1523,7 @@ void CPDFSDK_Widget::ResetAppearance_TextField(const CFX_WideString* sValue) {
pEdit->EnableRefresh(FALSE);
CPDFSDK_Document* pDoc = m_pInterForm->GetDocument();
- CPDFDoc_Environment* pEnv = pDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = pDoc->GetEnv();
CBA_FontMap font_map(this, pEnv->GetSysHandler());
pEdit->SetFontMap(&font_map);
@@ -1843,7 +1843,7 @@ FX_BOOL CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type,
PDFSDK_FieldAction& data,
CPDFSDK_PageView* pPageView) {
CPDFSDK_Document* pDocument = pPageView->GetSDKDocument();
- CPDFDoc_Environment* pEnv = pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = pDocument->GetEnv();
#ifdef PDF_ENABLE_XFA
CPDFXFA_Document* pDoc = pDocument->GetXFADocument();
diff --git a/fpdfsdk/cpdfsdk_widgethandler.cpp b/fpdfsdk/cpdfsdk_widgethandler.cpp
index 965a26ceb0..0a2694df89 100644
--- a/fpdfsdk/cpdfsdk_widgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_widgethandler.cpp
@@ -13,9 +13,9 @@
#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
#include "core/fpdfdoc/include/cpdf_interform.h"
#include "fpdfsdk/formfiller/cffl_formfiller.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_annot.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
@@ -24,7 +24,7 @@
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
#endif // PDF_ENABLE_XFA
-CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(CPDFDoc_Environment* pApp)
+CPDFSDK_WidgetHandler::CPDFSDK_WidgetHandler(CPDFSDK_Environment* pApp)
: m_pApp(pApp), m_pFormFiller(nullptr) {}
CPDFSDK_WidgetHandler::~CPDFSDK_WidgetHandler() {}
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
index af160765c8..0f91ccc905 100644
--- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
+++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp
@@ -8,9 +8,9 @@
#include "core/fpdfdoc/include/cpdf_interform.h"
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_annot.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/cpdfsdk_xfawidget.h"
@@ -22,7 +22,7 @@
#include "xfa/fxfa/include/xfa_ffwidgethandler.h"
#include "xfa/fxgraphics/include/cfx_graphics.h"
-CPDFSDK_XFAWidgetHandler::CPDFSDK_XFAWidgetHandler(CPDFDoc_Environment* pApp)
+CPDFSDK_XFAWidgetHandler::CPDFSDK_XFAWidgetHandler(CPDFSDK_Environment* pApp)
: m_pApp(pApp) {}
CPDFSDK_XFAWidgetHandler::~CPDFSDK_XFAWidgetHandler() {}
diff --git a/fpdfsdk/formfiller/cffl_checkbox.cpp b/fpdfsdk/formfiller/cffl_checkbox.cpp
index 3455cded60..df5e7bfbca 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.cpp
+++ b/fpdfsdk/formfiller/cffl_checkbox.cpp
@@ -7,12 +7,12 @@
#include "fpdfsdk/formfiller/cffl_checkbox.h"
#include "fpdfsdk/formfiller/cffl_formfiller.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
#include "fpdfsdk/pdfwindow/PWL_SpecialButton.h"
#include "public/fpdf_fwlevent.h"
-CFFL_CheckBox::CFFL_CheckBox(CPDFDoc_Environment* pApp, CPDFSDK_Widget* pWidget)
+CFFL_CheckBox::CFFL_CheckBox(CPDFSDK_Environment* pApp, CPDFSDK_Widget* pWidget)
: CFFL_Button(pApp, pWidget) {}
CFFL_CheckBox::~CFFL_CheckBox() {}
diff --git a/fpdfsdk/formfiller/cffl_checkbox.h b/fpdfsdk/formfiller/cffl_checkbox.h
index 01f6e3bee4..9dd0827356 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.h
+++ b/fpdfsdk/formfiller/cffl_checkbox.h
@@ -11,7 +11,7 @@
class CFFL_CheckBox : public CFFL_Button {
public:
- CFFL_CheckBox(CPDFDoc_Environment* pApp, CPDFSDK_Widget* pWidget);
+ CFFL_CheckBox(CPDFSDK_Environment* pApp, CPDFSDK_Widget* pWidget);
~CFFL_CheckBox() override;
// CFFL_Button
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp
index 3eea1e4fcc..7ff09b7948 100644
--- a/fpdfsdk/formfiller/cffl_combobox.cpp
+++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -9,12 +9,12 @@
#include "fpdfsdk/formfiller/cba_fontmap.h"
#include "fpdfsdk/formfiller/cffl_formfiller.h"
#include "fpdfsdk/formfiller/cffl_iformfiller.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
#include "fpdfsdk/include/fsdk_common.h"
#include "fpdfsdk/pdfwindow/PWL_ComboBox.h"
-CFFL_ComboBox::CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot)
+CFFL_ComboBox::CFFL_ComboBox(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pAnnot)
: CFFL_FormFiller(pApp, pAnnot), m_pFontMap(nullptr) {
m_State.nIndex = 0;
m_State.nStart = 0;
diff --git a/fpdfsdk/formfiller/cffl_combobox.h b/fpdfsdk/formfiller/cffl_combobox.h
index 6b8fb4939b..b9e7430636 100644
--- a/fpdfsdk/formfiller/cffl_combobox.h
+++ b/fpdfsdk/formfiller/cffl_combobox.h
@@ -21,7 +21,7 @@ struct FFL_ComboBoxState {
class CFFL_ComboBox : public CFFL_FormFiller, public IPWL_FocusHandler {
public:
- CFFL_ComboBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget);
+ CFFL_ComboBox(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pWidget);
~CFFL_ComboBox() override;
// CFFL_FormFiller:
diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp
index 595f4121f3..99fc0808ff 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_formfiller.cpp
@@ -9,8 +9,8 @@
#include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
#include "core/fxge/include/cfx_renderdevice.h"
#include "fpdfsdk/formfiller/cba_fontmap.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
#include "fpdfsdk/include/fsdk_common.h"
@@ -22,7 +22,7 @@
#define FFL_HINT_ELAPSE 800
-CFFL_FormFiller::CFFL_FormFiller(CPDFDoc_Environment* pApp,
+CFFL_FormFiller::CFFL_FormFiller(CPDFSDK_Environment* pApp,
CPDFSDK_Annot* pAnnot)
: m_pApp(pApp), m_pAnnot(pAnnot), m_bValid(FALSE) {
m_pWidget = static_cast<CPDFSDK_Widget*>(pAnnot);
@@ -618,7 +618,7 @@ void CFFL_FormFiller::InvalidateRect(double left,
m_pApp->FFI_Invalidate(pPage, left, top, right, bottom);
}
-CFFL_Button::CFFL_Button(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget)
+CFFL_Button::CFFL_Button(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pWidget)
: CFFL_FormFiller(pApp, pWidget), m_bMouseIn(FALSE), m_bMouseDown(FALSE) {}
CFFL_Button::~CFFL_Button() {}
diff --git a/fpdfsdk/formfiller/cffl_formfiller.h b/fpdfsdk/formfiller/cffl_formfiller.h
index d691e3f6ce..6a41185c39 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.h
+++ b/fpdfsdk/formfiller/cffl_formfiller.h
@@ -13,14 +13,14 @@
#include "fpdfsdk/formfiller/cffl_iformfiller.h"
#include "fpdfsdk/include/pdfsdk_fieldaction.h"
-class CPDFDoc_Environment;
class CPDFSDK_Annot;
+class CPDFSDK_Environment;
class CPDFSDK_PageView;
class CPDFSDK_Widget;
class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
public:
- CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot);
+ CFFL_FormFiller(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pAnnot);
~CFFL_FormFiller() override;
virtual FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView,
@@ -146,7 +146,7 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
double top,
double right,
double bottom);
- CPDFDoc_Environment* GetApp() { return m_pApp; }
+ CPDFSDK_Environment* GetApp() { return m_pApp; }
CPDFSDK_Annot* GetSDKAnnot() { return m_pAnnot; }
protected:
@@ -160,7 +160,7 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
// until the PWL_Edit is done with it. pdfium:566
void DestroyWindows();
- CPDFDoc_Environment* m_pApp;
+ CPDFSDK_Environment* m_pApp;
CPDFSDK_Widget* m_pWidget;
CPDFSDK_Annot* m_pAnnot;
@@ -171,7 +171,7 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
class CFFL_Button : public CFFL_FormFiller {
public:
- CFFL_Button(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget);
+ CFFL_Button(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pWidget);
~CFFL_Button() override;
// CFFL_FormFiller
diff --git a/fpdfsdk/formfiller/cffl_iformfiller.cpp b/fpdfsdk/formfiller/cffl_iformfiller.cpp
index d7ccaf217a..09e0109d79 100644
--- a/fpdfsdk/formfiller/cffl_iformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_iformfiller.cpp
@@ -18,8 +18,8 @@
#include "fpdfsdk/formfiller/cffl_pushbutton.h"
#include "fpdfsdk/formfiller/cffl_radiobutton.h"
#include "fpdfsdk/formfiller/cffl_textfield.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
@@ -27,7 +27,7 @@
#define FFL_MAXLISTBOXHEIGHT 140.0f
-CFFL_IFormFiller::CFFL_IFormFiller(CPDFDoc_Environment* pApp)
+CFFL_IFormFiller::CFFL_IFormFiller(CPDFSDK_Environment* pApp)
: m_pApp(pApp), m_bNotifying(FALSE) {}
CFFL_IFormFiller::~CFFL_IFormFiller() {}
diff --git a/fpdfsdk/formfiller/cffl_iformfiller.h b/fpdfsdk/formfiller/cffl_iformfiller.h
index 36cf19dd64..26638f8334 100644
--- a/fpdfsdk/formfiller/cffl_iformfiller.h
+++ b/fpdfsdk/formfiller/cffl_iformfiller.h
@@ -14,14 +14,14 @@
#include "fpdfsdk/pdfwindow/PWL_Edit.h"
class CFFL_FormFiller;
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CPDFSDK_Annot;
class CPDFSDK_PageView;
class CPDFSDK_Widget;
class CFFL_IFormFiller : public IPWL_Filler_Notify {
public:
- explicit CFFL_IFormFiller(CPDFDoc_Environment* pApp);
+ explicit CFFL_IFormFiller(CPDFSDK_Environment* pApp);
~CFFL_IFormFiller() override;
virtual FX_BOOL Annot_HitTest(CPDFSDK_PageView* pPageView,
@@ -171,7 +171,7 @@ class CFFL_IFormFiller : public IPWL_Filler_Notify {
#endif // PDF_ENABLE_XFA
void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot);
- CPDFDoc_Environment* const m_pApp;
+ CPDFSDK_Environment* const m_pApp;
CFFL_Widget2Filler m_Maps;
FX_BOOL m_bNotifying;
};
diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp
index 39b766a62c..e9627cb4e4 100644
--- a/fpdfsdk/formfiller/cffl_listbox.cpp
+++ b/fpdfsdk/formfiller/cffl_listbox.cpp
@@ -9,14 +9,14 @@
#include "fpdfsdk/formfiller/cba_fontmap.h"
#include "fpdfsdk/formfiller/cffl_formfiller.h"
#include "fpdfsdk/formfiller/cffl_iformfiller.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
#include "fpdfsdk/include/fsdk_common.h"
#include "fpdfsdk/pdfwindow/PWL_ListBox.h"
#define FFL_DEFAULTLISTBOXFONTSIZE 12.0f
-CFFL_ListBox::CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget)
+CFFL_ListBox::CFFL_ListBox(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pWidget)
: CFFL_FormFiller(pApp, pWidget) {}
CFFL_ListBox::~CFFL_ListBox() {}
diff --git a/fpdfsdk/formfiller/cffl_listbox.h b/fpdfsdk/formfiller/cffl_listbox.h
index 4d1f64f113..29d0884af0 100644
--- a/fpdfsdk/formfiller/cffl_listbox.h
+++ b/fpdfsdk/formfiller/cffl_listbox.h
@@ -16,7 +16,7 @@ class CBA_FontMap;
class CFFL_ListBox : public CFFL_FormFiller {
public:
- CFFL_ListBox(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget);
+ CFFL_ListBox(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pWidget);
~CFFL_ListBox() override;
// CFFL_FormFiller
diff --git a/fpdfsdk/formfiller/cffl_pushbutton.cpp b/fpdfsdk/formfiller/cffl_pushbutton.cpp
index d8da65a383..630b2d52d1 100644
--- a/fpdfsdk/formfiller/cffl_pushbutton.cpp
+++ b/fpdfsdk/formfiller/cffl_pushbutton.cpp
@@ -9,7 +9,7 @@
#include "fpdfsdk/formfiller/cffl_formfiller.h"
#include "fpdfsdk/pdfwindow/PWL_SpecialButton.h"
-CFFL_PushButton::CFFL_PushButton(CPDFDoc_Environment* pApp,
+CFFL_PushButton::CFFL_PushButton(CPDFSDK_Environment* pApp,
CPDFSDK_Annot* pAnnot)
: CFFL_Button(pApp, pAnnot) {}
diff --git a/fpdfsdk/formfiller/cffl_pushbutton.h b/fpdfsdk/formfiller/cffl_pushbutton.h
index 9292a76266..cc49ed8332 100644
--- a/fpdfsdk/formfiller/cffl_pushbutton.h
+++ b/fpdfsdk/formfiller/cffl_pushbutton.h
@@ -11,7 +11,7 @@
class CFFL_PushButton : public CFFL_Button {
public:
- CFFL_PushButton(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot);
+ CFFL_PushButton(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pAnnot);
~CFFL_PushButton() override;
// CFFL_Button
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.cpp b/fpdfsdk/formfiller/cffl_radiobutton.cpp
index 752baadf5e..ddb3d2765d 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.cpp
+++ b/fpdfsdk/formfiller/cffl_radiobutton.cpp
@@ -7,12 +7,12 @@
#include "fpdfsdk/formfiller/cffl_radiobutton.h"
#include "fpdfsdk/formfiller/cffl_formfiller.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
#include "fpdfsdk/pdfwindow/PWL_SpecialButton.h"
#include "public/fpdf_fwlevent.h"
-CFFL_RadioButton::CFFL_RadioButton(CPDFDoc_Environment* pApp,
+CFFL_RadioButton::CFFL_RadioButton(CPDFSDK_Environment* pApp,
CPDFSDK_Annot* pWidget)
: CFFL_Button(pApp, pWidget) {}
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.h b/fpdfsdk/formfiller/cffl_radiobutton.h
index f008d1b40f..52b1276e3a 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.h
+++ b/fpdfsdk/formfiller/cffl_radiobutton.h
@@ -11,7 +11,7 @@
class CFFL_RadioButton : public CFFL_Button {
public:
- CFFL_RadioButton(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot);
+ CFFL_RadioButton(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pAnnot);
~CFFL_RadioButton() override;
// CFFL_Button
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index 15bfbc841c..842c37bbf9 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -7,11 +7,11 @@
#include "fpdfsdk/formfiller/cffl_textfield.h"
#include "fpdfsdk/formfiller/cba_fontmap.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
#include "fpdfsdk/include/fsdk_common.h"
-CFFL_TextField::CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot)
+CFFL_TextField::CFFL_TextField(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pAnnot)
: CFFL_FormFiller(pApp, pAnnot) {}
CFFL_TextField::~CFFL_TextField() {
diff --git a/fpdfsdk/formfiller/cffl_textfield.h b/fpdfsdk/formfiller/cffl_textfield.h
index 5f9fc5d3bc..717f6d3c61 100644
--- a/fpdfsdk/formfiller/cffl_textfield.h
+++ b/fpdfsdk/formfiller/cffl_textfield.h
@@ -27,7 +27,7 @@ struct FFL_TextFieldState {
class CFFL_TextField : public CFFL_FormFiller, public IPWL_FocusHandler {
public:
- CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot);
+ CFFL_TextField(CPDFSDK_Environment* pApp, CPDFSDK_Annot* pAnnot);
~CFFL_TextField() override;
// CFFL_FormFiller:
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
index 86585842e1..bf44b5ea55 100644
--- a/fpdfsdk/fpdfformfill.cpp
+++ b/fpdfsdk/fpdfformfill.cpp
@@ -17,8 +17,8 @@
#include "core/fpdfdoc/include/cpdf_interform.h"
#include "core/fpdfdoc/include/cpdf_occontext.h"
#include "core/fxge/include/cfx_fxgedevice.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/fsdk_actionhandler.h"
@@ -37,6 +37,10 @@
namespace {
+CPDFSDK_Environment* HandleToCPDFSDKEnvironment(FPDF_FORMHANDLE handle) {
+ return static_cast<CPDFSDK_Environment*>(handle);
+}
+
CPDFSDK_InterForm* FormHandleToInterForm(FPDF_FORMHANDLE hHandle) {
CPDFSDK_Document* pSDKDoc = CPDFSDK_Document::FromFPDFFormHandle(hHandle);
return pSDKDoc ? pSDKDoc->GetInterForm() : nullptr;
@@ -86,7 +90,7 @@ void FFLCommon(FPDF_FORMHANDLE hHandle,
CPDF_Document* pPDFDoc = pDocument->GetPDFDoc();
if (!pPDFDoc)
return;
- CPDFDoc_Environment* pEnv = (CPDFDoc_Environment*)hHandle;
+ CPDFSDK_Environment* pEnv = HandleToCPDFSDKEnvironment(hHandle);
CPDFSDK_Document* pFXDoc = pEnv->GetSDKDocument();
if (!pFXDoc)
return;
@@ -238,7 +242,7 @@ FPDFDOC_InitFormFillEnvironment(FPDF_DOCUMENT document,
if (!pDocument)
return nullptr;
- CPDFDoc_Environment* pEnv = new CPDFDoc_Environment(pDocument, formInfo);
+ CPDFSDK_Environment* pEnv = new CPDFSDK_Environment(pDocument, formInfo);
#ifdef PDF_ENABLE_XFA
pEnv->SetSDKDocument(pDocument->GetSDKDocument(pEnv));
CPDFXFA_App* pApp = CPDFXFA_App::GetInstance();
@@ -253,7 +257,7 @@ DLLEXPORT void STDCALL
FPDFDOC_ExitFormFillEnvironment(FPDF_FORMHANDLE hHandle) {
if (!hHandle)
return;
- CPDFDoc_Environment* pEnv = (CPDFDoc_Environment*)hHandle;
+ CPDFSDK_Environment* pEnv = HandleToCPDFSDKEnvironment(hHandle);
#ifdef PDF_ENABLE_XFA
CPDFXFA_App* pApp = CPDFXFA_App::GetInstance();
pApp->RemoveFormFillEnv(pEnv);
@@ -641,7 +645,8 @@ DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page,
if (!hHandle)
return;
- CPDFSDK_Document* pSDKDoc = ((CPDFDoc_Environment*)hHandle)->GetSDKDocument();
+ CPDFSDK_Document* pSDKDoc =
+ HandleToCPDFSDKEnvironment(hHandle)->GetSDKDocument();
if (!pSDKDoc)
return;
@@ -659,13 +664,13 @@ DLLEXPORT void STDCALL FORM_OnBeforeClosePage(FPDF_PAGE page,
DLLEXPORT void STDCALL FORM_DoDocumentJSAction(FPDF_FORMHANDLE hHandle) {
CPDFSDK_Document* pSDKDoc = CPDFSDK_Document::FromFPDFFormHandle(hHandle);
- if (pSDKDoc && ((CPDFDoc_Environment*)hHandle)->IsJSInitiated())
+ if (pSDKDoc && HandleToCPDFSDKEnvironment(hHandle)->IsJSInitiated())
pSDKDoc->ProcJavascriptFun();
}
DLLEXPORT void STDCALL FORM_DoDocumentOpenAction(FPDF_FORMHANDLE hHandle) {
CPDFSDK_Document* pSDKDoc = CPDFSDK_Document::FromFPDFFormHandle(hHandle);
- if (pSDKDoc && ((CPDFDoc_Environment*)hHandle)->IsJSInitiated())
+ if (pSDKDoc && HandleToCPDFSDKEnvironment(hHandle)->IsJSInitiated())
pSDKDoc->ProcOpenAction();
}
@@ -684,7 +689,7 @@ DLLEXPORT void STDCALL FORM_DoDocumentAAction(FPDF_FORMHANDLE hHandle,
if (aa.ActionExist((CPDF_AAction::AActionType)aaType)) {
CPDF_Action action = aa.GetAction((CPDF_AAction::AActionType)aaType);
CPDFSDK_ActionHandler* pActionHandler =
- ((CPDFDoc_Environment*)hHandle)->GetActionHander();
+ HandleToCPDFSDKEnvironment(hHandle)->GetActionHander();
pActionHandler->DoAction_Document(action, (CPDF_AAction::AActionType)aaType,
pSDKDoc);
}
@@ -708,7 +713,7 @@ DLLEXPORT void STDCALL FORM_DoPageAAction(FPDF_PAGE page,
if (!pSDKDoc->GetPageView(pPage, false))
return;
- CPDFDoc_Environment* pEnv = pSDKDoc->GetEnv();
+ CPDFSDK_Environment* pEnv = pSDKDoc->GetEnv();
CPDFSDK_ActionHandler* pActionHandler = pEnv->GetActionHander();
CPDF_Dictionary* pPageDict = pPDFPage->m_pFormDict;
CPDF_AAction aa(pPageDict->GetDictBy("AA"));
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 56eb3fccc6..f6332cdc86 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -11,8 +11,8 @@
#include "core/fpdfapi/fpdf_parser/include/cpdf_stream_acc.h"
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_page.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
@@ -65,7 +65,7 @@ void CPDFXFA_DocEnvironment::InvalidateRect(CXFA_FFPageView* pPageView,
if (!pPage)
return;
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return;
@@ -97,7 +97,7 @@ void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget,
if (!pPage)
return;
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return;
@@ -124,7 +124,7 @@ FX_BOOL CPDFXFA_DocEnvironment::GetPopupPos(CXFA_FFWidget* hWidget,
CXFA_WidgetAcc* pWidgetAcc = hWidget->GetDataAcc();
int nRotate = pWidgetAcc->GetRotate();
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return FALSE;
@@ -235,7 +235,7 @@ FX_BOOL CPDFXFA_DocEnvironment::PopupMenu(CXFA_FFWidget* hWidget,
if (!pPage)
return FALSE;
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return FALSE;
@@ -258,7 +258,7 @@ FX_BOOL CPDFXFA_DocEnvironment::PopupMenu(CXFA_FFWidget* hWidget,
void CPDFXFA_DocEnvironment::PageViewEvent(CXFA_FFPageView* pPageView,
uint32_t dwFlags) {
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return;
@@ -340,7 +340,7 @@ int32_t CPDFXFA_DocEnvironment::GetCurrentPage(CXFA_FFDoc* hDoc) {
if (m_pDocument->GetDocType() != DOCTYPE_DYNAMIC_XFA)
return -1;
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return -1;
@@ -355,7 +355,7 @@ void CPDFXFA_DocEnvironment::SetCurrentPage(CXFA_FFDoc* hDoc,
return;
}
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return;
pEnv->FFI_SetCurrentPage(this, iCurPage);
@@ -410,7 +410,7 @@ void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc,
m_pDocument->GetDocType() != DOCTYPE_STATIC_XFA)
return;
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return;
@@ -508,7 +508,7 @@ void CPDFXFA_DocEnvironment::GotoURL(CXFA_FFDoc* hDoc,
if (m_pDocument->GetDocType() != DOCTYPE_DYNAMIC_XFA)
return;
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return;
@@ -565,7 +565,7 @@ void CPDFXFA_DocEnvironment::Print(CXFA_FFDoc* hDoc,
if (hDoc != m_pDocument->GetXFADoc())
return;
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv || !pEnv->GetFormFillInfo() ||
!pEnv->GetFormFillInfo()->m_pJsPlatform ||
!pEnv->GetFormFillInfo()->m_pJsPlatform->Doc_print) {
@@ -632,7 +632,7 @@ FX_BOOL CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() {
while (pWidgetAcc) {
int fRet = pWidgetAcc->ProcessValidate(-1);
if (fRet == XFA_EVENTERROR_Error) {
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return FALSE;
@@ -694,7 +694,7 @@ FX_BOOL CPDFXFA_DocEnvironment::SubmitData(CXFA_FFDoc* hDoc,
IFX_FileRead* CPDFXFA_DocEnvironment::OpenLinkedFile(
CXFA_FFDoc* hDoc,
const CFX_WideString& wsLink) {
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return FALSE;
@@ -717,7 +717,7 @@ FX_BOOL CPDFXFA_DocEnvironment::ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler,
return FALSE;
CFX_ByteString content;
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return FALSE;
@@ -888,7 +888,7 @@ FX_BOOL CPDFXFA_DocEnvironment::MailToInfo(CFX_WideString& csURL,
FX_BOOL CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
CXFA_Submit submit) {
- CPDFDoc_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv();
if (!pEnv)
return FALSE;
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
index 9f89a144cf..5cdd903877 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp
@@ -7,7 +7,7 @@
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_app.h"
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/fsdk_define.h"
#include "xfa/fxbarcode/include/BC_Library.h"
#include "xfa/fxfa/include/xfa_ffapp.h"
@@ -61,7 +61,7 @@ FX_BOOL CPDFXFA_App::Initialize(v8::Isolate* pIsolate) {
return TRUE;
}
-FX_BOOL CPDFXFA_App::AddFormFillEnv(CPDFDoc_Environment* pEnv) {
+FX_BOOL CPDFXFA_App::AddFormFillEnv(CPDFSDK_Environment* pEnv) {
if (!pEnv)
return FALSE;
@@ -69,7 +69,7 @@ FX_BOOL CPDFXFA_App::AddFormFillEnv(CPDFDoc_Environment* pEnv) {
return TRUE;
}
-FX_BOOL CPDFXFA_App::RemoveFormFillEnv(CPDFDoc_Environment* pEnv) {
+FX_BOOL CPDFXFA_App::RemoveFormFillEnv(CPDFSDK_Environment* pEnv) {
if (!pEnv)
return FALSE;
@@ -87,7 +87,7 @@ void CPDFXFA_App::GetAppType(CFX_WideString& wsAppType) {
}
void CPDFXFA_App::GetAppName(CFX_WideString& wsName) {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
wsName = pEnv->FFI_GetAppName();
}
@@ -98,14 +98,14 @@ void CPDFXFA_App::SetAppType(const CFX_WideStringC& wsAppType) {
}
void CPDFXFA_App::GetLanguage(CFX_WideString& wsLanguage) {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
wsLanguage = pEnv->FFI_GetLanguage();
}
}
void CPDFXFA_App::GetPlatform(CFX_WideString& wsPlatform) {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
wsPlatform = pEnv->FFI_GetPlatform();
}
@@ -120,7 +120,7 @@ void CPDFXFA_App::GetVersion(CFX_WideString& wsVersion) {
}
void CPDFXFA_App::Beep(uint32_t dwType) {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
pEnv->JS_appBeep(dwType);
}
@@ -130,7 +130,7 @@ int32_t CPDFXFA_App::MsgBox(const CFX_WideString& wsMessage,
const CFX_WideString& wsTitle,
uint32_t dwIconType,
uint32_t dwButtonType) {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (!pEnv)
return -1;
@@ -184,7 +184,7 @@ CFX_WideString CPDFXFA_App::Response(const CFX_WideString& wsQuestion,
const CFX_WideString& wsDefaultAnswer,
FX_BOOL bMark) {
CFX_WideString wsAnswer;
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
int nLength = 2048;
char* pBuff = new char[nLength];
@@ -205,7 +205,7 @@ CFX_WideString CPDFXFA_App::Response(const CFX_WideString& wsQuestion,
}
int32_t CPDFXFA_App::GetCurDocumentInBatch() {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
return pEnv->FFI_GetCurDocument();
}
@@ -213,7 +213,7 @@ int32_t CPDFXFA_App::GetCurDocumentInBatch() {
}
int32_t CPDFXFA_App::GetDocumentCountInBatch() {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv) {
return pEnv->FFI_GetDocumentCount();
}
@@ -222,7 +222,7 @@ int32_t CPDFXFA_App::GetDocumentCountInBatch() {
}
IFX_FileRead* CPDFXFA_App::DownloadURL(const CFX_WideString& wsURL) {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
return pEnv ? pEnv->FFI_DownloadFromURL(wsURL.c_str()) : nullptr;
}
@@ -232,7 +232,7 @@ FX_BOOL CPDFXFA_App::PostRequestURL(const CFX_WideString& wsURL,
const CFX_WideString& wsEncode,
const CFX_WideString& wsHeader,
CFX_WideString& wsResponse) {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (!pEnv)
return FALSE;
@@ -245,7 +245,7 @@ FX_BOOL CPDFXFA_App::PostRequestURL(const CFX_WideString& wsURL,
FX_BOOL CPDFXFA_App::PutRequestURL(const CFX_WideString& wsURL,
const CFX_WideString& wsData,
const CFX_WideString& wsEncode) {
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
return pEnv &&
pEnv->FFI_PutRequestURL(wsURL.c_str(), wsData.c_str(),
wsEncode.c_str());
@@ -350,7 +350,7 @@ void CPDFXFA_App::LoadString(int32_t iStringID, CFX_WideString& wsString) {
IFWL_AdapterTimerMgr* CPDFXFA_App::GetTimerMgr() {
CXFA_FWLAdapterTimerMgr* pAdapter = nullptr;
- CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0);
+ CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0);
if (pEnv)
pAdapter = new CXFA_FWLAdapterTimerMgr(pEnv);
return pAdapter;
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index 6c691e6c9b..ed9407858b 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -10,8 +10,8 @@
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_app.h"
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_page.h"
#include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/fsdk_define.h"
@@ -192,7 +192,7 @@ void CPDFXFA_Document::RemovePage(CPDFXFA_Page* page) {
}
CPDFSDK_Document* CPDFXFA_Document::GetSDKDocument(
- CPDFDoc_Environment* pFormFillEnv) {
+ CPDFSDK_Environment* pFormFillEnv) {
if (!m_pSDKDoc && pFormFillEnv)
m_pSDKDoc.reset(new CPDFSDK_Document(this, pFormFillEnv));
return m_pSDKDoc.get();
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp
index b3a77a842c..aa6c2d4e9d 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_util.cpp
@@ -8,7 +8,7 @@
#include <vector>
-#include "fpdfsdk/include/cpdfdoc_environment.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/fsdk_define.h"
std::vector<CFWL_TimerInfo*>* CXFA_FWLAdapterTimerMgr::s_TimerArray = nullptr;
diff --git a/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h b/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h
index 18cac4405b..0274acb2cc 100644
--- a/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h
+++ b/fpdfsdk/fpdfxfa/include/fpdfxfa_app.h
@@ -9,7 +9,7 @@
#include "xfa/fxfa/include/fxfa.h"
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class IFXJS_Runtime;
class CPDFXFA_App : public IXFA_AppProvider {
@@ -23,8 +23,8 @@ class CPDFXFA_App : public IXFA_AppProvider {
FX_BOOL Initialize(v8::Isolate* pIsolate);
CXFA_FFApp* GetXFAApp() { return m_pXFAApp.get(); }
- FX_BOOL AddFormFillEnv(CPDFDoc_Environment* pEnv);
- FX_BOOL RemoveFormFillEnv(CPDFDoc_Environment* pEnv);
+ FX_BOOL AddFormFillEnv(CPDFSDK_Environment* pEnv);
+ FX_BOOL RemoveFormFillEnv(CPDFSDK_Environment* pEnv);
FX_BOOL IsJavaScriptInitialized() const { return m_bJavaScriptInitialized; }
void SetJavaScriptInitialized(FX_BOOL bInitialized) {
@@ -70,7 +70,7 @@ class CPDFXFA_App : public IXFA_AppProvider {
void LoadString(int32_t iStringID, CFX_WideString& wsString) override;
IFWL_AdapterTimerMgr* GetTimerMgr() override;
- CFX_ArrayTemplate<CPDFDoc_Environment*> m_pEnvList;
+ CFX_ArrayTemplate<CPDFSDK_Environment*> m_pEnvList;
protected:
FX_BOOL m_bJavaScriptInitialized;
diff --git a/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h b/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h
index acced2c434..77597d47c2 100644
--- a/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h
+++ b/fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h
@@ -12,11 +12,13 @@
#include "fpdfsdk/fpdfxfa/include/cpdfxfa_docenvironment.h"
#include "xfa/fxfa/include/xfa_ffdoc.h"
+class CPDFSDK_Document;
+class CPDFSDK_Environment;
class CPDFXFA_App;
class CPDFXFA_Page;
-class CPDFSDK_Document;
-class CPDFDoc_Environment;
class CXFA_FFDocHandler;
+class IJS_Runtime;
+class IJS_Context;
enum LoadStatus {
FXFA_LOADSTATUS_PRELOAD = 0,
@@ -45,7 +47,7 @@ class CPDFXFA_Document {
void RemovePage(CPDFXFA_Page* page);
int GetDocType() { return m_iDocType; }
- CPDFSDK_Document* GetSDKDocument(CPDFDoc_Environment* pFormFillEnv);
+ CPDFSDK_Document* GetSDKDocument(CPDFSDK_Environment* pFormFillEnv);
void ClearChangeMark();
diff --git a/fpdfsdk/fpdfxfa/include/fpdfxfa_util.h b/fpdfsdk/fpdfxfa/include/fpdfxfa_util.h
index fb5bd0d1b7..fd7a678fdd 100644
--- a/fpdfsdk/fpdfxfa/include/fpdfxfa_util.h
+++ b/fpdfsdk/fpdfxfa/include/fpdfxfa_util.h
@@ -21,7 +21,7 @@ struct CFWL_TimerInfo;
class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr {
public:
- CXFA_FWLAdapterTimerMgr(CPDFDoc_Environment* pEnv) : m_pEnv(pEnv) {}
+ CXFA_FWLAdapterTimerMgr(CPDFSDK_Environment* pEnv) : m_pEnv(pEnv) {}
FWL_Error Start(IFWL_Timer* pTimer,
uint32_t dwElapse,
@@ -33,7 +33,7 @@ class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr {
static void TimerProc(int32_t idEvent);
static std::vector<CFWL_TimerInfo*>* s_TimerArray;
- CPDFDoc_Environment* const m_pEnv;
+ CPDFSDK_Environment* const m_pEnv;
};
struct CFWL_TimerInfo : public IFWL_TimerInfo {
diff --git a/fpdfsdk/fsdk_actionhandler.cpp b/fpdfsdk/fsdk_actionhandler.cpp
index 8168d4a1b5..64fbe17961 100644
--- a/fpdfsdk/fsdk_actionhandler.cpp
+++ b/fpdfsdk/fsdk_actionhandler.cpp
@@ -11,8 +11,8 @@
#include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
#include "core/fpdfdoc/include/cpdf_formfield.h"
#include "core/fpdfdoc/include/cpdf_interform.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/fsdk_define.h"
#include "fpdfsdk/javascript/ijs_context.h"
@@ -46,7 +46,7 @@ FX_BOOL CPDFSDK_ActionHandler::DoAction_FieldJavaScript(
CPDFSDK_Document* pDocument,
CPDF_FormField* pFormField,
PDFSDK_FieldAction& data) {
- CPDFDoc_Environment* pEnv = pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = pDocument->GetEnv();
ASSERT(pEnv);
if (pEnv->IsJSInitiated() && JsAction.GetType() == CPDF_Action::JavaScript) {
CFX_WideString swJS = JsAction.GetJavaScript();
@@ -116,7 +116,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(
visited->insert(pDict);
- CPDFDoc_Environment* pEnv = pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = pDocument->GetEnv();
ASSERT(pEnv);
if (action.GetType() == CPDF_Action::JavaScript) {
if (pEnv->IsJSInitiated()) {
@@ -148,7 +148,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteLinkAction(
visited->insert(pDict);
- CPDFDoc_Environment* pEnv = pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = pDocument->GetEnv();
ASSERT(pEnv);
if (action.GetType() == CPDF_Action::JavaScript) {
if (pEnv->IsJSInitiated()) {
@@ -193,7 +193,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentPageAction(
visited->insert(pDict);
- CPDFDoc_Environment* pEnv = pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = pDocument->GetEnv();
ASSERT(pEnv);
if (action.GetType() == CPDF_Action::JavaScript) {
if (pEnv->IsJSInitiated()) {
@@ -240,7 +240,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteFieldAction(
visited->insert(pDict);
- CPDFDoc_Environment* pEnv = pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = pDocument->GetEnv();
ASSERT(pEnv);
if (action.GetType() == CPDF_Action::JavaScript) {
if (pEnv->IsJSInitiated()) {
@@ -277,7 +277,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteScreenAction(
visited->insert(pDict);
- CPDFDoc_Environment* pEnv = pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = pDocument->GetEnv();
ASSERT(pEnv);
if (action.GetType() == CPDF_Action::JavaScript) {
if (pEnv->IsJSInitiated()) {
@@ -320,7 +320,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteBookMark(
visited->insert(pDict);
- CPDFDoc_Environment* pEnv = pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = pDocument->GetEnv();
ASSERT(pEnv);
if (action.GetType() == CPDF_Action::JavaScript) {
if (pEnv->IsJSInitiated()) {
@@ -438,7 +438,7 @@ void CPDFSDK_ActionHandler::DoAction_GoTo(CPDFSDK_Document* pDocument,
sizeOfAry = j;
}
- CPDFDoc_Environment* pApp = pDocument->GetEnv();
+ CPDFSDK_Environment* pApp = pDocument->GetEnv();
pApp->FFI_DoGoToAction(nPageIndex, nFitType, pPosAry, sizeOfAry);
delete[] pPosAry;
}
@@ -453,7 +453,7 @@ void CPDFSDK_ActionHandler::DoAction_URI(CPDFSDK_Document* pDocument,
const CPDF_Action& action) {
ASSERT(action.GetDict());
- CPDFDoc_Environment* pApp = pDocument->GetEnv();
+ CPDFSDK_Environment* pApp = pDocument->GetEnv();
CFX_ByteString sURI = action.GetURI(pDocument->GetPDFDocument());
pApp->FFI_DoURIAction(sURI.c_str());
}
diff --git a/fpdfsdk/include/cpdfsdk_annothandlermgr.h b/fpdfsdk/include/cpdfsdk_annothandlermgr.h
index f4be66a432..d79fc067f6 100644
--- a/fpdfsdk/include/cpdfsdk_annothandlermgr.h
+++ b/fpdfsdk/include/cpdfsdk_annothandlermgr.h
@@ -16,7 +16,7 @@
class CFX_Matrix;
class CFX_RenderDevice;
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CPDFSDK_Annot;
class CPDFSDK_BAAnnotHandler;
class CPDFSDK_WidgetHandler;
@@ -30,7 +30,7 @@ class CXFA_FFWidget;
class CPDFSDK_AnnotHandlerMgr {
public:
- explicit CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp);
+ explicit CPDFSDK_AnnotHandlerMgr(CPDFSDK_Environment* pApp);
virtual ~CPDFSDK_AnnotHandlerMgr();
virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot,
@@ -118,7 +118,7 @@ class CPDFSDK_AnnotHandlerMgr {
std::unique_ptr<CPDFSDK_XFAWidgetHandler> m_pXFAWidgetHandler;
#endif // PDF_ENABLE_XFA
- CPDFDoc_Environment* m_pApp;
+ CPDFSDK_Environment* m_pApp;
};
#endif // FPDFSDK_INCLUDE_CPDFSDK_ANNOTHANDLERMGR_H_
diff --git a/fpdfsdk/include/cpdfsdk_baannothandler.h b/fpdfsdk/include/cpdfsdk_baannothandler.h
index ba50df3ccb..1e04bc15c2 100644
--- a/fpdfsdk/include/cpdfsdk_baannothandler.h
+++ b/fpdfsdk/include/cpdfsdk_baannothandler.h
@@ -15,7 +15,7 @@ class CFFL_IFormFiller;
class CFX_Matrix;
class CFX_RenderDevice;
class CPDF_Annot;
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CPDFSDK_Annot;
class CPDFSDK_PageView;
diff --git a/fpdfsdk/include/cpdfsdk_document.h b/fpdfsdk/include/cpdfsdk_document.h
index 610fb1781d..9f6ac79202 100644
--- a/fpdfsdk/include/cpdfsdk_document.h
+++ b/fpdfsdk/include/cpdfsdk_document.h
@@ -16,7 +16,7 @@
#include "public/fpdf_formfill.h"
class CPDF_OCContext;
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CPDFSDK_Annot;
class CPDFSDK_InterForm;
class CPDFSDK_PageView;
@@ -26,7 +26,7 @@ class CPDFSDK_Document : public CFX_Observable<CPDFSDK_Document> {
public:
static CPDFSDK_Document* FromFPDFFormHandle(FPDF_FORMHANDLE hHandle);
- CPDFSDK_Document(UnderlyingDocumentType* pDoc, CPDFDoc_Environment* pEnv);
+ CPDFSDK_Document(UnderlyingDocumentType* pDoc, CPDFSDK_Environment* pEnv);
~CPDFSDK_Document();
CPDFSDK_InterForm* GetInterForm();
@@ -89,7 +89,7 @@ class CPDFSDK_Document : public CFX_Observable<CPDFSDK_Document> {
void ClearChangeMark() { m_bChangeMask = FALSE; }
CFX_WideString GetPath();
UnderlyingPageType* GetPage(int nIndex);
- CPDFDoc_Environment* GetEnv() { return m_pEnv; }
+ CPDFSDK_Environment* GetEnv() { return m_pEnv; }
void ProcJavascriptFun();
FX_BOOL ProcOpenAction();
CPDF_OCContext* GetOCContext();
@@ -99,7 +99,7 @@ class CPDFSDK_Document : public CFX_Observable<CPDFSDK_Document> {
UnderlyingDocumentType* m_pDoc;
std::unique_ptr<CPDFSDK_InterForm> m_pInterForm;
CPDFSDK_Annot* m_pFocusAnnot;
- CPDFDoc_Environment* m_pEnv;
+ CPDFSDK_Environment* m_pEnv;
std::unique_ptr<CPDF_OCContext> m_pOccontent;
FX_BOOL m_bChangeMask;
FX_BOOL m_bBeingDestroyed;
diff --git a/fpdfsdk/include/cpdfdoc_environment.h b/fpdfsdk/include/cpdfsdk_environment.h
index 2d29e11a92..7fd146a043 100644
--- a/fpdfsdk/include/cpdfdoc_environment.h
+++ b/fpdfsdk/include/cpdfsdk_environment.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef FPDFSDK_INCLUDE_CPDFDOC_ENVIRONMENT_H_
-#define FPDFSDK_INCLUDE_CPDFDOC_ENVIRONMENT_H_
+#ifndef FPDFSDK_INCLUDE_CPDFSDK_ENVIRONMENT_H_
+#define FPDFSDK_INCLUDE_CPDFSDK_ENVIRONMENT_H_
#include <memory>
@@ -25,10 +25,10 @@ class CPDFSDK_AnnotHandlerMgr;
class CPDFSDK_Document;
class IJS_Runtime;
-class CPDFDoc_Environment final {
+class CPDFSDK_Environment final {
public:
- CPDFDoc_Environment(UnderlyingDocumentType* pDoc, FPDF_FORMFILLINFO* pFFinfo);
- ~CPDFDoc_Environment();
+ CPDFSDK_Environment(UnderlyingDocumentType* pDoc, FPDF_FORMFILLINFO* pFFinfo);
+ ~CPDFSDK_Environment();
void FFI_Invalidate(FPDF_PAGE page,
double left,
@@ -432,4 +432,4 @@ class CPDFDoc_Environment final {
std::unique_ptr<CFX_SystemHandler> m_pSysHandler;
};
-#endif // FPDFSDK_INCLUDE_CPDFDOC_ENVIRONMENT_H_
+#endif // FPDFSDK_INCLUDE_CPDFSDK_ENVIRONMENT_H_
diff --git a/fpdfsdk/include/cpdfsdk_widgethandler.h b/fpdfsdk/include/cpdfsdk_widgethandler.h
index d34510d092..432a90bc24 100644
--- a/fpdfsdk/include/cpdfsdk_widgethandler.h
+++ b/fpdfsdk/include/cpdfsdk_widgethandler.h
@@ -15,8 +15,8 @@ class CFFL_IFormFiller;
class CFX_Matrix;
class CFX_RenderDevice;
class CPDF_Annot;
-class CPDFDoc_Environment;
class CPDFSDK_Annot;
+class CPDFSDK_Environment;
class CPDFSDK_PageView;
#ifdef PDF_ENABLE_XFA
@@ -25,7 +25,7 @@ class CXFA_FFWidget;
class CPDFSDK_WidgetHandler : public IPDFSDK_AnnotHandler {
public:
- explicit CPDFSDK_WidgetHandler(CPDFDoc_Environment* pApp);
+ explicit CPDFSDK_WidgetHandler(CPDFSDK_Environment* pApp);
~CPDFSDK_WidgetHandler() override;
FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override;
@@ -107,7 +107,7 @@ class CPDFSDK_WidgetHandler : public IPDFSDK_AnnotHandler {
CFFL_IFormFiller* GetFormFiller() { return m_pFormFiller; }
private:
- CPDFDoc_Environment* m_pApp;
+ CPDFSDK_Environment* m_pApp;
CFFL_IFormFiller* m_pFormFiller;
};
diff --git a/fpdfsdk/include/cpdfsdk_xfawidgethandler.h b/fpdfsdk/include/cpdfsdk_xfawidgethandler.h
index dec2675ed8..9ad7784ef3 100644
--- a/fpdfsdk/include/cpdfsdk_xfawidgethandler.h
+++ b/fpdfsdk/include/cpdfsdk_xfawidgethandler.h
@@ -14,7 +14,7 @@
class CFX_Matrix;
class CFX_RenderDevice;
class CPDF_Annot;
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CPDFSDK_Annot;
class CPDFSDK_PageView;
class CXFA_FFWidget;
@@ -22,7 +22,7 @@ class CXFA_FFWidgetHandler;
class CPDFSDK_XFAWidgetHandler : public IPDFSDK_AnnotHandler {
public:
- explicit CPDFSDK_XFAWidgetHandler(CPDFDoc_Environment* pApp);
+ explicit CPDFSDK_XFAWidgetHandler(CPDFSDK_Environment* pApp);
~CPDFSDK_XFAWidgetHandler() override;
FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override;
@@ -100,7 +100,7 @@ class CPDFSDK_XFAWidgetHandler : public IPDFSDK_AnnotHandler {
CXFA_FFWidgetHandler* GetXFAWidgetHandler(CPDFSDK_Annot* pAnnot);
uint32_t GetFWLFlags(uint32_t dwFlag);
- CPDFDoc_Environment* m_pApp;
+ CPDFSDK_Environment* m_pApp;
};
#endif // FPDFSDK_INCLUDE_CPDFSDK_XFAWIDGETHANDLER_H_
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index cbf155abf1..9fc99f5e10 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -15,9 +15,9 @@
#include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h"
#include "core/fpdfdoc/include/cpdf_interform.h"
#include "core/fpdfdoc/include/cpdf_nametree.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_annotiterator.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
@@ -224,7 +224,7 @@ FX_BOOL Document::pageNum(IJS_Context* cc,
int iPageNum = 0;
vp >> iPageNum;
- CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
if (iPageNum >= 0 && iPageNum < iPageCount) {
pEnv->JS_docgotoPage(iPageNum);
} else if (iPageNum >= iPageCount) {
@@ -407,7 +407,7 @@ FX_BOOL Document::mailForm(IJS_Context* cc,
return FALSE;
pRuntime->BeginBlock();
- CPDFDoc_Environment* pEnv = pContext->GetReaderApp();
+ CPDFSDK_Environment* pEnv = pContext->GetReaderApp();
pEnv->JS_docmailForm(textBuf.GetBuffer(), textBuf.GetLength(), bUI,
cTo.c_str(), cSubject.c_str(), cCc.c_str(), cBcc.c_str(),
cMsg.c_str());
@@ -476,7 +476,7 @@ FX_BOOL Document::print(IJS_Context* cc,
bAnnotations = params[7].ToBool(pRuntime);
}
- if (CPDFDoc_Environment* pEnv = m_pDocument->GetEnv()) {
+ if (CPDFSDK_Environment* pEnv = m_pDocument->GetEnv()) {
pEnv->JS_docprint(bUI, nStart, nEnd, bSilent, bShrinkToFit, bPrintAsImage,
bReverse, bAnnotations);
return TRUE;
@@ -755,7 +755,7 @@ FX_BOOL Document::mailDoc(IJS_Context* cc,
}
pRuntime->BeginBlock();
- CPDFDoc_Environment* pEnv = pRuntime->GetReaderApp();
+ CPDFSDK_Environment* pEnv = pRuntime->GetReaderApp();
pEnv->JS_docmailForm(nullptr, 0, bUI, cTo.c_str(), cSubject.c_str(),
cCc.c_str(), cBcc.c_str(), cMsg.c_str());
pRuntime->EndBlock();
@@ -1694,7 +1694,7 @@ FX_BOOL Document::gotoNamedDest(IJS_Context* cc,
}
pRuntime->BeginBlock();
- CPDFDoc_Environment* pApp = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pApp = m_pDocument->GetEnv();
pApp->FFI_DoGoToAction(dest.GetPageIndex(pDocument), dest.GetZoomMode(),
scrollPositionArray.get(), scrollPositionArraySize);
pRuntime->EndBlock();
diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp
index 0803cfa138..33c724095c 100644
--- a/fpdfsdk/javascript/Field.cpp
+++ b/fpdfsdk/javascript/Field.cpp
@@ -15,8 +15,8 @@
#include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
#include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
#include "core/fpdfdoc/include/cpdf_interform.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/include/cpdfsdk_pageview.h"
#include "fpdfsdk/include/cpdfsdk_widget.h"
@@ -2835,7 +2835,7 @@ FX_BOOL Field::browseForFileToSubmit(IJS_Context* cc,
return FALSE;
CPDF_FormField* pFormField = FieldArray[0];
- CPDFDoc_Environment* pApp = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pApp = m_pDocument->GetEnv();
if ((pFormField->GetFieldFlags() & FIELDFLAG_FILESELECT) &&
(pFormField->GetFieldType() == FIELDTYPE_TEXTFIELD)) {
CFX_WideString wsFileName = pApp->JS_fieldBrowse();
@@ -3202,7 +3202,7 @@ FX_BOOL Field::setFocus(IJS_Context* cc,
if (nCount == 1) {
pWidget = pInterForm->GetWidget(pFormField->GetControl(0), false);
} else {
- CPDFDoc_Environment* pEnv = m_pDocument->GetEnv();
+ CPDFSDK_Environment* pEnv = m_pDocument->GetEnv();
UnderlyingPageType* pPage = UnderlyingFromFPDFPage(
pEnv->FFI_GetCurrentPage(m_pDocument->GetUnderlyingDocument()));
if (!pPage)
diff --git a/fpdfsdk/javascript/JS_GlobalData.cpp b/fpdfsdk/javascript/JS_GlobalData.cpp
index d1268b042f..eff785353f 100644
--- a/fpdfsdk/javascript/JS_GlobalData.cpp
+++ b/fpdfsdk/javascript/JS_GlobalData.cpp
@@ -40,7 +40,7 @@ CJS_GlobalData* g_pInstance = nullptr;
} // namespace
// static
-CJS_GlobalData* CJS_GlobalData::GetRetainedInstance(CPDFDoc_Environment* pApp) {
+CJS_GlobalData* CJS_GlobalData::GetRetainedInstance(CPDFSDK_Environment* pApp) {
if (!g_pInstance) {
g_pInstance = new CJS_GlobalData();
}
diff --git a/fpdfsdk/javascript/JS_GlobalData.h b/fpdfsdk/javascript/JS_GlobalData.h
index d901ec58b3..cda8533fad 100644
--- a/fpdfsdk/javascript/JS_GlobalData.h
+++ b/fpdfsdk/javascript/JS_GlobalData.h
@@ -13,7 +13,7 @@
#include "core/fxcrt/include/fx_basic.h"
#include "fpdfsdk/javascript/JS_KeyValue.h"
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CJS_GlobalData_Element {
public:
@@ -26,7 +26,7 @@ class CJS_GlobalData_Element {
class CJS_GlobalData {
public:
- static CJS_GlobalData* GetRetainedInstance(CPDFDoc_Environment* pApp);
+ static CJS_GlobalData* GetRetainedInstance(CPDFSDK_Environment* pApp);
void Release();
void SetGlobalVariableNumber(const CFX_ByteString& propname, double dData);
diff --git a/fpdfsdk/javascript/JS_Object.h b/fpdfsdk/javascript/JS_Object.h
index 3b2407171c..ede64a7e20 100644
--- a/fpdfsdk/javascript/JS_Object.h
+++ b/fpdfsdk/javascript/JS_Object.h
@@ -16,7 +16,7 @@
class CJS_Context;
class CJS_Object;
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CJS_EmbedObj {
public:
diff --git a/fpdfsdk/javascript/JS_Runtime_Stub.cpp b/fpdfsdk/javascript/JS_Runtime_Stub.cpp
index 2b4a624c0e..2c7eda8a7e 100644
--- a/fpdfsdk/javascript/JS_Runtime_Stub.cpp
+++ b/fpdfsdk/javascript/JS_Runtime_Stub.cpp
@@ -163,6 +163,6 @@ void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {}
void IJS_Runtime::Destroy() {}
// static
-IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) {
+IJS_Runtime* IJS_Runtime::Create(CPDFSDK_Environment* pEnv) {
return new CJS_RuntimeStub;
}
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 5a793f4270..435c383b34 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -11,8 +11,8 @@
#include "core/fpdfdoc/include/cpdf_interform.h"
#include "core/fxcrt/include/fx_ext.h"
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/javascript/Field.h"
#include "fpdfsdk/javascript/JS_Define.h"
@@ -80,7 +80,7 @@ CFX_WideString StrTrim(const CFX_WideString& pStr) {
}
void AlertIfPossible(CJS_Context* pContext, const FX_WCHAR* swMsg) {
- CPDFDoc_Environment* pApp = pContext->GetReaderApp();
+ CPDFSDK_Environment* pApp = pContext->GetReaderApp();
if (pApp)
pApp->JS_appAlert(swMsg, nullptr, 0, 3);
}
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index 5e708de9ea..0f11609fe7 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -9,8 +9,8 @@
#include <memory>
#include <vector>
-#include "fpdfsdk/include/cpdfdoc_environment.h"
#include "fpdfsdk/include/cpdfsdk_document.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/include/cpdfsdk_interform.h"
#include "fpdfsdk/javascript/Document.h"
#include "fpdfsdk/javascript/JS_Define.h"
@@ -25,7 +25,7 @@
class GlobalTimer {
public:
GlobalTimer(app* pObj,
- CPDFDoc_Environment* pApp,
+ CPDFSDK_Environment* pApp,
CJS_Runtime* pRuntime,
int nType,
const CFX_WideString& script,
@@ -55,11 +55,11 @@ class GlobalTimer {
const uint32_t m_dwTimeOut;
const CFX_WideString m_swJScript;
CJS_Runtime::ObservedPtr m_pRuntime;
- CPDFDoc_Environment* const m_pApp;
+ CPDFSDK_Environment* const m_pApp;
};
GlobalTimer::GlobalTimer(app* pObj,
- CPDFDoc_Environment* pApp,
+ CPDFSDK_Environment* pApp,
CJS_Runtime* pRuntime,
int nType,
const CFX_WideString& script,
@@ -217,7 +217,7 @@ FX_BOOL app::activeDocs(IJS_Context* cc,
return FALSE;
CJS_Context* pContext = (CJS_Context*)cc;
- CPDFDoc_Environment* pApp = pContext->GetReaderApp();
+ CPDFSDK_Environment* pApp = pContext->GetReaderApp();
CJS_Runtime* pRuntime = pContext->GetJSRuntime();
CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument();
CJS_Array aDocs;
@@ -255,7 +255,7 @@ FX_BOOL app::calculate(IJS_Context* cc,
m_bCalculate = (FX_BOOL)bVP;
CJS_Context* pContext = (CJS_Context*)cc;
- CPDFDoc_Environment* pApp = pContext->GetReaderApp();
+ CPDFSDK_Environment* pApp = pContext->GetReaderApp();
if (CPDFSDK_Document* pDoc = pApp->GetSDKDocument())
pDoc->GetInterForm()->EnableCalculate((FX_BOOL)m_bCalculate);
} else {
@@ -321,7 +321,7 @@ FX_BOOL app::platform(IJS_Context* cc,
if (!vp.IsGetting())
return FALSE;
#ifdef PDF_ENABLE_XFA
- CPDFDoc_Environment* pEnv =
+ CPDFSDK_Environment* pEnv =
static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp();
if (!pEnv)
return FALSE;
@@ -341,7 +341,7 @@ FX_BOOL app::language(IJS_Context* cc,
if (!vp.IsGetting())
return FALSE;
#ifdef PDF_ENABLE_XFA
- CPDFDoc_Environment* pEnv =
+ CPDFSDK_Environment* pEnv =
static_cast<CJS_Context*>(cc)->GetJSRuntime()->GetReaderApp();
if (!pEnv)
return FALSE;
@@ -358,7 +358,7 @@ FX_BOOL app::language(IJS_Context* cc,
// creates a new fdf object that contains no data
// comment: need reader support
// note:
-// CFDF_Document * CPDFDoc_Environment::NewFDF();
+// CFDF_Document * CPDFSDK_Environment::NewFDF();
FX_BOOL app::newFDF(IJS_Context* cc,
const std::vector<CJS_Value>& params,
CJS_Value& vRet,
@@ -369,7 +369,7 @@ FX_BOOL app::newFDF(IJS_Context* cc,
// comment:need reader support
// note: as defined in js reference, the proto of this function's fourth
// parmeters, how old an fdf document while do not show it.
-// CFDF_Document * CPDFDoc_Environment::OpenFDF(string strPath,bool bUserConv);
+// CFDF_Document * CPDFSDK_Environment::OpenFDF(string strPath,bool bUserConv);
FX_BOOL app::openFDF(IJS_Context* cc,
const std::vector<CJS_Value>& params,
@@ -391,7 +391,7 @@ FX_BOOL app::alert(IJS_Context* cc,
return FALSE;
}
- CPDFDoc_Environment* pApp = pRuntime->GetReaderApp();
+ CPDFSDK_Environment* pApp = pRuntime->GetReaderApp();
if (!pApp) {
vRet = CJS_Value(pRuntime, 0);
return TRUE;
@@ -447,7 +447,7 @@ FX_BOOL app::beep(IJS_Context* cc,
CFX_WideString& sError) {
if (params.size() == 1) {
CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
- CPDFDoc_Environment* pEnv = pRuntime->GetReaderApp();
+ CPDFSDK_Environment* pEnv = pRuntime->GetReaderApp();
pEnv->JS_appBeep(params[0].ToInt(pRuntime));
return TRUE;
}
@@ -492,7 +492,7 @@ FX_BOOL app::setInterval(IJS_Context* cc,
}
uint32_t dwInterval = params.size() > 1 ? params[1].ToInt(pRuntime) : 1000;
- CPDFDoc_Environment* pApp = pRuntime->GetReaderApp();
+ CPDFSDK_Environment* pApp = pRuntime->GetReaderApp();
GlobalTimer* timerRef =
new GlobalTimer(this, pApp, pRuntime, 0, script, dwInterval, 0);
@@ -526,7 +526,7 @@ FX_BOOL app::setTimeOut(IJS_Context* cc,
}
uint32_t dwTimeOut = params.size() > 1 ? params[1].ToInt(pRuntime) : 1000;
- CPDFDoc_Environment* pApp = pRuntime->GetReaderApp();
+ CPDFSDK_Environment* pApp = pRuntime->GetReaderApp();
GlobalTimer* timerRef =
new GlobalTimer(this, pApp, pRuntime, 1, script, dwTimeOut, dwTimeOut);
diff --git a/fpdfsdk/javascript/cjs_context.cpp b/fpdfsdk/javascript/cjs_context.cpp
index 87b8b43975..4a6e4d3a64 100644
--- a/fpdfsdk/javascript/cjs_context.cpp
+++ b/fpdfsdk/javascript/cjs_context.cpp
@@ -21,7 +21,7 @@ CPDFSDK_Document* CJS_Context::GetReaderDocument() {
return m_pRuntime->GetReaderDocument();
}
-CPDFDoc_Environment* CJS_Context::GetReaderApp() {
+CPDFSDK_Environment* CJS_Context::GetReaderApp() {
return m_pRuntime->GetReaderApp();
}
diff --git a/fpdfsdk/javascript/cjs_context.h b/fpdfsdk/javascript/cjs_context.h
index 49ba42c6d1..03403de6b3 100644
--- a/fpdfsdk/javascript/cjs_context.h
+++ b/fpdfsdk/javascript/cjs_context.h
@@ -15,7 +15,7 @@
class CJS_EventHandler;
class CJS_Runtime;
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CJS_Context : public IJS_Context {
public:
@@ -125,7 +125,7 @@ class CJS_Context : public IJS_Context {
CJS_Runtime* GetJSRuntime() const { return m_pRuntime; }
CJS_EventHandler* GetEventHandler() const { return m_pEventHandler.get(); }
- CPDFDoc_Environment* GetReaderApp();
+ CPDFSDK_Environment* GetReaderApp();
CPDFSDK_Document* GetReaderDocument();
private:
diff --git a/fpdfsdk/javascript/cjs_runtime.cpp b/fpdfsdk/javascript/cjs_runtime.cpp
index e35ee5bc54..1afde804ca 100644
--- a/fpdfsdk/javascript/cjs_runtime.cpp
+++ b/fpdfsdk/javascript/cjs_runtime.cpp
@@ -8,7 +8,7 @@
#include <algorithm>
-#include "fpdfsdk/include/cpdfdoc_environment.h"
+#include "fpdfsdk/include/cpdfsdk_environment.h"
#include "fpdfsdk/javascript/Annot.h"
#include "fpdfsdk/javascript/Consts.h"
#include "fpdfsdk/javascript/Document.h"
@@ -47,7 +47,7 @@ void IJS_Runtime::Destroy() {
}
// static
-IJS_Runtime* IJS_Runtime::Create(CPDFDoc_Environment* pEnv) {
+IJS_Runtime* IJS_Runtime::Create(CPDFSDK_Environment* pEnv) {
return new CJS_Runtime(pEnv);
}
@@ -63,7 +63,7 @@ CJS_Runtime* CJS_Runtime::CurrentRuntimeFromIsolate(v8::Isolate* pIsolate) {
CFXJS_Engine::CurrentEngineFromIsolate(pIsolate));
}
-CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp)
+CJS_Runtime::CJS_Runtime(CPDFSDK_Environment* pApp)
: m_pApp(pApp),
m_pDocument(nullptr),
m_bBlocking(false),
diff --git a/fpdfsdk/javascript/cjs_runtime.h b/fpdfsdk/javascript/cjs_runtime.h
index 5157c416ad..12f902d7df 100644
--- a/fpdfsdk/javascript/cjs_runtime.h
+++ b/fpdfsdk/javascript/cjs_runtime.h
@@ -30,7 +30,7 @@ class CJS_Runtime : public IJS_Runtime,
static CJS_Runtime* FromContext(const IJS_Context* cc);
static CJS_Runtime* CurrentRuntimeFromIsolate(v8::Isolate* pIsolate);
- explicit CJS_Runtime(CPDFDoc_Environment* pApp);
+ explicit CJS_Runtime(CPDFSDK_Environment* pApp);
~CJS_Runtime() override;
// IJS_Runtime
@@ -42,7 +42,7 @@ class CJS_Runtime : public IJS_Runtime,
int ExecuteScript(const CFX_WideString& script,
CFX_WideString* info) override;
- CPDFDoc_Environment* GetReaderApp() const { return m_pApp; }
+ CPDFSDK_Environment* GetReaderApp() const { return m_pApp; }
// Returns true if the event isn't already found in the set.
bool AddEventToSet(const FieldEvent& event);
@@ -63,7 +63,7 @@ class CJS_Runtime : public IJS_Runtime,
void DefineJSObjects();
std::vector<std::unique_ptr<CJS_Context>> m_ContextArray;
- CPDFDoc_Environment* const m_pApp;
+ CPDFSDK_Environment* const m_pApp;
CPDFSDK_Document* m_pDocument;
bool m_bBlocking;
bool m_isolateManaged;
diff --git a/fpdfsdk/javascript/global.cpp b/fpdfsdk/javascript/global.cpp
index c0330f3a14..42ae8d54ce 100644
--- a/fpdfsdk/javascript/global.cpp
+++ b/fpdfsdk/javascript/global.cpp
@@ -56,7 +56,7 @@ JSGlobalAlternate::~JSGlobalAlternate() {
m_pGlobalData->Release();
}
-void JSGlobalAlternate::Initial(CPDFDoc_Environment* pApp) {
+void JSGlobalAlternate::Initial(CPDFSDK_Environment* pApp) {
m_pApp = pApp;
m_pGlobalData = CJS_GlobalData::GetRetainedInstance(pApp);
UpdateGlobalPersistentVariables();
diff --git a/fpdfsdk/javascript/global.h b/fpdfsdk/javascript/global.h
index 6604d9bad8..165cf3a443 100644
--- a/fpdfsdk/javascript/global.h
+++ b/fpdfsdk/javascript/global.h
@@ -47,7 +47,7 @@ class JSGlobalAlternate : public CJS_EmbedObj {
FX_BOOL DelProperty(IJS_Context* cc,
const FX_WCHAR* propname,
CFX_WideString& sError);
- void Initial(CPDFDoc_Environment* pApp);
+ void Initial(CPDFSDK_Environment* pApp);
private:
void UpdateGlobalPersistentVariables();
@@ -68,7 +68,7 @@ class JSGlobalAlternate : public CJS_EmbedObj {
std::map<CFX_ByteString, JSGlobalData*> m_mapGlobal;
CFX_WideString m_sFilePath;
CJS_GlobalData* m_pGlobalData;
- CPDFDoc_Environment* m_pApp;
+ CPDFSDK_Environment* m_pApp;
};
class CJS_Global : public CJS_Object {
diff --git a/fpdfsdk/javascript/ijs_runtime.h b/fpdfsdk/javascript/ijs_runtime.h
index 3dcfa372de..ee024fe2fd 100644
--- a/fpdfsdk/javascript/ijs_runtime.h
+++ b/fpdfsdk/javascript/ijs_runtime.h
@@ -14,7 +14,7 @@
#include "fxjs/include/fxjse.h"
#endif // PDF_ENABLE_XFA
-class CPDFDoc_Environment;
+class CPDFSDK_Environment;
class CPDFSDK_Document;
class IJS_Context;
@@ -23,7 +23,7 @@ class IJS_Runtime {
public:
static void Initialize(unsigned int slot, void* isolate);
static void Destroy();
- static IJS_Runtime* Create(CPDFDoc_Environment* pEnv);
+ static IJS_Runtime* Create(CPDFSDK_Environment* pEnv);
virtual ~IJS_Runtime() {}
virtual IJS_Context* NewContext() = 0;