diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-10-16 14:16:18 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-17 13:57:00 +0000 |
commit | f9068a5c08e55c1c16b14863abd8a089a327bc4d (patch) | |
tree | f8dc58642256506eb9051add027d06696836b811 /public | |
parent | 90fffb31e2ec6cf66fe1b85b466cd2f12ee9c87f (diff) | |
download | pdfium-f9068a5c08e55c1c16b14863abd8a089a327bc4d.tar.xz |
Convert XFA Doc Types to be more precise
The existing types are PDF, Dynamic & Static, which are poorly named
since they don't really convey the fundamental differences between the
types. "PDF" is confusing because PDFium only handles PDFs, and
"Dynamic" & "Static" describe what a form may do, not how it is
specified or some other fundamental difference. The terms "Dynamic"
and "Static" were especially confusing, since XFAF documents must be
static by definition, whereas full XFA documents can be either
dynamic or static, depending on whether or not they change their
layout.
The types have been renamed to be clear that they are talking about
the type of PDF document being described. "PDF" becomes "None", since
this is used to indicate that there are no XFA forms in the
document. "Dynamic" becomes "Full", since this indicates that the
entire XFA spec is being used for the forms, specifically display
layout is in the XML. "Static" has become "ForegroundOnly", since the
form is specified using the XFAF (XFA Foreground) subset of the spec.
The terms Full & Foreground come from the XFA spec. I would have
preferred XFAF to have a different name, since it is the
display/foreground layer that isn't XFA when using it.
BUG=pdfium:917
Change-Id: I4335958c4a11d77d3bbe63b93602dd5bc14acb57
Reviewed-on: https://pdfium-review.googlesource.com/16010
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'public')
-rw-r--r-- | public/fpdf_formfill.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/public/fpdf_formfill.h b/public/fpdf_formfill.h index e4194fed8e..1e0d305a6f 100644 --- a/public/fpdf_formfill.h +++ b/public/fpdf_formfill.h @@ -12,9 +12,10 @@ typedef void* FPDF_FORMHANDLE; -#define DOCTYPE_PDF 0 // Normal pdf Document -#define DOCTYPE_DYNAMIC_XFA 1 // Dynamic XFA Document Type -#define DOCTYPE_STATIC_XFA 2 // Static XFA Document Type +#define XFADOCTYPE_NONE 0 // Document contains no XFA forms +#define XFADOCTYPE_FULL 1 // XFA forms are specified using the entire XFA spec +#define XFADOCTYPE_FOREGROUNDONLY \ + 2 // XFA forms are specified using the XFAF subset // Exported Functions #ifdef __cplusplus @@ -1613,7 +1614,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_FFLRecord(FPDF_FORMHANDLE hHandle, * document - Handle to document. *Returned by FPDF_LoadDocument function. * docType - Document type defined as - *DOCTYPE_xxx. + *XFADOCTYPE_xxx. * Return Value: * TRUE indicates that the input document has XFA fields, *otherwise FALSE. |