De-duplicate rows in element-attributes table.

These have existed for years, but we couldn't remove them without
disrupting the index, which has now been removed.

Change-Id: Iab4cc2ecab4b5c02714012414319f9b71d339a71
Reviewed-on: https://pdfium-review.googlesource.com/c/47090
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fxfa/parser/element_attributes.inc b/xfa/fxfa/parser/element_attributes.inc
index ab9c71c..ebc0ec7 100644
--- a/xfa/fxfa/parser/element_attributes.inc
+++ b/xfa/fxfa/parser/element_attributes.inc
@@ -19,8 +19,6 @@
 ELEM_ATTR____(RecordSet, Usehref, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(RecordSet, CursorLocation, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(SubsetBelow, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(SubsetBelow, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(SubsetBelow, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(SubsetBelow, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(SubformSet, Use, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(SubformSet, InstanceIndex, &CJX_SubformSet::instanceIndex)
@@ -100,12 +98,8 @@
 ELEM_ATTR____(Uri, Use, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Uri, Usehref, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Uri, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Uri, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Uri, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Uri, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Xdc, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Xdc, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Xdc, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Xdc, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Xdp, Desc, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Xdp, Lock, &CJX_Object::ScriptAttributeBool)
@@ -113,8 +107,6 @@
 ELEM_ATTR____(Xfa, TimeStamp, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Xfa, Uuid, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Xsl, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Xsl, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Xsl, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Xsl, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Zpl, Name, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Zpl, Desc, &CJX_Object::ScriptAttributeString)
@@ -639,8 +631,6 @@
 ELEM_ATTR____(ConnectString, Use, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(ConnectString, Usehref, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Mode, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Mode, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Mode, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Mode, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Layout, Desc, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Layout, Lock, &CJX_Object::ScriptAttributeBool)
@@ -679,8 +669,6 @@
 ELEM_ATTR____(AddViewerPreferences, Desc, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(AddViewerPreferences, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(AlwaysEmbed, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(AlwaysEmbed, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(AlwaysEmbed, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(AlwaysEmbed, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(PasswordEdit, Use, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(PasswordEdit, PasswordChar, &CJX_Object::ScriptAttributeString)
@@ -717,8 +705,6 @@
 ELEM_ATTR____(Caption, Usehref, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Caption, Placement, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Relevant, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Relevant, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Relevant, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Relevant, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(FlipLabel, Desc, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(FlipLabel, Lock, &CJX_Object::ScriptAttributeBool)
@@ -943,8 +929,6 @@
 ELEM_ATTR____(OpenAction, Desc, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(OpenAction, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(NeverEmbed, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(NeverEmbed, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(NeverEmbed, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(NeverEmbed, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(BindItems, Connection, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(BindItems, LabelRef, &CJX_Object::ScriptAttributeString)
@@ -983,16 +967,12 @@
 ELEM_ATTR____(RootElement, Use, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(RootElement, Usehref, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(PlaintextMetadata, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(PlaintextMetadata, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(PlaintextMetadata, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(PlaintextMetadata, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(PrintHighQuality, Desc, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(PrintHighQuality, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Driver, Desc, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Driver, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(IncrementalLoad, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(IncrementalLoad, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(IncrementalLoad, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(IncrementalLoad, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(SubjectDN, Delimiter, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(CompressLogicalStructure, Desc, &CJX_Object::ScriptAttributeString)
@@ -1009,8 +989,6 @@
 ELEM_ATTR____(EffectiveInputPolicy, Use, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(EffectiveInputPolicy, Usehref, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(NameAttr, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(NameAttr, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(NameAttr, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(NameAttr, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Conformance, Desc, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Conformance, Lock, &CJX_Object::ScriptAttributeBool)
@@ -1045,8 +1023,6 @@
 ELEM_ATTR____(PickTrayByPDFSize, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(MonthNames, Abbr, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(Severity, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Severity, Desc, &CJX_Object::ScriptAttributeString)
-ELEM_ATTR____(Severity, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(Severity, Lock, &CJX_Object::ScriptAttributeBool)
 ELEM_ATTR____(GroupParent, Desc, &CJX_Object::ScriptAttributeString)
 ELEM_ATTR____(GroupParent, Lock, &CJX_Object::ScriptAttributeBool)
diff --git a/xfa/fxfa/parser/xfa_basic_data_unittest.cpp b/xfa/fxfa/parser/xfa_basic_data_unittest.cpp
index f5293f8..8a9c38b 100644
--- a/xfa/fxfa/parser/xfa_basic_data_unittest.cpp
+++ b/xfa/fxfa/parser/xfa_basic_data_unittest.cpp
@@ -14,7 +14,7 @@
                            XFA_Attribute attr,
                            std::pair<XFA_Element, XFA_Attribute>* so_far) {
   auto curr = std::make_pair(elem, attr);
-  EXPECT_LE(*so_far, curr) << " for " << static_cast<int>(elem) << ", "
+  EXPECT_LT(*so_far, curr) << " for " << static_cast<int>(elem) << ", "
                            << static_cast<int>(attr);
   *so_far = curr;
 }
@@ -61,7 +61,6 @@
   EXPECT_EQ(XFA_AttributeValue::Lowered, result.value());
 }
 
-// TODO(tsepez): convert EXPECT_LE to EXPECT_LT after removing duplicate rows.
 TEST(XFABasicDataText, ElementAttributeOrder) {
   std::pair<XFA_Element, XFA_Attribute> so_far = {};
 #undef ELEM_ATTR____