diff options
Diffstat (limited to 'fpdfsdk/fpdfformfill.cpp')
-rw-r--r-- | fpdfsdk/fpdfformfill.cpp | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp index e789df461e..9e8b69e29e 100644 --- a/fpdfsdk/fpdfformfill.cpp +++ b/fpdfsdk/fpdfformfill.cpp @@ -33,11 +33,12 @@ #include "xfa/fxfa/cxfa_ffpageview.h" #include "xfa/fxfa/cxfa_ffwidget.h" -static_assert(static_cast<int>(XFA_DocType::PDF) == DOCTYPE_PDF, +static_assert(static_cast<int>(XFA_DocType::kNone) == XFADOCTYPE_NONE, "PDF doctype must match"); -static_assert(static_cast<int>(XFA_DocType::Dynamic) == DOCTYPE_DYNAMIC_XFA, +static_assert(static_cast<int>(XFA_DocType::kFull) == XFADOCTYPE_FULL, "Dynamic XFA doctype must match"); -static_assert(static_cast<int>(XFA_DocType::Static) == DOCTYPE_STATIC_XFA, +static_assert(static_cast<int>(XFA_DocType::kForegroundOnly) == + XFADOCTYPE_FOREGROUNDONLY, "Static XFA doctype must match"); #endif // PDF_ENABLE_XFA @@ -456,8 +457,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Undo(FPDF_DOCUMENT document, return; CPDFXFA_Context* pContext = static_cast<CPDFXFA_Context*>(document); - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) { + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) { return; } @@ -470,8 +471,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Redo(FPDF_DOCUMENT document, return; CPDFXFA_Context* pContext = static_cast<CPDFXFA_Context*>(document); - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) return; static_cast<CXFA_FFWidget*>(hWidget)->Redo(); @@ -483,8 +484,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_SelectAll(FPDF_DOCUMENT document, return; CPDFXFA_Context* pContext = static_cast<CPDFXFA_Context*>(document); - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) return; static_cast<CXFA_FFWidget*>(hWidget)->SelectAll(); @@ -498,8 +499,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Copy(FPDF_DOCUMENT document, return; CPDFXFA_Context* pContext = static_cast<CPDFXFA_Context*>(document); - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) return; WideString wsCpText; @@ -530,8 +531,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Cut(FPDF_DOCUMENT document, return; CPDFXFA_Context* pContext = static_cast<CPDFXFA_Context*>(document); - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) return; WideString wsCpText; @@ -562,8 +563,8 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_Widget_Paste(FPDF_DOCUMENT document, return; CPDFXFA_Context* pContext = static_cast<CPDFXFA_Context*>(document); - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) return; WideString wstr = WideString::FromUTF16LE(wsText, size); @@ -580,8 +581,8 @@ FPDF_Widget_ReplaceSpellCheckWord(FPDF_DOCUMENT document, return; CPDFXFA_Context* pContext = static_cast<CPDFXFA_Context*>(document); - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) return; CFX_PointF ptPopup; @@ -601,8 +602,8 @@ FPDF_Widget_GetSpellCheckWords(FPDF_DOCUMENT document, return; auto* pContext = static_cast<CPDFXFA_Context*>(document); - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) return; CFX_PointF ptPopup; |