diff options
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_context.cpp')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 16 |
1 files changed, 8 insertions, 8 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) { |