diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-05 15:47:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-05 15:47:02 -0700 |
commit | 735606d84b6898a51c61b17a2d286a13d964589a (patch) | |
tree | 1feb64d2aae6d79c1f7d65f5dd05d7e934b428cc /fpdfsdk/fpdfxfa | |
parent | 2116105b7d0545eb353264d4b42420cf51af5195 (diff) | |
download | pdfium-735606d84b6898a51c61b17a2d286a13d964589a.tar.xz |
Rename CPDFSDK_Environment to CPDFSDK_FormfillEnvironment
Rename CPDFSDK_Environment to make it explicit that this is part of the formfill
system.
Review-Url: https://codereview.chromium.org/2391313002
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_app.cpp | 26 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_app.h | 8 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 30 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_document.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_document.h | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h | 4 |
7 files changed, 37 insertions, 37 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_app.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_app.cpp index 14450a10ab..d1a3bd0112 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_app.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_app.cpp @@ -8,7 +8,7 @@ #include <memory> -#include "fpdfsdk/cpdfsdk_environment.h" +#include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h" #include "fpdfsdk/fsdk_define.h" #include "third_party/base/ptr_util.h" @@ -64,7 +64,7 @@ FX_BOOL CPDFXFA_App::Initialize(v8::Isolate* pIsolate) { return TRUE; } -FX_BOOL CPDFXFA_App::AddFormFillEnv(CPDFSDK_Environment* pEnv) { +FX_BOOL CPDFXFA_App::AddFormFillEnv(CPDFSDK_FormFillEnvironment* pEnv) { if (!pEnv) return FALSE; @@ -72,7 +72,7 @@ FX_BOOL CPDFXFA_App::AddFormFillEnv(CPDFSDK_Environment* pEnv) { return TRUE; } -FX_BOOL CPDFXFA_App::RemoveFormFillEnv(CPDFSDK_Environment* pEnv) { +FX_BOOL CPDFXFA_App::RemoveFormFillEnv(CPDFSDK_FormFillEnvironment* pEnv) { if (!pEnv) return FALSE; @@ -90,7 +90,7 @@ void CPDFXFA_App::GetAppType(CFX_WideString& wsAppType) { } void CPDFXFA_App::GetAppName(CFX_WideString& wsName) { - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); if (pEnv) { wsName = pEnv->FFI_GetAppName(); } @@ -101,13 +101,13 @@ void CPDFXFA_App::SetAppType(const CFX_WideStringC& wsAppType) { } void CPDFXFA_App::GetLanguage(CFX_WideString& wsLanguage) { - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); if (pEnv) wsLanguage = pEnv->GetLanguage(); } void CPDFXFA_App::GetPlatform(CFX_WideString& wsPlatform) { - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); if (pEnv) { wsPlatform = pEnv->GetPlatform(); } @@ -122,7 +122,7 @@ void CPDFXFA_App::GetVersion(CFX_WideString& wsVersion) { } void CPDFXFA_App::Beep(uint32_t dwType) { - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); if (pEnv) { pEnv->JS_appBeep(dwType); } @@ -132,7 +132,7 @@ int32_t CPDFXFA_App::MsgBox(const CFX_WideString& wsMessage, const CFX_WideString& wsTitle, uint32_t dwIconType, uint32_t dwButtonType) { - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); if (!pEnv) return -1; @@ -186,7 +186,7 @@ CFX_WideString CPDFXFA_App::Response(const CFX_WideString& wsQuestion, const CFX_WideString& wsDefaultAnswer, FX_BOOL bMark) { CFX_WideString wsAnswer; - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); if (pEnv) { int nLength = 2048; char* pBuff = new char[nLength]; @@ -207,7 +207,7 @@ CFX_WideString CPDFXFA_App::Response(const CFX_WideString& wsQuestion, } IFX_FileRead* CPDFXFA_App::DownloadURL(const CFX_WideString& wsURL) { - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); return pEnv ? pEnv->DownloadFromURL(wsURL.c_str()) : nullptr; } @@ -217,7 +217,7 @@ FX_BOOL CPDFXFA_App::PostRequestURL(const CFX_WideString& wsURL, const CFX_WideString& wsEncode, const CFX_WideString& wsHeader, CFX_WideString& wsResponse) { - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); if (!pEnv) return FALSE; @@ -230,7 +230,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) { - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); return pEnv && pEnv->PutRequestURL(wsURL.c_str(), wsData.c_str(), wsEncode.c_str()); } @@ -334,7 +334,7 @@ void CPDFXFA_App::LoadString(int32_t iStringID, CFX_WideString& wsString) { IFWL_AdapterTimerMgr* CPDFXFA_App::GetTimerMgr() { CXFA_FWLAdapterTimerMgr* pAdapter = nullptr; - CPDFSDK_Environment* pEnv = m_pEnvList.GetAt(0); + CPDFSDK_FormFillEnvironment* pEnv = m_pEnvList.GetAt(0); if (pEnv) pAdapter = new CXFA_FWLAdapterTimerMgr(pEnv); return pAdapter; diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_app.h b/fpdfsdk/fpdfxfa/cpdfxfa_app.h index 3830dc4d4c..3d5256381c 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_app.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_app.h @@ -9,7 +9,7 @@ #include "xfa/fxfa/fxfa.h" -class CPDFSDK_Environment; +class CPDFSDK_FormFillEnvironment; 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(CPDFSDK_Environment* pEnv); - FX_BOOL RemoveFormFillEnv(CPDFSDK_Environment* pEnv); + FX_BOOL AddFormFillEnv(CPDFSDK_FormFillEnvironment* pEnv); + FX_BOOL RemoveFormFillEnv(CPDFSDK_FormFillEnvironment* pEnv); FX_BOOL IsJavaScriptInitialized() const { return m_bJavaScriptInitialized; } void SetJavaScriptInitialized(FX_BOOL bInitialized) { @@ -67,7 +67,7 @@ class CPDFXFA_App : public IXFA_AppProvider { void LoadString(int32_t iStringID, CFX_WideString& wsString) override; IFWL_AdapterTimerMgr* GetTimerMgr() override; - CFX_ArrayTemplate<CPDFSDK_Environment*> m_pEnvList; + CFX_ArrayTemplate<CPDFSDK_FormFillEnvironment*> m_pEnvList; protected: FX_BOOL m_bJavaScriptInitialized; diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index fed5409624..6e8f6711cd 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -10,7 +10,7 @@ #include "core/fpdfapi/parser/cpdf_stream_acc.h" #include "core/fpdfapi/parser/cpdf_string.h" #include "fpdfsdk/cpdfsdk_document.h" -#include "fpdfsdk/cpdfsdk_environment.h" +#include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/cpdfsdk_interform.h" #include "fpdfsdk/cpdfsdk_pageview.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_document.h" @@ -65,7 +65,7 @@ void CPDFXFA_DocEnvironment::InvalidateRect(CXFA_FFPageView* pPageView, if (!pPage) return; - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return; @@ -97,7 +97,7 @@ void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget, if (!pPage) return; - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* 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(); - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* 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; - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return FALSE; @@ -262,7 +262,7 @@ void CPDFXFA_DocEnvironment::PageViewEvent(CXFA_FFPageView* pPageView, if (!pSDKDoc) return; - CPDFSDK_Environment* pEnv = pSDKDoc->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = pSDKDoc->GetEnv(); if (!pEnv) return; @@ -344,7 +344,7 @@ int32_t CPDFXFA_DocEnvironment::GetCurrentPage(CXFA_FFDoc* hDoc) { if (m_pDocument->GetDocType() != DOCTYPE_DYNAMIC_XFA) return -1; - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return -1; @@ -359,7 +359,7 @@ void CPDFXFA_DocEnvironment::SetCurrentPage(CXFA_FFDoc* hDoc, return; } - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return; pEnv->SetCurrentPage(this, iCurPage); @@ -414,7 +414,7 @@ void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc, m_pDocument->GetDocType() != DOCTYPE_STATIC_XFA) return; - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return; @@ -511,7 +511,7 @@ void CPDFXFA_DocEnvironment::GotoURL(CXFA_FFDoc* hDoc, if (m_pDocument->GetDocType() != DOCTYPE_DYNAMIC_XFA) return; - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return; @@ -568,7 +568,7 @@ void CPDFXFA_DocEnvironment::Print(CXFA_FFDoc* hDoc, if (hDoc != m_pDocument->GetXFADoc()) return; - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv || !pEnv->GetFormFillInfo() || !pEnv->GetFormFillInfo()->m_pJsPlatform || !pEnv->GetFormFillInfo()->m_pJsPlatform->Doc_print) { @@ -635,7 +635,7 @@ FX_BOOL CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() { while (pWidgetAcc) { int fRet = pWidgetAcc->ProcessValidate(-1); if (fRet == XFA_EVENTERROR_Error) { - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return FALSE; @@ -697,7 +697,7 @@ FX_BOOL CPDFXFA_DocEnvironment::SubmitData(CXFA_FFDoc* hDoc, IFX_FileRead* CPDFXFA_DocEnvironment::OpenLinkedFile( CXFA_FFDoc* hDoc, const CFX_WideString& wsLink) { - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return FALSE; @@ -720,7 +720,7 @@ FX_BOOL CPDFXFA_DocEnvironment::ExportSubmitFile(FPDF_FILEHANDLER* pFileHandler, return FALSE; CFX_ByteString content; - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return FALSE; @@ -891,7 +891,7 @@ FX_BOOL CPDFXFA_DocEnvironment::MailToInfo(CFX_WideString& csURL, FX_BOOL CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc, CXFA_Submit submit) { - CPDFSDK_Environment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); + CPDFSDK_FormFillEnvironment* pEnv = m_pDocument->GetSDKDoc()->GetEnv(); if (!pEnv) return FALSE; diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp index 121d060453..bd7f931c59 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_document.cpp @@ -8,7 +8,7 @@ #include "core/fpdfapi/parser/cpdf_document.h" #include "fpdfsdk/cpdfsdk_document.h" -#include "fpdfsdk/cpdfsdk_environment.h" +#include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/cpdfsdk_interform.h" #include "fpdfsdk/cpdfsdk_pageview.h" #include "fpdfsdk/fpdfxfa/cpdfxfa_app.h" diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_document.h b/fpdfsdk/fpdfxfa/cpdfxfa_document.h index fa415f917c..4118a31f6d 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_document.h +++ b/fpdfsdk/fpdfxfa/cpdfxfa_document.h @@ -13,7 +13,7 @@ #include "xfa/fxfa/xfa_ffdoc.h" class CPDFSDK_Document; -class CPDFSDK_Environment; +class CPDFSDK_FormFillEnvironment; class CPDFXFA_App; class CPDFXFA_Page; class CXFA_FFDocHandler; diff --git a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp index b835fd4467..8d9356990b 100644 --- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp +++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.cpp @@ -8,7 +8,7 @@ #include <vector> -#include "fpdfsdk/cpdfsdk_environment.h" +#include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/fsdk_define.h" std::vector<CFWL_TimerInfo*>* CXFA_FWLAdapterTimerMgr::s_TimerArray = nullptr; diff --git a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h index 958171d4ca..5c046b5bdd 100644 --- a/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h +++ b/fpdfsdk/fpdfxfa/cxfa_fwladaptertimermgr.h @@ -21,7 +21,7 @@ struct CFWL_TimerInfo; class CXFA_FWLAdapterTimerMgr : public IFWL_AdapterTimerMgr { public: - CXFA_FWLAdapterTimerMgr(CPDFSDK_Environment* pEnv) : m_pEnv(pEnv) {} + CXFA_FWLAdapterTimerMgr(CPDFSDK_FormFillEnvironment* 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; - CPDFSDK_Environment* const m_pEnv; + CPDFSDK_FormFillEnvironment* const m_pEnv; }; struct CFWL_TimerInfo : public IFWL_TimerInfo { |