summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-01-16 16:06:45 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-16 16:06:45 +0000
commit2056fac754e679baea695390854fe7b0ce7acb28 (patch)
treeb0f2b982ac2ea9d4206ecd9703eb439ad524cb32 /public
parentd3427164e7869ee9c22fcb843ab619b247cbed72 (diff)
downloadpdfium-2056fac754e679baea695390854fe7b0ce7acb28.tar.xz
Add support for XFA specific FormField types
This adds to form field types specific types for XFA form fields to be used instead of the generic XFA value when possible. BUG=pdfium:952,chromium:763129,chromium:592758 Change-Id: I8d1cff6a280d71db348b7c31a251cbe2e398ec79 Reviewed-on: https://pdfium-review.googlesource.com/22677 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'public')
-rw-r--r--public/fpdf_formfill.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h
index e4cdaee0f6..c2e2bd515a 100644
--- a/public/fpdf_formfill.h
+++ b/public/fpdf_formfill.h
@@ -1453,13 +1453,31 @@ FORM_ForceToKillFocus(FPDF_FORMHANDLE hHandle);
#define FPDF_FORMFIELD_TEXTFIELD 6 // text field type.
#define FPDF_FORMFIELD_SIGNATURE 7 // text field type.
#ifdef PDF_ENABLE_XFA
-#define FPDF_FORMFIELD_XFA 8 // Generic XFA type.
-#endif // PDF_ENABLE_XFA
+#define FPDF_FORMFIELD_XFA 8 // Generic XFA type.
+#define FPDF_FORMFIELD_XFA_CHECKBOX 9 // XFA check box type.
+#define FPDF_FORMFIELD_XFA_COMBOBOX 10 // XFA combo box type.
+#define FPDF_FORMFIELD_XFA_IMAGEFIELD 11 // XFA image field type.
+#define FPDF_FORMFIELD_XFA_LISTBOX 12 // XFA list box type.
+#define FPDF_FORMFIELD_XFA_PUSHBUTTON 13 // XFA push button type.
+#define FPDF_FORMFIELD_XFA_SIGNATURE 14 // XFA signture field type.
+#define FPDF_FORMFIELD_XFA_TEXTFIELD 15 // XFA text field type.
+#endif // PDF_ENABLE_XFA
#ifndef PDF_ENABLE_XFA
#define FPDF_FORMFIELD_COUNT 8
#else
-#define FPDF_FORMFIELD_COUNT 9
+#define FPDF_FORMFIELD_COUNT 16
+#endif // PDF_ENABLE_XFA
+
+#ifdef PDF_ENABLE_XFA
+#define IS_XFA_FORMFIELD(type) \
+ ((type == FPDF_FORMFIELD_XFA) || (type == FPDF_FORMFIELD_XFA_CHECKBOX) || \
+ (type == FPDF_FORMFIELD_XFA_COMBOBOX) || \
+ (type == FPDF_FORMFIELD_XFA_IMAGEFIELD) || \
+ (type == FPDF_FORMFIELD_XFA_LISTBOX) || \
+ (type == FPDF_FORMFIELD_XFA_PUSHBUTTON) || \
+ (type == FPDF_FORMFIELD_XFA_SIGNATURE) || \
+ (type == FPDF_FORMFIELD_XFA_TEXTFIELD))
#endif // PDF_ENABLE_XFA
/**