summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-10-19 16:56:58 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-19 16:56:58 +0000
commit9ead811969b61d6a82b1f3fc634070fbc797d182 (patch)
tree3bbc04c3e864f028c651a0bfa2c9f209314b3f7f /fpdfsdk
parent1f120c74ea2e0217dbb8a825bc7d495da805fc50 (diff)
downloadpdfium-9ead811969b61d6a82b1f3fc634070fbc797d182.tar.xz
Add static asserts for FPDFDOC_AACTION_* constants.
These must match as we do an unchecked cast from int to the CPDF_AAction::AActionType enum. Tidy public header comments. Change-Id: Id4707a966dad6920b29f9fc8f4ab4e330d2658c3 Reviewed-on: https://pdfium-review.googlesource.com/c/44350 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_formfill.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp
index 4b23ce41b0..966ed097e9 100644
--- a/fpdfsdk/fpdf_formfill.cpp
+++ b/fpdfsdk/fpdf_formfill.cpp
@@ -141,6 +141,22 @@ static_assert(static_cast<int>(FormFieldType::kXFA_TextField) ==
static_assert(kFormFieldTypeCount == FPDF_FORMFIELD_COUNT,
"Number of form field types must match");
+static_assert(static_cast<int>(CPDF_AAction::CloseDocument) ==
+ FPDFDOC_AACTION_WC,
+ "CloseDocument action must match");
+static_assert(static_cast<int>(CPDF_AAction::SaveDocument) ==
+ FPDFDOC_AACTION_WS,
+ "SaveDocument action must match");
+static_assert(static_cast<int>(CPDF_AAction::DocumentSaved) ==
+ FPDFDOC_AACTION_DS,
+ "DocumentSaved action must match");
+static_assert(static_cast<int>(CPDF_AAction::PrintDocument) ==
+ FPDFDOC_AACTION_WP,
+ "PrintDocument action must match");
+static_assert(static_cast<int>(CPDF_AAction::DocumentPrinted) ==
+ FPDFDOC_AACTION_DP,
+ "DocumentPrinted action must match");
+
namespace {
CPDFSDK_InteractiveForm* FormHandleToInteractiveForm(FPDF_FORMHANDLE hHandle) {