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 /fpdfsdk/fpdfsave.cpp | |
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 'fpdfsdk/fpdfsave.cpp')
-rw-r--r-- | fpdfsdk/fpdfsave.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfsave.cpp b/fpdfsdk/fpdfsave.cpp index 13475f690e..783a913022 100644 --- a/fpdfsdk/fpdfsave.cpp +++ b/fpdfsdk/fpdfsave.cpp @@ -48,8 +48,8 @@ bool SaveXFADocumentData(CPDFXFA_Context* pContext, if (!pContext) return false; - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) { + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) { return true; } @@ -192,8 +192,8 @@ bool SendPostSaveToXFADoc(CPDFXFA_Context* pContext) { if (!pContext) return false; - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) return true; CXFA_FFDocView* pXFADocView = pContext->GetXFADocView(); @@ -215,8 +215,8 @@ bool SendPostSaveToXFADoc(CPDFXFA_Context* pContext) { bool SendPreSaveToXFADoc(CPDFXFA_Context* pContext, std::vector<RetainPtr<IFX_SeekableStream>>* fileList) { - if (pContext->GetDocType() != XFA_DocType::Dynamic && - pContext->GetDocType() != XFA_DocType::Static) + if (pContext->GetDocType() != XFA_DocType::kFull && + pContext->GetDocType() != XFA_DocType::kForegroundOnly) return true; CXFA_FFDocView* pXFADocView = pContext->GetXFADocView(); |