blob: dac21ddf955c5bcdf6e1e97431893375df2db29b [file] [log] [blame]
// Copyright 2016 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "xfa/fxfa/parser/xfa_basic_data.h"
#include "core/fxcrt/fx_memory.h"
#include "xfa/fxfa/fxfa_basic.h"
#undef INFO
#define INFO(a, b, c) a, c, b
const XFA_AttributeValueInfo g_XFAEnumData[] = {
{INFO(0x2a, "*", XFA_AttributeValue::Asterisk)},
{INFO(0x2f, "/", XFA_AttributeValue::Slash)},
{INFO(0x5c, "\\", XFA_AttributeValue::Backslash)},
{INFO(0x239bd, "on", XFA_AttributeValue::On)},
{INFO(0x25356, "tb", XFA_AttributeValue::Tb)},
{INFO(0x25885, "up", XFA_AttributeValue::Up)},
{INFO(0x91b281, "metaData", XFA_AttributeValue::MetaData)},
{INFO(0x1f8dedb, "delegate", XFA_AttributeValue::Delegate)},
{INFO(0x2a6c55a, "postSubmit", XFA_AttributeValue::PostSubmit)},
{INFO(0x31b19c1, "name", XFA_AttributeValue::Name)},
{INFO(0x378a38a, "cross", XFA_AttributeValue::Cross)},
{INFO(0x3848b3f, "next", XFA_AttributeValue::Next)},
{INFO(0x48b6670, "none", XFA_AttributeValue::None)},
{INFO(0x51aafe5, "shortEdge", XFA_AttributeValue::ShortEdge)},
{INFO(0x55264c4,
"1mod10_1mod11",
XFA_AttributeValue::Checksum_1mod10_1mod11)},
{INFO(0x5a5c519, "height", XFA_AttributeValue::Height)},
{INFO(0x89ce549, "crossDiagonal", XFA_AttributeValue::CrossDiagonal)},
{INFO(0x9f9d0f9, "all", XFA_AttributeValue::All)},
{INFO(0x9f9db48, "any", XFA_AttributeValue::Any)},
{INFO(0xa126261, "toRight", XFA_AttributeValue::ToRight)},
{INFO(0xa36de29, "matchTemplate", XFA_AttributeValue::MatchTemplate)},
{INFO(0xa48d040, "dpl", XFA_AttributeValue::Dpl)},
{INFO(0xa559c05, "invisible", XFA_AttributeValue::Invisible)},
{INFO(0xa7d48e3, "fit", XFA_AttributeValue::Fit)},
{INFO(0xa8a8f80, "width", XFA_AttributeValue::Width)},
{INFO(0xab466bb, "preSubmit", XFA_AttributeValue::PreSubmit)},
{INFO(0xacc5785, "ipl", XFA_AttributeValue::Ipl)},
{INFO(0xafab0f8, "flateCompress", XFA_AttributeValue::FlateCompress)},
{INFO(0xb355816, "med", XFA_AttributeValue::Med)},
{INFO(0xb69ef77, "odd", XFA_AttributeValue::Odd)},
{INFO(0xb69f9bb, "off", XFA_AttributeValue::Off)},
{INFO(0xb843dba, "pdf", XFA_AttributeValue::Pdf)},
{INFO(0xbb912b8, "row", XFA_AttributeValue::Row)},
{INFO(0xbedaf33, "top", XFA_AttributeValue::Top)},
{INFO(0xc56afcc, "xdp", XFA_AttributeValue::Xdp)},
{INFO(0xc56ba02, "xfd", XFA_AttributeValue::Xfd)},
{INFO(0xc56ddf1, "xml", XFA_AttributeValue::Xml)},
{INFO(0xc8b65f3, "zip", XFA_AttributeValue::Zip)},
{INFO(0xc8b89d6, "zpl", XFA_AttributeValue::Zpl)},
{INFO(0xf55d7ee, "visible", XFA_AttributeValue::Visible)},
{INFO(0xfe3596a, "exclude", XFA_AttributeValue::Exclude)},
{INFO(0x109d7ce7, "mouseEnter", XFA_AttributeValue::MouseEnter)},
{INFO(0x10f1bc0c, "pair", XFA_AttributeValue::Pair)},
{INFO(0x1154efe6, "filter", XFA_AttributeValue::Filter)},
{INFO(0x125bc94b, "moveLast", XFA_AttributeValue::MoveLast)},
{INFO(0x12e1f1f0, "exportAndImport", XFA_AttributeValue::ExportAndImport)},
{INFO(0x13000c60, "push", XFA_AttributeValue::Push)},
{INFO(0x138ee315, "portrait", XFA_AttributeValue::Portrait)},
{INFO(0x14da2125, "default", XFA_AttributeValue::Default)},
{INFO(0x157749a5, "storedProc", XFA_AttributeValue::StoredProc)},
{INFO(0x16641198, "stayBOF", XFA_AttributeValue::StayBOF)},
{INFO(0x16b2fc5b, "stayEOF", XFA_AttributeValue::StayEOF)},
{INFO(0x17fad373, "postPrint", XFA_AttributeValue::PostPrint)},
{INFO(0x193207d0, "usCarrier", XFA_AttributeValue::UsCarrier)},
{INFO(0x193ade3e, "right", XFA_AttributeValue::Right)},
{INFO(0x1bfc72d9, "preOpen", XFA_AttributeValue::PreOpen)},
{INFO(0x1cc9317a, "actual", XFA_AttributeValue::Actual)},
{INFO(0x1f31df1e, "rest", XFA_AttributeValue::Rest)},
{INFO(0x1fb1bf14, "topCenter", XFA_AttributeValue::TopCenter)},
{INFO(0x207de667, "standardSymbol", XFA_AttributeValue::StandardSymbol)},
{INFO(0x2196a452, "initialize", XFA_AttributeValue::Initialize)},
{INFO(0x23bd40c7, "justifyAll", XFA_AttributeValue::JustifyAll)},
{INFO(0x247cf3e9, "normal", XFA_AttributeValue::Normal)},
{INFO(0x25aa946b, "landscape", XFA_AttributeValue::Landscape)},
{INFO(0x2739b5c9, "nonInteractive", XFA_AttributeValue::NonInteractive)},
{INFO(0x27410f03, "mouseExit", XFA_AttributeValue::MouseExit)},
{INFO(0x2854e62c, "minus", XFA_AttributeValue::Minus)},
{INFO(0x287e936a, "diagonalLeft", XFA_AttributeValue::DiagonalLeft)},
{INFO(0x2972a98f,
"simplexPaginated",
XFA_AttributeValue::SimplexPaginated)},
{INFO(0x29d8225f, "document", XFA_AttributeValue::Document)},
{INFO(0x2a9d3016, "warning", XFA_AttributeValue::Warning)},
{INFO(0x2b35b6d9, "auto", XFA_AttributeValue::Auto)},
{INFO(0x2c1653d9, "below", XFA_AttributeValue::Below)},
{INFO(0x2c1f0540, "bottomLeft", XFA_AttributeValue::BottomLeft)},
{INFO(0x2c44e816, "bottomCenter", XFA_AttributeValue::BottomCenter)},
{INFO(0x2cd3e9f3, "tcpl", XFA_AttributeValue::Tcpl)},
{INFO(0x2d08af85, "text", XFA_AttributeValue::Text)},
{INFO(0x2dc478eb, "grouping", XFA_AttributeValue::Grouping)},
{INFO(0x2ef3afdd, "secureSymbol", XFA_AttributeValue::SecureSymbol)},
{INFO(0x2f2dd29a, "preExecute", XFA_AttributeValue::PreExecute)},
{INFO(0x33c43dec, "docClose", XFA_AttributeValue::DocClose)},
{INFO(0x33f25bb5, "keyset", XFA_AttributeValue::Keyset)},
{INFO(0x34e363da, "vertical", XFA_AttributeValue::Vertical)},
{INFO(0x361fa1b6, "preSave", XFA_AttributeValue::PreSave)},
{INFO(0x36f1c6d8, "preSign", XFA_AttributeValue::PreSign)},
{INFO(0x399f02b5, "bottom", XFA_AttributeValue::Bottom)},
{INFO(0x3b0ab096, "toTop", XFA_AttributeValue::ToTop)},
{INFO(0x3c752495, "verify", XFA_AttributeValue::Verify)},
{INFO(0x3ce05d68, "first", XFA_AttributeValue::First)},
{INFO(0x3ecead94, "contentArea", XFA_AttributeValue::ContentArea)},
{INFO(0x40623b5b, "solid", XFA_AttributeValue::Solid)},
{INFO(0x42c6cd8d, "pessimistic", XFA_AttributeValue::Pessimistic)},
{INFO(0x43ddc6bf, "duplexPaginated", XFA_AttributeValue::DuplexPaginated)},
{INFO(0x442f68c8, "round", XFA_AttributeValue::Round)},
{INFO(0x45efb847, "remerge", XFA_AttributeValue::Remerge)},
{INFO(0x46972265, "ordered", XFA_AttributeValue::Ordered)},
{INFO(0x46f95531, "percent", XFA_AttributeValue::Percent)},
{INFO(0x46fd25ae, "even", XFA_AttributeValue::Even)},
{INFO(0x4731d6ba, "exit", XFA_AttributeValue::Exit)},
{INFO(0x4977356b, "toolTip", XFA_AttributeValue::ToolTip)},
{INFO(0x49b980ee,
"orderedOccurrence",
XFA_AttributeValue::OrderedOccurrence)},
{INFO(0x4a7e2dfe, "readOnly", XFA_AttributeValue::ReadOnly)},
{INFO(0x4c4e8acb, "currency", XFA_AttributeValue::Currency)},
{INFO(0x4dcf25f8, "concat", XFA_AttributeValue::Concat)},
{INFO(0x4febb826, "Thai", XFA_AttributeValue::Thai)},
{INFO(0x50ef95b2, "embossed", XFA_AttributeValue::Embossed)},
{INFO(0x516e35ce, "formdata", XFA_AttributeValue::Formdata)},
{INFO(0x52fa6f0e, "Greek", XFA_AttributeValue::Greek)},
{INFO(0x54034c2f, "decimal", XFA_AttributeValue::Decimal)},
{INFO(0x542c7300, "select", XFA_AttributeValue::Select)},
{INFO(0x551f0ae5, "longEdge", XFA_AttributeValue::LongEdge)},
{INFO(0x55520a8a, "protected", XFA_AttributeValue::Protected)},
{INFO(0x559f76f3, "bottomRight", XFA_AttributeValue::BottomRight)},
{INFO(0x568cb500, "zero", XFA_AttributeValue::Zero)},
{INFO(0x56bcecb7, "forwardOnly", XFA_AttributeValue::ForwardOnly)},
{INFO(0x56bf456b, "docReady", XFA_AttributeValue::DocReady)},
{INFO(0x573cb40c, "hidden", XFA_AttributeValue::Hidden)},
{INFO(0x582e3424, "include", XFA_AttributeValue::Include)},
{INFO(0x58a3dd29, "dashed", XFA_AttributeValue::Dashed)},
{INFO(0x5955b22b, "multiSelect", XFA_AttributeValue::MultiSelect)},
{INFO(0x598d5c53, "inactive", XFA_AttributeValue::Inactive)},
{INFO(0x59c8f27d, "embed", XFA_AttributeValue::Embed)},
{INFO(0x5e7555e8, "static", XFA_AttributeValue::Static)},
{INFO(0x606d4def, "onEntry", XFA_AttributeValue::OnEntry)},
{INFO(0x6195eafb, "Cyrillic", XFA_AttributeValue::Cyrillic)},
{INFO(0x6491b0f3, "nonBlank", XFA_AttributeValue::NonBlank)},
{INFO(0x67bef031, "topRight", XFA_AttributeValue::TopRight)},
{INFO(0x67df5ebd, "Hebrew", XFA_AttributeValue::Hebrew)},
{INFO(0x6aea98be, "topLeft", XFA_AttributeValue::TopLeft)},
{INFO(0x6c51afc1, "center", XFA_AttributeValue::Center)},
{INFO(0x7145e6bf, "moveFirst", XFA_AttributeValue::MoveFirst)},
{INFO(0x7375465c, "diamond", XFA_AttributeValue::Diamond)},
{INFO(0x7461aef4, "pageOdd", XFA_AttributeValue::PageOdd)},
{INFO(0x75f8aeb2, "1mod10", XFA_AttributeValue::Checksum_1mod10)},
{INFO(0x76d708e0, "Korean", XFA_AttributeValue::Korean)},
{INFO(0x789f14d7, "aboveEmbedded", XFA_AttributeValue::AboveEmbedded)},
{INFO(0x792ea39f, "zipCompress", XFA_AttributeValue::ZipCompress)},
{INFO(0x7a5b7193, "numeric", XFA_AttributeValue::Numeric)},
{INFO(0x7abec0d2, "circle", XFA_AttributeValue::Circle)},
{INFO(0x7afbba38, "toBottom", XFA_AttributeValue::ToBottom)},
{INFO(0x7b95e661, "inverted", XFA_AttributeValue::Inverted)},
{INFO(0x7baca2e3, "update", XFA_AttributeValue::Update)},
{INFO(0x7eb5da2c, "isoname", XFA_AttributeValue::Isoname)},
{INFO(0x7f6fd3d7, "server", XFA_AttributeValue::Server)},
{INFO(0x814f82b5, "position", XFA_AttributeValue::Position)},
{INFO(0x82deacf0, "middleCenter", XFA_AttributeValue::MiddleCenter)},
{INFO(0x83a49dc6, "optional", XFA_AttributeValue::Optional)},
{INFO(0x861a116f,
"usePrinterSetting",
XFA_AttributeValue::UsePrinterSetting)},
{INFO(0x86701ce0, "outline", XFA_AttributeValue::Outline)},
{INFO(0x8808385e, "indexChange", XFA_AttributeValue::IndexChange)},
{INFO(0x891f4606, "change", XFA_AttributeValue::Change)},
{INFO(0x89939f36, "pageArea", XFA_AttributeValue::PageArea)},
{INFO(0x8b5c3b25, "once", XFA_AttributeValue::Once)},
{INFO(0x8b5c6962, "only", XFA_AttributeValue::Only)},
{INFO(0x8b90e1f2, "open", XFA_AttributeValue::Open)},
{INFO(0x8bcfe96e, "caption", XFA_AttributeValue::Caption)},
{INFO(0x8ce83ef8, "raised", XFA_AttributeValue::Raised)},
{INFO(0x8d269cae, "justify", XFA_AttributeValue::Justify)},
{INFO(0x8fd520dc,
"refAndDescendants",
XFA_AttributeValue::RefAndDescendants)},
{INFO(0x9041d4b0, "short", XFA_AttributeValue::Short)},
{INFO(0x90c94426, "pageFront", XFA_AttributeValue::PageFront)},
{INFO(0x936beee5, "monospace", XFA_AttributeValue::Monospace)},
{INFO(0x947fa00f, "middle", XFA_AttributeValue::Middle)},
{INFO(0x9528a7b4, "prePrint", XFA_AttributeValue::PrePrint)},
{INFO(0x959ab231, "always", XFA_AttributeValue::Always)},
{INFO(0x96d61bf0, "unknown", XFA_AttributeValue::Unknown)},
{INFO(0x997194ee, "toLeft", XFA_AttributeValue::ToLeft)},
{INFO(0x9a83a3cd, "above", XFA_AttributeValue::Above)},
{INFO(0x9d0d71c7, "dashDot", XFA_AttributeValue::DashDot)},
{INFO(0x9df56f3e, "gregorian", XFA_AttributeValue::Gregorian)},
{INFO(0x9f6723fd, "Roman", XFA_AttributeValue::Roman)},
{INFO(0x9f693b21, "mouseDown", XFA_AttributeValue::MouseDown)},
{INFO(0xa1429b36, "symbol", XFA_AttributeValue::Symbol)},
{INFO(0xa5aa45cb, "pageEven", XFA_AttributeValue::PageEven)},
{INFO(0xa68635f1, "sign", XFA_AttributeValue::Sign)},
{INFO(0xa7315093, "addNew", XFA_AttributeValue::AddNew)},
{INFO(0xa7a773fa, "star", XFA_AttributeValue::Star)},
{INFO(0xa7d57b45, "optimistic", XFA_AttributeValue::Optimistic)},
{INFO(0xa8077321, "rl-tb", XFA_AttributeValue::Rl_tb)},
{INFO(0xa8f1468d, "middleRight", XFA_AttributeValue::MiddleRight)},
{INFO(0xaa84a1f1, "maintain", XFA_AttributeValue::Maintain)},
{INFO(0xab40b12c, "package", XFA_AttributeValue::Package)},
{INFO(0xac8b4d85,
"SimplifiedChinese",
XFA_AttributeValue::SimplifiedChinese)},
{INFO(0xadae6744, "toCenter", XFA_AttributeValue::ToCenter)},
{INFO(0xb0129df1, "back", XFA_AttributeValue::Back)},
{INFO(0xb0f088cf, "unspecified", XFA_AttributeValue::Unspecified)},
{INFO(0xb1271067, "batchOptimistic", XFA_AttributeValue::BatchOptimistic)},
{INFO(0xb18313a1, "bold", XFA_AttributeValue::Bold)},
{INFO(0xb1833cad, "both", XFA_AttributeValue::Both)},
{INFO(0xb221123f, "butt", XFA_AttributeValue::Butt)},
{INFO(0xb40c36bf, "client", XFA_AttributeValue::Client)},
{INFO(0xb56c7053, "2mod10", XFA_AttributeValue::Checksum_2mod10)},
{INFO(0xb683a345, "imageOnly", XFA_AttributeValue::ImageOnly)},
{INFO(0xb7732dea, "horizontal", XFA_AttributeValue::Horizontal)},
{INFO(0xb88652a4, "dotted", XFA_AttributeValue::Dotted)},
{INFO(0xbb2f2880, "userControl", XFA_AttributeValue::UserControl)},
{INFO(0xbbb79c5d, "diagonalRight", XFA_AttributeValue::DiagonalRight)},
{INFO(0xbd077154, "consumeData", XFA_AttributeValue::ConsumeData)},
{INFO(0xbd3fb11e, "check", XFA_AttributeValue::Check)},
{INFO(0xbde9abda, "data", XFA_AttributeValue::Data)},
{INFO(0xbf5a02d8, "down", XFA_AttributeValue::Down)},
{INFO(0xbf7450ee, "sansSerif", XFA_AttributeValue::SansSerif)},
{INFO(0xc02d649f, "inline", XFA_AttributeValue::Inline)},
{INFO(0xc11a9e3a,
"TraditionalChinese",
XFA_AttributeValue::TraditionalChinese)},
{INFO(0xc16169d8, "warn", XFA_AttributeValue::Warn)},
{INFO(0xc16f071f, "refOnly", XFA_AttributeValue::RefOnly)},
{INFO(0xc27c8ba5,
"interactiveForms",
XFA_AttributeValue::InteractiveForms)},
{INFO(0xc2d1b15c, "word", XFA_AttributeValue::Word)},
{INFO(0xc3621288, "unordered", XFA_AttributeValue::Unordered)},
{INFO(0xc5251981, "required", XFA_AttributeValue::Required)},
{INFO(0xc7088e7d, "importOnly", XFA_AttributeValue::ImportOnly)},
{INFO(0xc72cf0e3, "belowEmbedded", XFA_AttributeValue::BelowEmbedded)},
{INFO(0xc819cf07, "Japanese", XFA_AttributeValue::Japanese)},
{INFO(0xcdce56b3, "full", XFA_AttributeValue::Full)},
{INFO(0xce0122e3, "rl-row", XFA_AttributeValue::Rl_row)},
{INFO(0xcf7d71f1, "Vietnamese", XFA_AttributeValue::Vietnamese)},
{INFO(0xcfde3e09,
"EastEuropeanRoman",
XFA_AttributeValue::EastEuropeanRoman)},
{INFO(0xd576d08e, "mouseUp", XFA_AttributeValue::MouseUp)},
{INFO(0xd7a92904, "exportOnly", XFA_AttributeValue::ExportOnly)},
{INFO(0xd8ed1467, "clear", XFA_AttributeValue::Clear)},
{INFO(0xd95657a6, "click", XFA_AttributeValue::Click)},
{INFO(0xd96c7de5, "base64", XFA_AttributeValue::Base64)},
{INFO(0xd9f47f36, "close", XFA_AttributeValue::Close)},
{INFO(0xdb075bde, "host", XFA_AttributeValue::Host)},
{INFO(0xdb103411, "global", XFA_AttributeValue::Global)},
{INFO(0xdb647188, "blank", XFA_AttributeValue::Blank)},
{INFO(0xdb9be968, "table", XFA_AttributeValue::Table)},
{INFO(0xdf590fbb, "import", XFA_AttributeValue::Import)},
{INFO(0xe0e573fb, "custom", XFA_AttributeValue::Custom)},
{INFO(0xe0ecc79a, "middleLeft", XFA_AttributeValue::MiddleLeft)},
{INFO(0xe1452019, "postExecute", XFA_AttributeValue::PostExecute)},
{INFO(0xe1911d98, "radix", XFA_AttributeValue::Radix)},
{INFO(0xe25fa7b8, "postOpen", XFA_AttributeValue::PostOpen)},
{INFO(0xe28dce7e, "enter", XFA_AttributeValue::Enter)},
{INFO(0xe2c44de4, "ignore", XFA_AttributeValue::Ignore)},
{INFO(0xe2cd8c61, "lr-tb", XFA_AttributeValue::Lr_tb)},
{INFO(0xe2da8336, "fantasy", XFA_AttributeValue::Fantasy)},
{INFO(0xe31d5396, "italic", XFA_AttributeValue::Italic)},
{INFO(0xe7ada113, "author", XFA_AttributeValue::Author)},
{INFO(0xe8e7cc18, "toEdge", XFA_AttributeValue::ToEdge)},
{INFO(0xe97aa98b, "choice", XFA_AttributeValue::Choice)},
{INFO(0xeafd2a38, "disabled", XFA_AttributeValue::Disabled)},
{INFO(0xeb2b7972, "crossHatch", XFA_AttributeValue::CrossHatch)},
{INFO(0xeb2db2d7, "dataRef", XFA_AttributeValue::DataRef)},
{INFO(0xec35dc6e, "dashDotDot", XFA_AttributeValue::DashDotDot)},
{INFO(0xef85d351, "square", XFA_AttributeValue::Square)},
{INFO(0xf2102445, "dynamic", XFA_AttributeValue::Dynamic)},
{INFO(0xf272c7be, "manual", XFA_AttributeValue::Manual)},
{INFO(0xf2bbb64d, "etched", XFA_AttributeValue::Etched)},
{INFO(0xf3b8fc6c, "validationState", XFA_AttributeValue::ValidationState)},
{INFO(0xf42f2b81, "cursive", XFA_AttributeValue::Cursive)},
{INFO(0xf54481d4, "last", XFA_AttributeValue::Last)},
{INFO(0xf5ad782b, "left", XFA_AttributeValue::Left)},
{INFO(0xf616da2e, "link", XFA_AttributeValue::Link)},
{INFO(0xf6b4afb0, "long", XFA_AttributeValue::Long)},
{INFO(0xf8636460,
"internationalCarrier",
XFA_AttributeValue::InternationalCarrier)},
{INFO(0xf9fb37ac, "PDF1.3", XFA_AttributeValue::PDF1_3)},
{INFO(0xf9fb37af, "PDF1.6", XFA_AttributeValue::PDF1_6)},
{INFO(0xfbce7f19, "serif", XFA_AttributeValue::Serif)},
{INFO(0xfc82d695, "postSave", XFA_AttributeValue::PostSave)},
{INFO(0xfcef86b5, "ready", XFA_AttributeValue::Ready)},
{INFO(0xfd54fbb7, "postSign", XFA_AttributeValue::PostSign)},
{INFO(0xfdc0aae2, "Arabic", XFA_AttributeValue::Arabic)},
{INFO(0xfe06d2ca, "error", XFA_AttributeValue::Error)},
{INFO(0xfefc4885, "urlencoded", XFA_AttributeValue::Urlencoded)},
{INFO(0xff795ad2, "lowered", XFA_AttributeValue::Lowered)},
};
#undef INFO
const size_t g_szXFAEnumCount = FX_ArraySize(g_XFAEnumData);