summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp16
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp26
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_page.cpp24
3 files changed, 33 insertions, 33 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
index a67ac0178b..692306aebf 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
@@ -36,7 +36,7 @@ extern int GetLastError();
#endif
CPDFXFA_Context::CPDFXFA_Context(std::unique_ptr<CPDF_Document> pPDFDoc)
- : m_iDocType(XFA_DocType::PDF),
+ : m_iDocType(XFA_DocType::kNone),
m_pPDFDoc(std::move(pPDFDoc)),
m_pFormFillEnv(nullptr),
m_pXFADocView(nullptr),
@@ -117,10 +117,10 @@ bool CPDFXFA_Context::LoadXFADoc() {
m_pXFADoc->StopLoad();
m_pXFADoc->GetXFADoc()->InitScriptContext(GetJSERuntime());
- if (m_pXFADoc->GetDocType() == XFA_DocType::Dynamic)
- m_iDocType = XFA_DocType::Dynamic;
+ if (m_pXFADoc->GetDocType() == XFA_DocType::kFull)
+ m_iDocType = XFA_DocType::kFull;
else
- m_iDocType = XFA_DocType::Static;
+ m_iDocType = XFA_DocType::kForegroundOnly;
m_pXFADocView = m_pXFADoc->CreateDocView();
if (m_pXFADocView->StartLayout() < 0) {
@@ -141,11 +141,11 @@ int CPDFXFA_Context::GetPageCount() const {
return 0;
switch (m_iDocType) {
- case XFA_DocType::PDF:
- case XFA_DocType::Static:
+ case XFA_DocType::kNone:
+ case XFA_DocType::kForegroundOnly:
if (m_pPDFDoc)
return m_pPDFDoc->GetPageCount();
- case XFA_DocType::Dynamic:
+ case XFA_DocType::kFull:
if (m_pXFADoc)
return m_pXFADocView->CountPageViews();
default:
@@ -183,7 +183,7 @@ RetainPtr<CPDFXFA_Page> CPDFXFA_Context::GetXFAPage(
if (!m_pXFADoc)
return nullptr;
- if (m_iDocType != XFA_DocType::Dynamic)
+ if (m_iDocType != XFA_DocType::kFull)
return nullptr;
for (auto& pTempPage : m_XFAPageList) {
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 4dcdcac0f6..91322ee103 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -55,7 +55,7 @@ void CPDFXFA_DocEnvironment::InvalidateRect(CXFA_FFPageView* pPageView,
if (!m_pContext->GetXFADoc() || !m_pContext->GetFormFillEnv())
return;
- if (m_pContext->GetDocType() != XFA_DocType::Dynamic)
+ if (m_pContext->GetDocType() != XFA_DocType::kFull)
return;
RetainPtr<CPDFXFA_Page> pPage = m_pContext->GetXFAPage(pPageView);
@@ -76,7 +76,7 @@ void CPDFXFA_DocEnvironment::DisplayCaret(CXFA_FFWidget* hWidget,
!m_pContext->GetFormFillEnv() || !m_pContext->GetXFADocView())
return;
- if (m_pContext->GetDocType() != XFA_DocType::Dynamic)
+ if (m_pContext->GetDocType() != XFA_DocType::kFull)
return;
CXFA_FFWidgetHandler* pWidgetHandler =
@@ -289,7 +289,7 @@ void CPDFXFA_DocEnvironment::PageViewEvent(CXFA_FFPageView* pPageView,
void CPDFXFA_DocEnvironment::WidgetPostAdd(CXFA_FFWidget* hWidget,
CXFA_WidgetAcc* pWidgetData) {
- if (m_pContext->GetDocType() != XFA_DocType::Dynamic || !hWidget)
+ if (m_pContext->GetDocType() != XFA_DocType::kFull || !hWidget)
return;
CXFA_FFPageView* pPageView = hWidget->GetPageView();
@@ -307,7 +307,7 @@ void CPDFXFA_DocEnvironment::WidgetPostAdd(CXFA_FFWidget* hWidget,
void CPDFXFA_DocEnvironment::WidgetPreRemove(CXFA_FFWidget* hWidget,
CXFA_WidgetAcc* pWidgetData) {
- if (m_pContext->GetDocType() != XFA_DocType::Dynamic || !hWidget)
+ if (m_pContext->GetDocType() != XFA_DocType::kFull || !hWidget)
return;
CXFA_FFPageView* pPageView = hWidget->GetPageView();
@@ -334,7 +334,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() != XFA_DocType::Dynamic)
+ if (m_pContext->GetDocType() != XFA_DocType::kFull)
return -1;
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
@@ -347,7 +347,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() != XFA_DocType::Dynamic || iCurPage < 0 ||
+ m_pContext->GetDocType() != XFA_DocType::kFull || iCurPage < 0 ||
iCurPage >= m_pContext->GetFormFillEnv()->GetPageCount()) {
return;
}
@@ -407,8 +407,8 @@ void CPDFXFA_DocEnvironment::ExportData(CXFA_FFDoc* hDoc,
if (hDoc != m_pContext->GetXFADoc())
return;
- if (m_pContext->GetDocType() != XFA_DocType::Dynamic &&
- m_pContext->GetDocType() != XFA_DocType::Static) {
+ if (m_pContext->GetDocType() != XFA_DocType::kFull &&
+ m_pContext->GetDocType() != XFA_DocType::kForegroundOnly) {
return;
}
@@ -506,7 +506,7 @@ void CPDFXFA_DocEnvironment::GotoURL(CXFA_FFDoc* hDoc,
if (hDoc != m_pContext->GetXFADoc())
return;
- if (m_pContext->GetDocType() != XFA_DocType::Dynamic)
+ if (m_pContext->GetDocType() != XFA_DocType::kFull)
return;
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
@@ -606,8 +606,8 @@ bool CPDFXFA_DocEnvironment::NotifySubmit(bool bPrevOrPost) {
}
bool CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() {
- if (m_pContext->GetDocType() != XFA_DocType::Dynamic &&
- m_pContext->GetDocType() != XFA_DocType::Static) {
+ if (m_pContext->GetDocType() != XFA_DocType::kFull &&
+ m_pContext->GetDocType() != XFA_DocType::kForegroundOnly) {
return true;
}
@@ -658,8 +658,8 @@ bool CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() {
}
void CPDFXFA_DocEnvironment::OnAfterNotifySubmit() {
- if (m_pContext->GetDocType() != XFA_DocType::Dynamic &&
- m_pContext->GetDocType() != XFA_DocType::Static)
+ if (m_pContext->GetDocType() != XFA_DocType::kFull &&
+ m_pContext->GetDocType() != XFA_DocType::kForegroundOnly)
return;
if (!m_pContext->GetXFADocView())
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
index 87e003e147..fa10a925cd 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp
@@ -65,10 +65,10 @@ bool CPDFXFA_Page::LoadPage() {
return false;
switch (m_pContext->GetDocType()) {
- case XFA_DocType::PDF:
- case XFA_DocType::Static:
+ case XFA_DocType::kNone:
+ case XFA_DocType::kForegroundOnly:
return LoadPDFPage();
- case XFA_DocType::Dynamic:
+ case XFA_DocType::kFull:
return LoadXFAPageView();
default:
return false;
@@ -90,13 +90,13 @@ float CPDFXFA_Page::GetPageWidth() const {
return 0.0f;
switch (m_pContext->GetDocType()) {
- case XFA_DocType::Dynamic: {
+ case XFA_DocType::kFull: {
if (m_pXFAPageView)
return m_pXFAPageView->GetPageViewRect().width;
break;
}
- case XFA_DocType::Static:
- case XFA_DocType::PDF: {
+ case XFA_DocType::kForegroundOnly:
+ case XFA_DocType::kNone: {
if (m_pPDFPage)
return m_pPDFPage->GetPageWidth();
break;
@@ -113,13 +113,13 @@ float CPDFXFA_Page::GetPageHeight() const {
return 0.0f;
switch (m_pContext->GetDocType()) {
- case XFA_DocType::PDF:
- case XFA_DocType::Static: {
+ case XFA_DocType::kNone:
+ case XFA_DocType::kForegroundOnly: {
if (m_pPDFPage)
return m_pPDFPage->GetPageHeight();
break;
}
- case XFA_DocType::Dynamic: {
+ case XFA_DocType::kFull: {
if (m_pXFAPageView)
return m_pXFAPageView->GetPageViewRect().height;
break;
@@ -183,15 +183,15 @@ CFX_Matrix CPDFXFA_Page::GetDisplayMatrix(int xPos,
return CFX_Matrix();
switch (m_pContext->GetDocType()) {
- case XFA_DocType::Dynamic: {
+ case XFA_DocType::kFull: {
if (m_pXFAPageView) {
return m_pXFAPageView->GetDisplayMatrix(
CFX_Rect(xPos, yPos, xSize, ySize), iRotate);
}
break;
}
- case XFA_DocType::PDF:
- case XFA_DocType::Static: {
+ case XFA_DocType::kNone:
+ case XFA_DocType::kForegroundOnly: {
if (m_pPDFPage)
return m_pPDFPage->GetDisplayMatrix(xPos, yPos, xSize, ySize, iRotate);
break;