From 854d71c1420eb80ec79755a6cdf829f3f39aead7 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 18 Oct 2017 12:28:14 -0400 Subject: Refactor HasXFAField into HasFormInfo The existing API is too restrictive for collection the metrics information that we want. Specifically it only tells us if there are XFA forms in the document, but not AcroForms. This refactoring makes the method more general, so that non-XFA information is provided also. This change in semantics of the return value required some changes at the call sites of the API. BUG=chromium:775519 Change-Id: Id421c66c09b47196c252c64cdc2c711ca1911de0 Reviewed-on: https://pdfium-review.googlesource.com/16210 Commit-Queue: Ryan Harrison Reviewed-by: Henrique Nakashima Reviewed-by: dsinclair --- xfa/fxfa/fxfa.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/fxfa.h') diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h index 9f5432e3ad..ee74fc14dd 100644 --- a/xfa/fxfa/fxfa.h +++ b/xfa/fxfa/fxfa.h @@ -40,8 +40,13 @@ class IXFA_WidgetIterator; #define XFA_IDNo 3 #define XFA_IDYes 4 -// Note, values match fpdf_formfill.h XFADOCTYPE_* flags. -enum class XFA_DocType { kNone = 0, kFull = 1, kForegroundOnly = 2 }; +// Note, values must match fpdf_formfill.h FORMTYPE_* flags. +enum class FormType { + kNone = 0, + kAcroForm = 1, + kXFAFull = 2, + kXFAForeground = 3 +}; #define XFA_PARSESTATUS_StatusErr -3 #define XFA_PARSESTATUS_StreamErr -2 -- cgit v1.2.3