summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_ext.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2018-04-13 16:43:05 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-13 16:43:05 +0000
commite04b66cc759c2cf0ceafae47340fdf9588ca2e23 (patch)
tree5b7e8da1e61d1b6dc9550fb599722681e65572fc /fpdfsdk/fpdf_ext.cpp
parent996c93068bfc8b443c77b735bc6400285bc8a407 (diff)
downloadpdfium-e04b66cc759c2cf0ceafae47340fdf9588ca2e23.tar.xz
Move SharedForm check to CPDF_Metadata class
This CL moves code related to shared form detection into the CPDF_Metadata class. This allows us to hide the usage of CXML inside CPDF_Metadata. Change-Id: I547471a2bcc119221565c415a58211c1500cbb3c Reviewed-on: https://pdfium-review.googlesource.com/30370 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_ext.cpp')
-rw-r--r--fpdfsdk/fpdf_ext.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
index 2f05fc5cdc..509cfe818b 100644
--- a/fpdfsdk/fpdf_ext.cpp
+++ b/fpdfsdk/fpdf_ext.cpp
@@ -9,12 +9,63 @@
#include "core/fpdfapi/cpdf_modulemgr.h"
#include "core/fpdfapi/parser/cpdf_document.h"
#include "core/fpdfdoc/cpdf_interform.h"
+#include "core/fpdfdoc/cpdf_metadata.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
#ifdef PDF_ENABLE_XFA
#include "fpdfsdk/fpdfxfa/cpdfxfa_context.h"
#endif // PDF_ENABLE_XFA
+static_assert(static_cast<int>(UnsupportedFeature::kDocumentXFAForm) ==
+ FPDF_UNSP_DOC_XFAFORM,
+ "UnsupportedFeature::kDocumentXFAForm value mismatch");
+static_assert(
+ static_cast<int>(UnsupportedFeature::kDocumentPortableCollection) ==
+ FPDF_UNSP_DOC_PORTABLECOLLECTION,
+ "UnsupportedFeature::kDocumentPortableCollection value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kDocumentAttachment) ==
+ FPDF_UNSP_DOC_ATTACHMENT,
+ "UnsupportedFeature::kDocumentAttachment value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kDocumentSecurity) ==
+ FPDF_UNSP_DOC_SECURITY,
+ "UnsupportedFeature::kDocumentSecurity value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kDocumentSharedReview) ==
+ FPDF_UNSP_DOC_SHAREDREVIEW,
+ "UnsupportedFeature::kDocumentSharedReview value mismatch");
+static_assert(
+ static_cast<int>(UnsupportedFeature::kDocumentSharedFormAcrobat) ==
+ FPDF_UNSP_DOC_SHAREDFORM_ACROBAT,
+ "UnsupportedFeature::kDocumentSharedFormAcrobat value mismatch");
+static_assert(
+ static_cast<int>(UnsupportedFeature::kDocumentSharedFormFilesystem) ==
+ FPDF_UNSP_DOC_SHAREDFORM_FILESYSTEM,
+ "UnsupportedFeature::kDocumentSharedFormFilesystem value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kDocumentSharedFormEmail) ==
+ FPDF_UNSP_DOC_SHAREDFORM_EMAIL,
+ "UnsupportedFeature::kDocumentSharedFormEmail value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kAnnotation3d) ==
+ FPDF_UNSP_ANNOT_3DANNOT,
+ "UnsupportedFeature::kAnnotation3d value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kAnnotationMovie) ==
+ FPDF_UNSP_ANNOT_MOVIE,
+ "UnsupportedFeature::kAnnotationMovie value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kAnnotationSound) ==
+ FPDF_UNSP_ANNOT_SOUND,
+ "UnsupportedFeature::kAnnotationSound value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kAnnotationScreenMedia) ==
+ FPDF_UNSP_ANNOT_SCREEN_MEDIA,
+ "UnsupportedFeature::kAnnotationScreenMedia value mismatch");
+static_assert(
+ static_cast<int>(UnsupportedFeature::kAnnotationScreenRichMedia) ==
+ FPDF_UNSP_ANNOT_SCREEN_RICHMEDIA,
+ "UnsupportedFeature::kAnnotationScreenRichMedia value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kAnnotationAttachment) ==
+ FPDF_UNSP_ANNOT_ATTACHMENT,
+ "UnsupportedFeature::kAnnotationAttachment value mismatch");
+static_assert(static_cast<int>(UnsupportedFeature::kAnnotationSignature) ==
+ FPDF_UNSP_ANNOT_SIG,
+ "UnsupportedFeature::kAnnotationSignature value mismatch");
+
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FSDK_SetUnSpObjProcessHandler(UNSUPPORT_INFO* unsp_info) {
if (!unsp_info || unsp_info->version != 1)