summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-03-23 09:17:10 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-03-23 13:50:52 +0000
commitcdba747a53082a7f36534dffa6a3ad01628e53c3 (patch)
tree4df0b15de7600592588a263deb9a3adee617f417 /fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
parent1bbedec89cc59df3e305dc25082d9699237d70ab (diff)
downloadpdfium-cdba747a53082a7f36534dffa6a3ad01628e53c3.tar.xz
Cleanup DocType defines
This Cl synchronizes the DocType's defined in XFA with the DOCTYPE flag used in public/. The internal XFA version is converted to an enum class. Change-Id: I1f7be71a200c1ec0f09f9b08099791da1f4fa2e4 Reviewed-on: https://pdfium-review.googlesource.com/3152 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index e54ca85fd9..44d59c69df 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -59,7 +59,7 @@ void CPDFXFA_DocEnvironment::InvalidateRect(CXFA_FFPageView* pPageView,
if (!m_pContext->GetXFADoc() || !m_pContext->GetFormFillEnv())
return;
- if (m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA)
+ if (m_pContext->GetDocType() != XFA_DocType::Dynamic)
return;
CPDFXFA_Page* pPage = m_pContext->GetXFAPage(pPageView);
@@ -81,7 +81,7 @@ void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget,
!m_pContext->GetFormFillEnv() || !m_pContext->GetXFADocView())
return;
- if (m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA)
+ if (m_pContext->GetDocType() != XFA_DocType::Dynamic)
return;
CXFA_FFWidgetHandler* pWidgetHandler =
@@ -295,7 +295,7 @@ void CPDFXFA_DocEnvironment::PageViewEvent(CXFA_FFPageView* pPageView,
void CPDFXFA_DocEnvironment::WidgetPostAdd(CXFA_FFWidget* hWidget,
CXFA_WidgetAcc* pWidgetData) {
- if (m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA || !hWidget)
+ if (m_pContext->GetDocType() != XFA_DocType::Dynamic || !hWidget)
return;
CXFA_FFPageView* pPageView = hWidget->GetPageView();
@@ -311,7 +311,7 @@ void CPDFXFA_DocEnvironment::WidgetPostAdd(CXFA_FFWidget* hWidget,
void CPDFXFA_DocEnvironment::WidgetPreRemove(CXFA_FFWidget* hWidget,
CXFA_WidgetAcc* pWidgetData) {
- if (m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA || !hWidget)
+ if (m_pContext->GetDocType() != XFA_DocType::Dynamic || !hWidget)
return;
CXFA_FFPageView* pPageView = hWidget->GetPageView();
@@ -337,7 +337,7 @@ int32_t CPDFXFA_DocEnvironment::CountPages(CXFA_FFDoc* hDoc) {
int32_t CPDFXFA_DocEnvironment::GetCurrentPage(CXFA_FFDoc* hDoc) {
if (hDoc != m_pContext->GetXFADoc() || !m_pContext->GetFormFillEnv())
return -1;
- if (m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA)
+ if (m_pContext->GetDocType() != XFA_DocType::Dynamic)
return -1;
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
@@ -350,7 +350,7 @@ int32_t CPDFXFA_DocEnvironment::GetCurrentPage(CXFA_FFDoc* hDoc) {
void CPDFXFA_DocEnvironment::SetCurrentPage(CXFA_FFDoc* hDoc,
int32_t iCurPage) {
if (hDoc != m_pContext->GetXFADoc() || !m_pContext->GetFormFillEnv() ||
- m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA || iCurPage < 0 ||
+ m_pContext->GetDocType() != XFA_DocType::Dynamic || iCurPage < 0 ||
iCurPage >= m_pContext->GetFormFillEnv()->GetPageCount()) {
return;
}
@@ -410,8 +410,8 @@ void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc,
if (hDoc != m_pContext->GetXFADoc())
return;
- if (m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA &&
- m_pContext->GetDocType() != DOCTYPE_STATIC_XFA) {
+ if (m_pContext->GetDocType() != XFA_DocType::Dynamic &&
+ m_pContext->GetDocType() != XFA_DocType::Static) {
return;
}
@@ -510,7 +510,7 @@ void CPDFXFA_DocEnvironment::GotoURL(CXFA_FFDoc* hDoc,
if (hDoc != m_pContext->GetXFADoc())
return;
- if (m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA)
+ if (m_pContext->GetDocType() != XFA_DocType::Dynamic)
return;
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
@@ -610,8 +610,8 @@ bool CPDFXFA_DocEnvironment::NotifySubmit(bool bPrevOrPost) {
}
bool CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() {
- if (m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA &&
- m_pContext->GetDocType() != DOCTYPE_STATIC_XFA) {
+ if (m_pContext->GetDocType() != XFA_DocType::Dynamic &&
+ m_pContext->GetDocType() != XFA_DocType::Static) {
return true;
}
@@ -663,8 +663,8 @@ bool CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() {
}
void CPDFXFA_DocEnvironment::OnAfterNotifySubmit() {
- if (m_pContext->GetDocType() != DOCTYPE_DYNAMIC_XFA &&
- m_pContext->GetDocType() != DOCTYPE_STATIC_XFA)
+ if (m_pContext->GetDocType() != XFA_DocType::Dynamic &&
+ m_pContext->GetDocType() != XFA_DocType::Static)
return;
if (!m_pContext->GetXFADocView())