diff options
author | dsinclair <dsinclair@chromium.org> | 2016-06-21 14:15:25 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-21 14:15:26 -0700 |
commit | 56a8b1944d555ed65dda97164b702a9a657485ca (patch) | |
tree | 0bfead2fa031b2c162a5992d29a11f872cf77135 /xfa | |
parent | bb8b63d6b762393e6e7460351375d596bdabef0c (diff) | |
download | pdfium-56a8b1944d555ed65dda97164b702a9a657485ca.tar.xz |
Convert XFA_ELEMENT to an enum class
This CL changes XFA_ELEMENT From an enum to an enum class. The type name was
updated to XFA_Element.
Review-Url: https://codereview.chromium.org/2089443002
Diffstat (limited to 'xfa')
69 files changed, 2296 insertions, 2265 deletions
diff --git a/xfa/fxfa/app/xfa_ffdoc.cpp b/xfa/fxfa/app/xfa_ffdoc.cpp index ce7628e43e..e85d1b76c5 100644 --- a/xfa/fxfa/app/xfa_ffdoc.cpp +++ b/xfa/fxfa/app/xfa_ffdoc.cpp @@ -292,16 +292,16 @@ void CXFA_FFDoc::StopLoad() { if (!pConfig) { return; } - CXFA_Node* pAcrobat = pConfig->GetFirstChildByClass(XFA_ELEMENT_Acrobat); + CXFA_Node* pAcrobat = pConfig->GetFirstChildByClass(XFA_Element::Acrobat); if (!pAcrobat) { return; } - CXFA_Node* pAcrobat7 = pAcrobat->GetFirstChildByClass(XFA_ELEMENT_Acrobat7); + CXFA_Node* pAcrobat7 = pAcrobat->GetFirstChildByClass(XFA_Element::Acrobat7); if (!pAcrobat7) { return; } CXFA_Node* pDynamicRender = - pAcrobat7->GetFirstChildByClass(XFA_ELEMENT_DynamicRender); + pAcrobat7->GetFirstChildByClass(XFA_Element::DynamicRender); if (!pDynamicRender) { return; } diff --git a/xfa/fxfa/app/xfa_ffdochandler.cpp b/xfa/fxfa/app/xfa_ffdochandler.cpp index 38e872a043..e0a28337ca 100644 --- a/xfa/fxfa/app/xfa_ffdochandler.cpp +++ b/xfa/fxfa/app/xfa_ffdochandler.cpp @@ -35,7 +35,7 @@ XFA_ATTRIBUTEENUM CXFA_FFDocHandler::GetRestoreState(CXFA_FFDoc* hDoc) { if (!pForm) return XFA_ATTRIBUTEENUM_Unknown; - CXFA_Node* pSubForm = pForm->GetFirstChildByClass(XFA_ELEMENT_Subform); + CXFA_Node* pSubForm = pForm->GetFirstChildByClass(XFA_Element::Subform); if (!pSubForm) return XFA_ATTRIBUTEENUM_Unknown; return pSubForm->GetEnum(XFA_ATTRIBUTE_RestoreState); diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp index 7a5397f683..d42dce3ea0 100644 --- a/xfa/fxfa/app/xfa_ffdocview.cpp +++ b/xfa/fxfa/app/xfa_ffdocview.cpp @@ -109,12 +109,12 @@ void CXFA_FFDocView::StopLayout() { if (!pRootItem) { return; } - CXFA_Node* pSubformNode = pRootItem->GetChild(0, XFA_ELEMENT_Subform); + CXFA_Node* pSubformNode = pRootItem->GetChild(0, XFA_Element::Subform); if (!pSubformNode) { return; } CXFA_Node* pPageSetNode = - pSubformNode->GetFirstChildByClass(XFA_ELEMENT_PageSet); + pSubformNode->GetFirstChildByClass(XFA_Element::PageSet); if (!pPageSetNode) { return; } @@ -209,8 +209,8 @@ CXFA_LayoutProcessor* CXFA_FFDocView::GetXFALayout() const { } FX_BOOL CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) { CXFA_Node* pNode = pWidgetAcc->GetNode(); - XFA_ELEMENT eType = pNode->GetClassID(); - if (eType != XFA_ELEMENT_Field && eType != XFA_ELEMENT_ExclGroup) { + XFA_Element eType = pNode->GetClassID(); + if (eType != XFA_Element::Field && eType != XFA_Element::ExclGroup) { return FALSE; } pWidgetAcc->ResetData(); @@ -234,12 +234,12 @@ void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc) { if (!pFormNode) { return; } - if (pFormNode->GetClassID() != XFA_ELEMENT_Field && - pFormNode->GetClassID() != XFA_ELEMENT_ExclGroup) { + if (pFormNode->GetClassID() != XFA_Element::Field && + pFormNode->GetClassID() != XFA_Element::ExclGroup) { CXFA_WidgetAccIterator Iterator(this, pFormNode); while (CXFA_WidgetAcc* pAcc = Iterator.MoveToNext()) { bChanged |= ResetSingleWidgetAccData(pAcc); - if (pAcc->GetNode()->GetClassID() == XFA_ELEMENT_ExclGroup) { + if (pAcc->GetNode()->GetClassID() == XFA_Element::ExclGroup) { Iterator.SkipTree(); } } @@ -250,23 +250,25 @@ void CXFA_FFDocView::ResetWidgetData(CXFA_WidgetAcc* pWidgetAcc) { } int32_t CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam, CXFA_WidgetAcc* pWidgetAcc) { - if (pParam == NULL) { + if (!pParam) return XFA_EVENTERROR_Error; - } + if (pParam->m_eType == XFA_EVENT_Validate) { CFX_WideString wsValidateStr(L"preSubmit"); CXFA_Node* pConfigItem = ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Config)); if (pConfigItem) { - CXFA_Node* pValidateNode = NULL; - CXFA_Node* pAcrobatNode = pConfigItem->GetChild(0, XFA_ELEMENT_Acrobat); - pValidateNode = - pAcrobatNode ? pAcrobatNode->GetChild(0, XFA_ELEMENT_Validate) : NULL; + CXFA_Node* pValidateNode = nullptr; + CXFA_Node* pAcrobatNode = pConfigItem->GetChild(0, XFA_Element::Acrobat); + pValidateNode = pAcrobatNode + ? pAcrobatNode->GetChild(0, XFA_Element::Validate) + : nullptr; if (!pValidateNode) { - CXFA_Node* pPresentNode = pConfigItem->GetChild(0, XFA_ELEMENT_Present); + CXFA_Node* pPresentNode = + pConfigItem->GetChild(0, XFA_Element::Present); pValidateNode = pPresentNode - ? pPresentNode->GetChild(0, XFA_ELEMENT_Validate) - : NULL; + ? pPresentNode->GetChild(0, XFA_Element::Validate) + : nullptr; } if (pValidateNode) { wsValidateStr = pValidateNode->GetContent(); @@ -291,14 +293,14 @@ int32_t CXFA_FFDocView::ProcessWidgetEvent(CXFA_EventParam* pParam, return XFA_EVENTERROR_Success; } } - CXFA_Node* pNode = pWidgetAcc ? pWidgetAcc->GetNode() : NULL; + CXFA_Node* pNode = pWidgetAcc ? pWidgetAcc->GetNode() : nullptr; if (!pNode) { CXFA_Node* pRootItem = ToNode(m_pDoc->GetXFADoc()->GetXFAObject(XFA_HASHCODE_Form)); if (!pRootItem) { return XFA_EVENTERROR_Error; } - pNode = pRootItem->GetChild(0, XFA_ELEMENT_Subform); + pNode = pRootItem->GetChild(0, XFA_Element::Subform); } ExecEventActivityByDeepFirst(pNode, pParam->m_eType, pParam->m_bIsFormReady); return XFA_EVENTERROR_Success; @@ -399,7 +401,7 @@ static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView, if (!pParam || pParam->m_eType == XFA_EVENT_Unknown) { return XFA_EVENTERROR_NotExist; } - if (!pWidgetAcc || pWidgetAcc->GetClassID() == XFA_ELEMENT_Draw) { + if (!pWidgetAcc || pWidgetAcc->GetClassID() == XFA_Element::Draw) { return XFA_EVENTERROR_NotExist; } switch (pParam->m_eType) { @@ -439,8 +441,8 @@ int32_t CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode, if (pFormNode == pExclude) { return iRet; } - XFA_ELEMENT elementType = pFormNode->GetClassID(); - if (elementType == XFA_ELEMENT_Field) { + XFA_Element elementType = pFormNode->GetClassID(); + if (elementType == XFA_Element::Field) { if (eEventType == XFA_EVENT_IndexChange) { return iRet; } @@ -460,8 +462,8 @@ int32_t CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode, pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling, XFA_ObjectType::ContainerNode)) { elementType = pNode->GetClassID(); - if (elementType != XFA_ELEMENT_Variables && - elementType != XFA_ELEMENT_Draw) { + if (elementType != XFA_Element::Variables && + elementType != XFA_Element::Draw) { iRet |= ExecEventActivityByDeepFirst(pNode, eEventType, bIsFormReady, bRecursive, pExclude); } @@ -598,7 +600,7 @@ void CXFA_FFDocView::AddNewFormNode(CXFA_Node* pNode) { InitLayout(pNode); } void CXFA_FFDocView::AddIndexChangedSubform(CXFA_Node* pNode) { - ASSERT(pNode->GetClassID() == XFA_ELEMENT_Subform); + ASSERT(pNode->GetClassID() == XFA_Element::Subform); m_IndexChangedSubforms.Add(pNode); } void CXFA_FFDocView::RunDocClose() { @@ -802,7 +804,7 @@ CXFA_Node* CXFA_FFDocView::GetRootSubform() { if (!pFormPacketNode) { return NULL; } - return pFormPacketNode->GetFirstChildByClass(XFA_ELEMENT_Subform); + return pFormPacketNode->GetFirstChildByClass(XFA_Element::Subform); } CXFA_WidgetAccIterator::CXFA_WidgetAccIterator(CXFA_FFDocView* pDocView, diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index 6d2f1e8db7..59374cdbec 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -36,10 +36,10 @@ FX_BOOL CXFA_FFField::GetBBox(CFX_RectF& rtBox, if (!bDrawFocus) return CXFA_FFWidget::GetBBox(rtBox, dwStatus); - XFA_ELEMENT type = (XFA_ELEMENT)m_pDataAcc->GetUIType(); - if (type == XFA_ELEMENT_Button || type == XFA_ELEMENT_CheckButton || - type == XFA_ELEMENT_ImageEdit || type == XFA_ELEMENT_Signature || - type == XFA_ELEMENT_ChoiceList) { + XFA_Element type = m_pDataAcc->GetUIType(); + if (type == XFA_Element::Button || type == XFA_Element::CheckButton || + type == XFA_Element::ImageEdit || type == XFA_Element::Signature || + type == XFA_Element::ChoiceList) { rtBox = m_rtUI; CFX_Matrix mt; GetRotateMatrix(mt); @@ -127,9 +127,9 @@ void CXFA_FFField::UnloadWidget() { m_pNormalWidget = nullptr; } void CXFA_FFField::SetEditScrollOffset() { - XFA_ELEMENT eType = m_pDataAcc->GetUIType(); - if (eType == XFA_ELEMENT_TextEdit || eType == XFA_ELEMENT_NumericEdit || - eType == XFA_ELEMENT_PasswordEdit) { + XFA_Element eType = m_pDataAcc->GetUIType(); + if (eType == XFA_Element::TextEdit || eType == XFA_Element::NumericEdit || + eType == XFA_Element::PasswordEdit) { FX_FLOAT fScrollOffset = 0; CXFA_FFField* pPrev = static_cast<CXFA_FFField*>(GetPrev()); if (pPrev) { @@ -323,7 +323,7 @@ void CXFA_FFField::UpdateFWL() { uint32_t CXFA_FFField::UpdateUIProperty() { CXFA_Node* pUiNode = m_pDataAcc->GetUIChild(); uint32_t dwStyle = 0; - if (pUiNode && pUiNode->GetClassID() == XFA_ELEMENT_DefaultUi) { + if (pUiNode && pUiNode->GetClassID() == XFA_Element::DefaultUi) { dwStyle = FWL_STYLEEXT_EDT_ReadOnly; } return dwStyle; diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp index 58618c2270..1a89ceaba5 100644 --- a/xfa/fxfa/app/xfa_ffnotify.cpp +++ b/xfa/fxfa/app/xfa_ffnotify.cpp @@ -53,7 +53,7 @@ void CXFA_FFNotify::OnWidgetListItemAdded(CXFA_WidgetData* pSender, const FX_WCHAR* pValue, int32_t iIndex) { CXFA_WidgetAcc* pWidgetAcc = static_cast<CXFA_WidgetAcc*>(pSender); - if (pWidgetAcc->GetUIType() != XFA_ELEMENT_ChoiceList) + if (pWidgetAcc->GetUIType() != XFA_Element::ChoiceList) return; CXFA_FFWidget* pWidget = nullptr; @@ -71,7 +71,7 @@ void CXFA_FFNotify::OnWidgetListItemAdded(CXFA_WidgetData* pSender, void CXFA_FFNotify::OnWidgetListItemRemoved(CXFA_WidgetData* pSender, int32_t iIndex) { CXFA_WidgetAcc* pWidgetAcc = static_cast<CXFA_WidgetAcc*>(pSender); - if (pWidgetAcc->GetUIType() != XFA_ELEMENT_ChoiceList) + if (pWidgetAcc->GetUIType() != XFA_Element::ChoiceList) return; CXFA_FFWidget* pWidget = nullptr; @@ -89,11 +89,11 @@ void CXFA_FFNotify::OnWidgetListItemRemoved(CXFA_WidgetData* pSender, CXFA_LayoutItem* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode) { CXFA_LayoutProcessor* pLayout = m_pDoc->GetXFADoc()->GetDocLayout(); CXFA_FFDocView* pDocView = m_pDoc->GetDocView(pLayout); - XFA_ELEMENT eType = pNode->GetClassID(); - if (eType == XFA_ELEMENT_PageArea) + XFA_Element eType = pNode->GetClassID(); + if (eType == XFA_Element::PageArea) return new CXFA_FFPageView(pDocView, pNode); - if (eType == XFA_ELEMENT_ContentArea) + if (eType == XFA_Element::ContentArea) return new CXFA_ContainerLayoutItem(pNode); CXFA_WidgetAcc* pAcc = static_cast<CXFA_WidgetAcc*>(pNode->GetWidgetData()); @@ -102,65 +102,65 @@ CXFA_LayoutItem* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode) { CXFA_FFWidget* pWidget; switch (pAcc->GetUIType()) { - case XFA_ELEMENT_Barcode: + case XFA_Element::Barcode: pWidget = new CXFA_FFBarcode(nullptr, pAcc); break; - case XFA_ELEMENT_Button: + case XFA_Element::Button: pWidget = new CXFA_FFPushButton(nullptr, pAcc); break; - case XFA_ELEMENT_CheckButton: + case XFA_Element::CheckButton: pWidget = new CXFA_FFCheckButton(nullptr, pAcc); break; - case XFA_ELEMENT_ChoiceList: { + case XFA_Element::ChoiceList: { if (pAcc->IsListBox()) { pWidget = new CXFA_FFListBox(nullptr, pAcc); } else { pWidget = new CXFA_FFComboBox(nullptr, pAcc); } } break; - case XFA_ELEMENT_DateTimeEdit: + case XFA_Element::DateTimeEdit: pWidget = new CXFA_FFDateTimeEdit(nullptr, pAcc); break; - case XFA_ELEMENT_ImageEdit: + case XFA_Element::ImageEdit: pWidget = new CXFA_FFImageEdit(nullptr, pAcc); break; - case XFA_ELEMENT_NumericEdit: + case XFA_Element::NumericEdit: pWidget = new CXFA_FFNumericEdit(nullptr, pAcc); break; - case XFA_ELEMENT_PasswordEdit: + case XFA_Element::PasswordEdit: pWidget = new CXFA_FFPasswordEdit(nullptr, pAcc); break; - case XFA_ELEMENT_Signature: + case XFA_Element::Signature: pWidget = new CXFA_FFSignature(nullptr, pAcc); break; - case XFA_ELEMENT_TextEdit: + case XFA_Element::TextEdit: pWidget = new CXFA_FFTextEdit(nullptr, pAcc); break; - case XFA_ELEMENT_Arc: + case XFA_Element::Arc: pWidget = new CXFA_FFArc(nullptr, pAcc); break; - case XFA_ELEMENT_Line: + case XFA_Element::Line: pWidget = new CXFA_FFLine(nullptr, pAcc); break; - case XFA_ELEMENT_Rectangle: + case XFA_Element::Rectangle: pWidget = new CXFA_FFRectangle(nullptr, pAcc); break; - case XFA_ELEMENT_Text: + case XFA_Element::Text: pWidget = new CXFA_FFText(nullptr, pAcc); break; - case XFA_ELEMENT_Image: + case XFA_Element::Image: pWidget = new CXFA_FFImage(nullptr, pAcc); break; - case XFA_ELEMENT_Draw: + case XFA_Element::Draw: pWidget = new CXFA_FFDraw(nullptr, pAcc); break; - case XFA_ELEMENT_Subform: + case XFA_Element::Subform: pWidget = new CXFA_FFSubForm(nullptr, pAcc); break; - case XFA_ELEMENT_ExclGroup: + case XFA_Element::ExclGroup: pWidget = new CXFA_FFExclGroup(nullptr, pAcc); break; - case XFA_ELEMENT_DefaultUi: + case XFA_Element::DefaultUi: default: pWidget = nullptr; break; @@ -254,7 +254,7 @@ CXFA_FFWidget* CXFA_FFNotify::GetHWidget(CXFA_LayoutItem* pLayoutItem) { return XFA_GetWidgetFromLayoutItem(pLayoutItem); } void CXFA_FFNotify::OpenDropDownList(CXFA_FFWidget* hWidget) { - if (hWidget->GetDataAcc()->GetUIType() != XFA_ELEMENT_ChoiceList) { + if (hWidget->GetDataAcc()->GetUIType() != XFA_Element::ChoiceList) { return; } CXFA_FFDocView* pDocView = m_pDoc->GetDocView(); @@ -317,20 +317,20 @@ void CXFA_FFNotify::SetFocusWidgetNode(CXFA_Node* pNode) { void CXFA_FFNotify::OnNodeReady(CXFA_Node* pNode) { CXFA_FFDocView* pDocView = m_pDoc->GetDocView(); - if (!pDocView) { + if (!pDocView) return; - } - XFA_ELEMENT iType = pNode->GetClassID(); + + XFA_Element iType = pNode->GetClassID(); if (XFA_IsCreateWidget(iType)) { CXFA_WidgetAcc* pAcc = new CXFA_WidgetAcc(pDocView, pNode); pNode->SetObject(XFA_ATTRIBUTE_WidgetData, pAcc, &gs_XFADeleteWidgetAcc); return; } switch (iType) { - case XFA_ELEMENT_BindItems: + case XFA_Element::BindItems: pDocView->m_BindItems.Add(pNode); break; - case XFA_ELEMENT_Validate: { + case XFA_Element::Validate: { pNode->SetFlag(XFA_NodeFlag_NeedsInitApp, false); } break; default: @@ -381,7 +381,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender, return; } - XFA_ELEMENT ePType = pParentNode->GetClassID(); + XFA_Element ePType = pParentNode->GetClassID(); FX_BOOL bIsContainerNode = pParentNode->IsContainerNode(); CXFA_WidgetAcc* pWidgetAcc = static_cast<CXFA_WidgetAcc*>(pWidgetNode->GetWidgetData()); @@ -391,15 +391,15 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender, bool bUpdateProperty = false; pDocView->SetChangeMark(); switch (ePType) { - case XFA_ELEMENT_Caption: { + case XFA_Element::Caption: { CXFA_TextLayout* pCapOut = pWidgetAcc->GetCaptionTextLayout(); if (!pCapOut) return; pCapOut->Unload(); } break; - case XFA_ELEMENT_Ui: - case XFA_ELEMENT_Para: + case XFA_Element::Ui: + case XFA_Element::Para: bUpdateProperty = true; break; default: @@ -410,13 +410,13 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender, if (eAttr == XFA_ATTRIBUTE_Value) { pDocView->AddCalculateNodeNotify(pSender); - if (ePType == XFA_ELEMENT_Value || bIsContainerNode) { + if (ePType == XFA_Element::Value || bIsContainerNode) { if (bIsContainerNode) { pWidgetAcc->UpdateUIDisplay(); pDocView->AddCalculateWidgetAcc(pWidgetAcc); pDocView->AddValidateWidget(pWidgetAcc); } else if (pWidgetNode->GetNodeItem(XFA_NODEITEM_Parent)->GetClassID() == - XFA_ELEMENT_ExclGroup) { + XFA_Element::ExclGroup) { pWidgetAcc->UpdateUIDisplay(); } return; diff --git a/xfa/fxfa/app/xfa_ffpageview.cpp b/xfa/fxfa/app/xfa_ffpageview.cpp index aef7a30226..7123df82b9 100644 --- a/xfa/fxfa/app/xfa_ffpageview.cpp +++ b/xfa/fxfa/app/xfa_ffpageview.cpp @@ -76,7 +76,7 @@ bool PageWidgetFilter(CXFA_FFWidget* pWidget, CXFA_WidgetAcc* pWidgetAcc = pWidget->GetDataAcc(); if (!!(dwFilter & XFA_WidgetStatus_Focused) && - pWidgetAcc->GetClassID() != XFA_ELEMENT_Field) { + pWidgetAcc->GetClassID() != XFA_Element::Field) { return false; } @@ -276,9 +276,9 @@ FX_BOOL CXFA_FFTabOrderPageWidgetIterator::SetCurrentWidget( CXFA_FFWidget* CXFA_FFTabOrderPageWidgetIterator::GetTraverseWidget( CXFA_FFWidget* pWidget) { CXFA_WidgetAcc* pAcc = pWidget->GetDataAcc(); - CXFA_Node* pTraversal = pAcc->GetNode()->GetChild(0, XFA_ELEMENT_Traversal); + CXFA_Node* pTraversal = pAcc->GetNode()->GetChild(0, XFA_Element::Traversal); if (pTraversal) { - CXFA_Node* pTraverse = pTraversal->GetChild(0, XFA_ELEMENT_Traverse); + CXFA_Node* pTraverse = pTraversal->GetChild(0, XFA_Element::Traverse); if (pTraverse) { CFX_WideString wsTraverseWidgetName; if (pTraverse->GetAttribute(XFA_ATTRIBUTE_Ref, wsTraverseWidgetName)) { @@ -306,7 +306,7 @@ void CXFA_FFTabOrderPageWidgetIterator::CreateTabOrderWidgetArray() { if (m_TabOrderWidgetArray.Find(hWidget) < 0) { m_TabOrderWidgetArray.Add(hWidget); CXFA_WidgetAcc* pWidgetAcc = hWidget->GetDataAcc(); - if (pWidgetAcc->GetUIType() == XFA_ELEMENT_ExclGroup) { + if (pWidgetAcc->GetUIType() == XFA_Element::ExclGroup) { int32_t iWidgetIndex = SpaceOrderWidgetArray.Find(hWidget) + 1; while (TRUE) { CXFA_FFWidget* pRadio = diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp index fd2abe7aba..d29446a086 100644 --- a/xfa/fxfa/app/xfa_fftextedit.cpp +++ b/xfa/fxfa/app/xfa_fftextedit.cpp @@ -75,9 +75,9 @@ void CXFA_FFTextEdit::UpdateWidgetProperty() { dwExtendedStyle |= FWL_STYLEEXT_EDT_ReadOnly; dwExtendedStyle |= FWL_STYLEEXT_EDT_MultiLine; } - XFA_ELEMENT eType = XFA_ELEMENT_UNKNOWN; + XFA_Element eType = XFA_Element::Unknown; int32_t iMaxChars = m_pDataAcc->GetMaxChars(eType); - if (eType == XFA_ELEMENT_ExData) { + if (eType == XFA_Element::ExData) { iMaxChars = 0; } int32_t iNumCells = m_pDataAcc->GetNumberOfCells(); @@ -189,7 +189,7 @@ FX_BOOL CXFA_FFTextEdit::CommitData() { } void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText) { CXFA_WidgetAcc* pAcc = GetDataAcc(); - if (pAcc && pAcc->GetUIType() == XFA_ELEMENT_NumericEdit) { + if (pAcc && pAcc->GetUIType() == XFA_Element::NumericEdit) { IXFA_AppProvider* pAppProvider = GetApp()->GetAppProvider(); if (pAppProvider) { CFX_WideString wsTitle; @@ -253,11 +253,11 @@ FX_BOOL CXFA_FFTextEdit::UpdateFWLData() { eType = XFA_VALUEPICTURE_Edit; } FX_BOOL bUpdate = FALSE; - if (m_pDataAcc->GetUIType() == XFA_ELEMENT_TextEdit && + if (m_pDataAcc->GetUIType() == XFA_Element::TextEdit && m_pDataAcc->GetNumberOfCells() < 0) { - XFA_ELEMENT elementType = XFA_ELEMENT_UNKNOWN; + XFA_Element elementType = XFA_Element::Unknown; int32_t iMaxChars = m_pDataAcc->GetMaxChars(elementType); - if (elementType == XFA_ELEMENT_ExData) { + if (elementType == XFA_Element::ExData) { iMaxChars = eType == XFA_VALUEPICTURE_Edit ? iMaxChars : 0; } if (((CFWL_Edit*)m_pNormalWidget)->GetLimit() != iMaxChars) { @@ -265,7 +265,7 @@ FX_BOOL CXFA_FFTextEdit::UpdateFWLData() { bUpdate = TRUE; } } - if (m_pDataAcc->GetUIType() == XFA_ELEMENT_Barcode) { + if (m_pDataAcc->GetUIType() == XFA_Element::Barcode) { int32_t nDataLen = 0; if (eType == XFA_VALUEPICTURE_Edit) m_pDataAcc->GetBarcodeAttribute_DataLength(nDataLen); @@ -337,7 +337,7 @@ FX_BOOL CXFA_FFTextEdit::DeSelect() { FX_BOOL CXFA_FFTextEdit::GetSuggestWords( CFX_PointF pointf, std::vector<CFX_ByteString>& sSuggest) { - if (m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) { + if (m_pDataAcc->GetUIType() != XFA_Element::TextEdit) { return FALSE; } FWLToClient(pointf.x, pointf.y); @@ -346,7 +346,7 @@ FX_BOOL CXFA_FFTextEdit::GetSuggestWords( FX_BOOL CXFA_FFTextEdit::ReplaceSpellCheckWord( CFX_PointF pointf, const CFX_ByteStringC& bsReplace) { - if (m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) { + if (m_pDataAcc->GetUIType() != XFA_Element::TextEdit) { return FALSE; } FWLToClient(pointf.x, pointf.y); @@ -363,7 +363,7 @@ void CXFA_FFTextEdit::OnTextChanged(IFWL_Widget* pWidget, eParam.m_pTarget = m_pDataAcc; eParam.m_wsPrevText = wsPrevText; CFWL_Edit* pEdit = ((CFWL_Edit*)m_pNormalWidget); - if (m_pDataAcc->GetUIType() == XFA_ELEMENT_DateTimeEdit) { + if (m_pDataAcc->GetUIType() == XFA_Element::DateTimeEdit) { CFWL_DateTimePicker* pDateTime = (CFWL_DateTimePicker*)pEdit; pDateTime->GetEditText(eParam.m_wsNewText); int32_t iSels = pDateTime->CountSelRanges(); @@ -387,7 +387,7 @@ void CXFA_FFTextEdit::OnTextFull(IFWL_Widget* pWidget) { } FX_BOOL CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord) { - if (sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) { + if (sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_Element::TextEdit) { return TRUE; } return GetDoc()->GetDocProvider()->CheckWord(GetDoc(), sWord); @@ -395,7 +395,7 @@ FX_BOOL CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord) { FX_BOOL CXFA_FFTextEdit::GetSuggestWords( const CFX_ByteStringC& sWord, std::vector<CFX_ByteString>& sSuggest) { - if (m_pDataAcc->GetUIType() != XFA_ELEMENT_TextEdit) { + if (m_pDataAcc->GetUIType() != XFA_Element::TextEdit) { return FALSE; } return GetDoc()->GetDocProvider()->GetSuggestWords(GetDoc(), sWord, sSuggest); @@ -600,7 +600,7 @@ FX_BOOL CXFA_FFDateTimeEdit::LoadWidget() { pWidget->SetEditText(wsText); if (CXFA_Value value = m_pDataAcc->GetFormValue()) { switch (value.GetChildValueClassID()) { - case XFA_ELEMENT_Date: { + case XFA_Element::Date: { if (!wsText.IsEmpty()) { CXFA_LocaleValue lcValue = XFA_GetLocaleValue(m_pDataAcc); CFX_Unitime date = lcValue.GetDate(); diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 4ea2857e09..1611b81397 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -1179,15 +1179,15 @@ void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, FX_BOOL bUI) { rt.Deflate(fLeftInset, fTopInset, fRightInset, fBottomInset); } CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem) { - XFA_ELEMENT iType = pLayoutItem->GetFormNode()->GetClassID(); + XFA_Element iType = pLayoutItem->GetFormNode()->GetClassID(); if (XFA_IsCreateWidget(iType)) { return static_cast<CXFA_FFWidget*>(pLayoutItem); } return nullptr; } -FX_BOOL XFA_IsCreateWidget(XFA_ELEMENT iType) { - return iType == XFA_ELEMENT_Field || iType == XFA_ELEMENT_Draw || - iType == XFA_ELEMENT_Subform || iType == XFA_ELEMENT_ExclGroup; +FX_BOOL XFA_IsCreateWidget(XFA_Element iType) { + return iType == XFA_Element::Field || iType == XFA_Element::Draw || + iType == XFA_Element::Subform || iType == XFA_Element::ExclGroup; } static void XFA_BOX_GetPath_Arc(CXFA_Box box, CFX_RectF rtDraw, @@ -1646,20 +1646,20 @@ static void XFA_BOX_Fill(CXFA_Box box, XFA_BOX_GetFillPath(box, strokes, rtWidget, fillPath, (dwFlags & XFA_DRAWBOX_ForceRound) != 0); fillPath.Close(); - int32_t eType = fill.GetFillType(); + XFA_Element eType = fill.GetFillType(); switch (eType) { - case XFA_ELEMENT_Radial: + case XFA_Element::Radial: XFA_BOX_Fill_Radial(box, pGS, fillPath, rtWidget, pMatrix); break; - case XFA_ELEMENT_Pattern: + case XFA_Element::Pattern: XFA_BOX_Fill_Pattern(box, pGS, fillPath, rtWidget, pMatrix); break; - case XFA_ELEMENT_Linear: + case XFA_Element::Linear: XFA_BOX_Fill_Linear(box, pGS, fillPath, rtWidget, pMatrix); break; default: { FX_ARGB cr; - if (eType == XFA_ELEMENT_Stipple) { + if (eType == XFA_Element::Stipple) { int32_t iRate = fill.GetStipple(cr); if (iRate == 0) { iRate = 100; @@ -2030,16 +2030,16 @@ void XFA_DrawBox(CXFA_Box box, const CFX_RectF& rtWidget, CFX_Matrix* pMatrix, uint32_t dwFlags) { - if (!box || box.GetPresence() != XFA_ATTRIBUTEENUM_Visible) { + if (!box || box.GetPresence() != XFA_ATTRIBUTEENUM_Visible) return; - } - int32_t iType = box.GetClassID(); - if (iType != XFA_ELEMENT_Arc && iType != XFA_ELEMENT_Border && - iType != XFA_ELEMENT_Rectangle) { + + XFA_Element iType = box.GetClassID(); + if (iType != XFA_Element::Arc && iType != XFA_Element::Border && + iType != XFA_Element::Rectangle) { return; } CXFA_StrokeArray strokes; - if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_ELEMENT_Arc) { + if (!(dwFlags & XFA_DRAWBOX_ForceRound) && iType != XFA_Element::Arc) { box.GetStrokes(strokes); } XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp index 9bf07b4556..3d8d7e18dc 100644 --- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp +++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp @@ -199,9 +199,9 @@ FX_BOOL CXFA_WidgetAcc::ProcessValueChanged() { } void CXFA_WidgetAcc::ResetData() { CFX_WideString wsValue; - XFA_ELEMENT eUIType = (XFA_ELEMENT)GetUIType(); + XFA_Element eUIType = GetUIType(); switch (eUIType) { - case XFA_ELEMENT_ImageEdit: { + case XFA_Element::ImageEdit: { CXFA_Value imageValue = GetDefaultValue(); CXFA_Image image = imageValue.GetImage(); CFX_WideString wsContentType, wsHref; @@ -212,7 +212,7 @@ void CXFA_WidgetAcc::ResetData() { } SetImageEdit(wsContentType, wsHref, wsValue); } break; - case XFA_ELEMENT_ExclGroup: { + case XFA_Element::ExclGroup: { CXFA_Node* pNextChild = m_pNode->GetNodeItem( XFA_NODEITEM_FirstChild, XFA_ObjectType::ContainerNode); while (pNextChild) { @@ -228,13 +228,13 @@ void CXFA_WidgetAcc::ResetData() { SetValue(wsValue, XFA_VALUEPICTURE_Raw); pAcc->SetValue(wsValue, XFA_VALUEPICTURE_Raw); } else { - CXFA_Node* pItems = pChild->GetChild(0, XFA_ELEMENT_Items); + CXFA_Node* pItems = pChild->GetChild(0, XFA_Element::Items); if (!pItems) { continue; } CFX_WideString itemText; - if (pItems->CountChildren(XFA_ELEMENT_UNKNOWN) > 1) { - itemText = pItems->GetChild(1, XFA_ELEMENT_UNKNOWN)->GetContent(); + if (pItems->CountChildren(XFA_Element::Unknown) > 1) { + itemText = pItems->GetChild(1, XFA_Element::Unknown)->GetContent(); } pAcc->SetValue(itemText, XFA_VALUEPICTURE_Raw); } @@ -242,7 +242,7 @@ void CXFA_WidgetAcc::ResetData() { XFA_ObjectType::ContainerNode); } } break; - case XFA_ELEMENT_ChoiceList: + case XFA_Element::ChoiceList: ClearAllSelections(); default: if (CXFA_Value defValue = GetDefaultValue()) { @@ -281,7 +281,7 @@ void CXFA_WidgetAcc::SetImageEdit(const CFX_WideString& wsContentType, CXFA_WidgetAcc* CXFA_WidgetAcc::GetExclGroup() { CXFA_Node* pExcl = m_pNode->GetNodeItem(XFA_NODEITEM_Parent); - if (!pExcl || pExcl->GetClassID() != XFA_ELEMENT_ExclGroup) { + if (!pExcl || pExcl->GetClassID() != XFA_Element::ExclGroup) { return NULL; } return static_cast<CXFA_WidgetAcc*>(pExcl->GetWidgetData()); @@ -300,7 +300,7 @@ IXFA_AppProvider* CXFA_WidgetAcc::GetAppProvider() { } int32_t CXFA_WidgetAcc::ProcessEvent(int32_t iActivity, CXFA_EventParam* pEventParam) { - if (GetClassID() == XFA_ELEMENT_Draw) { + if (GetClassID() == XFA_Element::Draw) { return XFA_EVENTERROR_NotExist; } int32_t iRet = XFA_EVENTERROR_NotExist; @@ -320,19 +320,19 @@ int32_t CXFA_WidgetAcc::ProcessEvent(int32_t iActivity, } int32_t CXFA_WidgetAcc::ProcessEvent(CXFA_Event& event, CXFA_EventParam* pEventParam) { - if (!event) { + if (!event) return XFA_EVENTERROR_NotExist; - } + switch (event.GetEventType()) { - case XFA_ELEMENT_Execute: + case XFA_Element::Execute: break; - case XFA_ELEMENT_Script: { + case XFA_Element::Script: { CXFA_Script script = event.GetScript(); return ExecuteScript(script, pEventParam); } break; - case XFA_ELEMENT_SignData: + case XFA_Element::SignData: break; - case XFA_ELEMENT_Submit: { + case XFA_Element::Submit: { CXFA_Submit submit = event.GetSubmit(); return GetDoc()->GetDocProvider()->SubmitData(GetDoc(), submit); } @@ -343,7 +343,7 @@ int32_t CXFA_WidgetAcc::ProcessEvent(CXFA_Event& event, } int32_t CXFA_WidgetAcc::ProcessCalculate() { - if (GetClassID() == XFA_ELEMENT_Draw) + if (GetClassID() == XFA_Element::Draw) return XFA_EVENTERROR_NotExist; CXFA_Calculate calc = GetCalculate(); @@ -569,7 +569,7 @@ void CXFA_WidgetAcc::GetValidateMessage(IXFA_AppProvider* pAppProvider, wsCaptionName.c_str()); } int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags) { - if (GetClassID() == XFA_ELEMENT_Draw) { + if (GetClassID() == XFA_Element::Draw) { return XFA_EVENTERROR_NotExist; } CXFA_Validate validate = GetValidate(); @@ -711,7 +711,7 @@ void CXFA_WidgetAcc::UpdateUIDisplay(CXFA_FFWidget* pExcept) { CXFA_FFWidget* pWidget = NULL; while ((pWidget = GetNextWidget(pWidget)) != nullptr) { if (pWidget == pExcept || !pWidget->IsLoaded() || - (GetUIType() != XFA_ELEMENT_CheckButton && pWidget->IsFocused())) { + (GetUIType() != XFA_Element::CheckButton && pWidget->IsFocused())) { continue; } pWidget->UpdateFWLData(); @@ -725,7 +725,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) { return; } LoadCaption(); - XFA_ELEMENT eUIType = (XFA_ELEMENT)GetUIType(); + XFA_Element eUIType = GetUIType(); int32_t iCapPlacement = caption.GetPlacementType(); FX_FLOAT fCapReserve = caption.GetReserve(); const bool bVert = iCapPlacement == XFA_ATTRIBUTEENUM_Top || @@ -735,7 +735,7 @@ void CXFA_WidgetAcc::CalcCaptionSize(CFX_SizeF& szCap) { static_cast<CXFA_FieldLayoutData*>(m_pLayoutData.get()) ->m_pCapTextLayout.get(); if (pCapTextLayout) { - if (!bVert && eUIType != XFA_ELEMENT_Button) { + if (!bVert && eUIType != XFA_Element::Button) { szCap.x = fCapReserve; } CFX_SizeF minSize; @@ -863,7 +863,7 @@ void CXFA_WidgetAcc::CalculateTextContentSize(CFX_SizeF& size) { pTextOut->SetLineBreakTolerance(fFontSize * 0.2f); pTextOut->SetLineSpace(GetLineHeight()); uint32_t dwStyles = FDE_TTOSTYLE_LastLineHeight; - if (GetUIType() == XFA_ELEMENT_TextEdit && IsMultiLine()) { + if (GetUIType() == XFA_Element::TextEdit && IsMultiLine()) { dwStyles |= FDE_TTOSTYLE_LineWrap; } pTextOut->SetStyles(dwStyles); @@ -1087,8 +1087,8 @@ FX_FLOAT CXFA_WidgetAcc::GetHeightWithoutMargin(FX_FLOAT fHeightCalc) { void CXFA_WidgetAcc::StartWidgetLayout(FX_FLOAT& fCalcWidth, FX_FLOAT& fCalcHeight) { InitLayoutData(); - XFA_ELEMENT eUIType = GetUIType(); - if (eUIType == XFA_ELEMENT_Text) { + XFA_Element eUIType = GetUIType(); + if (eUIType == XFA_Element::Text) { m_pLayoutData->m_fWidgetHeight = -1; GetHeight(m_pLayoutData->m_fWidgetHeight); StartTextLayout(fCalcWidth, fCalcHeight); @@ -1114,39 +1114,39 @@ void CXFA_WidgetAcc::StartWidgetLayout(FX_FLOAT& fCalcWidth, } m_pLayoutData->m_fWidgetHeight = fCalcHeight; } -void CXFA_WidgetAcc::CalculateAccWidthAndHeight(XFA_ELEMENT eUIType, +void CXFA_WidgetAcc::CalculateAccWidthAndHeight(XFA_Element eUIType, FX_FLOAT& fWidth, FX_FLOAT& fCalcHeight) { CFX_SizeF sz(fWidth, m_pLayoutData->m_fWidgetHeight); switch (eUIType) { - case XFA_ELEMENT_Barcode: - case XFA_ELEMENT_ChoiceList: - case XFA_ELEMENT_Signature: + case XFA_Element::Barcode: + case XFA_Element::ChoiceList: + case XFA_Element::Signature: CalculateFieldAutoSize(sz); break; - case XFA_ELEMENT_ImageEdit: + case XFA_Element::ImageEdit: CalculateImageEditAutoSize(sz); break; - case XFA_ELEMENT_Button: + case XFA_Element::Button: CalculatePushButtonAutoSize(sz); break; - case XFA_ELEMENT_CheckButton: + case XFA_Element::CheckButton: CalculateCheckButtonAutoSize(sz); break; - case XFA_ELEMENT_DateTimeEdit: - case XFA_ELEMENT_NumericEdit: - case XFA_ELEMENT_PasswordEdit: - case XFA_ELEMENT_TextEdit: + case XFA_Element::DateTimeEdit: + case XFA_Element::NumericEdit: + case XFA_Element::PasswordEdit: + case XFA_Element::TextEdit: CalculateTextEditAutoSize(sz); break; - case XFA_ELEMENT_Image: + case XFA_Element::Image: CalculateImageAutoSize(sz); break; - case XFA_ELEMENT_Arc: - case XFA_ELEMENT_Line: - case XFA_ELEMENT_Rectangle: - case XFA_ELEMENT_Subform: - case XFA_ELEMENT_ExclGroup: + case XFA_Element::Arc: + case XFA_Element::Line: + case XFA_Element::Rectangle: + case XFA_Element::Subform: + case XFA_Element::ExclGroup: CalculateWidgetAutoSize(sz); break; default: @@ -1158,13 +1158,13 @@ void CXFA_WidgetAcc::CalculateAccWidthAndHeight(XFA_ELEMENT eUIType, } FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, FX_FLOAT& fCalcHeight) { - XFA_ELEMENT eUIType = (XFA_ELEMENT)GetUIType(); - if (eUIType == XFA_ELEMENT_Subform) { + XFA_Element eUIType = GetUIType(); + if (eUIType == XFA_Element::Subform) { return FALSE; } - if (eUIType != XFA_ELEMENT_Text && eUIType != XFA_ELEMENT_TextEdit && - eUIType != XFA_ELEMENT_NumericEdit && - eUIType != XFA_ELEMENT_PasswordEdit) { + if (eUIType != XFA_Element::Text && eUIType != XFA_Element::TextEdit && + eUIType != XFA_Element::NumericEdit && + eUIType != XFA_Element::PasswordEdit) { fCalcHeight = 0; return TRUE; } @@ -1181,7 +1181,7 @@ FX_BOOL CXFA_WidgetAcc::FindSplitPos(int32_t iBlockIndex, fTopInset += rtUIMargin.top; fBottomInset += rtUIMargin.width; } - if (eUIType == XFA_ELEMENT_Text) { + if (eUIType == XFA_Element::Text) { FX_FLOAT fHeight = fCalcHeight; if (iBlockIndex == 0) { fCalcHeight = fCalcHeight - fTopInset; @@ -1392,22 +1392,22 @@ void CXFA_WidgetAcc::InitLayoutData() { return; } switch (GetUIType()) { - case XFA_ELEMENT_Text: + case XFA_Element::Text: m_pLayoutData.reset(new CXFA_TextLayoutData); return; - case XFA_ELEMENT_TextEdit: + case XFA_Element::TextEdit: m_pLayoutData.reset(new CXFA_TextEditData); return; - case XFA_ELEMENT_Image: + case XFA_Element::Image: m_pLayoutData.reset(new CXFA_ImageLayoutData); return; - case XFA_ELEMENT_ImageEdit: + case XFA_Element::ImageEdit: m_pLayoutData.reset(new CXFA_ImageEditData); return; default: break; } - if (GetClassID() == XFA_ELEMENT_Field) { + if (GetClassID() == XFA_Element::Field) { m_pLayoutData.reset(new CXFA_FieldLayoutData); return; } @@ -1556,7 +1556,7 @@ FX_ARGB CXFA_WidgetAcc::GetTextColor() { CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) { bRichText = FALSE; if (m_pTextNode) { - if (m_pTextNode->GetClassID() == XFA_ELEMENT_ExData) { + if (m_pTextNode->GetClassID() == XFA_Element::ExData) { CFX_WideString wsContentType; m_pTextNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); @@ -1568,12 +1568,12 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) { } if (m_eType == XFA_TEXTPROVIDERTYPE_Text) { CXFA_Node* pElementNode = m_pWidgetAcc->GetNode(); - CXFA_Node* pValueNode = pElementNode->GetChild(0, XFA_ELEMENT_Value); + CXFA_Node* pValueNode = pElementNode->GetChild(0, XFA_Element::Value); if (!pValueNode) { return NULL; } CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild); - if (pChildNode && pChildNode->GetClassID() == XFA_ELEMENT_ExData) { + if (pChildNode && pChildNode->GetClassID() == XFA_Element::ExData) { CFX_WideString wsContentType; pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); if (wsContentType == FX_WSTRC(L"text/html")) { @@ -1599,16 +1599,16 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) { return pBind; } else if (m_eType == XFA_TEXTPROVIDERTYPE_Caption) { CXFA_Node* pCaptionNode = - m_pWidgetAcc->GetNode()->GetChild(0, XFA_ELEMENT_Caption); + m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Caption); if (pCaptionNode == NULL) { return NULL; } - CXFA_Node* pValueNode = pCaptionNode->GetChild(0, XFA_ELEMENT_Value); + CXFA_Node* pValueNode = pCaptionNode->GetChild(0, XFA_Element::Value); if (pValueNode == NULL) { return NULL; } CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild); - if (pChildNode && pChildNode->GetClassID() == XFA_ELEMENT_ExData) { + if (pChildNode && pChildNode->GetClassID() == XFA_Element::ExData) { CFX_WideString wsContentType; pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); if (wsContentType == FX_WSTRC(L"text/html")) { @@ -1618,7 +1618,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) { return pChildNode; } CXFA_Node* pItemNode = - m_pWidgetAcc->GetNode()->GetChild(0, XFA_ELEMENT_Items); + m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Items); if (pItemNode == NULL) { return NULL; } @@ -1641,23 +1641,23 @@ CXFA_Para CXFA_TextProvider::GetParaNode() { if (m_eType == XFA_TEXTPROVIDERTYPE_Text) { return m_pWidgetAcc->GetPara(); } - CXFA_Node* pNode = m_pWidgetAcc->GetNode()->GetChild(0, XFA_ELEMENT_Caption); - return CXFA_Para(pNode->GetChild(0, XFA_ELEMENT_Para)); + CXFA_Node* pNode = m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Caption); + return CXFA_Para(pNode->GetChild(0, XFA_Element::Para)); } CXFA_Font CXFA_TextProvider::GetFontNode() { if (m_eType == XFA_TEXTPROVIDERTYPE_Text) { return m_pWidgetAcc->GetFont(); } - CXFA_Node* pNode = m_pWidgetAcc->GetNode()->GetChild(0, XFA_ELEMENT_Caption); - pNode = pNode->GetChild(0, XFA_ELEMENT_Font); + CXFA_Node* pNode = m_pWidgetAcc->GetNode()->GetChild(0, XFA_Element::Caption); + pNode = pNode->GetChild(0, XFA_Element::Font); if (pNode) { return CXFA_Font(pNode); } return m_pWidgetAcc->GetFont(); } FX_BOOL CXFA_TextProvider::IsCheckButtonAndAutoWidth() { - XFA_ELEMENT eType = m_pWidgetAcc->GetUIType(); - if (eType == XFA_ELEMENT_CheckButton) { + XFA_Element eType = m_pWidgetAcc->GetUIType(); + if (eType == XFA_Element::CheckButton) { FX_FLOAT fWidth = 0; return !m_pWidgetAcc->GetWidth(fWidth); } diff --git a/xfa/fxfa/app/xfa_ffwidgethandler.cpp b/xfa/fxfa/app/xfa_ffwidgethandler.cpp index eeaadc73b2..6ad03d1b73 100644 --- a/xfa/fxfa/app/xfa_ffwidgethandler.cpp +++ b/xfa/fxfa/app/xfa_ffwidgethandler.cpp @@ -187,7 +187,7 @@ FX_BOOL CXFA_FFWidgetHandler::HasEvent(CXFA_WidgetAcc* pWidgetAcc, XFA_EVENTTYPE eEventType) { if (!pWidgetAcc || eEventType == XFA_EVENT_Unknown) return FALSE; - if (pWidgetAcc->GetClassID() == XFA_ELEMENT_Draw) + if (pWidgetAcc->GetClassID() == XFA_Element::Draw) return FALSE; switch (eEventType) { @@ -219,7 +219,7 @@ int32_t CXFA_FFWidgetHandler::ProcessEvent(CXFA_WidgetAcc* pWidgetAcc, CXFA_EventParam* pParam) { if (!pParam || pParam->m_eType == XFA_EVENT_Unknown) return XFA_EVENTERROR_NotExist; - if (!pWidgetAcc || pWidgetAcc->GetClassID() == XFA_ELEMENT_Draw) + if (!pWidgetAcc || pWidgetAcc->GetClassID() == XFA_Element::Draw) return XFA_EVENTERROR_NotExist; switch (pParam->m_eType) { @@ -321,28 +321,28 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateWidgetFormItem( CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent, CXFA_Node* pBefore) const { - CXFA_Node* pField = CreateField(XFA_ELEMENT_Button, pParent, pBefore); - CXFA_Node* pCaption = CreateCopyNode(XFA_ELEMENT_Caption, pField); - CXFA_Node* pValue = CreateCopyNode(XFA_ELEMENT_Value, pCaption); - CXFA_Node* pText = CreateCopyNode(XFA_ELEMENT_Text, pValue); + CXFA_Node* pField = CreateField(XFA_Element::Button, pParent, pBefore); + CXFA_Node* pCaption = CreateCopyNode(XFA_Element::Caption, pField); + CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pCaption); + CXFA_Node* pText = CreateCopyNode(XFA_Element::Text, pValue); pText->SetContent(L"Button", L"Button", FALSE); - CXFA_Node* pPara = CreateCopyNode(XFA_ELEMENT_Para, pCaption); + CXFA_Node* pPara = CreateCopyNode(XFA_Element::Para, pCaption); pPara->SetEnum(XFA_ATTRIBUTE_VAlign, XFA_ATTRIBUTEENUM_Middle, FALSE); pPara->SetEnum(XFA_ATTRIBUTE_HAlign, XFA_ATTRIBUTEENUM_Center, FALSE); CreateFontNode(pCaption); - CXFA_Node* pBorder = CreateCopyNode(XFA_ELEMENT_Border, pField); + CXFA_Node* pBorder = CreateCopyNode(XFA_Element::Border, pField); pBorder->SetEnum(XFA_ATTRIBUTE_Hand, XFA_ATTRIBUTEENUM_Right, FALSE); - CXFA_Node* pEdge = CreateCopyNode(XFA_ELEMENT_Edge, pBorder); + CXFA_Node* pEdge = CreateCopyNode(XFA_Element::Edge, pBorder); pEdge->SetEnum(XFA_ATTRIBUTE_Stroke, XFA_ATTRIBUTEENUM_Raised, FALSE); - CXFA_Node* pFill = CreateCopyNode(XFA_ELEMENT_Fill, pBorder); - CXFA_Node* pColor = CreateCopyNode(XFA_ELEMENT_Color, pFill); + CXFA_Node* pFill = CreateCopyNode(XFA_Element::Fill, pBorder); + CXFA_Node* pColor = CreateCopyNode(XFA_Element::Color, pFill); pColor->SetCData(XFA_ATTRIBUTE_Value, L"212, 208, 200", FALSE); - CXFA_Node* pBind = CreateCopyNode(XFA_ELEMENT_Bind, pField); + CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField); pBind->SetEnum(XFA_ATTRIBUTE_Match, XFA_ATTRIBUTEENUM_None); return pField; @@ -350,55 +350,55 @@ CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent, CXFA_Node* CXFA_FFWidgetHandler::CreateCheckButton(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateField(XFA_ELEMENT_CheckButton, pParent, pBefore); + return CreateField(XFA_Element::CheckButton, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreateExclGroup(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateFormItem(XFA_ELEMENT_ExclGroup, pParent, pBefore); + return CreateFormItem(XFA_Element::ExclGroup, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreateRadioButton(CXFA_Node* pParent, CXFA_Node* pBefore) const { - CXFA_Node* pField = CreateField(XFA_ELEMENT_CheckButton, pParent, pBefore); - CXFA_Node* pUi = pField->GetFirstChildByClass(XFA_ELEMENT_Ui); - CXFA_Node* pWidget = pUi->GetFirstChildByClass(XFA_ELEMENT_CheckButton); + CXFA_Node* pField = CreateField(XFA_Element::CheckButton, pParent, pBefore); + CXFA_Node* pUi = pField->GetFirstChildByClass(XFA_Element::Ui); + CXFA_Node* pWidget = pUi->GetFirstChildByClass(XFA_Element::CheckButton); pWidget->SetEnum(XFA_ATTRIBUTE_Shape, XFA_ATTRIBUTEENUM_Round); return pField; } CXFA_Node* CXFA_FFWidgetHandler::CreateDatetimeEdit(CXFA_Node* pParent, CXFA_Node* pBefore) const { - CXFA_Node* pField = CreateField(XFA_ELEMENT_DateTimeEdit, pParent, pBefore); - CreateValueNode(XFA_ELEMENT_Date, pField); + CXFA_Node* pField = CreateField(XFA_Element::DateTimeEdit, pParent, pBefore); + CreateValueNode(XFA_Element::Date, pField); return pField; } CXFA_Node* CXFA_FFWidgetHandler::CreateDecimalField(CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pField = CreateNumericField(pParent, pBefore); - CreateValueNode(XFA_ELEMENT_Decimal, pField); + CreateValueNode(XFA_Element::Decimal, pField); return pField; } CXFA_Node* CXFA_FFWidgetHandler::CreateNumericField(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateField(XFA_ELEMENT_NumericEdit, pParent, pBefore); + return CreateField(XFA_Element::NumericEdit, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreateSignature(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateField(XFA_ELEMENT_Signature, pParent, pBefore); + return CreateField(XFA_Element::Signature, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreateTextEdit(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateField(XFA_ELEMENT_TextEdit, pParent, pBefore); + return CreateField(XFA_Element::TextEdit, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreateDropdownList(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateField(XFA_ELEMENT_ChoiceList, pParent, pBefore); + return CreateField(XFA_Element::ChoiceList, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreateListBox(CXFA_Node* pParent, @@ -413,70 +413,72 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateListBox(CXFA_Node* pParent, CXFA_Node* CXFA_FFWidgetHandler::CreateImageField(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateField(XFA_ELEMENT_ImageEdit, pParent, pBefore); + return CreateField(XFA_Element::ImageEdit, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreatePasswordEdit(CXFA_Node* pParent, CXFA_Node* pBefore) const { - CXFA_Node* pField = CreateField(XFA_ELEMENT_PasswordEdit, pParent, pBefore); - CXFA_Node* pBind = CreateCopyNode(XFA_ELEMENT_Bind, pField); + CXFA_Node* pField = CreateField(XFA_Element::PasswordEdit, pParent, pBefore); + CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField); pBind->SetEnum(XFA_ATTRIBUTE_Match, XFA_ATTRIBUTEENUM_None, FALSE); return pField; } -CXFA_Node* CXFA_FFWidgetHandler::CreateField(XFA_ELEMENT eElement, +CXFA_Node* CXFA_FFWidgetHandler::CreateField(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const { - CXFA_Node* pField = CreateFormItem(XFA_ELEMENT_Field, pParent, pBefore); - CreateCopyNode(eElement, CreateCopyNode(XFA_ELEMENT_Ui, pField)); + CXFA_Node* pField = CreateFormItem(XFA_Element::Field, pParent, pBefore); + CreateCopyNode(eElement, CreateCopyNode(XFA_Element::Ui, pField)); CreateFontNode(pField); return pField; } CXFA_Node* CXFA_FFWidgetHandler::CreateArc(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateDraw(XFA_ELEMENT_Arc, pParent, pBefore); + return CreateDraw(XFA_Element::Arc, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreateRectangle(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateDraw(XFA_ELEMENT_Rectangle, pParent, pBefore); + return CreateDraw(XFA_Element::Rectangle, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreateImage(CXFA_Node* pParent, CXFA_Node* pBefore) const { - CXFA_Node* pField = CreateDraw(XFA_ELEMENT_Image, pParent, pBefore); - CreateCopyNode(XFA_ELEMENT_ImageEdit, CreateCopyNode(XFA_ELEMENT_Ui, pField)); + CXFA_Node* pField = CreateDraw(XFA_Element::Image, pParent, pBefore); + CreateCopyNode(XFA_Element::ImageEdit, + CreateCopyNode(XFA_Element::Ui, pField)); return pField; } CXFA_Node* CXFA_FFWidgetHandler::CreateLine(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateDraw(XFA_ELEMENT_Line, pParent, pBefore); + return CreateDraw(XFA_Element::Line, pParent, pBefore); } CXFA_Node* CXFA_FFWidgetHandler::CreateText(CXFA_Node* pParent, CXFA_Node* pBefore) const { - CXFA_Node* pField = CreateDraw(XFA_ELEMENT_Text, pParent, pBefore); - CreateCopyNode(XFA_ELEMENT_TextEdit, CreateCopyNode(XFA_ELEMENT_Ui, pField)); + CXFA_Node* pField = CreateDraw(XFA_Element::Text, pParent, pBefore); + CreateCopyNode(XFA_Element::TextEdit, + CreateCopyNode(XFA_Element::Ui, pField)); CreateFontNode(pField); return pField; } -CXFA_Node* CXFA_FFWidgetHandler::CreateDraw(XFA_ELEMENT eElement, +CXFA_Node* CXFA_FFWidgetHandler::CreateDraw(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const { - CXFA_Node* pDraw = CreateFormItem(XFA_ELEMENT_Draw, pParent, pBefore); + CXFA_Node* pDraw = CreateFormItem(XFA_Element::Draw, pParent, pBefore); CreateValueNode(eElement, pDraw); return pDraw; } CXFA_Node* CXFA_FFWidgetHandler::CreateSubform(CXFA_Node* pParent, CXFA_Node* pBefore) const { - return CreateFormItem(XFA_ELEMENT_Subform, pParent, pBefore); + return CreateFormItem(XFA_Element::Subform, pParent, pBefore); } -CXFA_Node* CXFA_FFWidgetHandler::CreateFormItem(XFA_ELEMENT eElement, +CXFA_Node* CXFA_FFWidgetHandler::CreateFormItem(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pTemplateParent = pParent ? pParent->GetTemplateNode() : NULL; @@ -486,7 +488,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateFormItem(XFA_ELEMENT eElement, return pNewFormItem; } -CXFA_Node* CXFA_FFWidgetHandler::CreateCopyNode(XFA_ELEMENT eElement, +CXFA_Node* CXFA_FFWidgetHandler::CreateCopyNode(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Node* pTemplateParent = pParent ? pParent->GetTemplateNode() : NULL; @@ -499,7 +501,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateCopyNode(XFA_ELEMENT eElement, return pNewNode; } -CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_ELEMENT eElement, +CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const { CXFA_Document* pXFADoc = GetXFADoc(); @@ -511,7 +513,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateTemplateNode(XFA_ELEMENT eElement, } CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const { - CXFA_Node* pFont = CreateCopyNode(XFA_ELEMENT_Font, pParent); + CXFA_Node* pFont = CreateCopyNode(XFA_Element::Font, pParent); pFont->SetCData(XFA_ATTRIBUTE_Typeface, L"Myriad Pro", FALSE); return pFont; } @@ -519,7 +521,7 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const { CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent, uint32_t dwFlags, FX_FLOAT fInsets[4]) const { - CXFA_Node* pMargin = CreateCopyNode(XFA_ELEMENT_Margin, pParent); + CXFA_Node* pMargin = CreateCopyNode(XFA_Element::Margin, pParent); if (dwFlags & 0x01) pMargin->SetMeasure(XFA_ATTRIBUTE_LeftInset, CXFA_Measurement(fInsets[0], XFA_UNIT_Pt), FALSE); @@ -535,9 +537,9 @@ CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent, return pMargin; } -CXFA_Node* CXFA_FFWidgetHandler::CreateValueNode(XFA_ELEMENT eValue, +CXFA_Node* CXFA_FFWidgetHandler::CreateValueNode(XFA_Element eValue, CXFA_Node* pParent) const { - CXFA_Node* pValue = CreateCopyNode(XFA_ELEMENT_Value, pParent); + CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pParent); CreateCopyNode(eValue, pValue); return pValue; } diff --git a/xfa/fxfa/include/fxfa_basic.h b/xfa/fxfa/include/fxfa_basic.h index 215b2e657a..51d81cd157 100644 --- a/xfa/fxfa/include/fxfa_basic.h +++ b/xfa/fxfa/include/fxfa_basic.h @@ -613,331 +613,333 @@ enum XFA_ATTRIBUTE { XFA_ATTRIBUTE_XdpContent, XFA_ATTRIBUTE_DecipherOnly, }; -enum XFA_ELEMENT { - XFA_ELEMENT_Ps, - XFA_ELEMENT_To, - XFA_ELEMENT_Ui, - XFA_ELEMENT_RecordSet, - XFA_ELEMENT_SubsetBelow, - XFA_ELEMENT_SubformSet, - XFA_ELEMENT_AdobeExtensionLevel, - XFA_ELEMENT_Typeface, - XFA_ELEMENT_Break, - XFA_ELEMENT_FontInfo, - XFA_ELEMENT_NumberPattern, - XFA_ELEMENT_DynamicRender, - XFA_ELEMENT_PrintScaling, - XFA_ELEMENT_CheckButton, - XFA_ELEMENT_DatePatterns, - XFA_ELEMENT_SourceSet, - XFA_ELEMENT_Amd, - XFA_ELEMENT_Arc, - XFA_ELEMENT_Day, - XFA_ELEMENT_Era, - XFA_ELEMENT_Jog, - XFA_ELEMENT_Log, - XFA_ELEMENT_Map, - XFA_ELEMENT_Mdp, - XFA_ELEMENT_BreakBefore, - XFA_ELEMENT_Oid, - XFA_ELEMENT_Pcl, - XFA_ELEMENT_Pdf, - XFA_ELEMENT_Ref, - XFA_ELEMENT_Uri, - XFA_ELEMENT_Xdc, - XFA_ELEMENT_Xdp, - XFA_ELEMENT_Xfa, - XFA_ELEMENT_Xsl, - XFA_ELEMENT_Zpl, - XFA_ELEMENT_Cache, - XFA_ELEMENT_Margin, - XFA_ELEMENT_KeyUsage, - XFA_ELEMENT_Exclude, - XFA_ELEMENT_ChoiceList, - XFA_ELEMENT_Level, - XFA_ELEMENT_LabelPrinter, - XFA_ELEMENT_CalendarSymbols, - XFA_ELEMENT_Para, - XFA_ELEMENT_Part, - XFA_ELEMENT_Pdfa, - XFA_ELEMENT_Filter, - XFA_ELEMENT_Present, - XFA_ELEMENT_Pagination, - XFA_ELEMENT_Encoding, - XFA_ELEMENT_Event, - XFA_ELEMENT_Whitespace, - XFA_ELEMENT_DefaultUi, - XFA_ELEMENT_DataModel, - XFA_ELEMENT_Barcode, - XFA_ELEMENT_TimePattern, - XFA_ELEMENT_BatchOutput, - XFA_ELEMENT_Enforce, - XFA_ELEMENT_CurrencySymbols, - XFA_ELEMENT_AddSilentPrint, - XFA_ELEMENT_Rename, - XFA_ELEMENT_Operation, - XFA_ELEMENT_Typefaces, - XFA_ELEMENT_SubjectDNs, - XFA_ELEMENT_Issuers, - XFA_ELEMENT_SignaturePseudoModel, - XFA_ELEMENT_WsdlConnection, - XFA_ELEMENT_Debug, - XFA_ELEMENT_Delta, - XFA_ELEMENT_EraNames, - XFA_ELEMENT_ModifyAnnots, - XFA_ELEMENT_StartNode, - XFA_ELEMENT_Button, - XFA_ELEMENT_Format, - XFA_ELEMENT_Border, - XFA_ELEMENT_Area, - XFA_ELEMENT_Hyphenation, - XFA_ELEMENT_Text, - XFA_ELEMENT_Time, - XFA_ELEMENT_Type, - XFA_ELEMENT_Overprint, - XFA_ELEMENT_Certificates, - XFA_ELEMENT_EncryptionMethods, - XFA_ELEMENT_SetProperty, - XFA_ELEMENT_PrinterName, - XFA_ELEMENT_StartPage, - XFA_ELEMENT_PageOffset, - XFA_ELEMENT_DateTime, - XFA_ELEMENT_Comb, - XFA_ELEMENT_Pattern, - XFA_ELEMENT_IfEmpty, - XFA_ELEMENT_SuppressBanner, - XFA_ELEMENT_OutputBin, - XFA_ELEMENT_Field, - XFA_ELEMENT_Agent, - XFA_ELEMENT_OutputXSL, - XFA_ELEMENT_AdjustData, - XFA_ELEMENT_AutoSave, - XFA_ELEMENT_ContentArea, - XFA_ELEMENT_EventPseudoModel, - XFA_ELEMENT_WsdlAddress, - XFA_ELEMENT_Solid, - XFA_ELEMENT_DateTimeSymbols, - XFA_ELEMENT_EncryptionLevel, - XFA_ELEMENT_Edge, - XFA_ELEMENT_Stipple, - XFA_ELEMENT_Attributes, - XFA_ELEMENT_VersionControl, - XFA_ELEMENT_Meridiem, - XFA_ELEMENT_ExclGroup, - XFA_ELEMENT_ToolTip, - XFA_ELEMENT_Compress, - XFA_ELEMENT_Reason, - XFA_ELEMENT_Execute, - XFA_ELEMENT_ContentCopy, - XFA_ELEMENT_DateTimeEdit, - XFA_ELEMENT_Config, - XFA_ELEMENT_Image, - XFA_ELEMENT_SharpxHTML, - XFA_ELEMENT_NumberOfCopies, - XFA_ELEMENT_BehaviorOverride, - XFA_ELEMENT_TimeStamp, - XFA_ELEMENT_Month, - XFA_ELEMENT_ViewerPreferences, - XFA_ELEMENT_ScriptModel, - XFA_ELEMENT_Decimal, - XFA_ELEMENT_Subform, - XFA_ELEMENT_Select, - XFA_ELEMENT_Window, - XFA_ELEMENT_LocaleSet, - XFA_ELEMENT_Handler, - XFA_ELEMENT_HostPseudoModel, - XFA_ELEMENT_Presence, - XFA_ELEMENT_Record, - XFA_ELEMENT_Embed, - XFA_ELEMENT_Version, - XFA_ELEMENT_Command, - XFA_ELEMENT_Copies, - XFA_ELEMENT_Staple, - XFA_ELEMENT_SubmitFormat, - XFA_ELEMENT_Boolean, - XFA_ELEMENT_Message, - XFA_ELEMENT_Output, - XFA_ELEMENT_PsMap, - XFA_ELEMENT_ExcludeNS, - XFA_ELEMENT_Assist, - XFA_ELEMENT_Picture, - XFA_ELEMENT_Traversal, - XFA_ELEMENT_SilentPrint, - XFA_ELEMENT_WebClient, - XFA_ELEMENT_LayoutPseudoModel, - XFA_ELEMENT_Producer, - XFA_ELEMENT_Corner, - XFA_ELEMENT_MsgId, - XFA_ELEMENT_Color, - XFA_ELEMENT_Keep, - XFA_ELEMENT_Query, - XFA_ELEMENT_Insert, - XFA_ELEMENT_ImageEdit, - XFA_ELEMENT_Validate, - XFA_ELEMENT_DigestMethods, - XFA_ELEMENT_NumberPatterns, - XFA_ELEMENT_PageSet, - XFA_ELEMENT_Integer, - XFA_ELEMENT_SoapAddress, - XFA_ELEMENT_Equate, - XFA_ELEMENT_FormFieldFilling, - XFA_ELEMENT_PageRange, - XFA_ELEMENT_Update, - XFA_ELEMENT_ConnectString, - XFA_ELEMENT_Mode, - XFA_ELEMENT_Layout, - XFA_ELEMENT_Sharpxml, - XFA_ELEMENT_XsdConnection, - XFA_ELEMENT_Traverse, - XFA_ELEMENT_Encodings, - XFA_ELEMENT_Template, - XFA_ELEMENT_Acrobat, - XFA_ELEMENT_ValidationMessaging, - XFA_ELEMENT_Signing, - XFA_ELEMENT_DataWindow, - XFA_ELEMENT_Script, - XFA_ELEMENT_AddViewerPreferences, - XFA_ELEMENT_AlwaysEmbed, - XFA_ELEMENT_PasswordEdit, - XFA_ELEMENT_NumericEdit, - XFA_ELEMENT_EncryptionMethod, - XFA_ELEMENT_Change, - XFA_ELEMENT_PageArea, - XFA_ELEMENT_SubmitUrl, - XFA_ELEMENT_Oids, - XFA_ELEMENT_Signature, - XFA_ELEMENT_ADBE_JSConsole, - XFA_ELEMENT_Caption, - XFA_ELEMENT_Relevant, - XFA_ELEMENT_FlipLabel, - XFA_ELEMENT_ExData, - XFA_ELEMENT_DayNames, - XFA_ELEMENT_SoapAction, - XFA_ELEMENT_DefaultTypeface, - XFA_ELEMENT_Manifest, - XFA_ELEMENT_Overflow, - XFA_ELEMENT_Linear, - XFA_ELEMENT_CurrencySymbol, - XFA_ELEMENT_Delete, - XFA_ELEMENT_Deltas, - XFA_ELEMENT_DigestMethod, - XFA_ELEMENT_InstanceManager, - XFA_ELEMENT_EquateRange, - XFA_ELEMENT_Medium, - XFA_ELEMENT_TextEdit, - XFA_ELEMENT_TemplateCache, - XFA_ELEMENT_CompressObjectStream, - XFA_ELEMENT_DataValue, - XFA_ELEMENT_AccessibleContent, - XFA_ELEMENT_NodeList, - XFA_ELEMENT_IncludeXDPContent, - XFA_ELEMENT_XmlConnection, - XFA_ELEMENT_ValidateApprovalSignatures, - XFA_ELEMENT_SignData, - XFA_ELEMENT_Packets, - XFA_ELEMENT_DatePattern, - XFA_ELEMENT_DuplexOption, - XFA_ELEMENT_Base, - XFA_ELEMENT_Bind, - XFA_ELEMENT_Compression, - XFA_ELEMENT_User, - XFA_ELEMENT_Rectangle, - XFA_ELEMENT_EffectiveOutputPolicy, - XFA_ELEMENT_ADBE_JSDebugger, - XFA_ELEMENT_Acrobat7, - XFA_ELEMENT_Interactive, - XFA_ELEMENT_Locale, - XFA_ELEMENT_CurrentPage, - XFA_ELEMENT_Data, - XFA_ELEMENT_Date, - XFA_ELEMENT_Desc, - XFA_ELEMENT_Encrypt, - XFA_ELEMENT_Draw, - XFA_ELEMENT_Encryption, - XFA_ELEMENT_MeridiemNames, - XFA_ELEMENT_Messaging, - XFA_ELEMENT_Speak, - XFA_ELEMENT_DataGroup, - XFA_ELEMENT_Common, - XFA_ELEMENT_Sharptext, - XFA_ELEMENT_PaginationOverride, - XFA_ELEMENT_Reasons, - XFA_ELEMENT_SignatureProperties, - XFA_ELEMENT_Threshold, - XFA_ELEMENT_AppearanceFilter, - XFA_ELEMENT_Fill, - XFA_ELEMENT_Font, - XFA_ELEMENT_Form, - XFA_ELEMENT_MediumInfo, - XFA_ELEMENT_Certificate, - XFA_ELEMENT_Password, - XFA_ELEMENT_RunScripts, - XFA_ELEMENT_Trace, - XFA_ELEMENT_Float, - XFA_ELEMENT_RenderPolicy, - XFA_ELEMENT_LogPseudoModel, - XFA_ELEMENT_Destination, - XFA_ELEMENT_Value, - XFA_ELEMENT_Bookend, - XFA_ELEMENT_ExObject, - XFA_ELEMENT_OpenAction, - XFA_ELEMENT_NeverEmbed, - XFA_ELEMENT_BindItems, - XFA_ELEMENT_Calculate, - XFA_ELEMENT_Print, - XFA_ELEMENT_Extras, - XFA_ELEMENT_Proto, - XFA_ELEMENT_DSigData, - XFA_ELEMENT_Creator, - XFA_ELEMENT_Connect, - XFA_ELEMENT_Permissions, - XFA_ELEMENT_ConnectionSet, - XFA_ELEMENT_Submit, - XFA_ELEMENT_Range, - XFA_ELEMENT_Linearized, - XFA_ELEMENT_Packet, - XFA_ELEMENT_RootElement, - XFA_ELEMENT_PlaintextMetadata, - XFA_ELEMENT_NumberSymbols, - XFA_ELEMENT_PrintHighQuality, - XFA_ELEMENT_Driver, - XFA_ELEMENT_IncrementalLoad, - XFA_ELEMENT_SubjectDN, - XFA_ELEMENT_CompressLogicalStructure, - XFA_ELEMENT_IncrementalMerge, - XFA_ELEMENT_Radial, - XFA_ELEMENT_Variables, - XFA_ELEMENT_TimePatterns, - XFA_ELEMENT_EffectiveInputPolicy, - XFA_ELEMENT_NameAttr, - XFA_ELEMENT_Conformance, - XFA_ELEMENT_Transform, - XFA_ELEMENT_LockDocument, - XFA_ELEMENT_BreakAfter, - XFA_ELEMENT_Line, - XFA_ELEMENT_List, - XFA_ELEMENT_Source, - XFA_ELEMENT_Occur, - XFA_ELEMENT_PickTrayByPDFSize, - XFA_ELEMENT_MonthNames, - XFA_ELEMENT_Severity, - XFA_ELEMENT_GroupParent, - XFA_ELEMENT_DocumentAssembly, - XFA_ELEMENT_NumberSymbol, - XFA_ELEMENT_Tagged, - XFA_ELEMENT_Items, + +enum class XFA_Element : int32_t { + Unknown = -1, + + Ps, + To, + Ui, + RecordSet, + SubsetBelow, + SubformSet, + AdobeExtensionLevel, + Typeface, + Break, + FontInfo, + NumberPattern, + DynamicRender, + PrintScaling, + CheckButton, + DatePatterns, + SourceSet, + Amd, + Arc, + Day, + Era, + Jog, + Log, + Map, + Mdp, + BreakBefore, + Oid, + Pcl, + Pdf, + Ref, + Uri, + Xdc, + Xdp, + Xfa, + Xsl, + Zpl, + Cache, + Margin, + KeyUsage, + Exclude, + ChoiceList, + Level, + LabelPrinter, + CalendarSymbols, + Para, + Part, + Pdfa, + Filter, + Present, + Pagination, + Encoding, + Event, + Whitespace, + DefaultUi, + DataModel, + Barcode, + TimePattern, + BatchOutput, + Enforce, + CurrencySymbols, + AddSilentPrint, + Rename, + Operation, + Typefaces, + SubjectDNs, + Issuers, + SignaturePseudoModel, + WsdlConnection, + Debug, + Delta, + EraNames, + ModifyAnnots, + StartNode, + Button, + Format, + Border, + Area, + Hyphenation, + Text, + Time, + Type, + Overprint, + Certificates, + EncryptionMethods, + SetProperty, + PrinterName, + StartPage, + PageOffset, + DateTime, + Comb, + Pattern, + IfEmpty, + SuppressBanner, + OutputBin, + Field, + Agent, + OutputXSL, + AdjustData, + AutoSave, + ContentArea, + EventPseudoModel, + WsdlAddress, + Solid, + DateTimeSymbols, + EncryptionLevel, + Edge, + Stipple, + Attributes, + VersionControl, + Meridiem, + ExclGroup, + ToolTip, + Compress, + Reason, + Execute, + ContentCopy, + DateTimeEdit, + Config, + Image, + SharpxHTML, + NumberOfCopies, + BehaviorOverride, + TimeStamp, + Month, + ViewerPreferences, + ScriptModel, + Decimal, + Subform, + Select, + Window, + LocaleSet, + Handler, + HostPseudoModel, + Presence, + Record, + Embed, + Version, + Command, + Copies, + Staple, + SubmitFormat, + Boolean, + Message, + Output, + PsMap, + ExcludeNS, + Assist, + Picture, + Traversal, + SilentPrint, + WebClient, + LayoutPseudoModel, + Producer, + Corner, + MsgId, + Color, + Keep, + Query, + Insert, + ImageEdit, + Validate, + DigestMethods, + NumberPatterns, + PageSet, + Integer, + SoapAddress, + Equate, + FormFieldFilling, + PageRange, + Update, + ConnectString, + Mode, + Layout, + Sharpxml, + XsdConnection, + Traverse, + Encodings, + Template, + Acrobat, + ValidationMessaging, + Signing, + DataWindow, + Script, + AddViewerPreferences, + AlwaysEmbed, + PasswordEdit, + NumericEdit, + EncryptionMethod, + Change, + PageArea, + SubmitUrl, + Oids, + Signature, + ADBE_JSConsole, + Caption, + Relevant, + FlipLabel, + ExData, + DayNames, + SoapAction, + DefaultTypeface, + Manifest, + Overflow, + Linear, + CurrencySymbol, + Delete, + Deltas, + DigestMethod, + InstanceManager, + EquateRange, + Medium, + TextEdit, + TemplateCache, + CompressObjectStream, + DataValue, + AccessibleContent, + NodeList, + IncludeXDPContent, + XmlConnection, + ValidateApprovalSignatures, + SignData, + Packets, + DatePattern, + DuplexOption, + Base, + Bind, + Compression, + User, + Rectangle, + EffectiveOutputPolicy, + ADBE_JSDebugger, + Acrobat7, + Interactive, + Locale, + CurrentPage, + Data, + Date, + Desc, + Encrypt, + Draw, + Encryption, + MeridiemNames, + Messaging, + Speak, + DataGroup, + Common, + Sharptext, + PaginationOverride, + Reasons, + SignatureProperties, + Threshold, + AppearanceFilter, + Fill, + Font, + Form, + MediumInfo, + Certificate, + Password, + RunScripts, + Trace, + Float, + RenderPolicy, + LogPseudoModel, + Destination, + Value, + Bookend, + ExObject, + OpenAction, + NeverEmbed, + BindItems, + Calculate, + Print, + Extras, + Proto, + DSigData, + Creator, + Connect, + Permissions, + ConnectionSet, + Submit, + Range, + Linearized, + Packet, + RootElement, + PlaintextMetadata, + NumberSymbols, + PrintHighQuality, + Driver, + IncrementalLoad, + SubjectDN, + CompressLogicalStructure, + IncrementalMerge, + Radial, + Variables, + TimePatterns, + EffectiveInputPolicy, + NameAttr, + Conformance, + Transform, + LockDocument, + BreakAfter, + Line, + List, + Source, + Occur, + PickTrayByPDFSize, + MonthNames, + Severity, + GroupParent, + DocumentAssembly, + NumberSymbol, + Tagged, + Items }; -#define XFA_ELEMENT_UNKNOWN ((XFA_ELEMENT)-1) struct XFA_ELEMENTINFO { uint32_t uHash; const FX_WCHAR* pName; - XFA_ELEMENT eName; + XFA_Element eName; uint32_t dwPackets; XFA_ObjectType eObjectType; }; const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName); -const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_ELEMENT eName); +const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_Element eName); enum XFA_ATTRIBUTETYPE { XFA_ATTRIBUTETYPE_NOTSURE, @@ -959,20 +961,20 @@ struct XFA_ATTRIBUTEINFO { const XFA_ATTRIBUTEINFO* XFA_GetAttributeByName(const CFX_WideStringC& wsName); const XFA_ATTRIBUTEINFO* XFA_GetAttributeByID(XFA_ATTRIBUTE eName); FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue, - XFA_ELEMENT eElement, + XFA_Element eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType, uint32_t dwPacket); -XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, +XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket); -CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, +CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket); -FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, +FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket); -CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, +CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket); struct XFA_ELEMENTHIERARCHY { @@ -988,22 +990,22 @@ struct XFA_SCRIPTHIERARCHY { int16_t wParentIndex; }; -const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount); +const uint8_t* XFA_GetElementAttributes(XFA_Element eElement, int32_t& iCount); -const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement, +const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket); #define XFA_PROPERTYFLAG_OneOf 0x01 #define XFA_PROPERTYFLAG_DefaultOneOf 0x02 struct XFA_PROPERTY { - uint16_t eName; + XFA_Element eName; uint8_t uOccur; uint8_t uFlags; }; -const XFA_PROPERTY* XFA_GetElementProperties(XFA_ELEMENT eElement, +const XFA_PROPERTY* XFA_GetElementProperties(XFA_Element eElement, int32_t& iCount); -const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_ELEMENT eElement, - XFA_ELEMENT eProperty, +const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_Element eElement, + XFA_Element eProperty, uint32_t dwPacket); struct XFA_ATTRIBUTEENUMINFO { uint32_t uHash; @@ -1061,7 +1063,7 @@ struct XFA_METHODINFO { XFA_METHOD_CALLBACK lpfnCallback; }; -const XFA_METHODINFO* XFA_GetMethodByName(XFA_ELEMENT eElement, +const XFA_METHODINFO* XFA_GetMethodByName(XFA_Element eElement, const CFX_WideStringC& wsMethodName); typedef void (CXFA_Object::*XFA_ATTRIBUTE_CALLBACK)(CFXJSE_Value* pValue, FX_BOOL bSetting, @@ -1078,7 +1080,7 @@ struct XFA_SCRIPTATTRIBUTEINFO { uint16_t eValueType; }; const XFA_SCRIPTATTRIBUTEINFO* XFA_GetScriptAttributeByName( - XFA_ELEMENT eElement, + XFA_Element eElement, const CFX_WideStringC& wsAttributeName); #endif // XFA_FXFA_INCLUDE_FXFA_BASIC_H_ diff --git a/xfa/fxfa/include/fxfa_widget.h b/xfa/fxfa/include/fxfa_widget.h index a8bed176ab..cf52bbe205 100644 --- a/xfa/fxfa/include/fxfa_widget.h +++ b/xfa/fxfa/include/fxfa_widget.h @@ -109,7 +109,7 @@ class CXFA_WidgetAcc : public CXFA_WidgetData { FX_FLOAT GetWidthWithoutMargin(FX_FLOAT fWidthCalc); FX_FLOAT GetHeightWithoutMargin(FX_FLOAT fHeightCalc); void CalculateTextContentSize(CFX_SizeF& size); - void CalculateAccWidthAndHeight(XFA_ELEMENT eUIType, + void CalculateAccWidthAndHeight(XFA_Element eUIType, FX_FLOAT& fWidth, FX_FLOAT& fCalcHeight); void InitLayoutData(); diff --git a/xfa/fxfa/include/xfa_ffwidget.h b/xfa/fxfa/include/xfa_ffwidget.h index 4512cdf5a2..9d337d7fbe 100644 --- a/xfa/fxfa/include/xfa_ffwidget.h +++ b/xfa/fxfa/include/xfa_ffwidget.h @@ -174,7 +174,7 @@ void XFA_RectWidthoutMargin(CFX_RectF& rt, const CXFA_Margin& mg, FX_BOOL bUI = FALSE); CXFA_FFWidget* XFA_GetWidgetFromLayoutItem(CXFA_LayoutItem* pLayoutItem); -FX_BOOL XFA_IsCreateWidget(XFA_ELEMENT iType); +FX_BOOL XFA_IsCreateWidget(XFA_Element iType); #define XFA_DRAWBOX_ForceRound 1 #define XFA_DRAWBOX_Lowered3D 2 void XFA_DrawBox(CXFA_Box box, diff --git a/xfa/fxfa/include/xfa_ffwidgethandler.h b/xfa/fxfa/include/xfa_ffwidgethandler.h index cc6d048619..4aa86d21f0 100644 --- a/xfa/fxfa/include/xfa_ffwidgethandler.h +++ b/xfa/fxfa/include/xfa_ffwidgethandler.h @@ -93,7 +93,7 @@ class CXFA_FFWidgetHandler { CXFA_Node* CreateListBox(CXFA_Node* pParent, CXFA_Node* pBefore) const; CXFA_Node* CreateImageField(CXFA_Node* pParent, CXFA_Node* pBefore) const; CXFA_Node* CreatePasswordEdit(CXFA_Node* pParent, CXFA_Node* pBefore) const; - CXFA_Node* CreateField(XFA_ELEMENT eElement, + CXFA_Node* CreateField(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const; CXFA_Node* CreateArc(CXFA_Node* pParent, CXFA_Node* pBefore) const; @@ -101,25 +101,25 @@ class CXFA_FFWidgetHandler { CXFA_Node* CreateImage(CXFA_Node* pParent, CXFA_Node* pBefore) const; CXFA_Node* CreateLine(CXFA_Node* pParent, CXFA_Node* pBefore) const; CXFA_Node* CreateText(CXFA_Node* pParent, CXFA_Node* pBefore) const; - CXFA_Node* CreateDraw(XFA_ELEMENT eElement, + CXFA_Node* CreateDraw(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const; CXFA_Node* CreateSubform(CXFA_Node* pParent, CXFA_Node* pBefore) const; - CXFA_Node* CreateFormItem(XFA_ELEMENT eElement, + CXFA_Node* CreateFormItem(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const; - CXFA_Node* CreateCopyNode(XFA_ELEMENT eElement, + CXFA_Node* CreateCopyNode(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore = NULL) const; - CXFA_Node* CreateTemplateNode(XFA_ELEMENT eElement, + CXFA_Node* CreateTemplateNode(XFA_Element eElement, CXFA_Node* pParent, CXFA_Node* pBefore) const; CXFA_Node* CreateFontNode(CXFA_Node* pParent) const; CXFA_Node* CreateMarginNode(CXFA_Node* pParent, uint32_t dwFlags, FX_FLOAT fInsets[4]) const; - CXFA_Node* CreateValueNode(XFA_ELEMENT eValue, CXFA_Node* pParent) const; + CXFA_Node* CreateValueNode(XFA_Element eValue, CXFA_Node* pParent) const; CXFA_Document* GetObjFactory() const; CXFA_Document* GetXFADoc() const; diff --git a/xfa/fxfa/parser/cxfa_assist.cpp b/xfa/fxfa/parser/cxfa_assist.cpp index e19be348ab..894e729d6d 100644 --- a/xfa/fxfa/parser/cxfa_assist.cpp +++ b/xfa/fxfa/parser/cxfa_assist.cpp @@ -11,5 +11,5 @@ CXFA_Assist::CXFA_Assist(CXFA_Node* pNode) : CXFA_Data(pNode) {} CXFA_ToolTip CXFA_Assist::GetToolTip() { - return CXFA_ToolTip(m_pNode->GetChild(0, XFA_ELEMENT_ToolTip)); + return CXFA_ToolTip(m_pNode->GetChild(0, XFA_Element::ToolTip)); } diff --git a/xfa/fxfa/parser/cxfa_bind.cpp b/xfa/fxfa/parser/cxfa_bind.cpp index e27a8b1e0d..16efd1f440 100644 --- a/xfa/fxfa/parser/cxfa_bind.cpp +++ b/xfa/fxfa/parser/cxfa_bind.cpp @@ -11,6 +11,6 @@ CXFA_Bind::CXFA_Bind(CXFA_Node* pNode) : CXFA_Data(pNode) {} void CXFA_Bind::GetPicture(CFX_WideString& wsPicture) { - if (CXFA_Node* pPicture = m_pNode->GetChild(0, XFA_ELEMENT_Picture)) + if (CXFA_Node* pPicture = m_pNode->GetChild(0, XFA_Element::Picture)) pPicture->TryContent(wsPicture); } diff --git a/xfa/fxfa/parser/cxfa_box.cpp b/xfa/fxfa/parser/cxfa_box.cpp index fc57201750..cb5cf7f6b9 100644 --- a/xfa/fxfa/parser/cxfa_box.cpp +++ b/xfa/fxfa/parser/cxfa_box.cpp @@ -22,7 +22,7 @@ void GetStrokesInternal(CXFA_Node* pNode, int32_t i, j; for (i = 0, j = 0; i < 4; i++) { CXFA_Corner corner = - CXFA_Corner(pNode->GetProperty(i, XFA_ELEMENT_Corner, i == 0)); + CXFA_Corner(pNode->GetProperty(i, XFA_Element::Corner, i == 0)); if (corner || i == 0) strokes.SetAt(j, corner); else if (bNULL) @@ -35,7 +35,8 @@ void GetStrokesInternal(CXFA_Node* pNode, strokes.SetAt(j, strokes[2]); j++; - CXFA_Edge edge = CXFA_Edge(pNode->GetProperty(i, XFA_ELEMENT_Edge, i == 0)); + CXFA_Edge edge = + CXFA_Edge(pNode->GetProperty(i, XFA_Element::Edge, i == 0)); if (edge || i == 0) strokes.SetAt(j, edge); else if (bNULL) @@ -94,12 +95,12 @@ int32_t CXFA_Box::GetPresence() const { int32_t CXFA_Box::CountEdges() const { if (!m_pNode) return 0; - return m_pNode->CountChildren(XFA_ELEMENT_Edge); + return m_pNode->CountChildren(XFA_Element::Edge); } CXFA_Edge CXFA_Box::GetEdge(int32_t nIndex) const { return CXFA_Edge( - m_pNode ? m_pNode->GetProperty(nIndex, XFA_ELEMENT_Edge, nIndex == 0) + m_pNode ? m_pNode->GetProperty(nIndex, XFA_Element::Edge, nIndex == 0) : nullptr); } @@ -143,12 +144,12 @@ CXFA_Fill CXFA_Box::GetFill(FX_BOOL bModified) const { if (!m_pNode) return CXFA_Fill(nullptr); - CXFA_Node* pFillNode = m_pNode->GetProperty(0, XFA_ELEMENT_Fill, bModified); + CXFA_Node* pFillNode = m_pNode->GetProperty(0, XFA_Element::Fill, bModified); return CXFA_Fill(pFillNode); } CXFA_Margin CXFA_Box::GetMargin() const { - return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_ELEMENT_Margin) + return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin) : nullptr); } diff --git a/xfa/fxfa/parser/cxfa_box.h b/xfa/fxfa/parser/cxfa_box.h index 6123f946bd..106ed20222 100644 --- a/xfa/fxfa/parser/cxfa_box.h +++ b/xfa/fxfa/parser/cxfa_box.h @@ -19,9 +19,9 @@ class CXFA_Box : public CXFA_Data { public: explicit CXFA_Box(CXFA_Node* pNode) : CXFA_Data(pNode) {} - bool IsArc() const { return GetClassID() == XFA_ELEMENT_Arc; } - bool IsBorder() const { return GetClassID() == XFA_ELEMENT_Border; } - bool IsRectangle() const { return GetClassID() == XFA_ELEMENT_Rectangle; } + bool IsArc() const { return GetClassID() == XFA_Element::Arc; } + bool IsBorder() const { return GetClassID() == XFA_Element::Border; } + bool IsRectangle() const { return GetClassID() == XFA_Element::Rectangle; } int32_t GetHand() const; int32_t GetPresence() const; int32_t CountEdges() const; diff --git a/xfa/fxfa/parser/cxfa_calculate.cpp b/xfa/fxfa/parser/cxfa_calculate.cpp index 8984c5e817..17379cb6c7 100644 --- a/xfa/fxfa/parser/cxfa_calculate.cpp +++ b/xfa/fxfa/parser/cxfa_calculate.cpp @@ -18,15 +18,15 @@ int32_t CXFA_Calculate::GetOverride() { } CXFA_Script CXFA_Calculate::GetScript() { - return CXFA_Script(m_pNode->GetChild(0, XFA_ELEMENT_Script)); + return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script)); } void CXFA_Calculate::GetMessageText(CFX_WideString& wsMessage) { - CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Message); + CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Message); if (!pNode) return; - CXFA_Text text(pNode->GetChild(0, XFA_ELEMENT_Text)); + CXFA_Text text(pNode->GetChild(0, XFA_Element::Text)); if (text) text.GetContent(wsMessage); } diff --git a/xfa/fxfa/parser/cxfa_caption.cpp b/xfa/fxfa/parser/cxfa_caption.cpp index 1d343e7e43..6606d51396 100644 --- a/xfa/fxfa/parser/cxfa_caption.cpp +++ b/xfa/fxfa/parser/cxfa_caption.cpp @@ -29,13 +29,15 @@ FX_FLOAT CXFA_Caption::GetReserve() { } CXFA_Margin CXFA_Caption::GetMargin() { - return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_ELEMENT_Margin) : NULL); + return CXFA_Margin(m_pNode ? m_pNode->GetChild(0, XFA_Element::Margin) + : nullptr); } CXFA_Font CXFA_Caption::GetFont() { - return CXFA_Font(m_pNode ? m_pNode->GetChild(0, XFA_ELEMENT_Font) : NULL); + return CXFA_Font(m_pNode ? m_pNode->GetChild(0, XFA_Element::Font) : nullptr); } CXFA_Value CXFA_Caption::GetValue() { - return CXFA_Value(m_pNode ? m_pNode->GetChild(0, XFA_ELEMENT_Value) : NULL); + return CXFA_Value(m_pNode ? m_pNode->GetChild(0, XFA_Element::Value) + : nullptr); } diff --git a/xfa/fxfa/parser/cxfa_data.cpp b/xfa/fxfa/parser/cxfa_data.cpp index cbcb079cad..1e0db417d6 100644 --- a/xfa/fxfa/parser/cxfa_data.cpp +++ b/xfa/fxfa/parser/cxfa_data.cpp @@ -59,8 +59,8 @@ FX_ARGB CXFA_Data::ToColor(const CFX_WideStringC& wsValue) { return (0xff << 24) | (r << 16) | (g << 8) | b; } -XFA_ELEMENT CXFA_Data::GetClassID() const { - return m_pNode ? m_pNode->GetClassID() : XFA_ELEMENT_UNKNOWN; +XFA_Element CXFA_Data::GetClassID() const { + return m_pNode ? m_pNode->GetClassID() : XFA_Element::Unknown; } FX_BOOL CXFA_Data::TryMeasure(XFA_ATTRIBUTE eAttr, diff --git a/xfa/fxfa/parser/cxfa_data.h b/xfa/fxfa/parser/cxfa_data.h index e591393153..dfb1682fee 100644 --- a/xfa/fxfa/parser/cxfa_data.h +++ b/xfa/fxfa/parser/cxfa_data.h @@ -21,7 +21,7 @@ class CXFA_Data { operator bool() const { return !!m_pNode; } CXFA_Node* GetNode() const { return m_pNode; } - XFA_ELEMENT GetClassID() const; + XFA_Element GetClassID() const; protected: FX_BOOL TryMeasure(XFA_ATTRIBUTE eAttr, diff --git a/xfa/fxfa/parser/cxfa_event.cpp b/xfa/fxfa/parser/cxfa_event.cpp index efff3e5161..1eb182ec3b 100644 --- a/xfa/fxfa/parser/cxfa_event.cpp +++ b/xfa/fxfa/parser/cxfa_event.cpp @@ -14,16 +14,16 @@ int32_t CXFA_Event::GetActivity() { return m_pNode->GetEnum(XFA_ATTRIBUTE_Activity); } -int32_t CXFA_Event::GetEventType() { +XFA_Element CXFA_Event::GetEventType() { CXFA_Node* pChild = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); while (pChild) { - int32_t eType = pChild->GetClassID(); - if (eType != XFA_ELEMENT_Extras) + XFA_Element eType = pChild->GetClassID(); + if (eType != XFA_Element::Extras) return eType; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); } - return XFA_ELEMENT_UNKNOWN; + return XFA_Element::Unknown; } void CXFA_Event::GetRef(CFX_WideStringC& wsRef) { @@ -31,15 +31,15 @@ void CXFA_Event::GetRef(CFX_WideStringC& wsRef) { } CXFA_Script CXFA_Event::GetScript() { - return CXFA_Script(m_pNode->GetChild(0, XFA_ELEMENT_Script)); + return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script)); } CXFA_Submit CXFA_Event::GetSubmit() { - return CXFA_Submit(m_pNode->GetChild(0, XFA_ELEMENT_Submit)); + return CXFA_Submit(m_pNode->GetChild(0, XFA_Element::Submit)); } void CXFA_Event::GetSignDataTarget(CFX_WideString& wsTarget) { - CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_SignData); + CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::SignData); if (!pNode) return; diff --git a/xfa/fxfa/parser/cxfa_event.h b/xfa/fxfa/parser/cxfa_event.h index 91d0812f95..de3598de46 100644 --- a/xfa/fxfa/parser/cxfa_event.h +++ b/xfa/fxfa/parser/cxfa_event.h @@ -21,7 +21,7 @@ class CXFA_Event : public CXFA_Data { explicit CXFA_Event(CXFA_Node* pNode); int32_t GetActivity(); - int32_t GetEventType(); + XFA_Element GetEventType(); void GetRef(CFX_WideStringC& wsRef); CXFA_Script GetScript(); diff --git a/xfa/fxfa/parser/cxfa_fill.cpp b/xfa/fxfa/parser/cxfa_fill.cpp index c67e303eb2..c19504facd 100644 --- a/xfa/fxfa/parser/cxfa_fill.cpp +++ b/xfa/fxfa/parser/cxfa_fill.cpp @@ -17,7 +17,7 @@ int32_t CXFA_Fill::GetPresence() { } void CXFA_Fill::SetColor(FX_ARGB color) { - CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Color); + CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Color); CFX_WideString wsColor; int a, r, g, b; ArgbDecode(color, a, r, g, b); @@ -26,7 +26,7 @@ void CXFA_Fill::SetColor(FX_ARGB color) { } FX_ARGB CXFA_Fill::GetColor(FX_BOOL bText) { - if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Color)) { + if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Color)) { CFX_WideStringC wsColor; if (pNode->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE)) return CXFA_Data::ToColor(wsColor); @@ -36,21 +36,21 @@ FX_ARGB CXFA_Fill::GetColor(FX_BOOL bText) { return 0xFFFFFFFF; } -int32_t CXFA_Fill::GetFillType() { +XFA_Element CXFA_Fill::GetFillType() { CXFA_Node* pChild = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); while (pChild) { - int32_t eType = pChild->GetClassID(); - if (eType != XFA_ELEMENT_Color && eType != XFA_ELEMENT_Extras) + XFA_Element eType = pChild->GetClassID(); + if (eType != XFA_Element::Color && eType != XFA_Element::Extras) return eType; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); } - return XFA_ELEMENT_Solid; + return XFA_Element::Solid; } int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) { - CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Pattern); - if (CXFA_Node* pColor = pNode->GetChild(0, XFA_ELEMENT_Color)) { + CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Pattern); + if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) { CFX_WideStringC wsColor; pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE); foreColor = CXFA_Data::ToColor(wsColor); @@ -61,10 +61,10 @@ int32_t CXFA_Fill::GetPattern(FX_ARGB& foreColor) { } int32_t CXFA_Fill::GetStipple(FX_ARGB& stippleColor) { - CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Stipple); + CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Stipple); int32_t eAttr = 50; pNode->TryInteger(XFA_ATTRIBUTE_Rate, eAttr); - if (CXFA_Node* pColor = pNode->GetChild(0, XFA_ELEMENT_Color)) { + if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) { CFX_WideStringC wsColor; pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE); stippleColor = CXFA_Data::ToColor(wsColor); @@ -75,10 +75,10 @@ int32_t CXFA_Fill::GetStipple(FX_ARGB& stippleColor) { } int32_t CXFA_Fill::GetLinear(FX_ARGB& endColor) { - CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Linear); + CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Linear); XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToRight; pNode->TryEnum(XFA_ATTRIBUTE_Type, eAttr); - if (CXFA_Node* pColor = pNode->GetChild(0, XFA_ELEMENT_Color)) { + if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) { CFX_WideStringC wsColor; pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE); endColor = CXFA_Data::ToColor(wsColor); @@ -89,10 +89,10 @@ int32_t CXFA_Fill::GetLinear(FX_ARGB& endColor) { } int32_t CXFA_Fill::GetRadial(FX_ARGB& endColor) { - CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Radial); + CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Radial); XFA_ATTRIBUTEENUM eAttr = XFA_ATTRIBUTEENUM_ToEdge; pNode->TryEnum(XFA_ATTRIBUTE_Type, eAttr); - if (CXFA_Node* pColor = pNode->GetChild(0, XFA_ELEMENT_Color)) { + if (CXFA_Node* pColor = pNode->GetChild(0, XFA_Element::Color)) { CFX_WideStringC wsColor; pColor->TryCData(XFA_ATTRIBUTE_Value, wsColor, FALSE); endColor = CXFA_Data::ToColor(wsColor); diff --git a/xfa/fxfa/parser/cxfa_fill.h b/xfa/fxfa/parser/cxfa_fill.h index 57f0410741..c8f1cb3013 100644 --- a/xfa/fxfa/parser/cxfa_fill.h +++ b/xfa/fxfa/parser/cxfa_fill.h @@ -20,7 +20,7 @@ class CXFA_Fill : public CXFA_Data { int32_t GetPresence(); FX_ARGB GetColor(FX_BOOL bText = FALSE); - int32_t GetFillType(); + XFA_Element GetFillType(); int32_t GetPattern(FX_ARGB& foreColor); int32_t GetStipple(FX_ARGB& stippleColor); int32_t GetLinear(FX_ARGB& endColor); diff --git a/xfa/fxfa/parser/cxfa_font.cpp b/xfa/fxfa/parser/cxfa_font.cpp index 261ef1f9ea..8d3e7856bd 100644 --- a/xfa/fxfa/parser/cxfa_font.cpp +++ b/xfa/fxfa/parser/cxfa_font.cpp @@ -82,11 +82,11 @@ FX_BOOL CXFA_Font::IsItalic() { } void CXFA_Font::SetColor(FX_ARGB color) { - CXFA_Fill fill(m_pNode->GetProperty(0, XFA_ELEMENT_Fill)); + CXFA_Fill fill(m_pNode->GetProperty(0, XFA_Element::Fill)); fill.SetColor(color); } FX_ARGB CXFA_Font::GetColor() { - CXFA_Fill fill(m_pNode->GetChild(0, XFA_ELEMENT_Fill)); + CXFA_Fill fill(m_pNode->GetChild(0, XFA_Element::Fill)); return fill ? fill.GetColor(TRUE) : 0xFF000000; } diff --git a/xfa/fxfa/parser/cxfa_line.cpp b/xfa/fxfa/parser/cxfa_line.cpp index 07ca6d7a69..b35aa4146d 100644 --- a/xfa/fxfa/parser/cxfa_line.cpp +++ b/xfa/fxfa/parser/cxfa_line.cpp @@ -18,5 +18,5 @@ FX_BOOL CXFA_Line::GetSlop() { } CXFA_Edge CXFA_Line::GetEdge() { - return CXFA_Edge(m_pNode->GetChild(0, XFA_ELEMENT_Edge)); + return CXFA_Edge(m_pNode->GetChild(0, XFA_Element::Edge)); } diff --git a/xfa/fxfa/parser/cxfa_stroke.cpp b/xfa/fxfa/parser/cxfa_stroke.cpp index ac175bed58..0733f3a0c4 100644 --- a/xfa/fxfa/parser/cxfa_stroke.cpp +++ b/xfa/fxfa/parser/cxfa_stroke.cpp @@ -30,7 +30,7 @@ FX_FLOAT CXFA_Stroke::GetThickness() const { CXFA_Measurement CXFA_Stroke::GetMSThickness() const { return m_pNode ? m_pNode->GetMeasure(XFA_ATTRIBUTE_Thickness) - : XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT_Edge, + : XFA_GetAttributeDefaultValue_Measure(XFA_Element::Edge, XFA_ATTRIBUTE_Thickness, XFA_XDPPACKET_Form); } @@ -46,7 +46,7 @@ FX_ARGB CXFA_Stroke::GetColor() const { if (!m_pNode) return 0xFF000000; - CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Color); + CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Color); if (!pNode) return 0xFF000000; @@ -59,7 +59,7 @@ void CXFA_Stroke::SetColor(FX_ARGB argb) { if (!m_pNode) return; - CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Color); + CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Color); CFX_WideString wsColor; int a; int r; diff --git a/xfa/fxfa/parser/cxfa_stroke.h b/xfa/fxfa/parser/cxfa_stroke.h index 719ac1bbcf..f455edc69e 100644 --- a/xfa/fxfa/parser/cxfa_stroke.h +++ b/xfa/fxfa/parser/cxfa_stroke.h @@ -23,8 +23,8 @@ class CXFA_Stroke : public CXFA_Data { public: explicit CXFA_Stroke(CXFA_Node* pNode) : CXFA_Data(pNode) {} - bool IsCorner() const { return GetClassID() == XFA_ELEMENT_Corner; } - bool IsEdge() const { return GetClassID() == XFA_ELEMENT_Edge; } + bool IsCorner() const { return GetClassID() == XFA_Element::Corner; } + bool IsEdge() const { return GetClassID() == XFA_Element::Edge; } bool IsVisible() const { return GetPresence() == XFA_ATTRIBUTEENUM_Visible; } int32_t GetPresence() const; int32_t GetCapType() const; diff --git a/xfa/fxfa/parser/cxfa_validate.cpp b/xfa/fxfa/parser/cxfa_validate.cpp index 17140fbbc3..dcb00df551 100644 --- a/xfa/fxfa/parser/cxfa_validate.cpp +++ b/xfa/fxfa/parser/cxfa_validate.cpp @@ -41,14 +41,14 @@ int32_t CXFA_Validate::GetScriptTest() { void CXFA_Validate::GetMessageText(CFX_WideString& wsMessage, const CFX_WideString& wsMessageType) { - CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Message, FALSE); + CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Message, FALSE); if (!pNode) return; CXFA_Node* pItemNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pItemNode; pItemNode = pItemNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pItemNode->GetClassID() != XFA_ELEMENT_Text) + if (pItemNode->GetClassID() != XFA_Element::Text) continue; CFX_WideStringC wsName; @@ -78,14 +78,14 @@ void CXFA_Validate::GetNullMessageText(CFX_WideString& wsMessage) { void CXFA_Validate::SetMessageText(CFX_WideString& wsMessage, const CFX_WideString& wsMessageType) { - CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_ELEMENT_Message, TRUE); + CXFA_Node* pNode = m_pNode->GetProperty(0, XFA_Element::Message, TRUE); if (!pNode) return; CXFA_Node* pItemNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pItemNode; pItemNode = pItemNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pItemNode->GetClassID() != XFA_ELEMENT_Text) + if (pItemNode->GetClassID() != XFA_Element::Text) continue; CFX_WideStringC wsName; @@ -95,7 +95,7 @@ void CXFA_Validate::SetMessageText(CFX_WideString& wsMessage, return; } } - CXFA_Node* pTextNode = pNode->CreateSamePacketNode(XFA_ELEMENT_Text); + CXFA_Node* pTextNode = pNode->CreateSamePacketNode(XFA_Element::Text); pNode->InsertChild(pTextNode); pTextNode->SetCData(XFA_ATTRIBUTE_Name, wsMessageType, FALSE); pTextNode->SetContent(wsMessage, wsMessage, FALSE); @@ -110,10 +110,10 @@ void CXFA_Validate::SetScriptMessageText(CFX_WideString wsMessage) { } void CXFA_Validate::GetPicture(CFX_WideString& wsPicture) { - if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Picture)) + if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Picture)) pNode->TryContent(wsPicture); } CXFA_Script CXFA_Validate::GetScript() { - return CXFA_Script(m_pNode->GetChild(0, XFA_ELEMENT_Script)); + return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script)); } diff --git a/xfa/fxfa/parser/cxfa_value.cpp b/xfa/fxfa/parser/cxfa_value.cpp index 1e41ab27d3..eac146be8a 100644 --- a/xfa/fxfa/parser/cxfa_value.cpp +++ b/xfa/fxfa/parser/cxfa_value.cpp @@ -8,12 +8,12 @@ #include "xfa/fxfa/parser/xfa_object.h" -XFA_ELEMENT CXFA_Value::GetChildValueClassID() { +XFA_Element CXFA_Value::GetChildValueClassID() { if (!m_pNode) - return XFA_ELEMENT_UNKNOWN; + return XFA_Element::Unknown; if (CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild)) return pNode->GetClassID(); - return XFA_ELEMENT_UNKNOWN; + return XFA_Element::Unknown; } FX_BOOL CXFA_Value::GetChildValueContent(CFX_WideString& wsContent) { diff --git a/xfa/fxfa/parser/cxfa_value.h b/xfa/fxfa/parser/cxfa_value.h index 5c9a684828..69697c150a 100644 --- a/xfa/fxfa/parser/cxfa_value.h +++ b/xfa/fxfa/parser/cxfa_value.h @@ -22,7 +22,7 @@ class CXFA_Value : public CXFA_Data { public: explicit CXFA_Value(CXFA_Node* pNode) : CXFA_Data(pNode) {} - XFA_ELEMENT GetChildValueClassID(); + XFA_Element GetChildValueClassID(); FX_BOOL GetChildValueContent(CFX_WideString& wsContent); CXFA_Arc GetArc(); CXFA_Line GetLine(); diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp index e29e8682af..28d3f4b312 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.cpp +++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp @@ -77,16 +77,16 @@ CXFA_WidgetData::CXFA_WidgetData(CXFA_Node* pNode) m_bIsNull(TRUE), m_bPreNull(TRUE), m_pUiChildNode(NULL), - m_eUIType(XFA_ELEMENT_UNKNOWN) {} + m_eUIType(XFA_Element::Unknown) {} CXFA_Node* CXFA_WidgetData::GetUIChild() { - if (m_eUIType == XFA_ELEMENT_UNKNOWN) + if (m_eUIType == XFA_Element::Unknown) m_pUiChildNode = XFA_CreateUIChild(m_pNode, m_eUIType); return m_pUiChildNode; } -XFA_ELEMENT CXFA_WidgetData::GetUIType() { +XFA_Element CXFA_WidgetData::GetUIType() { GetUIChild(); return m_eUIType; } @@ -125,27 +125,27 @@ int32_t CXFA_WidgetData::GetRotate() { } CXFA_Border CXFA_WidgetData::GetBorder(FX_BOOL bModified) { - return CXFA_Border(m_pNode->GetProperty(0, XFA_ELEMENT_Border, bModified)); + return CXFA_Border(m_pNode->GetProperty(0, XFA_Element::Border, bModified)); } CXFA_Caption CXFA_WidgetData::GetCaption(FX_BOOL bModified) { - return CXFA_Caption(m_pNode->GetProperty(0, XFA_ELEMENT_Caption, bModified)); + return CXFA_Caption(m_pNode->GetProperty(0, XFA_Element::Caption, bModified)); } CXFA_Font CXFA_WidgetData::GetFont(FX_BOOL bModified) { - return CXFA_Font(m_pNode->GetProperty(0, XFA_ELEMENT_Font, bModified)); + return CXFA_Font(m_pNode->GetProperty(0, XFA_Element::Font, bModified)); } CXFA_Margin CXFA_WidgetData::GetMargin(FX_BOOL bModified) { - return CXFA_Margin(m_pNode->GetProperty(0, XFA_ELEMENT_Margin, bModified)); + return CXFA_Margin(m_pNode->GetProperty(0, XFA_Element::Margin, bModified)); } CXFA_Para CXFA_WidgetData::GetPara(FX_BOOL bModified) { - return CXFA_Para(m_pNode->GetProperty(0, XFA_ELEMENT_Para, bModified)); + return CXFA_Para(m_pNode->GetProperty(0, XFA_Element::Para, bModified)); } void CXFA_WidgetData::GetEventList(CXFA_NodeArray& events) { - m_pNode->GetNodeList(events, 0, XFA_ELEMENT_Event); + m_pNode->GetNodeList(events, 0, XFA_Element::Event); } int32_t CXFA_WidgetData::GetEventByActivity(int32_t iActivity, @@ -177,31 +177,31 @@ int32_t CXFA_WidgetData::GetEventByActivity(int32_t iActivity, CXFA_Value CXFA_WidgetData::GetDefaultValue(FX_BOOL bModified) { CXFA_Node* pTemNode = m_pNode->GetTemplateNode(); - return CXFA_Value(pTemNode - ? pTemNode->GetProperty(0, XFA_ELEMENT_Value, bModified) - : nullptr); + return CXFA_Value( + pTemNode ? pTemNode->GetProperty(0, XFA_Element::Value, bModified) + : nullptr); } CXFA_Value CXFA_WidgetData::GetFormValue(FX_BOOL bModified) { - return CXFA_Value(m_pNode->GetProperty(0, XFA_ELEMENT_Value, bModified)); + return CXFA_Value(m_pNode->GetProperty(0, XFA_Element::Value, bModified)); } CXFA_Calculate CXFA_WidgetData::GetCalculate(FX_BOOL bModified) { return CXFA_Calculate( - m_pNode->GetProperty(0, XFA_ELEMENT_Calculate, bModified)); + m_pNode->GetProperty(0, XFA_Element::Calculate, bModified)); } CXFA_Validate CXFA_WidgetData::GetValidate(FX_BOOL bModified) { return CXFA_Validate( - m_pNode->GetProperty(0, XFA_ELEMENT_Validate, bModified)); + m_pNode->GetProperty(0, XFA_Element::Validate, bModified)); } CXFA_Bind CXFA_WidgetData::GetBind(FX_BOOL bModified) { - return CXFA_Bind(m_pNode->GetProperty(0, XFA_ELEMENT_Bind, bModified)); + return CXFA_Bind(m_pNode->GetProperty(0, XFA_Element::Bind, bModified)); } CXFA_Assist CXFA_WidgetData::GetAssist(FX_BOOL bModified) { - return CXFA_Assist(m_pNode->GetProperty(0, XFA_ELEMENT_Assist, bModified)); + return CXFA_Assist(m_pNode->GetProperty(0, XFA_Element::Assist, bModified)); } FX_BOOL CXFA_WidgetData::GetWidth(FX_FLOAT& fWidth) { @@ -231,14 +231,14 @@ FX_BOOL CXFA_WidgetData::GetMaxHeight(FX_FLOAT& fMaxHeight) { CXFA_Border CXFA_WidgetData::GetUIBorder(FX_BOOL bModified) { CXFA_Node* pUIChild = GetUIChild(); return CXFA_Border( - pUIChild ? pUIChild->GetProperty(0, XFA_ELEMENT_Border, bModified) + pUIChild ? pUIChild->GetProperty(0, XFA_Element::Border, bModified) : nullptr); } CXFA_Margin CXFA_WidgetData::GetUIMargin(FX_BOOL bModified) { CXFA_Node* pUIChild = GetUIChild(); return CXFA_Margin( - pUIChild ? pUIChild->GetProperty(0, XFA_ELEMENT_Margin, bModified) + pUIChild ? pUIChild->GetProperty(0, XFA_Element::Margin, bModified) : nullptr); } @@ -282,19 +282,19 @@ int32_t CXFA_WidgetData::GetButtonHighlight() { if (pUIChild) return pUIChild->GetEnum(XFA_ATTRIBUTE_Highlight); return XFA_GetAttributeDefaultValue_Enum( - XFA_ELEMENT_Button, XFA_ATTRIBUTE_Highlight, XFA_XDPPACKET_Form); + XFA_Element::Button, XFA_ATTRIBUTE_Highlight, XFA_XDPPACKET_Form); } FX_BOOL CXFA_WidgetData::GetButtonRollover(CFX_WideString& wsRollover, FX_BOOL& bRichText) { - if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_ELEMENT_Items)) { + if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) { CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild); while (pText) { CFX_WideStringC wsName; pText->TryCData(XFA_ATTRIBUTE_Name, wsName); if (wsName == FX_WSTRC(L"rollover")) { pText->TryContent(wsRollover); - bRichText = pText->GetClassID() == XFA_ELEMENT_ExData; + bRichText = pText->GetClassID() == XFA_Element::ExData; return !wsRollover.IsEmpty(); } pText = pText->GetNodeItem(XFA_NODEITEM_NextSibling); @@ -305,14 +305,14 @@ FX_BOOL CXFA_WidgetData::GetButtonRollover(CFX_WideString& wsRollover, FX_BOOL CXFA_WidgetData::GetButtonDown(CFX_WideString& wsDown, FX_BOOL& bRichText) { - if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_ELEMENT_Items)) { + if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) { CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild); while (pText) { CFX_WideStringC wsName; pText->TryCData(XFA_ATTRIBUTE_Name, wsName); if (wsName == FX_WSTRC(L"down")) { pText->TryContent(wsDown); - bRichText = pText->GetClassID() == XFA_ELEMENT_ExData; + bRichText = pText->GetClassID() == XFA_Element::ExData; return !wsDown.IsEmpty(); } pText = pText->GetNodeItem(XFA_NODEITEM_NextSibling); @@ -326,7 +326,7 @@ int32_t CXFA_WidgetData::GetCheckButtonShape() { if (pUIChild) return pUIChild->GetEnum(XFA_ATTRIBUTE_Shape); return XFA_GetAttributeDefaultValue_Enum( - XFA_ELEMENT_CheckButton, XFA_ATTRIBUTE_Shape, XFA_XDPPACKET_Form); + XFA_Element::CheckButton, XFA_ATTRIBUTE_Shape, XFA_XDPPACKET_Form); } int32_t CXFA_WidgetData::GetCheckButtonMark() { @@ -334,12 +334,12 @@ int32_t CXFA_WidgetData::GetCheckButtonMark() { if (pUIChild) return pUIChild->GetEnum(XFA_ATTRIBUTE_Mark); return XFA_GetAttributeDefaultValue_Enum( - XFA_ELEMENT_CheckButton, XFA_ATTRIBUTE_Mark, XFA_XDPPACKET_Form); + XFA_Element::CheckButton, XFA_ATTRIBUTE_Mark, XFA_XDPPACKET_Form); } FX_BOOL CXFA_WidgetData::IsRadioButton() { if (CXFA_Node* pParent = m_pNode->GetNodeItem(XFA_NODEITEM_Parent)) - return pParent->GetClassID() == XFA_ELEMENT_ExclGroup; + return pParent->GetClassID() == XFA_Element::ExclGroup; return FALSE; } @@ -348,7 +348,7 @@ FX_FLOAT CXFA_WidgetData::GetCheckButtonSize() { if (pUIChild) return pUIChild->GetMeasure(XFA_ATTRIBUTE_Size).ToUnit(XFA_UNIT_Pt); return XFA_GetAttributeDefaultValue_Measure( - XFA_ELEMENT_CheckButton, XFA_ATTRIBUTE_Size, XFA_XDPPACKET_Form) + XFA_Element::CheckButton, XFA_ATTRIBUTE_Size, XFA_XDPPACKET_Form) .ToUnit(XFA_UNIT_Pt); } @@ -357,7 +357,7 @@ FX_BOOL CXFA_WidgetData::IsAllowNeutral() { if (pUIChild) return pUIChild->GetBoolean(XFA_ATTRIBUTE_AllowNeutral); return XFA_GetAttributeDefaultValue_Boolean( - XFA_ELEMENT_CheckButton, XFA_ATTRIBUTE_AllowNeutral, XFA_XDPPACKET_Form); + XFA_Element::CheckButton, XFA_ATTRIBUTE_AllowNeutral, XFA_XDPPACKET_Form); } XFA_CHECKSTATE CXFA_WidgetData::GetCheckState() { @@ -365,7 +365,7 @@ XFA_CHECKSTATE CXFA_WidgetData::GetCheckState() { if (wsValue.IsEmpty()) return XFA_CHECKSTATE_Off; - if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_ELEMENT_Items)) { + if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) { CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild); int32_t i = 0; while (pText) { @@ -385,7 +385,7 @@ void CXFA_WidgetData::SetCheckState(XFA_CHECKSTATE eCheckState, bool bNotify) { if (exclGroup) { CFX_WideString wsValue; if (eCheckState != XFA_CHECKSTATE_Off) { - if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_ELEMENT_Items)) { + if (CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items)) { CXFA_Node* pText = pItems->GetNodeItem(XFA_NODEITEM_FirstChild); if (pText) pText->TryContent(wsValue); @@ -394,10 +394,10 @@ void CXFA_WidgetData::SetCheckState(XFA_CHECKSTATE eCheckState, bool bNotify) { CXFA_Node* pChild = exclGroup.GetNode()->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pChild->GetClassID() != XFA_ELEMENT_Field) + if (pChild->GetClassID() != XFA_Element::Field) continue; - CXFA_Node* pItem = pChild->GetChild(0, XFA_ELEMENT_Items); + CXFA_Node* pItem = pChild->GetChild(0, XFA_Element::Items); if (!pItem) continue; @@ -419,7 +419,7 @@ void CXFA_WidgetData::SetCheckState(XFA_CHECKSTATE eCheckState, bool bNotify) { } exclGroup.SyncValue(wsValue, bNotify); } else { - CXFA_Node* pItems = m_pNode->GetChild(0, XFA_ELEMENT_Items); + CXFA_Node* pItems = m_pNode->GetChild(0, XFA_Element::Items); if (!pItems) return; @@ -440,7 +440,7 @@ void CXFA_WidgetData::SetCheckState(XFA_CHECKSTATE eCheckState, bool bNotify) { CXFA_Node* CXFA_WidgetData::GetExclGroupNode() { CXFA_Node* pExcl = ToNode(m_pNode->GetNodeItem(XFA_NODEITEM_Parent)); - if (!pExcl || pExcl->GetClassID() != XFA_ELEMENT_ExclGroup) + if (!pExcl || pExcl->GetClassID() != XFA_Element::ExclGroup) return NULL; return pExcl; } @@ -483,10 +483,10 @@ void CXFA_WidgetData::SetSelectedMemberByValue(const CFX_WideStringC& wsValue, CFX_WideString wsExclGroup; for (CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pNode->GetClassID() != XFA_ELEMENT_Field) + if (pNode->GetClassID() != XFA_Element::Field) continue; - CXFA_Node* pItem = pNode->GetChild(0, XFA_ELEMENT_Items); + CXFA_Node* pItem = pNode->GetChild(0, XFA_Element::Items); if (!pItem) continue; @@ -520,7 +520,7 @@ CXFA_Node* CXFA_WidgetData::GetExclGroupFirstMember() { CXFA_Node* pNode = pExcl->GetNodeItem(XFA_NODEITEM_FirstChild); while (pNode) { - if (pNode->GetClassID() == XFA_ELEMENT_Field) + if (pNode->GetClassID() == XFA_Element::Field) return pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling); @@ -533,7 +533,7 @@ CXFA_Node* CXFA_WidgetData::GetExclGroupNextMember(CXFA_Node* pNode) { CXFA_Node* pNodeField = pNode->GetNodeItem(XFA_NODEITEM_NextSibling); while (pNodeField) { - if (pNodeField->GetClassID() == XFA_ELEMENT_Field) + if (pNodeField->GetClassID() == XFA_Element::Field) return pNodeField; pNodeField = pNodeField->GetNodeItem(XFA_NODEITEM_NextSibling); @@ -546,7 +546,7 @@ int32_t CXFA_WidgetData::GetChoiceListCommitOn() { if (pUIChild) return pUIChild->GetEnum(XFA_ATTRIBUTE_CommitOn); return XFA_GetAttributeDefaultValue_Enum( - XFA_ELEMENT_ChoiceList, XFA_ATTRIBUTE_CommitOn, XFA_XDPPACKET_Form); + XFA_Element::ChoiceList, XFA_ATTRIBUTE_CommitOn, XFA_XDPPACKET_Form); } FX_BOOL CXFA_WidgetData::IsChoiceListAllowTextEntry() { @@ -554,7 +554,7 @@ FX_BOOL CXFA_WidgetData::IsChoiceListAllowTextEntry() { if (pUIChild) return pUIChild->GetBoolean(XFA_ATTRIBUTE_TextEntry); return XFA_GetAttributeDefaultValue_Boolean( - XFA_ELEMENT_ChoiceList, XFA_ATTRIBUTE_TextEntry, XFA_XDPPACKET_Form); + XFA_Element::ChoiceList, XFA_ATTRIBUTE_TextEntry, XFA_XDPPACKET_Form); } int32_t CXFA_WidgetData::GetChoiceListOpen() { @@ -562,7 +562,7 @@ int32_t CXFA_WidgetData::GetChoiceListOpen() { if (pUIChild) return pUIChild->GetEnum(XFA_ATTRIBUTE_Open); return XFA_GetAttributeDefaultValue_Enum( - XFA_ELEMENT_ChoiceList, XFA_ATTRIBUTE_Open, XFA_XDPPACKET_Form); + XFA_Element::ChoiceList, XFA_ATTRIBUTE_Open, XFA_XDPPACKET_Form); } FX_BOOL CXFA_WidgetData::IsListBox() { @@ -577,7 +577,7 @@ int32_t CXFA_WidgetData::CountChoiceListItems(FX_BOOL bSaveValue) { int32_t iCount = 0; CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pNode->GetClassID() != XFA_ELEMENT_Items) + if (pNode->GetClassID() != XFA_Element::Items) continue; iCount++; @@ -596,7 +596,7 @@ int32_t CXFA_WidgetData::CountChoiceListItems(FX_BOOL bSaveValue) { pItem = pItems[1]; } pItems.RemoveAll(); - return pItem->CountChildren(XFA_ELEMENT_UNKNOWN); + return pItem->CountChildren(XFA_Element::Unknown); } FX_BOOL CXFA_WidgetData::GetChoiceListItem(CFX_WideString& wsText, @@ -604,11 +604,11 @@ FX_BOOL CXFA_WidgetData::GetChoiceListItem(CFX_WideString& wsText, FX_BOOL bSaveValue) { wsText.clear(); CXFA_NodeArray pItemsArray; - CXFA_Node* pItems = NULL; + CXFA_Node* pItems = nullptr; int32_t iCount = 0; CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pNode->GetClassID() != XFA_ELEMENT_Items) + if (pNode->GetClassID() != XFA_Element::Items) continue; iCount++; @@ -627,7 +627,7 @@ FX_BOOL CXFA_WidgetData::GetChoiceListItem(CFX_WideString& wsText, pItems = pItemsArray[1]; } if (pItems) { - CXFA_Node* pItem = pItems->GetChild(nIndex, XFA_ELEMENT_UNKNOWN); + CXFA_Node* pItem = pItems->GetChild(nIndex, XFA_Element::Unknown); if (pItem) { pItem->TryContent(wsText); return TRUE; @@ -643,7 +643,7 @@ void CXFA_WidgetData::GetChoiceListItems(CFX_WideStringArray& wsTextArray, int32_t iCount = 0; CXFA_Node* pNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pNode->GetClassID() != XFA_ELEMENT_Items) + if (pNode->GetClassID() != XFA_Element::Items) continue; iCount++; @@ -875,17 +875,17 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel, CXFA_Node* pItemNode = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pItemNode; pItemNode = pItemNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pItemNode->GetClassID() != XFA_ELEMENT_Items) + if (pItemNode->GetClassID() != XFA_Element::Items) continue; listitems.Add(pItemNode); iCount++; } if (iCount < 1) { - CXFA_Node* pItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items); + CXFA_Node* pItems = m_pNode->CreateSamePacketNode(XFA_Element::Items); m_pNode->InsertChild(-1, pItems); InsertListTextItem(pItems, wsLabel, nIndex); - CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items); + CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_Element::Items); m_pNode->InsertChild(-1, pSaveItems); pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE); InsertListTextItem(pSaveItems, wsNewValue, nIndex); @@ -902,7 +902,7 @@ void CXFA_WidgetData::InsertItem(const CFX_WideString& wsLabel, CXFA_Node* pNode = listitems[0]; pNode->SetBoolean(XFA_ATTRIBUTE_Save, FALSE); pNode->SetEnum(XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTEENUM_Visible); - CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_ELEMENT_Items); + CXFA_Node* pSaveItems = m_pNode->CreateSamePacketNode(XFA_Element::Items); m_pNode->InsertChild(-1, pSaveItems); pSaveItems->SetBoolean(XFA_ATTRIBUTE_Save, TRUE); pSaveItems->SetEnum(XFA_ATTRIBUTE_Presence, XFA_ATTRIBUTEENUM_Hidden); @@ -932,7 +932,7 @@ void CXFA_WidgetData::GetItemLabel(const CFX_WideStringC& wsValue, CXFA_NodeArray listitems; CXFA_Node* pItems = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pItems; pItems = pItems->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pItems->GetClassID() != XFA_ELEMENT_Items) + if (pItems->GetClassID() != XFA_Element::Items) continue; iCount++; @@ -966,7 +966,7 @@ void CXFA_WidgetData::GetItemLabel(const CFX_WideStringC& wsValue, if (iSearch < 0) return; if (CXFA_Node* pText = - pLabelItems->GetChild(iSearch, XFA_ELEMENT_UNKNOWN)) { + pLabelItems->GetChild(iSearch, XFA_Element::Unknown)) { pText->TryContent(wsLabel); } } @@ -978,7 +978,7 @@ void CXFA_WidgetData::GetItemValue(const CFX_WideStringC& wsLabel, CXFA_NodeArray listitems; CXFA_Node* pItems = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pItems; pItems = pItems->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pItems->GetClassID() != XFA_ELEMENT_Items) + if (pItems->GetClassID() != XFA_Element::Items) continue; iCount++; @@ -1011,7 +1011,7 @@ void CXFA_WidgetData::GetItemValue(const CFX_WideStringC& wsLabel, } if (iSearch < 0) return; - if (CXFA_Node* pText = pSaveItems->GetChild(iSearch, XFA_ELEMENT_UNKNOWN)) + if (CXFA_Node* pText = pSaveItems->GetChild(iSearch, XFA_Element::Unknown)) pText->TryContent(wsValue); } } @@ -1023,7 +1023,7 @@ FX_BOOL CXFA_WidgetData::DeleteItem(int32_t nIndex, FX_BOOL bSetValue = FALSE; CXFA_Node* pItems = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pItems; pItems = pItems->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pItems->GetClassID() != XFA_ELEMENT_Items) + if (pItems->GetClassID() != XFA_Element::Items) continue; if (nIndex < 0) { @@ -1063,7 +1063,7 @@ int32_t CXFA_WidgetData::GetNumberOfCells() { CXFA_Node* pUIChild = GetUIChild(); if (!pUIChild) return -1; - if (CXFA_Node* pNode = pUIChild->GetChild(0, XFA_ELEMENT_Comb)) + if (CXFA_Node* pNode = pUIChild->GetChild(0, XFA_Element::Comb)) return pNode->GetInteger(XFA_ATTRIBUTE_NumberOfCells); return -1; } @@ -1251,7 +1251,7 @@ void CXFA_WidgetData::GetPasswordChar(CFX_WideString& wsPassWord) { if (pUIChild) { pUIChild->TryCData(XFA_ATTRIBUTE_PasswordChar, wsPassWord); } else { - wsPassWord = XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT_PasswordEdit, + wsPassWord = XFA_GetAttributeDefaultValue_Cdata(XFA_Element::PasswordEdit, XFA_ATTRIBUTE_PasswordChar, XFA_XDPPACKET_Form); } @@ -1262,7 +1262,7 @@ FX_BOOL CXFA_WidgetData::IsMultiLine() { if (pUIChild) return pUIChild->GetBoolean(XFA_ATTRIBUTE_MultiLine); return XFA_GetAttributeDefaultValue_Boolean( - XFA_ELEMENT_TextEdit, XFA_ATTRIBUTE_MultiLine, XFA_XDPPACKET_Form); + XFA_Element::TextEdit, XFA_ATTRIBUTE_MultiLine, XFA_XDPPACKET_Form); } int32_t CXFA_WidgetData::GetVerticalScrollPolicy() { @@ -1270,18 +1270,18 @@ int32_t CXFA_WidgetData::GetVerticalScrollPolicy() { if (pUIChild) return pUIChild->GetEnum(XFA_ATTRIBUTE_VScrollPolicy); return XFA_GetAttributeDefaultValue_Enum( - XFA_ELEMENT_TextEdit, XFA_ATTRIBUTE_VScrollPolicy, XFA_XDPPACKET_Form); + XFA_Element::TextEdit, XFA_ATTRIBUTE_VScrollPolicy, XFA_XDPPACKET_Form); } -int32_t CXFA_WidgetData::GetMaxChars(XFA_ELEMENT& eType) { - if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Value)) { +int32_t CXFA_WidgetData::GetMaxChars(XFA_Element& eType) { + if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value)) { if (CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild)) { switch (pChild->GetClassID()) { - case XFA_ELEMENT_Text: - eType = XFA_ELEMENT_Text; + case XFA_Element::Text: + eType = XFA_Element::Text; return pChild->GetInteger(XFA_ATTRIBUTE_MaxChars); - case XFA_ELEMENT_ExData: { - eType = XFA_ELEMENT_ExData; + case XFA_Element::ExData: { + eType = XFA_Element::ExData; int32_t iMax = pChild->GetInteger(XFA_ATTRIBUTE_MaxLength); return iMax < 0 ? 0 : iMax; } @@ -1294,8 +1294,8 @@ int32_t CXFA_WidgetData::GetMaxChars(XFA_ELEMENT& eType) { } FX_BOOL CXFA_WidgetData::GetFracDigits(int32_t& iFracDigits) { - if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Value)) { - if (CXFA_Node* pChild = pNode->GetChild(0, XFA_ELEMENT_Decimal)) + if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value)) { + if (CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal)) return pChild->TryInteger(XFA_ATTRIBUTE_FracDigits, iFracDigits); } iFracDigits = -1; @@ -1303,8 +1303,8 @@ FX_BOOL CXFA_WidgetData::GetFracDigits(int32_t& iFracDigits) { } FX_BOOL CXFA_WidgetData::GetLeadDigits(int32_t& iLeadDigits) { - if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_ELEMENT_Value)) { - if (CXFA_Node* pChild = pNode->GetChild(0, XFA_ELEMENT_Decimal)) + if (CXFA_Node* pNode = m_pNode->GetChild(0, XFA_Element::Value)) { + if (CXFA_Node* pChild = pNode->GetChild(0, XFA_Element::Decimal)) return pChild->TryInteger(XFA_ATTRIBUTE_LeadDigits, iLeadDigits); } iLeadDigits = -1; @@ -1328,7 +1328,7 @@ FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue, if (!pNode) return TRUE; - XFA_ELEMENT uiType = pNode->GetClassID(); + XFA_Element uiType = pNode->GetClassID(); if (!wsPicture.IsEmpty()) { CXFA_LocaleMgr* pLocalMgr = m_pNode->GetDocument()->GetLocalMgr(); IFX_Locale* pLocale = GetLocal(); @@ -1339,7 +1339,7 @@ FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue, widgetValue = CXFA_LocaleValue(widgetValue.GetType(), wsNewText, wsPicture, pLocale, pLocalMgr); wsNewText = widgetValue.GetValue(); - if (uiType == XFA_ELEMENT_NumericEdit) { + if (uiType == XFA_Element::NumericEdit) { int32_t iLeadDigits = 0; int32_t iFracDigits = 0; GetLeadDigits(iLeadDigits); @@ -1349,7 +1349,7 @@ FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue, bSyncData = TRUE; } } else { - if (uiType == XFA_ELEMENT_NumericEdit) { + if (uiType == XFA_Element::NumericEdit) { if (wsNewText != FX_WSTRC(L"0")) { int32_t iLeadDigits = 0; int32_t iFracDigits = 0; @@ -1360,7 +1360,7 @@ FX_BOOL CXFA_WidgetData::SetValue(const CFX_WideString& wsValue, bSyncData = TRUE; } } - if (uiType != XFA_ELEMENT_NumericEdit || bSyncData) + if (uiType != XFA_Element::NumericEdit || bSyncData) SyncValue(wsNewText, true); return bValidate; @@ -1374,8 +1374,8 @@ FX_BOOL CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture, CXFA_LocaleValue widgetValue = XFA_GetLocaleValue(this); switch (ePicture) { case XFA_VALUEPICTURE_Display: { - if (CXFA_Node* pFormat = m_pNode->GetChild(0, XFA_ELEMENT_Format)) { - if (CXFA_Node* pPicture = pFormat->GetChild(0, XFA_ELEMENT_Picture)) { + if (CXFA_Node* pFormat = m_pNode->GetChild(0, XFA_Element::Format)) { + if (CXFA_Node* pPicture = pFormat->GetChild(0, XFA_Element::Picture)) { if (pPicture->TryContent(wsPicture)) return TRUE; } @@ -1412,9 +1412,9 @@ FX_BOOL CXFA_WidgetData::GetPictureContent(CFX_WideString& wsPicture, } case XFA_VALUEPICTURE_Edit: { - CXFA_Node* pUI = m_pNode->GetChild(0, XFA_ELEMENT_Ui); + CXFA_Node* pUI = m_pNode->GetChild(0, XFA_Element::Ui); if (pUI) { - if (CXFA_Node* pPicture = pUI->GetChild(0, XFA_ELEMENT_Picture)) { + if (CXFA_Node* pPicture = pUI->GetChild(0, XFA_Element::Picture)) { if (pPicture->TryContent(wsPicture)) return TRUE; } @@ -1493,9 +1493,9 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue, if (!pNode) return TRUE; - XFA_ELEMENT uiType = GetUIChild()->GetClassID(); + XFA_Element uiType = GetUIChild()->GetClassID(); switch (uiType) { - case XFA_ELEMENT_ChoiceList: { + case XFA_Element::ChoiceList: { if (eValueType == XFA_VALUEPICTURE_Display) { int32_t iSelItemIndex = GetSelectedItem(0); if (iSelItemIndex >= 0) { @@ -1504,7 +1504,7 @@ FX_BOOL CXFA_WidgetData::GetValue(CFX_WideString& wsValue, } } } break; - case XFA_ELEMENT_NumericEdit: + case XFA_Element::NumericEdit: if (eValueType != XFA_VALUEPICTURE_Raw && wsPicture.IsEmpty()) { IFX_Locale* pLocale = GetLocal(); if (eValueType == XFA_VALUEPICTURE_Display && pLocale) { @@ -1589,7 +1589,7 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue, if (IFX_Locale* pLocale = GetLocal()) { ASSERT(GetNode()); - CXFA_Node* pNodeValue = GetNode()->GetChild(0, XFA_ELEMENT_Value); + CXFA_Node* pNodeValue = GetNode()->GetChild(0, XFA_Element::Value); if (!pNodeValue) return FALSE; @@ -1598,30 +1598,30 @@ FX_BOOL CXFA_WidgetData::GetFormatDataValue(const CFX_WideString& wsValue, return FALSE; int32_t iVTType = XFA_VT_NULL; - XFA_ELEMENT eType = pValueChild->GetClassID(); + XFA_Element eType = pValueChild->GetClassID(); switch (eType) { - case XFA_ELEMENT_Decimal: + case XFA_Element::Decimal: iVTType = XFA_VT_DECIMAL; break; - case XFA_ELEMENT_Float: + case XFA_Element::Float: iVTType = XFA_VT_FLOAT; break; - case XFA_ELEMENT_Date: + case XFA_Element::Date: iVTType = XFA_VT_DATE; break; - case XFA_ELEMENT_Time: + case XFA_Element::Time: iVTType = XFA_VT_TIME; break; - case XFA_ELEMENT_DateTime: + case XFA_Element::DateTime: iVTType = XFA_VT_DATETIME; break; - case XFA_ELEMENT_Boolean: + case XFA_Element::Boolean: iVTType = XFA_VT_BOOLEAN; break; - case XFA_ELEMENT_Integer: + case XFA_Element::Integer: iVTType = XFA_VT_INTEGER; break; - case XFA_ELEMENT_Text: + case XFA_Element::Text: iVTType = XFA_VT_TEXT; break; default: @@ -1738,7 +1738,7 @@ void CXFA_WidgetData::SyncValue(const CFX_WideString& wsValue, bool bNotify) { void CXFA_WidgetData::InsertListTextItem(CXFA_Node* pItems, const CFX_WideString& wsText, int32_t nIndex) { - CXFA_Node* pText = pItems->CreateSamePacketNode(XFA_ELEMENT_Text); + CXFA_Node* pText = pItems->CreateSamePacketNode(XFA_Element::Text); pItems->InsertChild(nIndex, pText); pText->SetContent(wsText, wsText, FALSE, FALSE, FALSE); } diff --git a/xfa/fxfa/parser/cxfa_widgetdata.h b/xfa/fxfa/parser/cxfa_widgetdata.h index 26f397cb64..222b5bed4a 100644 --- a/xfa/fxfa/parser/cxfa_widgetdata.h +++ b/xfa/fxfa/parser/cxfa_widgetdata.h @@ -42,7 +42,7 @@ class CXFA_WidgetData : public CXFA_Data { explicit CXFA_WidgetData(CXFA_Node* pNode); CXFA_Node* GetUIChild(); - XFA_ELEMENT GetUIType(); + XFA_Element GetUIType(); CFX_WideString GetRawValue(); int32_t GetAccess(FX_BOOL bTemplate = FALSE); int32_t GetRotate(); @@ -152,7 +152,7 @@ class CXFA_WidgetData : public CXFA_Data { void GetPasswordChar(CFX_WideString& wsPassWord); FX_BOOL IsMultiLine(); int32_t GetVerticalScrollPolicy(); - int32_t GetMaxChars(XFA_ELEMENT& eType); + int32_t GetMaxChars(XFA_Element& eType); FX_BOOL GetFracDigits(int32_t& iFracDigits); FX_BOOL GetLeadDigits(int32_t& iLeadDigits); @@ -173,7 +173,7 @@ class CXFA_WidgetData : public CXFA_Data { CFX_WideString& wsOutput); CXFA_Node* m_pUiChildNode; - XFA_ELEMENT m_eUIType; + XFA_Element m_eUIType; }; #endif // XFA_FXFA_PARSER_CXFA_WIDGETDATA_H_ diff --git a/xfa/fxfa/parser/xfa_basic_data.cpp b/xfa/fxfa/parser/xfa_basic_data.cpp index 99d4eaf653..7c9d7e6bd7 100644 --- a/xfa/fxfa/parser/xfa_basic_data.cpp +++ b/xfa/fxfa/parser/xfa_basic_data.cpp @@ -972,765 +972,768 @@ const int32_t g_iXFAAttributeCount = sizeof(g_XFAAttributeData) / sizeof(XFA_ATTRIBUTEINFO); const XFA_NOTSUREATTRIBUTE g_XFANotsureAttributes[] = { - {XFA_ELEMENT_SubformSet, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::SubformSet, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Ordered}, - {XFA_ELEMENT_NumberPattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::NumberPattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Numeric}, - {XFA_ELEMENT_KeyUsage, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::KeyUsage, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_LabelPrinter, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::LabelPrinter, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Zpl}, - {XFA_ELEMENT_CalendarSymbols, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::CalendarSymbols, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Gregorian}, - {XFA_ELEMENT_Barcode, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Cdata, + {XFA_Element::Barcode, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL}, - {XFA_ELEMENT_Barcode, XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Barcode, XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_None}, - {XFA_ELEMENT_TimePattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::TimePattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Med}, - {XFA_ELEMENT_BatchOutput, XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::BatchOutput, XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_None}, - {XFA_ELEMENT_SubjectDNs, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::SubjectDNs, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_Issuers, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Issuers, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_EncryptionMethods, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::EncryptionMethods, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_Pattern, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Pattern, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_CrossHatch}, - {XFA_ELEMENT_Compress, XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Compress, XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_ImageOnly}, - {XFA_ELEMENT_Image, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Image, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Base64}, - {XFA_ELEMENT_TimeStamp, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::TimeStamp, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_Subform, XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Subform, XFA_ATTRIBUTE_Scope, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Name}, - {XFA_ELEMENT_Handler, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Handler, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_Record, XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_Integer, + {XFA_Element::Record, XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_Integer, (void*)0}, - {XFA_ELEMENT_Command, XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_Integer, + {XFA_Element::Command, XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_Integer, (void*)30}, - {XFA_ELEMENT_DigestMethods, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::DigestMethods, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_PageSet, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::PageSet, XFA_ATTRIBUTE_Relation, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_OrderedOccurrence}, - {XFA_ELEMENT_Equate, XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, + {XFA_Element::Equate, XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL}, - {XFA_ELEMENT_Equate, XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, + {XFA_Element::Equate, XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL}, - {XFA_ELEMENT_Traverse, XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Traverse, XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Next}, - {XFA_ELEMENT_Encodings, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Encodings, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_Signing, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Signing, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_Oids, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Oids, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_Signature, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Signature, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_PDF1_3}, - {XFA_ELEMENT_ExData, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, - (void*)XFA_ATTRIBUTEENUM_None}, - {XFA_ELEMENT_Linear, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::ExData, XFA_ATTRIBUTE_TransferEncoding, + XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_None}, + {XFA_Element::Linear, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_ToRight}, - {XFA_ELEMENT_CurrencySymbol, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::CurrencySymbol, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Symbol}, - {XFA_ELEMENT_EquateRange, XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, + {XFA_Element::EquateRange, XFA_ATTRIBUTE_From, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL}, - {XFA_ELEMENT_EquateRange, XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, + {XFA_Element::EquateRange, XFA_ATTRIBUTE_To, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL}, - {XFA_ELEMENT_SignData, XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::SignData, XFA_ATTRIBUTE_Operation, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Sign}, - {XFA_ELEMENT_DatePattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::DatePattern, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Med}, - {XFA_ELEMENT_Bind, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Bind, XFA_ATTRIBUTE_TransferEncoding, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_None}, - {XFA_ELEMENT_Reasons, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Reasons, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_AppearanceFilter, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::AppearanceFilter, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_Form, XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_Cdata, + {XFA_Element::Form, XFA_ATTRIBUTE_Checksum, XFA_ATTRIBUTETYPE_Cdata, (void*)NULL}, - {XFA_ELEMENT_Value, XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_Boolean, + {XFA_Element::Value, XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_Boolean, (void*)0}, - {XFA_ELEMENT_Calculate, XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Calculate, XFA_ATTRIBUTE_Override, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Error}, - {XFA_ELEMENT_Connect, XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_Integer, + {XFA_Element::Connect, XFA_ATTRIBUTE_Timeout, XFA_ATTRIBUTETYPE_Integer, (void*)15}, - {XFA_ELEMENT_Submit, XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Submit, XFA_ATTRIBUTE_Format, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Xdp}, - {XFA_ELEMENT_Radial, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Radial, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_ToEdge}, - {XFA_ELEMENT_LockDocument, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::LockDocument, XFA_ATTRIBUTE_Type, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Optional}, - {XFA_ELEMENT_Occur, XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_Integer, (void*)1}, - {XFA_ELEMENT_NumberSymbol, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, + {XFA_Element::Occur, XFA_ATTRIBUTE_Max, XFA_ATTRIBUTETYPE_Integer, + (void*)1}, + {XFA_Element::NumberSymbol, XFA_ATTRIBUTE_Name, XFA_ATTRIBUTETYPE_Enum, (void*)XFA_ATTRIBUTEENUM_Decimal}, }; const int32_t g_iXFANotsureCount = sizeof(g_XFANotsureAttributes) / sizeof(XFA_NOTSUREATTRIBUTE); const XFA_ELEMENTINFO g_XFAElementData[] = { - {0x23ee3, L"ps", XFA_ELEMENT_Ps, XFA_XDPPACKET_Config, + {0x23ee3, L"ps", XFA_Element::Ps, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x25363, L"to", XFA_ELEMENT_To, XFA_XDPPACKET_Config, + {0x25363, L"to", XFA_Element::To, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x2587e, L"ui", XFA_ELEMENT_Ui, + {0x2587e, L"ui", XFA_Element::Ui, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x1c648b, L"recordSet", XFA_ELEMENT_RecordSet, XFA_XDPPACKET_SourceSet, + {0x1c648b, L"recordSet", XFA_Element::RecordSet, XFA_XDPPACKET_SourceSet, XFA_ObjectType::Node}, - {0x171428f, L"subsetBelow", XFA_ELEMENT_SubsetBelow, XFA_XDPPACKET_Config, + {0x171428f, L"subsetBelow", XFA_Element::SubsetBelow, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x1a0776a, L"subformSet", XFA_ELEMENT_SubformSet, + {0x1a0776a, L"subformSet", XFA_Element::SubformSet, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0x2340d70, L"adobeExtensionLevel", XFA_ELEMENT_AdobeExtensionLevel, + {0x2340d70, L"adobeExtensionLevel", XFA_Element::AdobeExtensionLevel, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x2c1c7f1, L"typeface", XFA_ELEMENT_Typeface, XFA_XDPPACKET_LocaleSet, + {0x2c1c7f1, L"typeface", XFA_Element::Typeface, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0x5518c25, L"break", XFA_ELEMENT_Break, + {0x5518c25, L"break", XFA_Element::Break, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x5fff523, L"fontInfo", XFA_ELEMENT_FontInfo, XFA_XDPPACKET_Config, + {0x5fff523, L"fontInfo", XFA_Element::FontInfo, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x653a227, L"numberPattern", XFA_ELEMENT_NumberPattern, + {0x653a227, L"numberPattern", XFA_Element::NumberPattern, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0x65b4a05, L"dynamicRender", XFA_ELEMENT_DynamicRender, + {0x65b4a05, L"dynamicRender", XFA_Element::DynamicRender, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x7e4362e, L"printScaling", XFA_ELEMENT_PrintScaling, XFA_XDPPACKET_Config, - XFA_ObjectType::ContentNode}, - {0x7fe6d3a, L"checkButton", XFA_ELEMENT_CheckButton, + {0x7e4362e, L"printScaling", XFA_Element::PrintScaling, + XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, + {0x7fe6d3a, L"checkButton", XFA_Element::CheckButton, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x80cf58f, L"datePatterns", XFA_ELEMENT_DatePatterns, + {0x80cf58f, L"datePatterns", XFA_Element::DatePatterns, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0x811929d, L"sourceSet", XFA_ELEMENT_SourceSet, XFA_XDPPACKET_SourceSet, + {0x811929d, L"sourceSet", XFA_Element::SourceSet, XFA_XDPPACKET_SourceSet, XFA_ObjectType::ModelNode}, - {0x9f9d612, L"amd", XFA_ELEMENT_Amd, XFA_XDPPACKET_Config, + {0x9f9d612, L"amd", XFA_Element::Amd, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x9f9efb6, L"arc", XFA_ELEMENT_Arc, + {0x9f9efb6, L"arc", XFA_Element::Arc, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xa48835e, L"day", XFA_ELEMENT_Day, XFA_XDPPACKET_LocaleSet, + {0xa48835e, L"day", XFA_Element::Day, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0xa6328b8, L"era", XFA_ELEMENT_Era, XFA_XDPPACKET_LocaleSet, + {0xa6328b8, L"era", XFA_Element::Era, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0xae6a0a0, L"jog", XFA_ELEMENT_Jog, XFA_XDPPACKET_Config, + {0xae6a0a0, L"jog", XFA_Element::Jog, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xb1b3d22, L"log", XFA_ELEMENT_Log, XFA_XDPPACKET_Config, + {0xb1b3d22, L"log", XFA_Element::Log, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xb35439e, L"map", XFA_ELEMENT_Map, + {0xb35439e, L"map", XFA_Element::Map, XFA_XDPPACKET_Config | XFA_XDPPACKET_SourceSet, XFA_ObjectType::Node}, - {0xb355301, L"mdp", XFA_ELEMENT_Mdp, + {0xb355301, L"mdp", XFA_Element::Mdp, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xb420438, L"breakBefore", XFA_ELEMENT_BreakBefore, + {0xb420438, L"breakBefore", XFA_Element::BreakBefore, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xb6a091c, L"oid", XFA_ELEMENT_Oid, + {0xb6a091c, L"oid", XFA_Element::Oid, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::TextNode}, - {0xb84389f, L"pcl", XFA_ELEMENT_Pcl, XFA_XDPPACKET_Config, + {0xb84389f, L"pcl", XFA_Element::Pcl, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xb843dba, L"pdf", XFA_ELEMENT_Pdf, XFA_XDPPACKET_Config, + {0xb843dba, L"pdf", XFA_Element::Pdf, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xbb8df5d, L"ref", XFA_ELEMENT_Ref, + {0xbb8df5d, L"ref", XFA_Element::Ref, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::TextNode}, - {0xc080cd0, L"uri", XFA_ELEMENT_Uri, + {0xc080cd0, L"uri", XFA_Element::Uri, XFA_XDPPACKET_Config | XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::TextNode}, - {0xc56afbf, L"xdc", XFA_ELEMENT_Xdc, + {0xc56afbf, L"xdc", XFA_Element::Xdc, XFA_XDPPACKET_Config | XFA_XDPPACKET_Xdc, XFA_ObjectType::ModelNode}, - {0xc56afcc, L"xdp", XFA_ELEMENT_Xdp, XFA_XDPPACKET_Config, + {0xc56afcc, L"xdp", XFA_Element::Xdp, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xc56b9ff, L"xfa", XFA_ELEMENT_Xfa, XFA_XDPPACKET_XDP, + {0xc56b9ff, L"xfa", XFA_Element::Xfa, XFA_XDPPACKET_XDP, XFA_ObjectType::ModelNode}, - {0xc56fcb7, L"xsl", XFA_ELEMENT_Xsl, XFA_XDPPACKET_Config, + {0xc56fcb7, L"xsl", XFA_Element::Xsl, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xc8b89d6, L"zpl", XFA_ELEMENT_Zpl, XFA_XDPPACKET_Config, + {0xc8b89d6, L"zpl", XFA_Element::Zpl, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xc9bae94, L"cache", XFA_ELEMENT_Cache, XFA_XDPPACKET_Config, + {0xc9bae94, L"cache", XFA_Element::Cache, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xcb016be, L"margin", XFA_ELEMENT_Margin, + {0xcb016be, L"margin", XFA_Element::Margin, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xe1378fe, L"keyUsage", XFA_ELEMENT_KeyUsage, + {0xe1378fe, L"keyUsage", XFA_Element::KeyUsage, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xfe3596a, L"exclude", XFA_ELEMENT_Exclude, XFA_XDPPACKET_Config, + {0xfe3596a, L"exclude", XFA_Element::Exclude, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x10395ac7, L"choiceList", XFA_ELEMENT_ChoiceList, + {0x10395ac7, L"choiceList", XFA_Element::ChoiceList, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x1059ec18, L"level", XFA_ELEMENT_Level, XFA_XDPPACKET_Config, + {0x1059ec18, L"level", XFA_Element::Level, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x10874804, L"labelPrinter", XFA_ELEMENT_LabelPrinter, + {0x10874804, L"labelPrinter", XFA_Element::LabelPrinter, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x10c40e03, L"calendarSymbols", XFA_ELEMENT_CalendarSymbols, + {0x10c40e03, L"calendarSymbols", XFA_Element::CalendarSymbols, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0x10f1ea24, L"para", XFA_ELEMENT_Para, + {0x10f1ea24, L"para", XFA_Element::Para, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x10f1ea37, L"part", XFA_ELEMENT_Part, XFA_XDPPACKET_Config, + {0x10f1ea37, L"part", XFA_Element::Part, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x1140975b, L"pdfa", XFA_ELEMENT_Pdfa, XFA_XDPPACKET_Config, + {0x1140975b, L"pdfa", XFA_Element::Pdfa, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x1154efe6, L"filter", XFA_ELEMENT_Filter, + {0x1154efe6, L"filter", XFA_Element::Filter, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x13f41de1, L"present", XFA_ELEMENT_Present, XFA_XDPPACKET_Config, + {0x13f41de1, L"present", XFA_Element::Present, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x1827e6ea, L"pagination", XFA_ELEMENT_Pagination, XFA_XDPPACKET_Config, + {0x1827e6ea, L"pagination", XFA_Element::Pagination, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x18463707, L"encoding", XFA_ELEMENT_Encoding, + {0x18463707, L"encoding", XFA_Element::Encoding, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::NodeC}, - {0x185e41e2, L"event", XFA_ELEMENT_Event, + {0x185e41e2, L"event", XFA_Element::Event, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x1adb142d, L"whitespace", XFA_ELEMENT_Whitespace, XFA_XDPPACKET_Config, + {0x1adb142d, L"whitespace", XFA_Element::Whitespace, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x1f3f64c3, L"defaultUi", XFA_ELEMENT_DefaultUi, + {0x1f3f64c3, L"defaultUi", XFA_Element::DefaultUi, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x204e87cb, L"dataModel", XFA_ELEMENT_DataModel, XFA_XDPPACKET_Datasets, + {0x204e87cb, L"dataModel", XFA_Element::DataModel, XFA_XDPPACKET_Datasets, XFA_ObjectType::ModelNode}, - {0x2057b350, L"barcode", XFA_ELEMENT_Barcode, + {0x2057b350, L"barcode", XFA_Element::Barcode, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x20596bad, L"timePattern", XFA_ELEMENT_TimePattern, + {0x20596bad, L"timePattern", XFA_Element::TimePattern, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0x210b74d3, L"batchOutput", XFA_ELEMENT_BatchOutput, XFA_XDPPACKET_Config, + {0x210b74d3, L"batchOutput", XFA_Element::BatchOutput, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x212ff0e2, L"enforce", XFA_ELEMENT_Enforce, XFA_XDPPACKET_Config, + {0x212ff0e2, L"enforce", XFA_Element::Enforce, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x21d351b4, L"currencySymbols", XFA_ELEMENT_CurrencySymbols, + {0x21d351b4, L"currencySymbols", XFA_Element::CurrencySymbols, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0x21db83c5, L"addSilentPrint", XFA_ELEMENT_AddSilentPrint, + {0x21db83c5, L"addSilentPrint", XFA_Element::AddSilentPrint, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x22266258, L"rename", XFA_ELEMENT_Rename, XFA_XDPPACKET_Config, + {0x22266258, L"rename", XFA_Element::Rename, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x226ca8f1, L"operation", XFA_ELEMENT_Operation, + {0x226ca8f1, L"operation", XFA_Element::Operation, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::TextNode}, - {0x23e27b84, L"typefaces", XFA_ELEMENT_Typefaces, XFA_XDPPACKET_LocaleSet, + {0x23e27b84, L"typefaces", XFA_Element::Typefaces, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0x23f4aa75, L"subjectDNs", XFA_ELEMENT_SubjectDNs, + {0x23f4aa75, L"subjectDNs", XFA_Element::SubjectDNs, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x240d5e8e, L"issuers", XFA_ELEMENT_Issuers, + {0x240d5e8e, L"issuers", XFA_Element::Issuers, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x2457a033, L"signaturePseudoModel", XFA_ELEMENT_SignaturePseudoModel, + {0x2457a033, L"signaturePseudoModel", XFA_Element::SignaturePseudoModel, XFA_XDPPACKET_XDP, XFA_ObjectType::OrdinaryObject}, - {0x24a52f8a, L"wsdlConnection", XFA_ELEMENT_WsdlConnection, + {0x24a52f8a, L"wsdlConnection", XFA_Element::WsdlConnection, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::Node}, - {0x254ebd07, L"debug", XFA_ELEMENT_Debug, XFA_XDPPACKET_Config, + {0x254ebd07, L"debug", XFA_Element::Debug, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x2655c66a, L"delta", XFA_ELEMENT_Delta, XFA_XDPPACKET_Form, + {0x2655c66a, L"delta", XFA_Element::Delta, XFA_XDPPACKET_Form, XFA_ObjectType::OrdinaryObject}, - {0x26c0daec, L"eraNames", XFA_ELEMENT_EraNames, XFA_XDPPACKET_LocaleSet, + {0x26c0daec, L"eraNames", XFA_Element::EraNames, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0x273ab03b, L"modifyAnnots", XFA_ELEMENT_ModifyAnnots, + {0x273ab03b, L"modifyAnnots", XFA_Element::ModifyAnnots, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x27875bb4, L"startNode", XFA_ELEMENT_StartNode, XFA_XDPPACKET_Config, + {0x27875bb4, L"startNode", XFA_Element::StartNode, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x285d0dbc, L"button", XFA_ELEMENT_Button, + {0x285d0dbc, L"button", XFA_Element::Button, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x28dee6e9, L"format", XFA_ELEMENT_Format, + {0x28dee6e9, L"format", XFA_Element::Format, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x2a23349e, L"border", XFA_ELEMENT_Border, + {0x2a23349e, L"border", XFA_Element::Border, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x2ae67f19, L"area", XFA_ELEMENT_Area, + {0x2ae67f19, L"area", XFA_Element::Area, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0x2c3c4c67, L"hyphenation", XFA_ELEMENT_Hyphenation, + {0x2c3c4c67, L"hyphenation", XFA_Element::Hyphenation, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x2d08af85, L"text", XFA_ELEMENT_Text, + {0x2d08af85, L"text", XFA_Element::Text, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x2d71b00f, L"time", XFA_ELEMENT_Time, + {0x2d71b00f, L"time", XFA_Element::Time, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x2f16a382, L"type", XFA_ELEMENT_Type, XFA_XDPPACKET_Config, + {0x2f16a382, L"type", XFA_Element::Type, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x2fe057e9, L"overprint", XFA_ELEMENT_Overprint, XFA_XDPPACKET_Config, + {0x2fe057e9, L"overprint", XFA_Element::Overprint, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x302aee16, L"certificates", XFA_ELEMENT_Certificates, + {0x302aee16, L"certificates", XFA_Element::Certificates, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x30b227df, L"encryptionMethods", XFA_ELEMENT_EncryptionMethods, + {0x30b227df, L"encryptionMethods", XFA_Element::EncryptionMethods, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x32b900d1, L"setProperty", XFA_ELEMENT_SetProperty, + {0x32b900d1, L"setProperty", XFA_Element::SetProperty, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x337d9e45, L"printerName", XFA_ELEMENT_PrinterName, XFA_XDPPACKET_Config, + {0x337d9e45, L"printerName", XFA_Element::PrinterName, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x33edda4b, L"startPage", XFA_ELEMENT_StartPage, XFA_XDPPACKET_Config, + {0x33edda4b, L"startPage", XFA_Element::StartPage, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x381943e4, L"pageOffset", XFA_ELEMENT_PageOffset, XFA_XDPPACKET_Config, + {0x381943e4, L"pageOffset", XFA_Element::PageOffset, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x382106cd, L"dateTime", XFA_ELEMENT_DateTime, + {0x382106cd, L"dateTime", XFA_Element::DateTime, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x386e7421, L"comb", XFA_ELEMENT_Comb, + {0x386e7421, L"comb", XFA_Element::Comb, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x390acd9e, L"pattern", XFA_ELEMENT_Pattern, + {0x390acd9e, L"pattern", XFA_Element::Pattern, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x3942163e, L"ifEmpty", XFA_ELEMENT_IfEmpty, XFA_XDPPACKET_Config, + {0x3942163e, L"ifEmpty", XFA_Element::IfEmpty, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x39944a7b, L"suppressBanner", XFA_ELEMENT_SuppressBanner, + {0x39944a7b, L"suppressBanner", XFA_Element::SuppressBanner, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x3b3c3dca, L"outputBin", XFA_ELEMENT_OutputBin, XFA_XDPPACKET_Config, + {0x3b3c3dca, L"outputBin", XFA_Element::OutputBin, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x3b8a4024, L"field", XFA_ELEMENT_Field, + {0x3b8a4024, L"field", XFA_Element::Field, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0x3c15352f, L"agent", XFA_ELEMENT_Agent, XFA_XDPPACKET_Config, + {0x3c15352f, L"agent", XFA_Element::Agent, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x3d7e8668, L"outputXSL", XFA_ELEMENT_OutputXSL, XFA_XDPPACKET_Config, + {0x3d7e8668, L"outputXSL", XFA_Element::OutputXSL, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x3e1c91c5, L"adjustData", XFA_ELEMENT_AdjustData, XFA_XDPPACKET_Config, + {0x3e1c91c5, L"adjustData", XFA_Element::AdjustData, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x3e7a9408, L"autoSave", XFA_ELEMENT_AutoSave, XFA_XDPPACKET_Config, + {0x3e7a9408, L"autoSave", XFA_Element::AutoSave, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x3ecead94, L"contentArea", XFA_ELEMENT_ContentArea, + {0x3ecead94, L"contentArea", XFA_Element::ContentArea, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0x3ef334e3, L"eventPseudoModel", XFA_ELEMENT_EventPseudoModel, + {0x3ef334e3, L"eventPseudoModel", XFA_Element::EventPseudoModel, XFA_XDPPACKET_XDP, XFA_ObjectType::OrdinaryObject}, - {0x3fadaec0, L"wsdlAddress", XFA_ELEMENT_WsdlAddress, + {0x3fadaec0, L"wsdlAddress", XFA_Element::WsdlAddress, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::TextNode}, - {0x40623b5b, L"solid", XFA_ELEMENT_Solid, + {0x40623b5b, L"solid", XFA_Element::Solid, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x41f0bd76, L"dateTimeSymbols", XFA_ELEMENT_DateTimeSymbols, + {0x41f0bd76, L"dateTimeSymbols", XFA_Element::DateTimeSymbols, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0x444e7523, L"encryptionLevel", XFA_ELEMENT_EncryptionLevel, + {0x444e7523, L"encryptionLevel", XFA_Element::EncryptionLevel, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x4523af55, L"edge", XFA_ELEMENT_Edge, + {0x4523af55, L"edge", XFA_Element::Edge, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x45d5e3c1, L"stipple", XFA_ELEMENT_Stipple, + {0x45d5e3c1, L"stipple", XFA_Element::Stipple, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x475e4e87, L"attributes", XFA_ELEMENT_Attributes, XFA_XDPPACKET_Config, + {0x475e4e87, L"attributes", XFA_Element::Attributes, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x487a8c87, L"versionControl", XFA_ELEMENT_VersionControl, + {0x487a8c87, L"versionControl", XFA_Element::VersionControl, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x48e5248c, L"meridiem", XFA_ELEMENT_Meridiem, XFA_XDPPACKET_LocaleSet, + {0x48e5248c, L"meridiem", XFA_Element::Meridiem, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0x48f36719, L"exclGroup", XFA_ELEMENT_ExclGroup, + {0x48f36719, L"exclGroup", XFA_Element::ExclGroup, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0x4977356b, L"toolTip", XFA_ELEMENT_ToolTip, + {0x4977356b, L"toolTip", XFA_Element::ToolTip, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::TextNode}, - {0x499afecc, L"compress", XFA_ELEMENT_Compress, XFA_XDPPACKET_Config, + {0x499afecc, L"compress", XFA_Element::Compress, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x4a0c4948, L"reason", XFA_ELEMENT_Reason, + {0x4a0c4948, L"reason", XFA_Element::Reason, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::TextNode}, - {0x4bdcce13, L"execute", XFA_ELEMENT_Execute, + {0x4bdcce13, L"execute", XFA_Element::Execute, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x4c56b216, L"contentCopy", XFA_ELEMENT_ContentCopy, XFA_XDPPACKET_Config, + {0x4c56b216, L"contentCopy", XFA_Element::ContentCopy, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x4cc176d3, L"dateTimeEdit", XFA_ELEMENT_DateTimeEdit, + {0x4cc176d3, L"dateTimeEdit", XFA_Element::DateTimeEdit, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x4e1e39b6, L"config", XFA_ELEMENT_Config, XFA_XDPPACKET_Config, + {0x4e1e39b6, L"config", XFA_Element::Config, XFA_XDPPACKET_Config, XFA_ObjectType::ModelNode}, - {0x4e2d6083, L"image", XFA_ELEMENT_Image, + {0x4e2d6083, L"image", XFA_Element::Image, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x4e814150, L"#xHTML", XFA_ELEMENT_SharpxHTML, + {0x4e814150, L"#xHTML", XFA_Element::SharpxHTML, XFA_XDPPACKET_Template | XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Form, XFA_ObjectType::NodeV}, - {0x4f2388c1, L"numberOfCopies", XFA_ELEMENT_NumberOfCopies, + {0x4f2388c1, L"numberOfCopies", XFA_Element::NumberOfCopies, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x4f512e30, L"behaviorOverride", XFA_ELEMENT_BehaviorOverride, + {0x4f512e30, L"behaviorOverride", XFA_Element::BehaviorOverride, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x4fdc3454, L"timeStamp", XFA_ELEMENT_TimeStamp, + {0x4fdc3454, L"timeStamp", XFA_Element::TimeStamp, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x51d90546, L"month", XFA_ELEMENT_Month, XFA_XDPPACKET_LocaleSet, + {0x51d90546, L"month", XFA_Element::Month, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0x523437e4, L"viewerPreferences", XFA_ELEMENT_ViewerPreferences, + {0x523437e4, L"viewerPreferences", XFA_Element::ViewerPreferences, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x53abc1c6, L"scriptModel", XFA_ELEMENT_ScriptModel, XFA_XDPPACKET_Config, + {0x53abc1c6, L"scriptModel", XFA_Element::ScriptModel, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x54034c2f, L"decimal", XFA_ELEMENT_Decimal, + {0x54034c2f, L"decimal", XFA_Element::Decimal, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x54202c9e, L"subform", XFA_ELEMENT_Subform, + {0x54202c9e, L"subform", XFA_Element::Subform, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0x542c7300, L"select", XFA_ELEMENT_Select, XFA_XDPPACKET_SourceSet, + {0x542c7300, L"select", XFA_Element::Select, XFA_XDPPACKET_SourceSet, XFA_ObjectType::TextNode}, - {0x5436d198, L"window", XFA_ELEMENT_Window, XFA_XDPPACKET_Config, + {0x5436d198, L"window", XFA_Element::Window, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x5473b6dc, L"localeSet", XFA_ELEMENT_LocaleSet, + {0x5473b6dc, L"localeSet", XFA_Element::LocaleSet, XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ModelNode}, - {0x56ae179e, L"handler", XFA_ELEMENT_Handler, + {0x56ae179e, L"handler", XFA_Element::Handler, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::TextNode}, - {0x5700bd5f, L"hostPseudoModel", XFA_ELEMENT_HostPseudoModel, + {0x5700bd5f, L"hostPseudoModel", XFA_Element::HostPseudoModel, XFA_XDPPACKET_XDP, XFA_ObjectType::OrdinaryObject}, - {0x570ce835, L"presence", XFA_ELEMENT_Presence, XFA_XDPPACKET_Config, + {0x570ce835, L"presence", XFA_Element::Presence, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x5779d65f, L"record", XFA_ELEMENT_Record, XFA_XDPPACKET_Config, + {0x5779d65f, L"record", XFA_Element::Record, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x59c8f27d, L"embed", XFA_ELEMENT_Embed, XFA_XDPPACKET_Config, + {0x59c8f27d, L"embed", XFA_Element::Embed, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x5a50e9e6, L"version", XFA_ELEMENT_Version, XFA_XDPPACKET_Config, + {0x5a50e9e6, L"version", XFA_Element::Version, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x5b8383df, L"command", XFA_ELEMENT_Command, XFA_XDPPACKET_SourceSet, + {0x5b8383df, L"command", XFA_Element::Command, XFA_XDPPACKET_SourceSet, XFA_ObjectType::Node}, - {0x5c43c6c3, L"copies", XFA_ELEMENT_Copies, XFA_XDPPACKET_Config, + {0x5c43c6c3, L"copies", XFA_Element::Copies, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x5e0c2c49, L"staple", XFA_ELEMENT_Staple, XFA_XDPPACKET_Config, + {0x5e0c2c49, L"staple", XFA_Element::Staple, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x5e5083dd, L"submitFormat", XFA_ELEMENT_SubmitFormat, + {0x5e5083dd, L"submitFormat", XFA_Element::SubmitFormat, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x5e8c5d20, L"boolean", XFA_ELEMENT_Boolean, + {0x5e8c5d20, L"boolean", XFA_Element::Boolean, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x60490a85, L"message", XFA_ELEMENT_Message, + {0x60490a85, L"message", XFA_Element::Message, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x60d4c8b1, L"output", XFA_ELEMENT_Output, XFA_XDPPACKET_Config, + {0x60d4c8b1, L"output", XFA_Element::Output, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x61810081, L"psMap", XFA_ELEMENT_PsMap, XFA_XDPPACKET_Config, + {0x61810081, L"psMap", XFA_Element::PsMap, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x62bd904b, L"excludeNS", XFA_ELEMENT_ExcludeNS, XFA_XDPPACKET_Config, + {0x62bd904b, L"excludeNS", XFA_Element::ExcludeNS, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x669d4f77, L"assist", XFA_ELEMENT_Assist, + {0x669d4f77, L"assist", XFA_Element::Assist, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x67334a1c, L"picture", XFA_ELEMENT_Picture, + {0x67334a1c, L"picture", XFA_Element::Picture, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x67fe7334, L"traversal", XFA_ELEMENT_Traversal, + {0x67fe7334, L"traversal", XFA_Element::Traversal, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x6894589c, L"silentPrint", XFA_ELEMENT_SilentPrint, XFA_XDPPACKET_Config, + {0x6894589c, L"silentPrint", XFA_Element::SilentPrint, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x68a16bbd, L"webClient", XFA_ELEMENT_WebClient, XFA_XDPPACKET_Config, + {0x68a16bbd, L"webClient", XFA_Element::WebClient, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x69f115df, L"layoutPseudoModel", XFA_ELEMENT_LayoutPseudoModel, + {0x69f115df, L"layoutPseudoModel", XFA_Element::LayoutPseudoModel, XFA_XDPPACKET_XDP, XFA_ObjectType::OrdinaryObject}, - {0x6a4bc084, L"producer", XFA_ELEMENT_Producer, XFA_XDPPACKET_Config, + {0x6a4bc084, L"producer", XFA_Element::Producer, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x6a9e04c9, L"corner", XFA_ELEMENT_Corner, + {0x6a9e04c9, L"corner", XFA_Element::Corner, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x6ccd7274, L"msgId", XFA_ELEMENT_MsgId, XFA_XDPPACKET_Config, + {0x6ccd7274, L"msgId", XFA_Element::MsgId, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x6e67921f, L"color", XFA_ELEMENT_Color, + {0x6e67921f, L"color", XFA_Element::Color, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x6ec217a5, L"keep", XFA_ELEMENT_Keep, + {0x6ec217a5, L"keep", XFA_Element::Keep, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x6eef1116, L"query", XFA_ELEMENT_Query, XFA_XDPPACKET_SourceSet, + {0x6eef1116, L"query", XFA_Element::Query, XFA_XDPPACKET_SourceSet, XFA_ObjectType::Node}, - {0x7033bfd5, L"insert", XFA_ELEMENT_Insert, XFA_XDPPACKET_SourceSet, + {0x7033bfd5, L"insert", XFA_Element::Insert, XFA_XDPPACKET_SourceSet, XFA_ObjectType::TextNode}, - {0x704af389, L"imageEdit", XFA_ELEMENT_ImageEdit, + {0x704af389, L"imageEdit", XFA_Element::ImageEdit, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x7233018a, L"validate", XFA_ELEMENT_Validate, + {0x7233018a, L"validate", XFA_Element::Validate, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x72ba47b4, L"digestMethods", XFA_ELEMENT_DigestMethods, + {0x72ba47b4, L"digestMethods", XFA_Element::DigestMethods, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x72f2aa7a, L"numberPatterns", XFA_ELEMENT_NumberPatterns, + {0x72f2aa7a, L"numberPatterns", XFA_Element::NumberPatterns, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0x74caed29, L"pageSet", XFA_ELEMENT_PageSet, + {0x74caed29, L"pageSet", XFA_Element::PageSet, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0x7568e6ae, L"integer", XFA_ELEMENT_Integer, + {0x7568e6ae, L"integer", XFA_Element::Integer, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x76182db9, L"soapAddress", XFA_ELEMENT_SoapAddress, + {0x76182db9, L"soapAddress", XFA_Element::SoapAddress, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::TextNode}, - {0x773146c5, L"equate", XFA_ELEMENT_Equate, XFA_XDPPACKET_Config, + {0x773146c5, L"equate", XFA_Element::Equate, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x77d449dd, L"formFieldFilling", XFA_ELEMENT_FormFieldFilling, + {0x77d449dd, L"formFieldFilling", XFA_Element::FormFieldFilling, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x7889d68a, L"pageRange", XFA_ELEMENT_PageRange, XFA_XDPPACKET_Config, + {0x7889d68a, L"pageRange", XFA_Element::PageRange, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x7baca2e3, L"update", XFA_ELEMENT_Update, XFA_XDPPACKET_SourceSet, + {0x7baca2e3, L"update", XFA_Element::Update, XFA_XDPPACKET_SourceSet, XFA_ObjectType::TextNode}, - {0x7ce89001, L"connectString", XFA_ELEMENT_ConnectString, + {0x7ce89001, L"connectString", XFA_Element::ConnectString, XFA_XDPPACKET_SourceSet, XFA_ObjectType::TextNode}, - {0x7d9fd7c5, L"mode", XFA_ELEMENT_Mode, XFA_XDPPACKET_Config, + {0x7d9fd7c5, L"mode", XFA_Element::Mode, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x7e7e845e, L"layout", XFA_ELEMENT_Layout, XFA_XDPPACKET_Config, + {0x7e7e845e, L"layout", XFA_Element::Layout, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x7e845c34, L"#xml", XFA_ELEMENT_Sharpxml, + {0x7e845c34, L"#xml", XFA_Element::Sharpxml, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::NodeV}, - {0x7fb341df, L"xsdConnection", XFA_ELEMENT_XsdConnection, + {0x7fb341df, L"xsdConnection", XFA_Element::XsdConnection, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::Node}, - {0x7ffb51cc, L"traverse", XFA_ELEMENT_Traverse, + {0x7ffb51cc, L"traverse", XFA_Element::Traverse, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x80203b5a, L"encodings", XFA_ELEMENT_Encodings, + {0x80203b5a, L"encodings", XFA_Element::Encodings, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x803550fc, L"template", XFA_ELEMENT_Template, + {0x803550fc, L"template", XFA_Element::Template, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ModelNode}, - {0x803d5bbc, L"acrobat", XFA_ELEMENT_Acrobat, XFA_XDPPACKET_Config, + {0x803d5bbc, L"acrobat", XFA_Element::Acrobat, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0x821d6569, L"validationMessaging", XFA_ELEMENT_ValidationMessaging, + {0x821d6569, L"validationMessaging", XFA_Element::ValidationMessaging, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x830e688f, L"signing", XFA_ELEMENT_Signing, + {0x830e688f, L"signing", XFA_Element::Signing, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x83a550d2, L"dataWindow", XFA_ELEMENT_DataWindow, XFA_XDPPACKET_Datasets, + {0x83a550d2, L"dataWindow", XFA_Element::DataWindow, XFA_XDPPACKET_Datasets, XFA_ObjectType::OrdinaryObject}, - {0x83dab9f5, L"script", XFA_ELEMENT_Script, + {0x83dab9f5, L"script", XFA_Element::Script, XFA_XDPPACKET_Config | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x8411ebcd, L"addViewerPreferences", XFA_ELEMENT_AddViewerPreferences, + {0x8411ebcd, L"addViewerPreferences", XFA_Element::AddViewerPreferences, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x8777642e, L"alwaysEmbed", XFA_ELEMENT_AlwaysEmbed, XFA_XDPPACKET_Config, + {0x8777642e, L"alwaysEmbed", XFA_Element::AlwaysEmbed, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x877a6b39, L"passwordEdit", XFA_ELEMENT_PasswordEdit, + {0x877a6b39, L"passwordEdit", XFA_Element::PasswordEdit, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x87e84c99, L"numericEdit", XFA_ELEMENT_NumericEdit, + {0x87e84c99, L"numericEdit", XFA_Element::NumericEdit, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x8852cdec, L"encryptionMethod", XFA_ELEMENT_EncryptionMethod, + {0x8852cdec, L"encryptionMethod", XFA_Element::EncryptionMethod, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::NodeC}, - {0x891f4606, L"change", XFA_ELEMENT_Change, XFA_XDPPACKET_Config, + {0x891f4606, L"change", XFA_Element::Change, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x89939f36, L"pageArea", XFA_ELEMENT_PageArea, + {0x89939f36, L"pageArea", XFA_Element::PageArea, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0x8a9d6247, L"submitUrl", XFA_ELEMENT_SubmitUrl, XFA_XDPPACKET_Config, + {0x8a9d6247, L"submitUrl", XFA_Element::SubmitUrl, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x8ad8b90f, L"oids", XFA_ELEMENT_Oids, + {0x8ad8b90f, L"oids", XFA_Element::Oids, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x8b036f32, L"signature", XFA_ELEMENT_Signature, + {0x8b036f32, L"signature", XFA_Element::Signature, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x8b128efb, L"ADBE_JSConsole", XFA_ELEMENT_ADBE_JSConsole, + {0x8b128efb, L"ADBE_JSConsole", XFA_Element::ADBE_JSConsole, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0x8bcfe96e, L"caption", XFA_ELEMENT_Caption, + {0x8bcfe96e, L"caption", XFA_Element::Caption, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x8e1c2921, L"relevant", XFA_ELEMENT_Relevant, XFA_XDPPACKET_Config, + {0x8e1c2921, L"relevant", XFA_Element::Relevant, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x8e3f0a4b, L"flipLabel", XFA_ELEMENT_FlipLabel, XFA_XDPPACKET_Config, + {0x8e3f0a4b, L"flipLabel", XFA_Element::FlipLabel, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x900280b7, L"exData", XFA_ELEMENT_ExData, + {0x900280b7, L"exData", XFA_Element::ExData, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0x91e80352, L"dayNames", XFA_ELEMENT_DayNames, XFA_XDPPACKET_LocaleSet, + {0x91e80352, L"dayNames", XFA_Element::DayNames, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0x93113b11, L"soapAction", XFA_ELEMENT_SoapAction, + {0x93113b11, L"soapAction", XFA_Element::SoapAction, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::TextNode}, - {0x938b09f6, L"defaultTypeface", XFA_ELEMENT_DefaultTypeface, + {0x938b09f6, L"defaultTypeface", XFA_Element::DefaultTypeface, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0x95b37897, L"manifest", XFA_ELEMENT_Manifest, + {0x95b37897, L"manifest", XFA_Element::Manifest, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x97b76b54, L"overflow", XFA_ELEMENT_Overflow, + {0x97b76b54, L"overflow", XFA_Element::Overflow, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x9a57861b, L"linear", XFA_ELEMENT_Linear, + {0x9a57861b, L"linear", XFA_Element::Linear, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0x9ad5a821, L"currencySymbol", XFA_ELEMENT_CurrencySymbol, + {0x9ad5a821, L"currencySymbol", XFA_Element::CurrencySymbol, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0x9c6471b3, L"delete", XFA_ELEMENT_Delete, XFA_XDPPACKET_SourceSet, + {0x9c6471b3, L"delete", XFA_Element::Delete, XFA_XDPPACKET_SourceSet, XFA_ObjectType::TextNode}, - {0x9deea61d, L"deltas", XFA_ELEMENT_Deltas, XFA_XDPPACKET_Form, + {0x9deea61d, L"deltas", XFA_Element::Deltas, XFA_XDPPACKET_Form, XFA_ObjectType::OrdinaryObject}, - {0x9e67de21, L"digestMethod", XFA_ELEMENT_DigestMethod, + {0x9e67de21, L"digestMethod", XFA_Element::DigestMethod, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::NodeC}, - {0x9f3e9510, L"instanceManager", XFA_ELEMENT_InstanceManager, + {0x9f3e9510, L"instanceManager", XFA_Element::InstanceManager, XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xa0799892, L"equateRange", XFA_ELEMENT_EquateRange, XFA_XDPPACKET_Config, + {0xa0799892, L"equateRange", XFA_Element::EquateRange, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0xa084a381, L"medium", XFA_ELEMENT_Medium, + {0xa084a381, L"medium", XFA_Element::Medium, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xa1211b8b, L"textEdit", XFA_ELEMENT_TextEdit, + {0xa1211b8b, L"textEdit", XFA_Element::TextEdit, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xa17008f0, L"templateCache", XFA_ELEMENT_TemplateCache, + {0xa17008f0, L"templateCache", XFA_Element::TemplateCache, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xa4f7b88f, L"compressObjectStream", XFA_ELEMENT_CompressObjectStream, + {0xa4f7b88f, L"compressObjectStream", XFA_Element::CompressObjectStream, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xa65f5d17, L"dataValue", XFA_ELEMENT_DataValue, XFA_XDPPACKET_Datasets, + {0xa65f5d17, L"dataValue", XFA_Element::DataValue, XFA_XDPPACKET_Datasets, XFA_ObjectType::Node}, - {0xa6caaa89, L"accessibleContent", XFA_ELEMENT_AccessibleContent, + {0xa6caaa89, L"accessibleContent", XFA_Element::AccessibleContent, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xa8c7d5e2, L"nodeList", XFA_ELEMENT_NodeList, XFA_XDPPACKET_XDP, + {0xa8c7d5e2, L"nodeList", XFA_Element::NodeList, XFA_XDPPACKET_XDP, XFA_ObjectType::NodeList}, - {0xa94cc00b, L"includeXDPContent", XFA_ELEMENT_IncludeXDPContent, + {0xa94cc00b, L"includeXDPContent", XFA_Element::IncludeXDPContent, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xa9b081a1, L"xmlConnection", XFA_ELEMENT_XmlConnection, + {0xa9b081a1, L"xmlConnection", XFA_Element::XmlConnection, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::Node}, {0xab2a3b74, L"validateApprovalSignatures", - XFA_ELEMENT_ValidateApprovalSignatures, XFA_XDPPACKET_Config, + XFA_Element::ValidateApprovalSignatures, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0xab8c5a2b, L"signData", XFA_ELEMENT_SignData, + {0xab8c5a2b, L"signData", XFA_Element::SignData, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xabaa2ceb, L"packets", XFA_ELEMENT_Packets, XFA_XDPPACKET_Config, + {0xabaa2ceb, L"packets", XFA_Element::Packets, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xadba359c, L"datePattern", XFA_ELEMENT_DatePattern, + {0xadba359c, L"datePattern", XFA_Element::DatePattern, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0xae222b2b, L"duplexOption", XFA_ELEMENT_DuplexOption, + {0xae222b2b, L"duplexOption", XFA_Element::DuplexOption, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xb012effb, L"base", XFA_ELEMENT_Base, XFA_XDPPACKET_Config, + {0xb012effb, L"base", XFA_Element::Base, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xb0e5485d, L"bind", XFA_ELEMENT_Bind, + {0xb0e5485d, L"bind", XFA_Element::Bind, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xb45d61b2, L"compression", XFA_ELEMENT_Compression, XFA_XDPPACKET_Config, + {0xb45d61b2, L"compression", XFA_Element::Compression, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xb563f0ff, L"user", XFA_ELEMENT_User, XFA_XDPPACKET_SourceSet, + {0xb563f0ff, L"user", XFA_Element::User, XFA_XDPPACKET_SourceSet, XFA_ObjectType::TextNode}, - {0xb5848ad5, L"rectangle", XFA_ELEMENT_Rectangle, + {0xb5848ad5, L"rectangle", XFA_Element::Rectangle, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xb6dacb72, L"effectiveOutputPolicy", XFA_ELEMENT_EffectiveOutputPolicy, + {0xb6dacb72, L"effectiveOutputPolicy", XFA_Element::EffectiveOutputPolicy, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::Node}, - {0xb7d7654d, L"ADBE_JSDebugger", XFA_ELEMENT_ADBE_JSDebugger, + {0xb7d7654d, L"ADBE_JSDebugger", XFA_Element::ADBE_JSDebugger, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xbab37f73, L"acrobat7", XFA_ELEMENT_Acrobat7, XFA_XDPPACKET_Config, + {0xbab37f73, L"acrobat7", XFA_Element::Acrobat7, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xbc70081e, L"interactive", XFA_ELEMENT_Interactive, XFA_XDPPACKET_Config, + {0xbc70081e, L"interactive", XFA_Element::Interactive, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xbc8fa350, L"locale", XFA_ELEMENT_Locale, + {0xbc8fa350, L"locale", XFA_Element::Locale, XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0xbcd44940, L"currentPage", XFA_ELEMENT_CurrentPage, XFA_XDPPACKET_Config, + {0xbcd44940, L"currentPage", XFA_Element::CurrentPage, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xbde9abda, L"data", XFA_ELEMENT_Data, XFA_XDPPACKET_Config, + {0xbde9abda, L"data", XFA_Element::Data, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xbde9abde, L"date", XFA_ELEMENT_Date, + {0xbde9abde, L"date", XFA_Element::Date, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0xbe52dfbf, L"desc", XFA_ELEMENT_Desc, + {0xbe52dfbf, L"desc", XFA_Element::Desc, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xbf4b6405, L"encrypt", XFA_ELEMENT_Encrypt, + {0xbf4b6405, L"encrypt", XFA_Element::Encrypt, XFA_XDPPACKET_Template | XFA_XDPPACKET_Config | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0xbfa87cce, L"draw", XFA_ELEMENT_Draw, + {0xbfa87cce, L"draw", XFA_Element::Draw, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0xc181ff4b, L"encryption", XFA_ELEMENT_Encryption, XFA_XDPPACKET_Config, + {0xc181ff4b, L"encryption", XFA_Element::Encryption, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xc1970f40, L"meridiemNames", XFA_ELEMENT_MeridiemNames, + {0xc1970f40, L"meridiemNames", XFA_Element::MeridiemNames, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0xc5ad9f5e, L"messaging", XFA_ELEMENT_Messaging, XFA_XDPPACKET_Config, + {0xc5ad9f5e, L"messaging", XFA_Element::Messaging, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xc69549f4, L"speak", XFA_ELEMENT_Speak, + {0xc69549f4, L"speak", XFA_Element::Speak, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::TextNode}, - {0xc7743dc7, L"dataGroup", XFA_ELEMENT_DataGroup, XFA_XDPPACKET_Datasets, + {0xc7743dc7, L"dataGroup", XFA_Element::DataGroup, XFA_XDPPACKET_Datasets, XFA_ObjectType::Node}, - {0xc7eb20e9, L"common", XFA_ELEMENT_Common, XFA_XDPPACKET_Config, + {0xc7eb20e9, L"common", XFA_Element::Common, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xc85d4528, L"#text", XFA_ELEMENT_Sharptext, + {0xc85d4528, L"#text", XFA_Element::Sharptext, XFA_XDPPACKET_Template | XFA_XDPPACKET_Config | XFA_XDPPACKET_LocaleSet | XFA_XDPPACKET_ConnectionSet | XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Form, XFA_ObjectType::NodeV}, - {0xc861556a, L"paginationOverride", XFA_ELEMENT_PaginationOverride, + {0xc861556a, L"paginationOverride", XFA_Element::PaginationOverride, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xc903dabb, L"reasons", XFA_ELEMENT_Reasons, + {0xc903dabb, L"reasons", XFA_Element::Reasons, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xc9a8127f, L"signatureProperties", XFA_ELEMENT_SignatureProperties, + {0xc9a8127f, L"signatureProperties", XFA_Element::SignatureProperties, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xca010c2d, L"threshold", XFA_ELEMENT_Threshold, XFA_XDPPACKET_Config, + {0xca010c2d, L"threshold", XFA_Element::Threshold, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0xcb4c5e96, L"appearanceFilter", XFA_ELEMENT_AppearanceFilter, + {0xcb4c5e96, L"appearanceFilter", XFA_Element::AppearanceFilter, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::NodeC}, - {0xcc92aba7, L"fill", XFA_ELEMENT_Fill, + {0xcc92aba7, L"fill", XFA_Element::Fill, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xcd308b77, L"font", XFA_ELEMENT_Font, + {0xcd308b77, L"font", XFA_Element::Font, XFA_XDPPACKET_Template | XFA_XDPPACKET_Config | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xcd309ff4, L"form", XFA_ELEMENT_Form, XFA_XDPPACKET_Form, + {0xcd309ff4, L"form", XFA_Element::Form, XFA_XDPPACKET_Form, XFA_ObjectType::ModelNode}, - {0xcebcca2d, L"mediumInfo", XFA_ELEMENT_MediumInfo, XFA_XDPPACKET_Config, + {0xcebcca2d, L"mediumInfo", XFA_Element::MediumInfo, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xcfe0d643, L"certificate", XFA_ELEMENT_Certificate, + {0xcfe0d643, L"certificate", XFA_Element::Certificate, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::TextNode}, - {0xd012c033, L"password", XFA_ELEMENT_Password, XFA_XDPPACKET_SourceSet, + {0xd012c033, L"password", XFA_Element::Password, XFA_XDPPACKET_SourceSet, XFA_ObjectType::TextNode}, - {0xd01604bd, L"runScripts", XFA_ELEMENT_RunScripts, XFA_XDPPACKET_Config, + {0xd01604bd, L"runScripts", XFA_Element::RunScripts, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xd1227e6f, L"trace", XFA_ELEMENT_Trace, XFA_XDPPACKET_Config, + {0xd1227e6f, L"trace", XFA_Element::Trace, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xd1532876, L"float", XFA_ELEMENT_Float, + {0xd1532876, L"float", XFA_Element::Float, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0xd17a6c30, L"renderPolicy", XFA_ELEMENT_RenderPolicy, + {0xd17a6c30, L"renderPolicy", XFA_Element::RenderPolicy, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xd4bf6823, L"logPseudoModel", XFA_ELEMENT_LogPseudoModel, + {0xd4bf6823, L"logPseudoModel", XFA_Element::LogPseudoModel, XFA_XDPPACKET_XDP, XFA_ObjectType::OrdinaryObject}, - {0xd58aa962, L"destination", XFA_ELEMENT_Destination, XFA_XDPPACKET_Config, + {0xd58aa962, L"destination", XFA_Element::Destination, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xd6e27f1d, L"value", XFA_ELEMENT_Value, + {0xd6e27f1d, L"value", XFA_Element::Value, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xd7a14462, L"bookend", XFA_ELEMENT_Bookend, + {0xd7a14462, L"bookend", XFA_Element::Bookend, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xd8c31254, L"exObject", XFA_ELEMENT_ExObject, + {0xd8c31254, L"exObject", XFA_Element::ExObject, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xda6a8590, L"openAction", XFA_ELEMENT_OpenAction, XFA_XDPPACKET_Config, + {0xda6a8590, L"openAction", XFA_Element::OpenAction, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xdab4fb7d, L"neverEmbed", XFA_ELEMENT_NeverEmbed, XFA_XDPPACKET_Config, + {0xdab4fb7d, L"neverEmbed", XFA_Element::NeverEmbed, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0xdb98475f, L"bindItems", XFA_ELEMENT_BindItems, + {0xdb98475f, L"bindItems", XFA_Element::BindItems, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xdbfbe02e, L"calculate", XFA_ELEMENT_Calculate, + {0xdbfbe02e, L"calculate", XFA_Element::Calculate, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xdd7676ed, L"print", XFA_ELEMENT_Print, XFA_XDPPACKET_Config, + {0xdd7676ed, L"print", XFA_Element::Print, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xdde273d7, L"extras", XFA_ELEMENT_Extras, + {0xdde273d7, L"extras", XFA_Element::Extras, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xde146b34, L"proto", XFA_ELEMENT_Proto, + {0xde146b34, L"proto", XFA_Element::Proto, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xdf059321, L"dSigData", XFA_ELEMENT_DSigData, + {0xdf059321, L"dSigData", XFA_Element::DSigData, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xdfccf030, L"creator", XFA_ELEMENT_Creator, XFA_XDPPACKET_Config, + {0xdfccf030, L"creator", XFA_Element::Creator, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xdff78c6a, L"connect", XFA_ELEMENT_Connect, + {0xdff78c6a, L"connect", XFA_Element::Connect, XFA_XDPPACKET_SourceSet | XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xe11a2cbc, L"permissions", XFA_ELEMENT_Permissions, XFA_XDPPACKET_Config, + {0xe11a2cbc, L"permissions", XFA_Element::Permissions, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xe14c801c, L"connectionSet", XFA_ELEMENT_ConnectionSet, + {0xe14c801c, L"connectionSet", XFA_Element::ConnectionSet, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::ModelNode}, - {0xe1c83a14, L"submit", XFA_ELEMENT_Submit, + {0xe1c83a14, L"submit", XFA_Element::Submit, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xe29821cd, L"range", XFA_ELEMENT_Range, XFA_XDPPACKET_Config, + {0xe29821cd, L"range", XFA_Element::Range, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0xe38d83c7, L"linearized", XFA_ELEMENT_Linearized, XFA_XDPPACKET_Config, + {0xe38d83c7, L"linearized", XFA_Element::Linearized, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xe3aa2578, L"packet", XFA_ELEMENT_Packet, XFA_XDPPACKET_XDP, + {0xe3aa2578, L"packet", XFA_Element::Packet, XFA_XDPPACKET_XDP, XFA_ObjectType::NodeC}, - {0xe3aa860e, L"rootElement", XFA_ELEMENT_RootElement, + {0xe3aa860e, L"rootElement", XFA_Element::RootElement, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::TextNode}, - {0xe3e553fa, L"plaintextMetadata", XFA_ELEMENT_PlaintextMetadata, + {0xe3e553fa, L"plaintextMetadata", XFA_Element::PlaintextMetadata, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xe3e6e4f2, L"numberSymbols", XFA_ELEMENT_NumberSymbols, + {0xe3e6e4f2, L"numberSymbols", XFA_Element::NumberSymbols, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0xe3f067f6, L"printHighQuality", XFA_ELEMENT_PrintHighQuality, + {0xe3f067f6, L"printHighQuality", XFA_Element::PrintHighQuality, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xe3fd078c, L"driver", XFA_ELEMENT_Driver, XFA_XDPPACKET_Config, + {0xe3fd078c, L"driver", XFA_Element::Driver, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xe48b34f2, L"incrementalLoad", XFA_ELEMENT_IncrementalLoad, + {0xe48b34f2, L"incrementalLoad", XFA_Element::IncrementalLoad, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0xe550e7c2, L"subjectDN", XFA_ELEMENT_SubjectDN, + {0xe550e7c2, L"subjectDN", XFA_Element::SubjectDN, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::NodeC}, {0xe6669a78, L"compressLogicalStructure", - XFA_ELEMENT_CompressLogicalStructure, XFA_XDPPACKET_Config, + XFA_Element::CompressLogicalStructure, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xe7a7ea02, L"incrementalMerge", XFA_ELEMENT_IncrementalMerge, + {0xe7a7ea02, L"incrementalMerge", XFA_Element::IncrementalMerge, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xe948530d, L"radial", XFA_ELEMENT_Radial, + {0xe948530d, L"radial", XFA_Element::Radial, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xea8d6999, L"variables", XFA_ELEMENT_Variables, + {0xea8d6999, L"variables", XFA_Element::Variables, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContainerNode}, - {0xeaa142c0, L"timePatterns", XFA_ELEMENT_TimePatterns, + {0xeaa142c0, L"timePatterns", XFA_Element::TimePatterns, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, - {0xeb943a71, L"effectiveInputPolicy", XFA_ELEMENT_EffectiveInputPolicy, + {0xeb943a71, L"effectiveInputPolicy", XFA_Element::EffectiveInputPolicy, XFA_XDPPACKET_ConnectionSet, XFA_ObjectType::Node}, - {0xef04a2bc, L"nameAttr", XFA_ELEMENT_NameAttr, XFA_XDPPACKET_Config, + {0xef04a2bc, L"nameAttr", XFA_Element::NameAttr, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0xf07222ab, L"conformance", XFA_ELEMENT_Conformance, XFA_XDPPACKET_Config, + {0xf07222ab, L"conformance", XFA_Element::Conformance, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xf0aaaadc, L"transform", XFA_ELEMENT_Transform, XFA_XDPPACKET_Config, + {0xf0aaaadc, L"transform", XFA_Element::Transform, XFA_XDPPACKET_Config, XFA_ObjectType::Node}, - {0xf1433e88, L"lockDocument", XFA_ELEMENT_LockDocument, + {0xf1433e88, L"lockDocument", XFA_Element::LockDocument, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::ContentNode}, - {0xf54eb997, L"breakAfter", XFA_ELEMENT_BreakAfter, + {0xf54eb997, L"breakAfter", XFA_Element::BreakAfter, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xf616da28, L"line", XFA_ELEMENT_Line, + {0xf616da28, L"line", XFA_Element::Line, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xf616f3dc, L"list", XFA_ELEMENT_List, XFA_XDPPACKET_XDP, + {0xf616f3dc, L"list", XFA_Element::List, XFA_XDPPACKET_XDP, XFA_ObjectType::OrdinaryList}, - {0xf7055fb1, L"source", XFA_ELEMENT_Source, XFA_XDPPACKET_SourceSet, + {0xf7055fb1, L"source", XFA_Element::Source, XFA_XDPPACKET_SourceSet, XFA_ObjectType::Node}, - {0xf7eebe1c, L"occur", XFA_ELEMENT_Occur, + {0xf7eebe1c, L"occur", XFA_Element::Occur, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, - {0xf8d10d97, L"pickTrayByPDFSize", XFA_ELEMENT_PickTrayByPDFSize, + {0xf8d10d97, L"pickTrayByPDFSize", XFA_Element::PickTrayByPDFSize, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xf8f19e3a, L"monthNames", XFA_ELEMENT_MonthNames, XFA_XDPPACKET_LocaleSet, - XFA_ObjectType::Node}, - {0xf984149b, L"severity", XFA_ELEMENT_Severity, XFA_XDPPACKET_Config, + {0xf8f19e3a, L"monthNames", XFA_Element::MonthNames, + XFA_XDPPACKET_LocaleSet, XFA_ObjectType::Node}, + {0xf984149b, L"severity", XFA_Element::Severity, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0xf9bcb037, L"groupParent", XFA_ELEMENT_GroupParent, XFA_XDPPACKET_Config, + {0xf9bcb037, L"groupParent", XFA_Element::GroupParent, XFA_XDPPACKET_Config, XFA_ObjectType::NodeV}, - {0xfbc42fff, L"documentAssembly", XFA_ELEMENT_DocumentAssembly, + {0xfbc42fff, L"documentAssembly", XFA_Element::DocumentAssembly, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xfc78159f, L"numberSymbol", XFA_ELEMENT_NumberSymbol, + {0xfc78159f, L"numberSymbol", XFA_Element::NumberSymbol, XFA_XDPPACKET_LocaleSet, XFA_ObjectType::ContentNode}, - {0xfcbd606c, L"tagged", XFA_ELEMENT_Tagged, XFA_XDPPACKET_Config, + {0xfcbd606c, L"tagged", XFA_Element::Tagged, XFA_XDPPACKET_Config, XFA_ObjectType::ContentNode}, - {0xff063802, L"items", XFA_ELEMENT_Items, + {0xff063802, L"items", XFA_Element::Items, XFA_XDPPACKET_Template | XFA_XDPPACKET_Form, XFA_ObjectType::Node}, }; -const int32_t g_iXFAElementCount = - sizeof(g_XFAElementData) / sizeof(XFA_ELEMENTINFO); +const int32_t g_iXFAElementCount = FX_ArraySize(g_XFAElementData); +static_assert(g_iXFAElementCount == + (static_cast<int32_t>(XFA_Element::Items) + 1), + "g_XFAElementData size does not match XFA_Elements"); const XFA_ELEMENTHIERARCHY g_XFAElementPropertyIndex[] = { {0, 8}, {8, 0}, {8, 14}, {22, 0}, {22, 0}, {22, 6}, {28, 0}, @@ -1781,433 +1784,433 @@ const XFA_ELEMENTHIERARCHY g_XFAElementPropertyIndex[] = { }; const XFA_PROPERTY g_XFAElementPropertyData[] = { - {XFA_ELEMENT_FontInfo, 1, 0}, - {XFA_ELEMENT_Jog, 1, 0}, - {XFA_ELEMENT_Xdc, 1, 0}, - {XFA_ELEMENT_BatchOutput, 1, 0}, - {XFA_ELEMENT_OutputBin, 1, 0}, - {XFA_ELEMENT_Compress, 1, 0}, - {XFA_ELEMENT_Staple, 1, 0}, - {XFA_ELEMENT_MediumInfo, 1, 0}, - {XFA_ELEMENT_CheckButton, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_ChoiceList, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_DefaultUi, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Barcode, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Button, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_DateTimeEdit, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Picture, 1, 0}, - {XFA_ELEMENT_ImageEdit, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_PasswordEdit, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_NumericEdit, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Signature, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_TextEdit, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_ExObject, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Break, 1, 0}, - {XFA_ELEMENT_Overflow, 1, 0}, - {XFA_ELEMENT_Desc, 1, 0}, - {XFA_ELEMENT_Bookend, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Occur, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_SubsetBelow, 1, 0}, - {XFA_ELEMENT_Map, 1, 0}, - {XFA_ELEMENT_Embed, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_DatePattern, 4, 0}, - {XFA_ELEMENT_Edge, 1, 0}, - {XFA_ELEMENT_Fill, 1, 0}, - {XFA_ELEMENT_To, 1, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_Mode, 1, 0}, - {XFA_ELEMENT_Threshold, 1, 0}, - {XFA_ELEMENT_Script, 1, 0}, - {XFA_ELEMENT_FontInfo, 1, 0}, - {XFA_ELEMENT_Jog, 1, 0}, - {XFA_ELEMENT_Xdc, 1, 0}, - {XFA_ELEMENT_BatchOutput, 1, 0}, - {XFA_ELEMENT_PageOffset, 1, 0}, - {XFA_ELEMENT_OutputBin, 1, 0}, - {XFA_ELEMENT_Staple, 1, 0}, - {XFA_ELEMENT_MediumInfo, 1, 0}, - {XFA_ELEMENT_AdobeExtensionLevel, 1, 0}, - {XFA_ELEMENT_FontInfo, 1, 0}, - {XFA_ELEMENT_Xdc, 1, 0}, - {XFA_ELEMENT_Pdfa, 1, 0}, - {XFA_ELEMENT_BatchOutput, 1, 0}, - {XFA_ELEMENT_ViewerPreferences, 1, 0}, - {XFA_ELEMENT_ScriptModel, 1, 0}, - {XFA_ELEMENT_Version, 1, 0}, - {XFA_ELEMENT_SubmitFormat, 1, 0}, - {XFA_ELEMENT_SilentPrint, 1, 0}, - {XFA_ELEMENT_Producer, 1, 0}, - {XFA_ELEMENT_Compression, 1, 0}, - {XFA_ELEMENT_Interactive, 1, 0}, - {XFA_ELEMENT_Encryption, 1, 0}, - {XFA_ELEMENT_RenderPolicy, 1, 0}, - {XFA_ELEMENT_OpenAction, 1, 0}, - {XFA_ELEMENT_Creator, 1, 0}, - {XFA_ELEMENT_Linearized, 1, 0}, - {XFA_ELEMENT_Tagged, 1, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_Xsl, 1, 0}, - {XFA_ELEMENT_Packets, 1, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_Debug, 1, 0}, - {XFA_ELEMENT_FontInfo, 1, 0}, - {XFA_ELEMENT_Xdc, 1, 0}, - {XFA_ELEMENT_BatchOutput, 1, 0}, - {XFA_ELEMENT_FlipLabel, 1, 0}, - {XFA_ELEMENT_TemplateCache, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_FontInfo, 1, 0}, - {XFA_ELEMENT_Xdc, 1, 0}, - {XFA_ELEMENT_BatchOutput, 1, 0}, - {XFA_ELEMENT_FlipLabel, 1, 0}, - {XFA_ELEMENT_EraNames, 1, 0}, - {XFA_ELEMENT_DayNames, 2, 0}, - {XFA_ELEMENT_MeridiemNames, 1, 0}, - {XFA_ELEMENT_MonthNames, 2, 0}, - {XFA_ELEMENT_Hyphenation, 1, 0}, - {XFA_ELEMENT_Amd, 1, 0}, - {XFA_ELEMENT_Part, 1, 0}, - {XFA_ELEMENT_IncludeXDPContent, 1, 0}, - {XFA_ELEMENT_Conformance, 1, 0}, - {XFA_ELEMENT_Mdp, 1, 0}, - {XFA_ELEMENT_Certificates, 1, 0}, - {XFA_ELEMENT_TimeStamp, 1, 0}, - {XFA_ELEMENT_Handler, 1, 0}, - {XFA_ELEMENT_DigestMethods, 1, 0}, - {XFA_ELEMENT_Encodings, 1, 0}, - {XFA_ELEMENT_Reasons, 1, 0}, - {XFA_ELEMENT_AppearanceFilter, 1, 0}, - {XFA_ELEMENT_LockDocument, 1, 0}, - {XFA_ELEMENT_Xdp, 1, 0}, - {XFA_ELEMENT_Cache, 1, 0}, - {XFA_ELEMENT_Pagination, 1, 0}, - {XFA_ELEMENT_Overprint, 1, 0}, - {XFA_ELEMENT_BehaviorOverride, 1, 0}, - {XFA_ELEMENT_Copies, 1, 0}, - {XFA_ELEMENT_Output, 1, 0}, - {XFA_ELEMENT_Validate, 1, 0}, - {XFA_ELEMENT_Layout, 1, 0}, - {XFA_ELEMENT_Script, 1, 0}, - {XFA_ELEMENT_Common, 1, 0}, - {XFA_ELEMENT_PaginationOverride, 1, 0}, - {XFA_ELEMENT_Destination, 1, 0}, - {XFA_ELEMENT_IncrementalMerge, 1, 0}, - {XFA_ELEMENT_Execute, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Script, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_SignData, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Submit, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_CurrencySymbol, 3, 0}, - {XFA_ELEMENT_Operation, 1, 0}, - {XFA_ELEMENT_WsdlAddress, 1, 0}, - {XFA_ELEMENT_SoapAddress, 1, 0}, - {XFA_ELEMENT_SoapAction, 1, 0}, - {XFA_ELEMENT_EffectiveOutputPolicy, 1, 0}, - {XFA_ELEMENT_EffectiveInputPolicy, 1, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_Era, 2, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Picture, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Edge, 4, 0}, - {XFA_ELEMENT_Corner, 4, 0}, - {XFA_ELEMENT_Fill, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Desc, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_KeyUsage, 1, 0}, - {XFA_ELEMENT_SubjectDNs, 1, 0}, - {XFA_ELEMENT_Issuers, 1, 0}, - {XFA_ELEMENT_Signing, 1, 0}, - {XFA_ELEMENT_Oids, 1, 0}, - {XFA_ELEMENT_Color, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Ui, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Para, 1, 0}, - {XFA_ELEMENT_Format, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Assist, 1, 0}, - {XFA_ELEMENT_Traversal, 1, 0}, - {XFA_ELEMENT_Keep, 1, 0}, - {XFA_ELEMENT_Validate, 1, 0}, - {XFA_ELEMENT_Caption, 1, 0}, - {XFA_ELEMENT_Bind, 1, 0}, - {XFA_ELEMENT_Desc, 1, 0}, - {XFA_ELEMENT_Font, 1, 0}, - {XFA_ELEMENT_Value, 1, 0}, - {XFA_ELEMENT_Calculate, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Items, 2, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_Desc, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Color, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Color, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Para, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Assist, 1, 0}, - {XFA_ELEMENT_Traversal, 1, 0}, - {XFA_ELEMENT_Validate, 1, 0}, - {XFA_ELEMENT_Caption, 1, 0}, - {XFA_ELEMENT_Bind, 1, 0}, - {XFA_ELEMENT_Desc, 1, 0}, - {XFA_ELEMENT_Calculate, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Comb, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Present, 1, 0}, - {XFA_ELEMENT_Acrobat, 1, 0}, - {XFA_ELEMENT_Trace, 1, 0}, - {XFA_ELEMENT_PrintScaling, 1, 0}, - {XFA_ELEMENT_Enforce, 1, 0}, - {XFA_ELEMENT_NumberOfCopies, 1, 0}, - {XFA_ELEMENT_PageRange, 1, 0}, - {XFA_ELEMENT_AddViewerPreferences, 1, 0}, - {XFA_ELEMENT_ADBE_JSConsole, 1, 0}, - {XFA_ELEMENT_DuplexOption, 1, 0}, - {XFA_ELEMENT_ADBE_JSDebugger, 1, 0}, - {XFA_ELEMENT_PickTrayByPDFSize, 1, 0}, - {XFA_ELEMENT_Break, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Para, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Assist, 1, 0}, - {XFA_ELEMENT_Traversal, 1, 0}, - {XFA_ELEMENT_Keep, 1, 0}, - {XFA_ELEMENT_Validate, 1, 0}, - {XFA_ELEMENT_PageSet, 1, 0}, - {XFA_ELEMENT_Overflow, 1, 0}, - {XFA_ELEMENT_Bind, 1, 0}, - {XFA_ELEMENT_Desc, 1, 0}, - {XFA_ELEMENT_Bookend, 1, 0}, - {XFA_ELEMENT_Calculate, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Variables, 1, 0}, - {XFA_ELEMENT_Occur, 1, 0}, - {XFA_ELEMENT_Query, 1, 0}, - {XFA_ELEMENT_Insert, 1, 0}, - {XFA_ELEMENT_Update, 1, 0}, - {XFA_ELEMENT_Delete, 1, 0}, - {XFA_ELEMENT_MsgId, 1, 0}, - {XFA_ELEMENT_Severity, 1, 0}, - {XFA_ELEMENT_To, 1, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_Type, 1, 0}, - {XFA_ELEMENT_ToolTip, 1, 0}, - {XFA_ELEMENT_Speak, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_AddSilentPrint, 1, 0}, - {XFA_ELEMENT_PrinterName, 1, 0}, - {XFA_ELEMENT_FontInfo, 1, 0}, - {XFA_ELEMENT_Xdc, 1, 0}, - {XFA_ELEMENT_Color, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_RecordSet, 1, 0}, - {XFA_ELEMENT_Select, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Message, 1, 0}, - {XFA_ELEMENT_Picture, 1, 0}, - {XFA_ELEMENT_Script, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_NumberPattern, 4, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Occur, 1, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_RootElement, 1, 0}, - {XFA_ELEMENT_Script, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_Xsl, 1, 0}, - {XFA_ELEMENT_StartPage, 1, 0}, - {XFA_ELEMENT_Relevant, 1, 0}, - {XFA_ELEMENT_Base, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_AutoSave, 1, 0}, - {XFA_ELEMENT_Validate, 1, 0}, - {XFA_ELEMENT_ValidateApprovalSignatures, 1, 0}, - {XFA_ELEMENT_Acrobat7, 1, 0}, - {XFA_ELEMENT_Common, 1, 0}, - {XFA_ELEMENT_Exclude, 1, 0}, - {XFA_ELEMENT_CurrentPage, 1, 0}, - {XFA_ELEMENT_RunScripts, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Comb, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Medium, 1, 0}, - {XFA_ELEMENT_Desc, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Occur, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Filter, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Manifest, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Para, 1, 0}, - {XFA_ELEMENT_Font, 1, 0}, - {XFA_ELEMENT_Value, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Day, 7, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Color, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Occur, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Comb, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_Filter, 1, 0}, - {XFA_ELEMENT_Manifest, 1, 0}, - {XFA_ELEMENT_Picture, 1, 0}, - {XFA_ELEMENT_Level, 1, 0}, - {XFA_ELEMENT_Type, 1, 0}, - {XFA_ELEMENT_CompressObjectStream, 1, 0}, - {XFA_ELEMENT_CompressLogicalStructure, 1, 0}, - {XFA_ELEMENT_Edge, 4, 0}, - {XFA_ELEMENT_Corner, 4, 0}, - {XFA_ELEMENT_Fill, 1, 0}, - {XFA_ELEMENT_DynamicRender, 1, 0}, - {XFA_ELEMENT_DatePatterns, 1, 0}, - {XFA_ELEMENT_CalendarSymbols, 1, 0}, - {XFA_ELEMENT_CurrencySymbols, 1, 0}, - {XFA_ELEMENT_Typefaces, 1, 0}, - {XFA_ELEMENT_DateTimeSymbols, 1, 0}, - {XFA_ELEMENT_NumberPatterns, 1, 0}, - {XFA_ELEMENT_NumberSymbols, 1, 0}, - {XFA_ELEMENT_TimePatterns, 1, 0}, - {XFA_ELEMENT_Uri, 1, 0}, - {XFA_ELEMENT_Xsl, 1, 0}, - {XFA_ELEMENT_StartNode, 1, 0}, - {XFA_ELEMENT_OutputXSL, 1, 0}, - {XFA_ELEMENT_AdjustData, 1, 0}, - {XFA_ELEMENT_Attributes, 1, 0}, - {XFA_ELEMENT_Window, 1, 0}, - {XFA_ELEMENT_Record, 1, 0}, - {XFA_ELEMENT_Range, 1, 0}, - {XFA_ELEMENT_IncrementalLoad, 1, 0}, - {XFA_ELEMENT_Text, 1, 0}, - {XFA_ELEMENT_Time, 1, 0}, - {XFA_ELEMENT_DateTime, 1, 0}, - {XFA_ELEMENT_Image, 1, 0}, - {XFA_ELEMENT_Decimal, 1, 0}, - {XFA_ELEMENT_Boolean, 1, 0}, - {XFA_ELEMENT_Integer, 1, 0}, - {XFA_ELEMENT_ExData, 1, 0}, - {XFA_ELEMENT_Date, 1, 0}, - {XFA_ELEMENT_Float, 1, 0}, - {XFA_ELEMENT_Certificate, 1, 0}, - {XFA_ELEMENT_Ui, 1, 0}, - {XFA_ELEMENT_Margin, 1, 0}, - {XFA_ELEMENT_Para, 1, 0}, - {XFA_ELEMENT_Border, 1, 0}, - {XFA_ELEMENT_Assist, 1, 0}, - {XFA_ELEMENT_Traversal, 1, 0}, - {XFA_ELEMENT_Keep, 1, 0}, - {XFA_ELEMENT_Caption, 1, 0}, - {XFA_ELEMENT_Desc, 1, 0}, - {XFA_ELEMENT_Font, 1, 0}, - {XFA_ELEMENT_Value, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_EncryptionLevel, 1, 0}, - {XFA_ELEMENT_Encrypt, 1, 0}, - {XFA_ELEMENT_Permissions, 1, 0}, - {XFA_ELEMENT_Meridiem, 2, 0}, - {XFA_ELEMENT_SuppressBanner, 1, 0}, - {XFA_ELEMENT_VersionControl, 1, 0}, - {XFA_ELEMENT_LocaleSet, 1, 0}, - {XFA_ELEMENT_Template, 1, 0}, - {XFA_ELEMENT_ValidationMessaging, 1, 0}, - {XFA_ELEMENT_Locale, 1, 0}, - {XFA_ELEMENT_Data, 1, 0}, - {XFA_ELEMENT_Messaging, 1, 0}, - {XFA_ELEMENT_Pattern, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Solid, 1, + {XFA_Element::FontInfo, 1, 0}, + {XFA_Element::Jog, 1, 0}, + {XFA_Element::Xdc, 1, 0}, + {XFA_Element::BatchOutput, 1, 0}, + {XFA_Element::OutputBin, 1, 0}, + {XFA_Element::Compress, 1, 0}, + {XFA_Element::Staple, 1, 0}, + {XFA_Element::MediumInfo, 1, 0}, + {XFA_Element::CheckButton, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::ChoiceList, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::DefaultUi, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Barcode, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Button, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::DateTimeEdit, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Picture, 1, 0}, + {XFA_Element::ImageEdit, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::PasswordEdit, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::NumericEdit, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Signature, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::TextEdit, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::ExObject, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Break, 1, 0}, + {XFA_Element::Overflow, 1, 0}, + {XFA_Element::Desc, 1, 0}, + {XFA_Element::Bookend, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Occur, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::SubsetBelow, 1, 0}, + {XFA_Element::Map, 1, 0}, + {XFA_Element::Embed, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::DatePattern, 4, 0}, + {XFA_Element::Edge, 1, 0}, + {XFA_Element::Fill, 1, 0}, + {XFA_Element::To, 1, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::Mode, 1, 0}, + {XFA_Element::Threshold, 1, 0}, + {XFA_Element::Script, 1, 0}, + {XFA_Element::FontInfo, 1, 0}, + {XFA_Element::Jog, 1, 0}, + {XFA_Element::Xdc, 1, 0}, + {XFA_Element::BatchOutput, 1, 0}, + {XFA_Element::PageOffset, 1, 0}, + {XFA_Element::OutputBin, 1, 0}, + {XFA_Element::Staple, 1, 0}, + {XFA_Element::MediumInfo, 1, 0}, + {XFA_Element::AdobeExtensionLevel, 1, 0}, + {XFA_Element::FontInfo, 1, 0}, + {XFA_Element::Xdc, 1, 0}, + {XFA_Element::Pdfa, 1, 0}, + {XFA_Element::BatchOutput, 1, 0}, + {XFA_Element::ViewerPreferences, 1, 0}, + {XFA_Element::ScriptModel, 1, 0}, + {XFA_Element::Version, 1, 0}, + {XFA_Element::SubmitFormat, 1, 0}, + {XFA_Element::SilentPrint, 1, 0}, + {XFA_Element::Producer, 1, 0}, + {XFA_Element::Compression, 1, 0}, + {XFA_Element::Interactive, 1, 0}, + {XFA_Element::Encryption, 1, 0}, + {XFA_Element::RenderPolicy, 1, 0}, + {XFA_Element::OpenAction, 1, 0}, + {XFA_Element::Creator, 1, 0}, + {XFA_Element::Linearized, 1, 0}, + {XFA_Element::Tagged, 1, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::Xsl, 1, 0}, + {XFA_Element::Packets, 1, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::Debug, 1, 0}, + {XFA_Element::FontInfo, 1, 0}, + {XFA_Element::Xdc, 1, 0}, + {XFA_Element::BatchOutput, 1, 0}, + {XFA_Element::FlipLabel, 1, 0}, + {XFA_Element::TemplateCache, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::FontInfo, 1, 0}, + {XFA_Element::Xdc, 1, 0}, + {XFA_Element::BatchOutput, 1, 0}, + {XFA_Element::FlipLabel, 1, 0}, + {XFA_Element::EraNames, 1, 0}, + {XFA_Element::DayNames, 2, 0}, + {XFA_Element::MeridiemNames, 1, 0}, + {XFA_Element::MonthNames, 2, 0}, + {XFA_Element::Hyphenation, 1, 0}, + {XFA_Element::Amd, 1, 0}, + {XFA_Element::Part, 1, 0}, + {XFA_Element::IncludeXDPContent, 1, 0}, + {XFA_Element::Conformance, 1, 0}, + {XFA_Element::Mdp, 1, 0}, + {XFA_Element::Certificates, 1, 0}, + {XFA_Element::TimeStamp, 1, 0}, + {XFA_Element::Handler, 1, 0}, + {XFA_Element::DigestMethods, 1, 0}, + {XFA_Element::Encodings, 1, 0}, + {XFA_Element::Reasons, 1, 0}, + {XFA_Element::AppearanceFilter, 1, 0}, + {XFA_Element::LockDocument, 1, 0}, + {XFA_Element::Xdp, 1, 0}, + {XFA_Element::Cache, 1, 0}, + {XFA_Element::Pagination, 1, 0}, + {XFA_Element::Overprint, 1, 0}, + {XFA_Element::BehaviorOverride, 1, 0}, + {XFA_Element::Copies, 1, 0}, + {XFA_Element::Output, 1, 0}, + {XFA_Element::Validate, 1, 0}, + {XFA_Element::Layout, 1, 0}, + {XFA_Element::Script, 1, 0}, + {XFA_Element::Common, 1, 0}, + {XFA_Element::PaginationOverride, 1, 0}, + {XFA_Element::Destination, 1, 0}, + {XFA_Element::IncrementalMerge, 1, 0}, + {XFA_Element::Execute, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Script, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::SignData, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Submit, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::CurrencySymbol, 3, 0}, + {XFA_Element::Operation, 1, 0}, + {XFA_Element::WsdlAddress, 1, 0}, + {XFA_Element::SoapAddress, 1, 0}, + {XFA_Element::SoapAction, 1, 0}, + {XFA_Element::EffectiveOutputPolicy, 1, 0}, + {XFA_Element::EffectiveInputPolicy, 1, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::Era, 2, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Picture, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Edge, 4, 0}, + {XFA_Element::Corner, 4, 0}, + {XFA_Element::Fill, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Desc, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::KeyUsage, 1, 0}, + {XFA_Element::SubjectDNs, 1, 0}, + {XFA_Element::Issuers, 1, 0}, + {XFA_Element::Signing, 1, 0}, + {XFA_Element::Oids, 1, 0}, + {XFA_Element::Color, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Ui, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Para, 1, 0}, + {XFA_Element::Format, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Assist, 1, 0}, + {XFA_Element::Traversal, 1, 0}, + {XFA_Element::Keep, 1, 0}, + {XFA_Element::Validate, 1, 0}, + {XFA_Element::Caption, 1, 0}, + {XFA_Element::Bind, 1, 0}, + {XFA_Element::Desc, 1, 0}, + {XFA_Element::Font, 1, 0}, + {XFA_Element::Value, 1, 0}, + {XFA_Element::Calculate, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Items, 2, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::Desc, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Color, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Color, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Para, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Assist, 1, 0}, + {XFA_Element::Traversal, 1, 0}, + {XFA_Element::Validate, 1, 0}, + {XFA_Element::Caption, 1, 0}, + {XFA_Element::Bind, 1, 0}, + {XFA_Element::Desc, 1, 0}, + {XFA_Element::Calculate, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Comb, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Present, 1, 0}, + {XFA_Element::Acrobat, 1, 0}, + {XFA_Element::Trace, 1, 0}, + {XFA_Element::PrintScaling, 1, 0}, + {XFA_Element::Enforce, 1, 0}, + {XFA_Element::NumberOfCopies, 1, 0}, + {XFA_Element::PageRange, 1, 0}, + {XFA_Element::AddViewerPreferences, 1, 0}, + {XFA_Element::ADBE_JSConsole, 1, 0}, + {XFA_Element::DuplexOption, 1, 0}, + {XFA_Element::ADBE_JSDebugger, 1, 0}, + {XFA_Element::PickTrayByPDFSize, 1, 0}, + {XFA_Element::Break, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Para, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Assist, 1, 0}, + {XFA_Element::Traversal, 1, 0}, + {XFA_Element::Keep, 1, 0}, + {XFA_Element::Validate, 1, 0}, + {XFA_Element::PageSet, 1, 0}, + {XFA_Element::Overflow, 1, 0}, + {XFA_Element::Bind, 1, 0}, + {XFA_Element::Desc, 1, 0}, + {XFA_Element::Bookend, 1, 0}, + {XFA_Element::Calculate, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Variables, 1, 0}, + {XFA_Element::Occur, 1, 0}, + {XFA_Element::Query, 1, 0}, + {XFA_Element::Insert, 1, 0}, + {XFA_Element::Update, 1, 0}, + {XFA_Element::Delete, 1, 0}, + {XFA_Element::MsgId, 1, 0}, + {XFA_Element::Severity, 1, 0}, + {XFA_Element::To, 1, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::Type, 1, 0}, + {XFA_Element::ToolTip, 1, 0}, + {XFA_Element::Speak, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::AddSilentPrint, 1, 0}, + {XFA_Element::PrinterName, 1, 0}, + {XFA_Element::FontInfo, 1, 0}, + {XFA_Element::Xdc, 1, 0}, + {XFA_Element::Color, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::RecordSet, 1, 0}, + {XFA_Element::Select, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Message, 1, 0}, + {XFA_Element::Picture, 1, 0}, + {XFA_Element::Script, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::NumberPattern, 4, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Occur, 1, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::RootElement, 1, 0}, + {XFA_Element::Script, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::Xsl, 1, 0}, + {XFA_Element::StartPage, 1, 0}, + {XFA_Element::Relevant, 1, 0}, + {XFA_Element::Base, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::AutoSave, 1, 0}, + {XFA_Element::Validate, 1, 0}, + {XFA_Element::ValidateApprovalSignatures, 1, 0}, + {XFA_Element::Acrobat7, 1, 0}, + {XFA_Element::Common, 1, 0}, + {XFA_Element::Exclude, 1, 0}, + {XFA_Element::CurrentPage, 1, 0}, + {XFA_Element::RunScripts, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Comb, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Medium, 1, 0}, + {XFA_Element::Desc, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Occur, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Filter, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Manifest, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Para, 1, 0}, + {XFA_Element::Font, 1, 0}, + {XFA_Element::Value, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Day, 7, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Color, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Occur, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Comb, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::Filter, 1, 0}, + {XFA_Element::Manifest, 1, 0}, + {XFA_Element::Picture, 1, 0}, + {XFA_Element::Level, 1, 0}, + {XFA_Element::Type, 1, 0}, + {XFA_Element::CompressObjectStream, 1, 0}, + {XFA_Element::CompressLogicalStructure, 1, 0}, + {XFA_Element::Edge, 4, 0}, + {XFA_Element::Corner, 4, 0}, + {XFA_Element::Fill, 1, 0}, + {XFA_Element::DynamicRender, 1, 0}, + {XFA_Element::DatePatterns, 1, 0}, + {XFA_Element::CalendarSymbols, 1, 0}, + {XFA_Element::CurrencySymbols, 1, 0}, + {XFA_Element::Typefaces, 1, 0}, + {XFA_Element::DateTimeSymbols, 1, 0}, + {XFA_Element::NumberPatterns, 1, 0}, + {XFA_Element::NumberSymbols, 1, 0}, + {XFA_Element::TimePatterns, 1, 0}, + {XFA_Element::Uri, 1, 0}, + {XFA_Element::Xsl, 1, 0}, + {XFA_Element::StartNode, 1, 0}, + {XFA_Element::OutputXSL, 1, 0}, + {XFA_Element::AdjustData, 1, 0}, + {XFA_Element::Attributes, 1, 0}, + {XFA_Element::Window, 1, 0}, + {XFA_Element::Record, 1, 0}, + {XFA_Element::Range, 1, 0}, + {XFA_Element::IncrementalLoad, 1, 0}, + {XFA_Element::Text, 1, 0}, + {XFA_Element::Time, 1, 0}, + {XFA_Element::DateTime, 1, 0}, + {XFA_Element::Image, 1, 0}, + {XFA_Element::Decimal, 1, 0}, + {XFA_Element::Boolean, 1, 0}, + {XFA_Element::Integer, 1, 0}, + {XFA_Element::ExData, 1, 0}, + {XFA_Element::Date, 1, 0}, + {XFA_Element::Float, 1, 0}, + {XFA_Element::Certificate, 1, 0}, + {XFA_Element::Ui, 1, 0}, + {XFA_Element::Margin, 1, 0}, + {XFA_Element::Para, 1, 0}, + {XFA_Element::Border, 1, 0}, + {XFA_Element::Assist, 1, 0}, + {XFA_Element::Traversal, 1, 0}, + {XFA_Element::Keep, 1, 0}, + {XFA_Element::Caption, 1, 0}, + {XFA_Element::Desc, 1, 0}, + {XFA_Element::Font, 1, 0}, + {XFA_Element::Value, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::EncryptionLevel, 1, 0}, + {XFA_Element::Encrypt, 1, 0}, + {XFA_Element::Permissions, 1, 0}, + {XFA_Element::Meridiem, 2, 0}, + {XFA_Element::SuppressBanner, 1, 0}, + {XFA_Element::VersionControl, 1, 0}, + {XFA_Element::LocaleSet, 1, 0}, + {XFA_Element::Template, 1, 0}, + {XFA_Element::ValidationMessaging, 1, 0}, + {XFA_Element::Locale, 1, 0}, + {XFA_Element::Data, 1, 0}, + {XFA_Element::Messaging, 1, 0}, + {XFA_Element::Pattern, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Solid, 1, XFA_PROPERTYFLAG_OneOf | XFA_PROPERTYFLAG_DefaultOneOf}, - {XFA_ELEMENT_Stipple, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Color, 1, 0}, - {XFA_ELEMENT_Linear, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Radial, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Fill, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Map, 1, 0}, - {XFA_ELEMENT_Arc, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Text, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Time, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_DateTime, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Image, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Decimal, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Boolean, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Integer, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_ExData, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Rectangle, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Date, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Float, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Line, 1, XFA_PROPERTYFLAG_OneOf}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Destination, 1, 0}, - {XFA_ELEMENT_Message, 1, 0}, - {XFA_ELEMENT_Script, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Picture, 1, 0}, - {XFA_ELEMENT_ConnectString, 1, 0}, - {XFA_ELEMENT_User, 1, 0}, - {XFA_ELEMENT_Password, 1, 0}, - {XFA_ELEMENT_ModifyAnnots, 1, 0}, - {XFA_ELEMENT_ContentCopy, 1, 0}, - {XFA_ELEMENT_FormFieldFilling, 1, 0}, - {XFA_ELEMENT_Change, 1, 0}, - {XFA_ELEMENT_AccessibleContent, 1, 0}, - {XFA_ELEMENT_Print, 1, 0}, - {XFA_ELEMENT_PlaintextMetadata, 1, 0}, - {XFA_ELEMENT_PrintHighQuality, 1, 0}, - {XFA_ELEMENT_DocumentAssembly, 1, 0}, - {XFA_ELEMENT_Encrypt, 1, 0}, - {XFA_ELEMENT_NumberSymbol, 5, 0}, - {XFA_ELEMENT_FontInfo, 1, 0}, - {XFA_ELEMENT_Xdc, 1, 0}, - {XFA_ELEMENT_Color, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_TimePattern, 4, 0}, - {XFA_ELEMENT_Whitespace, 1, 0}, - {XFA_ELEMENT_Rename, 1, 0}, - {XFA_ELEMENT_IfEmpty, 1, 0}, - {XFA_ELEMENT_Presence, 1, 0}, - {XFA_ELEMENT_Picture, 1, 0}, - {XFA_ELEMENT_NameAttr, 1, 0}, - {XFA_ELEMENT_GroupParent, 1, 0}, - {XFA_ELEMENT_Script, 1, 0}, - {XFA_ELEMENT_Edge, 1, 0}, - {XFA_ELEMENT_Connect, 1, 0}, - {XFA_ELEMENT_Extras, 1, 0}, - {XFA_ELEMENT_Month, 12, 0}, + {XFA_Element::Stipple, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Color, 1, 0}, + {XFA_Element::Linear, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Radial, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Fill, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Map, 1, 0}, + {XFA_Element::Arc, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Text, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Time, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::DateTime, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Image, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Decimal, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Boolean, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Integer, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::ExData, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Rectangle, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Date, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Float, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Line, 1, XFA_PROPERTYFLAG_OneOf}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Destination, 1, 0}, + {XFA_Element::Message, 1, 0}, + {XFA_Element::Script, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Picture, 1, 0}, + {XFA_Element::ConnectString, 1, 0}, + {XFA_Element::User, 1, 0}, + {XFA_Element::Password, 1, 0}, + {XFA_Element::ModifyAnnots, 1, 0}, + {XFA_Element::ContentCopy, 1, 0}, + {XFA_Element::FormFieldFilling, 1, 0}, + {XFA_Element::Change, 1, 0}, + {XFA_Element::AccessibleContent, 1, 0}, + {XFA_Element::Print, 1, 0}, + {XFA_Element::PlaintextMetadata, 1, 0}, + {XFA_Element::PrintHighQuality, 1, 0}, + {XFA_Element::DocumentAssembly, 1, 0}, + {XFA_Element::Encrypt, 1, 0}, + {XFA_Element::NumberSymbol, 5, 0}, + {XFA_Element::FontInfo, 1, 0}, + {XFA_Element::Xdc, 1, 0}, + {XFA_Element::Color, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::TimePattern, 4, 0}, + {XFA_Element::Whitespace, 1, 0}, + {XFA_Element::Rename, 1, 0}, + {XFA_Element::IfEmpty, 1, 0}, + {XFA_Element::Presence, 1, 0}, + {XFA_Element::Picture, 1, 0}, + {XFA_Element::NameAttr, 1, 0}, + {XFA_Element::GroupParent, 1, 0}, + {XFA_Element::Script, 1, 0}, + {XFA_Element::Edge, 1, 0}, + {XFA_Element::Connect, 1, 0}, + {XFA_Element::Extras, 1, 0}, + {XFA_Element::Month, 12, 0}, }; const XFA_ELEMENTHIERARCHY g_XFAElementAttributeIndex[] = { @@ -2257,6 +2260,9 @@ const XFA_ELEMENTHIERARCHY g_XFAElementAttributeIndex[] = { {1096, 0}, {1096, 4}, {1100, 6}, {1106, 2}, {1108, 1}, {1109, 2}, {1111, 2}, {1113, 2}, {1115, 1}, {1116, 2}, {1118, 7}, }; +static_assert(FX_ArraySize(g_XFAElementAttributeIndex) == + (static_cast<int32_t>(XFA_Element::Items) + 1), + "gXFAElementAttributeIndex size does not match XFA_Element"); const uint8_t g_XFAElementAttributeData[] = { XFA_ATTRIBUTE_Name, diff --git a/xfa/fxfa/parser/xfa_basic_imp.cpp b/xfa/fxfa/parser/xfa_basic_imp.cpp index 2b8074fe04..6896299a0e 100644 --- a/xfa/fxfa/parser/xfa_basic_imp.cpp +++ b/xfa/fxfa/parser/xfa_basic_imp.cpp @@ -108,7 +108,7 @@ const XFA_ATTRIBUTEINFO* XFA_GetAttributeByID(XFA_ATTRIBUTE eName) { return (eName < g_iXFAAttributeCount) ? (g_XFAAttributeData + eName) : NULL; } FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue, - XFA_ELEMENT eElement, + XFA_Element eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType, uint32_t dwPacket) { @@ -132,7 +132,7 @@ FX_BOOL XFA_GetAttributeDefaultValue(void*& pValue, } return FALSE; } -XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, +XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket) { void* pValue; @@ -142,7 +142,7 @@ XFA_ATTRIBUTEENUM XFA_GetAttributeDefaultValue_Enum(XFA_ELEMENT eElement, } return XFA_ATTRIBUTEENUM_Unknown; } -CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, +CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket) { void* pValue; @@ -152,7 +152,7 @@ CFX_WideStringC XFA_GetAttributeDefaultValue_Cdata(XFA_ELEMENT eElement, } return NULL; } -FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, +FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket) { void* pValue; @@ -163,7 +163,7 @@ FX_BOOL XFA_GetAttributeDefaultValue_Boolean(XFA_ELEMENT eElement, return FALSE; } -CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_ELEMENT eElement, +CXFA_Measurement XFA_GetAttributeDefaultValue_Measure(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket) { void* pValue; @@ -192,22 +192,25 @@ const XFA_ELEMENTINFO* XFA_GetElementByName(const CFX_WideStringC& wsName) { iStart = iMid + 1; } } while (iStart <= iEnd); - return NULL; + return nullptr; } -const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_ELEMENT eName) { - return (eName < g_iXFAElementCount) ? (g_XFAElementData + eName) : NULL; +const XFA_ELEMENTINFO* XFA_GetElementByID(XFA_Element eName) { + return eName == XFA_Element::Unknown + ? nullptr + : g_XFAElementData + static_cast<int32_t>(eName); } -const uint8_t* XFA_GetElementAttributes(XFA_ELEMENT eElement, int32_t& iCount) { - if (eElement >= g_iXFAElementCount) { - return NULL; - } - const XFA_ELEMENTHIERARCHY* pElement = g_XFAElementAttributeIndex + eElement; +const uint8_t* XFA_GetElementAttributes(XFA_Element eElement, int32_t& iCount) { + if (eElement == XFA_Element::Unknown) + return nullptr; + + const XFA_ELEMENTHIERARCHY* pElement = + g_XFAElementAttributeIndex + static_cast<int32_t>(eElement); iCount = pElement->wCount; return g_XFAElementAttributeData + pElement->wStart; } -const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement, +const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, uint32_t dwPacket) { int32_t iCount = 0; @@ -225,17 +228,18 @@ const XFA_ATTRIBUTEINFO* XFA_GetAttributeOfElement(XFA_ELEMENT eElement, return (dwPacket & pInfo->dwPackets) ? pInfo : nullptr; } -const XFA_PROPERTY* XFA_GetElementProperties(XFA_ELEMENT eElement, +const XFA_PROPERTY* XFA_GetElementProperties(XFA_Element eElement, int32_t& iCount) { - if (eElement >= g_iXFAElementCount) { + if (eElement == XFA_Element::Unknown) return NULL; - } - const XFA_ELEMENTHIERARCHY* pElement = g_XFAElementPropertyIndex + eElement; + + const XFA_ELEMENTHIERARCHY* pElement = + g_XFAElementPropertyIndex + static_cast<int32_t>(eElement); iCount = pElement->wCount; return g_XFAElementPropertyData + pElement->wStart; } -const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_ELEMENT eElement, - XFA_ELEMENT eProperty, +const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_Element eElement, + XFA_Element eProperty, uint32_t dwPacket) { int32_t iCount = 0; const XFA_PROPERTY* pProperty = XFA_GetElementProperties(eElement, iCount); @@ -245,7 +249,7 @@ const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_ELEMENT eElement, int32_t iStart = 0, iEnd = iCount - 1, iMid; do { iMid = (iStart + iEnd) / 2; - XFA_ELEMENT eName = (XFA_ELEMENT)pProperty[iMid].eName; + XFA_Element eName = pProperty[iMid].eName; if (eProperty == eName) { break; } else if (eProperty < eName) { @@ -263,7 +267,7 @@ const XFA_PROPERTY* XFA_GetPropertyOfElement(XFA_ELEMENT eElement, return pProperty + iMid; return (dwPacket & pInfo->dwPackets) ? (pProperty + iMid) : NULL; } -const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute(XFA_ELEMENT eElement, +const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute(XFA_Element eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType) { int32_t iStart = 0, iEnd = g_iXFANotsureCount - 1; @@ -322,12 +326,12 @@ const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute(XFA_ELEMENT eElement, return NULL; } -const XFA_METHODINFO* XFA_GetMethodByName(XFA_ELEMENT eElement, +const XFA_METHODINFO* XFA_GetMethodByName(XFA_Element eElement, const CFX_WideStringC& wsMethodName) { if (wsMethodName.IsEmpty()) return nullptr; - int32_t iElementIndex = eElement; + int32_t iElementIndex = static_cast<int32_t>(eElement); while (iElementIndex != -1) { const XFA_SCRIPTHIERARCHY* scriptIndex = g_XFAScriptIndex + iElementIndex; int32_t icount = scriptIndex->wMethodCount; @@ -354,12 +358,12 @@ const XFA_METHODINFO* XFA_GetMethodByName(XFA_ELEMENT eElement, return NULL; } const XFA_SCRIPTATTRIBUTEINFO* XFA_GetScriptAttributeByName( - XFA_ELEMENT eElement, + XFA_Element eElement, const CFX_WideStringC& wsAttributeName) { if (wsAttributeName.IsEmpty()) return nullptr; - int32_t iElementIndex = eElement; + int32_t iElementIndex = static_cast<int32_t>(eElement); while (iElementIndex != -1) { const XFA_SCRIPTHIERARCHY* scriptIndex = g_XFAScriptIndex + iElementIndex; int32_t icount = scriptIndex->wAttributeCount; diff --git a/xfa/fxfa/parser/xfa_basic_imp.h b/xfa/fxfa/parser/xfa_basic_imp.h index fdb77a9d07..1c79f5439e 100644 --- a/xfa/fxfa/parser/xfa_basic_imp.h +++ b/xfa/fxfa/parser/xfa_basic_imp.h @@ -11,13 +11,13 @@ #include "xfa/fxfa/include/fxfa_basic.h" struct XFA_NOTSUREATTRIBUTE { - XFA_ELEMENT eElement; + XFA_Element eElement; XFA_ATTRIBUTE eAttribute; XFA_ATTRIBUTETYPE eType; void* pValue; }; const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute( - XFA_ELEMENT eElement, + XFA_Element eElement, XFA_ATTRIBUTE eAttribute, XFA_ATTRIBUTETYPE eType = XFA_ATTRIBUTETYPE_NOTSURE); diff --git a/xfa/fxfa/parser/xfa_document.h b/xfa/fxfa/parser/xfa_document.h index 39068c7076..ba9979bc5c 100644 --- a/xfa/fxfa/parser/xfa_document.h +++ b/xfa/fxfa/parser/xfa_document.h @@ -77,8 +77,8 @@ class CXFA_Document { XFA_VERSION GetCurVersionMode() { return m_eCurVersionMode; } XFA_VERSION RecognizeXFAVersionNumber(CFX_WideString& wsTemplateNS); CXFA_LocaleMgr* GetLocalMgr(); - CXFA_Node* CreateNode(uint32_t dwPacket, XFA_ELEMENT eElement); - CXFA_Node* CreateNode(const XFA_PACKETINFO* pPacket, XFA_ELEMENT eElement); + CXFA_Node* CreateNode(uint32_t dwPacket, XFA_Element eElement); + CXFA_Node* CreateNode(const XFA_PACKETINFO* pPacket, XFA_Element eElement); void DoProtoMerge(); CXFA_Node* GetNodeByID(CXFA_Node* pRoot, const CFX_WideStringC& wsID); void DoDataMerge(); diff --git a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp index 652c3e3906..d0fb2f47ab 100644 --- a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp @@ -31,7 +31,7 @@ void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode, pDataChild; pDataChild = pDataChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { uint32_t dwNameHash = pDataChild->GetNameHash(); - XFA_ELEMENT eType = pDataChild->GetClassID(); + XFA_Element eType = pDataChild->GetClassID(); if (!dwNameHash) { continue; } @@ -40,7 +40,7 @@ void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode, for (CXFA_Node* pDDGroupNode = sIterator.GetCurrent(); pDDGroupNode; pDDGroupNode = sIterator.MoveToNext()) { if (pDDGroupNode != pDataDescriptionNode) { - if (pDDGroupNode->GetClassID() != XFA_ELEMENT_DataGroup) { + if (pDDGroupNode->GetClassID() != XFA_Element::DataGroup) { continue; } CFX_WideString wsNamespace; @@ -65,7 +65,7 @@ void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode, CXFA_Node* XFA_DataDescription_MaybeCreateDataNode( CXFA_Document* pDocument, CXFA_Node* pDataParent, - XFA_ELEMENT eNodeType, + XFA_Element eNodeType, const CFX_WideString& wsName) { if (!pDataParent) { return NULL; @@ -86,7 +86,7 @@ CXFA_Node* XFA_DataDescription_MaybeCreateDataNode( for (CXFA_Node* pDDGroupNode = sIterator.GetCurrent(); pDDGroupNode; pDDGroupNode = sIterator.MoveToNext()) { if (pDDGroupNode != pParentDDNode) { - if (pDDGroupNode->GetClassID() != XFA_ELEMENT_DataGroup) { + if (pDDGroupNode->GetClassID() != XFA_Element::DataGroup) { continue; } CFX_WideString wsNamespace; @@ -108,7 +108,7 @@ CXFA_Node* XFA_DataDescription_MaybeCreateDataNode( ASSERT(pDataNode); pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName); pDataNode->CreateXMLMappingNode(); - if (eNodeType == XFA_ELEMENT_DataValue && + if (eNodeType == XFA_Element::DataValue && pDDNode->GetEnum(XFA_ATTRIBUTE_Contains) == XFA_ATTRIBUTEENUM_MetaData) { pDataNode->SetEnum(XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTEENUM_MetaData); diff --git a/xfa/fxfa/parser/xfa_document_datadescription_imp.h b/xfa/fxfa/parser/xfa_document_datadescription_imp.h index 47bc358972..f0c905c85d 100644 --- a/xfa/fxfa/parser/xfa_document_datadescription_imp.h +++ b/xfa/fxfa/parser/xfa_document_datadescription_imp.h @@ -12,7 +12,7 @@ void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode, CXFA_Node* XFA_DataDescription_MaybeCreateDataNode( CXFA_Document* pDocument, CXFA_Node* pDataParent, - XFA_ELEMENT eNodeType, + XFA_Element eNodeType, const CFX_WideString& wsName); #endif // XFA_FXFA_PARSER_XFA_DOCUMENT_DATADESCRIPTION_IMP_H_ diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp index 91e5086d3d..6a6abe9a99 100644 --- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp @@ -38,10 +38,10 @@ struct XFA_DataMerge_RecurseRecord { }; static CXFA_Node* XFA_DataMerge_FormValueNode_CreateChild( CXFA_Node* pValueNode, - XFA_ELEMENT iType = XFA_ELEMENT_UNKNOWN) { + XFA_Element iType = XFA_Element::Unknown) { CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild); if (!pChildNode) { - if (iType == XFA_ELEMENT_UNKNOWN) { + if (iType == XFA_Element::Unknown) { return FALSE; } pChildNode = pValueNode->GetProperty(0, iType); @@ -57,7 +57,7 @@ static void XFA_DataMerge_FormValueNode_MatchNoneCreateChild( static FX_BOOL XFA_DataMerge_FormValueNode_SetChildContent( CXFA_Node* pValueNode, const CFX_WideString& wsContent, - XFA_ELEMENT iType = XFA_ELEMENT_UNKNOWN) { + XFA_Element iType = XFA_Element::Unknown) { if (!pValueNode) { return FALSE; } @@ -72,15 +72,15 @@ static FX_BOOL XFA_DataMerge_FormValueNode_SetChildContent( CXFA_Node* pContentRawDataNode = pChildNode->GetNodeItem(XFA_NODEITEM_FirstChild); if (!pContentRawDataNode) { - XFA_ELEMENT element = XFA_ELEMENT_Sharptext; - if (pChildNode->GetClassID() == XFA_ELEMENT_ExData) { + XFA_Element element = XFA_Element::Sharptext; + if (pChildNode->GetClassID() == XFA_Element::ExData) { CFX_WideString wsContentType; pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); if (wsContentType == FX_WSTRC(L"text/html")) { - element = XFA_ELEMENT_SharpxHTML; + element = XFA_Element::SharpxHTML; } else if (wsContentType == FX_WSTRC(L"text/xml")) { - element = XFA_ELEMENT_Sharpxml; + element = XFA_Element::Sharpxml; } } pContentRawDataNode = pChildNode->CreateSamePacketNode(element); @@ -104,19 +104,19 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, FX_BOOL bDataToForm = TRUE) { pFormNode->SetObject(XFA_ATTRIBUTE_BindingNode, pDataNode); pDataNode->AddBindItem(pFormNode); - XFA_ELEMENT eClass = pFormNode->GetClassID(); - if (eClass != XFA_ELEMENT_Field && eClass != XFA_ELEMENT_ExclGroup) { + XFA_Element eClass = pFormNode->GetClassID(); + if (eClass != XFA_Element::Field && eClass != XFA_Element::ExclGroup) { return; } CXFA_WidgetData* pWidgetData = pFormNode->GetWidgetData(); ASSERT(pWidgetData); - XFA_ELEMENT eUIType = pWidgetData->GetUIType(); - CXFA_Value defValue(pFormNode->GetProperty(0, XFA_ELEMENT_Value)); + XFA_Element eUIType = pWidgetData->GetUIType(); + CXFA_Value defValue(pFormNode->GetProperty(0, XFA_Element::Value)); if (!bDataToForm) { CFX_WideString wsValue; CFX_WideString wsFormatedValue; switch (eUIType) { - case XFA_ELEMENT_ImageEdit: { + case XFA_Element::ImageEdit: { CXFA_Image image = defValue.GetImage(); CFX_WideString wsContentType; CFX_WideString wsHref; @@ -135,7 +135,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, pXMLDataElement->SetString(L"href", wsHref); } } break; - case XFA_ELEMENT_ChoiceList: + case XFA_Element::ChoiceList: defValue.GetChildValueContent(wsValue); if (pWidgetData->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) { CFX_WideStringArray wsSelTextArray; @@ -144,7 +144,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, if (iSize >= 1) { CXFA_Node* pValue = NULL; for (int32_t i = 0; i < iSize; i++) { - pValue = pDataNode->CreateSamePacketNode(XFA_ELEMENT_DataValue); + pValue = pDataNode->CreateSamePacketNode(XFA_Element::DataValue); pValue->SetCData(XFA_ATTRIBUTE_Name, L"value"); pValue->CreateXMLMappingNode(); pDataNode->InsertChild(pValue); @@ -161,7 +161,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, pDataNode->SetAttributeValue(wsValue, wsFormatedValue); } break; - case XFA_ELEMENT_CheckButton: + case XFA_Element::CheckButton: defValue.GetChildValueContent(wsValue); if (wsValue.IsEmpty()) { break; @@ -169,14 +169,14 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue); pDataNode->SetAttributeValue(wsValue, wsFormatedValue); break; - case XFA_ELEMENT_ExclGroup: { + case XFA_Element::ExclGroup: { CXFA_Node* pChecked = NULL; CXFA_Node* pChild = pFormNode->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pChild->GetClassID() != XFA_ELEMENT_Field) { + if (pChild->GetClassID() != XFA_Element::Field) { continue; } - CXFA_Node* pValue = pChild->GetChild(0, XFA_ELEMENT_Value); + CXFA_Node* pValue = pChild->GetChild(0, XFA_Element::Value); if (!pValue) { continue; } @@ -185,7 +185,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, if (wsValue.IsEmpty()) { continue; } - CXFA_Node* pItems = pChild->GetChild(0, XFA_ELEMENT_Items); + CXFA_Node* pItems = pChild->GetChild(0, XFA_Element::Items); if (!pItems) { continue; } @@ -210,11 +210,11 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, if (pChild == pChecked) { continue; } - if (pChild->GetClassID() != XFA_ELEMENT_Field) { + if (pChild->GetClassID() != XFA_Element::Field) { continue; } - CXFA_Node* pValue = pChild->GetProperty(0, XFA_ELEMENT_Value); - CXFA_Node* pItems = pChild->GetChild(0, XFA_ELEMENT_Items); + CXFA_Node* pValue = pChild->GetProperty(0, XFA_Element::Value); + CXFA_Node* pItems = pChild->GetChild(0, XFA_Element::Items); CXFA_Node* pText = pItems ? pItems->GetNodeItem(XFA_NODEITEM_FirstChild) : NULL; if (pText) { @@ -225,10 +225,10 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, pText->TryContent(wsContent); } XFA_DataMerge_FormValueNode_SetChildContent(pValue, wsContent, - XFA_ELEMENT_Text); + XFA_Element::Text); } } break; - case XFA_ELEMENT_NumericEdit: { + case XFA_Element::NumericEdit: { defValue.GetChildValueContent(wsValue); if (wsValue.IsEmpty()) { break; @@ -238,9 +238,9 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, wsValue = wsOutput; pWidgetData->GetFormatDataValue(wsValue, wsFormatedValue); pDataNode->SetAttributeValue(wsValue, wsFormatedValue); - CXFA_Node* pValue = pFormNode->GetProperty(0, XFA_ELEMENT_Value); + CXFA_Node* pValue = pFormNode->GetProperty(0, XFA_Element::Value); XFA_DataMerge_FormValueNode_SetChildContent(pValue, wsValue, - XFA_ELEMENT_Float); + XFA_Element::Float); } break; default: defValue.GetChildValueContent(wsValue); @@ -258,9 +258,9 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, pWidgetData->GetNormalizeDataValue(wsXMLValue, wsNormailizeValue); pDataNode->SetAttributeValue(wsNormailizeValue, wsXMLValue); switch (eUIType) { - case XFA_ELEMENT_ImageEdit: { + case XFA_Element::ImageEdit: { XFA_DataMerge_FormValueNode_SetChildContent( - defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_Image); + defValue.GetNode(), wsNormailizeValue, XFA_Element::Image); CXFA_Image image = defValue.GetImage(); if (image) { CFDE_XMLElement* pXMLDataElement = @@ -279,7 +279,7 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, } } } break; - case XFA_ELEMENT_ChoiceList: + case XFA_Element::ChoiceList: if (pWidgetData->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) { CXFA_NodeArray items; pDataNode->GetNodeList(items); @@ -297,25 +297,25 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, exData.SetContentType(iCounts == 1 ? L"text/plain" : L"text/xml"); } XFA_DataMerge_FormValueNode_SetChildContent( - defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_ExData); + defValue.GetNode(), wsNormailizeValue, XFA_Element::ExData); } else { XFA_DataMerge_FormValueNode_SetChildContent( - defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_Text); + defValue.GetNode(), wsNormailizeValue, XFA_Element::Text); } break; - case XFA_ELEMENT_CheckButton: + case XFA_Element::CheckButton: XFA_DataMerge_FormValueNode_SetChildContent( - defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_Text); + defValue.GetNode(), wsNormailizeValue, XFA_Element::Text); break; - case XFA_ELEMENT_ExclGroup: { + case XFA_Element::ExclGroup: { pWidgetData->SetSelectedMemberByValue(wsNormailizeValue.AsStringC(), false, FALSE, FALSE); } break; - case XFA_ELEMENT_DateTimeEdit: + case XFA_Element::DateTimeEdit: XFA_DataMerge_FormValueNode_SetChildContent( - defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_DateTime); + defValue.GetNode(), wsNormailizeValue, XFA_Element::DateTime); break; - case XFA_ELEMENT_NumericEdit: { + case XFA_Element::NumericEdit: { CFX_WideString wsPicture; pWidgetData->GetPictureContent(wsPicture, XFA_VALUEPICTURE_DataBind); if (wsPicture.IsEmpty()) { @@ -324,16 +324,16 @@ static void XFA_DataMerge_CreateDataBinding(CXFA_Node* pFormNode, wsNormailizeValue = wsOutput; } XFA_DataMerge_FormValueNode_SetChildContent( - defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_Float); + defValue.GetNode(), wsNormailizeValue, XFA_Element::Float); } break; - case XFA_ELEMENT_Barcode: - case XFA_ELEMENT_Button: - case XFA_ELEMENT_PasswordEdit: - case XFA_ELEMENT_Signature: - case XFA_ELEMENT_TextEdit: + case XFA_Element::Barcode: + case XFA_Element::Button: + case XFA_Element::PasswordEdit: + case XFA_Element::Signature: + case XFA_Element::TextEdit: default: XFA_DataMerge_FormValueNode_SetChildContent( - defValue.GetNode(), wsNormailizeValue, XFA_ELEMENT_Text); + defValue.GetNode(), wsNormailizeValue, XFA_Element::Text); break; } } @@ -355,7 +355,7 @@ static void XFA_DataMerge_ClearGlobalBinding(CXFA_Document* pDocument) { static CXFA_Node* XFA_DataMerge_ScopeMatchGlobalBinding( CXFA_Node* pDataScope, uint32_t dwNameHash, - XFA_ELEMENT eMatchDataNodeType, + XFA_Element eMatchDataNodeType, FX_BOOL bUpLevel = TRUE) { for (CXFA_Node *pCurDataScope = pDataScope, *pLastDataScope = NULL; pCurDataScope && pCurDataScope->GetPacketID() == XFA_XDPPACKET_Datasets; @@ -366,7 +366,7 @@ static CXFA_Node* XFA_DataMerge_ScopeMatchGlobalBinding( pDataChild; pDataChild = pDataChild->GetNextSameNameSibling(dwNameHash)) { if (pDataChild == pLastDataScope || - (eMatchDataNodeType != XFA_ELEMENT_DataModel && + (eMatchDataNodeType != XFA_Element::DataModel && pDataChild->GetClassID() != eMatchDataNodeType) || pDataChild->HasBindItem()) { continue; @@ -374,9 +374,9 @@ static CXFA_Node* XFA_DataMerge_ScopeMatchGlobalBinding( return pDataChild; } for (CXFA_Node* pDataChild = - pCurDataScope->GetFirstChildByClass(XFA_ELEMENT_DataGroup); + pCurDataScope->GetFirstChildByClass(XFA_Element::DataGroup); pDataChild; pDataChild = pDataChild->GetNextSameClassSibling( - XFA_ELEMENT_DataGroup)) { + XFA_Element::DataGroup)) { CXFA_Node* pDataNode = XFA_DataMerge_ScopeMatchGlobalBinding( pDataChild, dwNameHash, eMatchDataNodeType, FALSE); if (pDataNode) { @@ -392,7 +392,7 @@ static CXFA_Node* XFA_DataMerge_ScopeMatchGlobalBinding( static CXFA_Node* XFA_DataMerge_FindGlobalDataNode(CXFA_Document* pDocument, CFX_WideStringC wsName, CXFA_Node* pDataScope, - XFA_ELEMENT eMatchNodeType) { + XFA_Element eMatchNodeType) { if (wsName.IsEmpty()) return nullptr; @@ -411,7 +411,7 @@ static CXFA_Node* XFA_DataMerge_FindGlobalDataNode(CXFA_Document* pDocument, static CXFA_Node* XFA_DataMerge_FindOnceDataNode(CXFA_Document* pDocument, CFX_WideStringC wsName, CXFA_Node* pDataScope, - XFA_ELEMENT eMatchNodeType) { + XFA_Element eMatchNodeType) { if (wsName.IsEmpty()) return nullptr; @@ -424,7 +424,7 @@ static CXFA_Node* XFA_DataMerge_FindOnceDataNode(CXFA_Document* pDocument, pDataChild; pDataChild = pDataChild->GetNextSameNameSibling(dwNameHash)) { if (pDataChild == pLastDataScope || pDataChild->HasBindItem() || - (eMatchNodeType != XFA_ELEMENT_DataModel && + (eMatchNodeType != XFA_Element::DataModel && pDataChild->GetClassID() != eMatchNodeType)) { continue; } @@ -438,7 +438,7 @@ static CXFA_Node* XFA_DataMerge_FindOnceDataNode(CXFA_Document* pDocument, static CXFA_Node* XFA_DataMerge_FindDataRefDataNode(CXFA_Document* pDocument, CFX_WideStringC wsRef, CXFA_Node* pDataScope, - XFA_ELEMENT eMatchNodeType, + XFA_Element eMatchNodeType, CXFA_Node* pTemplateNode, FX_BOOL bForceBind, FX_BOOL bUpLevel = TRUE) { @@ -465,7 +465,7 @@ static CXFA_Node* XFA_DataMerge_FindDataRefDataNode(CXFA_Document* pDocument, return NULL; } CXFA_Node* XFA_DataMerge_FindFormDOMInstance(CXFA_Document* pDocument, - XFA_ELEMENT eClassID, + XFA_Element eClassID, uint32_t dwNameHash, CXFA_Node* pFormParent) { CXFA_Node* pFormChild = pFormParent->GetNodeItem(XFA_NODEITEM_FirstChild); @@ -480,15 +480,15 @@ CXFA_Node* XFA_DataMerge_FindFormDOMInstance(CXFA_Document* pDocument, } static FX_BOOL XFA_NeedGenerateForm(CXFA_Node* pTemplateChild, FX_BOOL bUseInstanceManager = TRUE) { - XFA_ELEMENT eType = pTemplateChild->GetClassID(); - if (eType == XFA_ELEMENT_Variables) { + XFA_Element eType = pTemplateChild->GetClassID(); + if (eType == XFA_Element::Variables) { return TRUE; } if (pTemplateChild->IsContainerNode()) { return FALSE; } - if (eType == XFA_ELEMENT_Proto || - (bUseInstanceManager && eType == XFA_ELEMENT_Occur)) { + if (eType == XFA_Element::Proto || + (bUseInstanceManager && eType == XFA_Element::Occur)) { return FALSE; } return TRUE; @@ -516,7 +516,7 @@ CXFA_Node* XFA_NodeMerge_CloneOrMergeContainer(CXFA_Document* pDocument, } pExistingNode->ClearFlag(XFA_NodeFlag_UnusedNode); pExistingNode->SetTemplateNode(pTemplateNode); - if (bRecursive && pExistingNode->GetClassID() != XFA_ELEMENT_Items) { + if (bRecursive && pExistingNode->GetClassID() != XFA_Element::Items) { for (CXFA_Node* pTemplateChild = pTemplateNode->GetNodeItem(XFA_NODEITEM_FirstChild); pTemplateChild; pTemplateChild = pTemplateChild->GetNodeItem( @@ -555,18 +555,18 @@ static CXFA_Node* XFA_NodeMerge_CloneOrMergeInstanceManager( uint32_t dwInstNameHash = FX_HashCode_GetW(wsInstMgrNodeName.AsStringC(), false); CXFA_Node* pExistingNode = XFA_DataMerge_FindFormDOMInstance( - pDocument, XFA_ELEMENT_InstanceManager, dwInstNameHash, pFormParent); + pDocument, XFA_Element::InstanceManager, dwInstNameHash, pFormParent); if (pExistingNode) { uint32_t dwNameHash = pTemplateNode->GetNameHash(); for (CXFA_Node* pNode = pExistingNode->GetNodeItem(XFA_NODEITEM_NextSibling); pNode;) { - XFA_ELEMENT eCurType = pNode->GetClassID(); - if (eCurType == XFA_ELEMENT_InstanceManager) { + XFA_Element eCurType = pNode->GetClassID(); + if (eCurType == XFA_Element::InstanceManager) { break; } - if ((eCurType != XFA_ELEMENT_Subform) && - (eCurType != XFA_ELEMENT_SubformSet)) { + if ((eCurType != XFA_Element::Subform) && + (eCurType != XFA_Element::SubformSet)) { pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling); continue; } @@ -585,7 +585,7 @@ static CXFA_Node* XFA_NodeMerge_CloneOrMergeInstanceManager( return pExistingNode; } CXFA_Node* pNewNode = pDocument->GetParser()->GetFactory()->CreateNode( - XFA_XDPPACKET_Form, XFA_ELEMENT_InstanceManager); + XFA_XDPPACKET_Form, XFA_Element::InstanceManager); ASSERT(pNewNode); wsInstMgrNodeName = FX_WSTRC(L"_") + pTemplateNode->GetCData(XFA_ATTRIBUTE_Name); @@ -615,25 +615,25 @@ static CXFA_Node* XFA_DataMerge_FindMatchingDataNode( CXFA_Node* pResult = NULL; for (CXFA_Node* pCurTemplateNode = pIterator->GetCurrent(); pCurTemplateNode;) { - XFA_ELEMENT eMatchNodeType; + XFA_Element eMatchNodeType; switch (pCurTemplateNode->GetClassID()) { - case XFA_ELEMENT_Subform: - eMatchNodeType = XFA_ELEMENT_DataGroup; + case XFA_Element::Subform: + eMatchNodeType = XFA_Element::DataGroup; break; - case XFA_ELEMENT_Field: { + case XFA_Element::Field: { eMatchNodeType = XFA_FieldIsMultiListBox(pCurTemplateNode) - ? XFA_ELEMENT_DataGroup - : XFA_ELEMENT_DataValue; + ? XFA_Element::DataGroup + : XFA_Element::DataValue; } break; - case XFA_ELEMENT_ExclGroup: - eMatchNodeType = XFA_ELEMENT_DataValue; + case XFA_Element::ExclGroup: + eMatchNodeType = XFA_Element::DataValue; break; default: pCurTemplateNode = pIterator->MoveToNext(); continue; } CXFA_Node* pTemplateNodeOccur = - pCurTemplateNode->GetFirstChildByClass(XFA_ELEMENT_Occur); + pCurTemplateNode->GetFirstChildByClass(XFA_Element::Occur); int32_t iMin, iMax, iInit; if (pTemplateNodeOccur && XFA_GetOccurInfo(pTemplateNodeOccur, iMin, iMax, iInit) && iMax == 0) { @@ -641,7 +641,7 @@ static CXFA_Node* XFA_DataMerge_FindMatchingDataNode( continue; } CXFA_Node* pTemplateNodeBind = - pCurTemplateNode->GetFirstChildByClass(XFA_ELEMENT_Bind); + pCurTemplateNode->GetFirstChildByClass(XFA_Element::Bind); XFA_ATTRIBUTEENUM eMatch = pTemplateNodeBind ? pTemplateNodeBind->GetEnum(XFA_ATTRIBUTE_Match) : XFA_ATTRIBUTEENUM_Once; @@ -656,8 +656,8 @@ static CXFA_Node* XFA_DataMerge_FindMatchingDataNode( pCurTemplateNode = pIterator->MoveToNext(); continue; } - if (eMatchNodeType == XFA_ELEMENT_DataValue || - (eMatchNodeType == XFA_ELEMENT_DataGroup && + if (eMatchNodeType == XFA_Element::DataValue || + (eMatchNodeType == XFA_Element::DataGroup && XFA_FieldIsMultiListBox(pTemplateNodeBind))) { CXFA_Node* pGlobalBindNode = XFA_DataMerge_FindGlobalDataNode( pDocument, pCurTemplateNode->GetCData(XFA_ATTRIBUTE_Name), @@ -750,29 +750,29 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet( CXFA_Node* pDataScope, FX_BOOL bOneInstance, FX_BOOL bDataMerge) { - XFA_ELEMENT eElement = pTemplateNode->GetClassID(); + XFA_Element eElement = pTemplateNode->GetClassID(); CXFA_Node* pOccurNode = NULL; CXFA_Node* pFirstInstance = NULL; FX_BOOL bUseInstanceManager = - pFormParentNode->GetClassID() != XFA_ELEMENT_Area; + pFormParentNode->GetClassID() != XFA_Element::Area; CXFA_Node* pInstMgrNode = NULL; CXFA_NodeArray subformArray; CXFA_NodeArray* pSearchArray = NULL; - if (!bOneInstance && - (eElement == XFA_ELEMENT_SubformSet || eElement == XFA_ELEMENT_Subform)) { + if (!bOneInstance && (eElement == XFA_Element::SubformSet || + eElement == XFA_Element::Subform)) { pInstMgrNode = bUseInstanceManager ? XFA_NodeMerge_CloneOrMergeInstanceManager( pDocument, pFormParentNode, pTemplateNode, subformArray) : NULL; if (CXFA_Node* pOccurTemplateNode = - pTemplateNode->GetFirstChildByClass(XFA_ELEMENT_Occur)) { + pTemplateNode->GetFirstChildByClass(XFA_Element::Occur)) { pOccurNode = pInstMgrNode ? XFA_NodeMerge_CloneOrMergeContainer( pDocument, pInstMgrNode, pOccurTemplateNode, FALSE) : pOccurTemplateNode; } else if (pInstMgrNode) { - pOccurNode = pInstMgrNode->GetFirstChildByClass(XFA_ELEMENT_Occur); + pOccurNode = pInstMgrNode->GetFirstChildByClass(XFA_Element::Occur); if (pOccurNode) { pOccurNode->ClearFlag(XFA_NodeFlag_UnusedNode); } @@ -780,7 +780,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet( if (pInstMgrNode) { pInstMgrNode->SetFlag(XFA_NodeFlag_Initialized, true); pSearchArray = &subformArray; - if (pFormParentNode->GetClassID() == XFA_ELEMENT_PageArea) { + if (pFormParentNode->GetClassID() == XFA_Element::PageArea) { bOneInstance = TRUE; if (subformArray.GetSize() < 1) { pSearchArray = NULL; @@ -796,7 +796,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet( XFA_GetOccurInfo(pOccurNode, iMin, iMax, iInit); } XFA_ATTRIBUTEENUM eRelation = - eElement == XFA_ELEMENT_SubformSet + eElement == XFA_Element::SubformSet ? pTemplateNode->GetEnum(XFA_ATTRIBUTE_Relation) : XFA_ATTRIBUTEENUM_Ordered; int32_t iCurRepeatIndex = 0; @@ -805,7 +805,7 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_SubformSet( CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFAContainerNode> sNodeIterator(pTemplateNode); FX_BOOL bAccessedDataDOM = FALSE; - if (eElement == XFA_ELEMENT_SubformSet || eElement == XFA_ELEMENT_Area) { + if (eElement == XFA_Element::SubformSet || eElement == XFA_Element::Area) { sNodeIterator.MoveToNext(); } else { CFX_MapPtrTemplate<CXFA_Node*, CXFA_Node*> subformMapArray; @@ -1032,9 +1032,9 @@ static CXFA_Node* XFA_DataMerge_CopyContainer_Field(CXFA_Document* pDocument, if (XFA_NeedGenerateForm(pTemplateChildNode)) { XFA_NodeMerge_CloneOrMergeContainer(pDocument, pFieldNode, pTemplateChildNode, TRUE); - } else if (pTemplateNode->GetClassID() == XFA_ELEMENT_ExclGroup && + } else if (pTemplateNode->GetClassID() == XFA_Element::ExclGroup && pTemplateChildNode->IsContainerNode()) { - if (pTemplateChildNode->GetClassID() == XFA_ELEMENT_Field) { + if (pTemplateChildNode->GetClassID() == XFA_Element::Field) { XFA_DataMerge_CopyContainer_Field(pDocument, pTemplateChildNode, pFieldNode, NULL, FALSE); } @@ -1062,21 +1062,21 @@ CXFA_Node* CXFA_Document::DataMerge_CopyContainer(CXFA_Node* pTemplateNode, FX_BOOL bDataMerge, FX_BOOL bUpLevel) { switch (pTemplateNode->GetClassID()) { - case XFA_ELEMENT_SubformSet: - case XFA_ELEMENT_Subform: - case XFA_ELEMENT_Area: - case XFA_ELEMENT_PageArea: + case XFA_Element::SubformSet: + case XFA_Element::Subform: + case XFA_Element::Area: + case XFA_Element::PageArea: return XFA_DataMerge_CopyContainer_SubformSet( this, pTemplateNode, pFormNode, pDataScope, bOneInstance, bDataMerge); - case XFA_ELEMENT_ExclGroup: - case XFA_ELEMENT_Field: - case XFA_ELEMENT_Draw: - case XFA_ELEMENT_ContentArea: + case XFA_Element::ExclGroup: + case XFA_Element::Field: + case XFA_Element::Draw: + case XFA_Element::ContentArea: return XFA_DataMerge_CopyContainer_Field( this, pTemplateNode, pFormNode, pDataScope, bDataMerge, bUpLevel); - case XFA_ELEMENT_PageSet: + case XFA_Element::PageSet: break; - case XFA_ELEMENT_Variables: + case XFA_Element::Variables: break; default: ASSERT(FALSE); @@ -1091,13 +1091,13 @@ static void XFA_DataMerge_UpdateBindingRelations(CXFA_Document* pDocument, FX_BOOL bDataRef, FX_BOOL bParentDataRef) { FX_BOOL bMatchRef = TRUE; - XFA_ELEMENT eClassID = pFormNode->GetClassID(); + XFA_Element eClassID = pFormNode->GetClassID(); CXFA_Node* pDataNode = pFormNode->GetBindData(); - if (eClassID == XFA_ELEMENT_Subform || eClassID == XFA_ELEMENT_ExclGroup || - eClassID == XFA_ELEMENT_Field) { + if (eClassID == XFA_Element::Subform || eClassID == XFA_Element::ExclGroup || + eClassID == XFA_Element::Field) { CXFA_Node* pTemplateNode = pFormNode->GetTemplateNode(); CXFA_Node* pTemplateNodeBind = - pTemplateNode ? pTemplateNode->GetFirstChildByClass(XFA_ELEMENT_Bind) + pTemplateNode ? pTemplateNode->GetFirstChildByClass(XFA_Element::Bind) : NULL; XFA_ATTRIBUTEENUM eMatch = pTemplateNodeBind ? pTemplateNodeBind->GetEnum(XFA_ATTRIBUTE_Match) @@ -1114,10 +1114,10 @@ static void XFA_DataMerge_UpdateBindingRelations(CXFA_Document* pDocument, if (pFormNode->GetNameHash() != 0 && pFormNode->GetEnum(XFA_ATTRIBUTE_Scope) != XFA_ATTRIBUTEENUM_None) { - XFA_ELEMENT eDataNodeType = (eClassID == XFA_ELEMENT_Subform || + XFA_Element eDataNodeType = (eClassID == XFA_Element::Subform || XFA_FieldIsMultiListBox(pFormNode)) - ? XFA_ELEMENT_DataGroup - : XFA_ELEMENT_DataValue; + ? XFA_Element::DataGroup + : XFA_Element::DataValue; pDataNode = XFA_DataDescription_MaybeCreateDataNode( pDocument, pDataScope, eDataNodeType, CFX_WideString(pFormNode->GetCData(XFA_ATTRIBUTE_Name))); @@ -1145,10 +1145,10 @@ static void XFA_DataMerge_UpdateBindingRelations(CXFA_Document* pDocument, if (dwNameHash != 0 && !pDataNode) { pDataNode = XFA_DataMerge_GetGlobalBinding(pDocument, dwNameHash); if (!pDataNode) { - XFA_ELEMENT eDataNodeType = (eClassID == XFA_ELEMENT_Subform || + XFA_Element eDataNodeType = (eClassID == XFA_Element::Subform || XFA_FieldIsMultiListBox(pFormNode)) - ? XFA_ELEMENT_DataGroup - : XFA_ELEMENT_DataValue; + ? XFA_Element::DataGroup + : XFA_Element::DataValue; CXFA_Node* pRecordNode = ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Record)); pDataNode = XFA_DataDescription_MaybeCreateDataNode( @@ -1195,9 +1195,9 @@ static void XFA_DataMerge_UpdateBindingRelations(CXFA_Document* pDocument, } } if (bMatchRef && - (eClassID == XFA_ELEMENT_Subform || eClassID == XFA_ELEMENT_SubformSet || - eClassID == XFA_ELEMENT_Area || eClassID == XFA_ELEMENT_PageArea || - eClassID == XFA_ELEMENT_PageSet)) { + (eClassID == XFA_Element::Subform || + eClassID == XFA_Element::SubformSet || eClassID == XFA_Element::Area || + eClassID == XFA_Element::PageArea || eClassID == XFA_Element::PageSet)) { for (CXFA_Node* pFormChild = pFormNode->GetNodeItem(XFA_NODEITEM_FirstChild); pFormChild; @@ -1251,7 +1251,7 @@ void CXFA_Document::DoDataMerge() { CFDE_XMLElement* pDatasetsXMLNode = new CFDE_XMLElement(L"xfa:datasets"); pDatasetsXMLNode->SetString(L"xmlns:xfa", L"http://www.xfa.org/schema/xfa-data/1.0/"); - pDatasetsRoot = CreateNode(XFA_XDPPACKET_Datasets, XFA_ELEMENT_DataModel); + pDatasetsRoot = CreateNode(XFA_XDPPACKET_Datasets, XFA_Element::DataModel); pDatasetsRoot->SetCData(XFA_ATTRIBUTE_Name, L"datasets"); m_pRootNode->GetXMLMappingNode()->InsertChildNode(pDatasetsXMLNode); m_pRootNode->InsertChild(pDatasetsRoot); @@ -1264,7 +1264,7 @@ void CXFA_Document::DoDataMerge() { pDatasetsRoot->GetNodeItem(XFA_NODEITEM_FirstChild); pChildNode; pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pChildNode->GetClassID() != XFA_ELEMENT_DataGroup) { + if (pChildNode->GetClassID() != XFA_Element::DataGroup) { continue; } CFX_WideString wsNamespaceURI; @@ -1290,33 +1290,33 @@ void CXFA_Document::DoDataMerge() { } if (!pDataRoot) { CFDE_XMLElement* pDataRootXMLNode = new CFDE_XMLElement(L"xfa:data"); - pDataRoot = CreateNode(XFA_XDPPACKET_Datasets, XFA_ELEMENT_DataGroup); + pDataRoot = CreateNode(XFA_XDPPACKET_Datasets, XFA_Element::DataGroup); pDataRoot->SetCData(XFA_ATTRIBUTE_Name, L"data"); pDataRoot->SetXMLMappingNode(pDataRootXMLNode); pDatasetsRoot->InsertChild(pDataRoot); } CXFA_Node* pDataTopLevel = - pDataRoot->GetFirstChildByClass(XFA_ELEMENT_DataGroup); + pDataRoot->GetFirstChildByClass(XFA_Element::DataGroup); uint32_t dwNameHash = pDataTopLevel ? pDataTopLevel->GetNameHash() : 0; CXFA_Node* pTemplateRoot = - m_pRootNode->GetFirstChildByClass(XFA_ELEMENT_Template); + m_pRootNode->GetFirstChildByClass(XFA_Element::Template); if (!pTemplateRoot) { return; } CXFA_Node* pTemplateChosen = dwNameHash != 0 ? pTemplateRoot->GetFirstChildByName(dwNameHash) : NULL; if (!pTemplateChosen || - pTemplateChosen->GetClassID() != XFA_ELEMENT_Subform) { - pTemplateChosen = pTemplateRoot->GetFirstChildByClass(XFA_ELEMENT_Subform); + pTemplateChosen->GetClassID() != XFA_Element::Subform) { + pTemplateChosen = pTemplateRoot->GetFirstChildByClass(XFA_Element::Subform); } if (!pTemplateChosen) { return; } - CXFA_Node* pFormRoot = m_pRootNode->GetFirstChildByClass(XFA_ELEMENT_Form); + CXFA_Node* pFormRoot = m_pRootNode->GetFirstChildByClass(XFA_Element::Form); FX_BOOL bEmptyForm = FALSE; if (!pFormRoot) { bEmptyForm = TRUE; - pFormRoot = CreateNode(XFA_XDPPACKET_Form, XFA_ELEMENT_Form); + pFormRoot = CreateNode(XFA_XDPPACKET_Form, XFA_Element::Form); ASSERT(pFormRoot); pFormRoot->SetCData(XFA_ATTRIBUTE_Name, L"form"); m_pRootNode->InsertChild(pFormRoot, NULL); @@ -1338,7 +1338,7 @@ void CXFA_Document::DoDataMerge() { CFDE_XMLElement* pDataTopLevelXMLNode = new CFDE_XMLElement(wsDataTopLevelName); - pDataTopLevel = CreateNode(XFA_XDPPACKET_Datasets, XFA_ELEMENT_DataGroup); + pDataTopLevel = CreateNode(XFA_XDPPACKET_Datasets, XFA_Element::DataGroup); pDataTopLevel->SetCData(XFA_ATTRIBUTE_Name, wsDataTopLevelName); pDataTopLevel->SetXMLMappingNode(pDataTopLevelXMLNode); CXFA_Node* pBeforeNode = pDataRoot->GetNodeItem(XFA_NODEITEM_FirstChild); @@ -1362,11 +1362,11 @@ void CXFA_Document::DoDataMerge() { } DataMerge_UpdateBindingRelations(pSubformSetNode); CXFA_Node* pPageSetNode = - pSubformSetNode->GetFirstChildByClass(XFA_ELEMENT_PageSet); + pSubformSetNode->GetFirstChildByClass(XFA_Element::PageSet); while (pPageSetNode) { m_pPendingPageSet.Add(pPageSetNode); CXFA_Node* pNextPageSetNode = - pPageSetNode->GetNextSameClassSibling(XFA_ELEMENT_PageSet); + pPageSetNode->GetNextSameClassSibling(XFA_Element::PageSet); pSubformSetNode->RemoveChild(pPageSetNode); pPageSetNode = pNextPageSetNode; } @@ -1377,7 +1377,7 @@ void CXFA_Document::DoDataMerge() { while (pNode) { if (pNode->IsUnusedNode()) { if (pNode->IsContainerNode() || - pNode->GetClassID() == XFA_ELEMENT_InstanceManager) { + pNode->GetClassID() == XFA_Element::InstanceManager) { CXFA_Node* pNext = sIterator.SkipChildrenAndMoveToNext(); pNode->GetNodeItem(XFA_NODEITEM_Parent)->RemoveChild(pNode); pNode = pNext; diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.h b/xfa/fxfa/parser/xfa_document_datamerger_imp.h index 0749b73e47..dcf6902ba9 100644 --- a/xfa/fxfa/parser/xfa_document_datamerger_imp.h +++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.h @@ -17,7 +17,7 @@ CXFA_Node* XFA_NodeMerge_CloneOrMergeContainer( CXFA_NodeArray* pSubformArray = NULL); CXFA_Node* XFA_DataMerge_FindDataScope(CXFA_Node* pParentFormNode); CXFA_Node* XFA_DataMerge_FindFormDOMInstance(CXFA_Document* pDocument, - XFA_ELEMENT eClassID, + XFA_Element eClassID, uint32_t dwNameHash, CXFA_Node* pFormParent); diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp index 76ec4ec465..919a94d8fe 100644 --- a/xfa/fxfa/parser/xfa_document_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_imp.cpp @@ -86,10 +86,10 @@ CXFA_Object* CXFA_Document::GetXFAObject(XFA_HashCode dwNodeNameHash) { return NULL; } for (CXFA_Node* pDatasetsChild = - pDatasetsNode->GetFirstChildByClass(XFA_ELEMENT_DataGroup); + pDatasetsNode->GetFirstChildByClass(XFA_Element::DataGroup); pDatasetsChild; - pDatasetsChild = - pDatasetsChild->GetNextSameClassSibling(XFA_ELEMENT_DataGroup)) { + pDatasetsChild = pDatasetsChild->GetNextSameClassSibling( + XFA_Element::DataGroup)) { if (pDatasetsChild->GetNameHash() != XFA_HASHCODE_Data) { continue; } @@ -109,7 +109,7 @@ CXFA_Object* CXFA_Document::GetXFAObject(XFA_HashCode dwNodeNameHash) { return NULL; case XFA_HASHCODE_Record: { CXFA_Node* pData = ToNode(GetXFAObject(XFA_HASHCODE_Data)); - return pData ? pData->GetFirstChildByClass(XFA_ELEMENT_DataGroup) : NULL; + return pData ? pData->GetFirstChildByClass(XFA_Element::DataGroup) : NULL; } case XFA_HASHCODE_DataWindow: { if (m_pScriptDataWindow == NULL) { @@ -151,12 +151,12 @@ CXFA_Object* CXFA_Document::GetXFAObject(XFA_HashCode dwNodeNameHash) { return m_pRootNode->GetFirstChildByName(dwNodeNameHash); } } -CXFA_Node* CXFA_Document::CreateNode(uint32_t dwPacket, XFA_ELEMENT eElement) { +CXFA_Node* CXFA_Document::CreateNode(uint32_t dwPacket, XFA_Element eElement) { return CreateNode(XFA_GetPacketByID(dwPacket), eElement); } CXFA_Node* CXFA_Document::CreateNode(const XFA_PACKETINFO* pPacket, - XFA_ELEMENT eElement) { + XFA_Element eElement) { if (!pPacket) return nullptr; @@ -201,15 +201,15 @@ FX_BOOL CXFA_Document::IsInteractive() { return FALSE; } CFX_WideString wsInteractive; - CXFA_Node* pPresent = pConfig->GetFirstChildByClass(XFA_ELEMENT_Present); + CXFA_Node* pPresent = pConfig->GetFirstChildByClass(XFA_Element::Present); if (!pPresent) { return FALSE; } - CXFA_Node* pPDF = pPresent->GetFirstChildByClass(XFA_ELEMENT_Pdf); + CXFA_Node* pPDF = pPresent->GetFirstChildByClass(XFA_Element::Pdf); if (!pPDF) { return FALSE; } - CXFA_Node* pInteractive = pPDF->GetChild(0, XFA_ELEMENT_Interactive); + CXFA_Node* pInteractive = pPDF->GetChild(0, XFA_Element::Interactive); if (pInteractive) { m_dwDocFlags |= XFA_DOCFLAG_HasInteractive; if (pInteractive->TryContent(wsInteractive) && diff --git a/xfa/fxfa/parser/xfa_document_layout_imp.cpp b/xfa/fxfa/parser/xfa_document_layout_imp.cpp index 31733bb52d..723ae1db69 100644 --- a/xfa/fxfa/parser/xfa_document_layout_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_layout_imp.cpp @@ -55,7 +55,7 @@ int32_t CXFA_LayoutProcessor::StartLayout(FX_BOOL bForceRestart) { return -1; } CXFA_Node* pFormRoot = - pFormPacketNode->GetFirstChildByClass(XFA_ELEMENT_Subform); + pFormPacketNode->GetFirstChildByClass(XFA_Element::Subform); if (!pFormRoot) { return -1; } @@ -178,7 +178,7 @@ int32_t CXFA_ContainerLayoutItem::GetPageIndex() const { void CXFA_ContainerLayoutItem::GetPageSize(CFX_SizeF& size) const { size.clear(); - CXFA_Node* pMedium = m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Medium); + CXFA_Node* pMedium = m_pFormNode->GetFirstChildByClass(XFA_Element::Medium); if (!pMedium) return; diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp index 9ffae1850f..c45f609e3a 100644 --- a/xfa/fxfa/parser/xfa_document_serialize.cpp +++ b/xfa/fxfa/parser/xfa_document_serialize.cpp @@ -50,7 +50,7 @@ FX_BOOL CXFA_DataImporter::ImportData(IFX_FileRead* pDataDocument) { if (pDataNode) { pDataModel->RemoveChild(pDataNode); } - if (pImportDataRoot->GetClassID() == XFA_ELEMENT_DataModel) { + if (pImportDataRoot->GetClassID() == XFA_Element::DataModel) { while (CXFA_Node* pChildNode = pImportDataRoot->GetNodeItem(XFA_NODEITEM_FirstChild)) { pImportDataRoot->RemoveChild(pChildNode); @@ -145,11 +145,11 @@ static FX_BOOL XFA_DataExporter_AttributeSaveInDataModel( CXFA_Node* pNode, XFA_ATTRIBUTE eAttribute) { FX_BOOL bSaveInDataModel = FALSE; - if (pNode->GetClassID() != XFA_ELEMENT_Image) { + if (pNode->GetClassID() != XFA_Element::Image) { return bSaveInDataModel; } CXFA_Node* pValueNode = pNode->GetNodeItem(XFA_NODEITEM_Parent); - if (!pValueNode || pValueNode->GetClassID() != XFA_ELEMENT_Value) { + if (!pValueNode || pValueNode->GetClassID() != XFA_Element::Value) { return bSaveInDataModel; } CXFA_Node* pFieldNode = pValueNode->GetNodeItem(XFA_NODEITEM_Parent); @@ -166,7 +166,7 @@ FX_BOOL XFA_DataExporter_ContentNodeNeedtoExport(CXFA_Node* pContentNode) { ASSERT(pContentNode->IsContentNode()); CXFA_Node* pParentNode = pContentNode->GetNodeItem(XFA_NODEITEM_Parent); - if (!pParentNode || pParentNode->GetClassID() != XFA_ELEMENT_Value) + if (!pParentNode || pParentNode->GetClassID() != XFA_Element::Value) return TRUE; CXFA_Node* pGrandParentNode = pParentNode->GetNodeItem(XFA_NODEITEM_Parent); @@ -176,8 +176,8 @@ FX_BOOL XFA_DataExporter_ContentNodeNeedtoExport(CXFA_Node* pContentNode) { return FALSE; CXFA_WidgetData* pWidgetData = pGrandParentNode->GetWidgetData(); - XFA_ELEMENT eUIType = pWidgetData->GetUIType(); - if (eUIType == XFA_ELEMENT_PasswordEdit) { + XFA_Element eUIType = pWidgetData->GetUIType(); + if (eUIType == XFA_Element::PasswordEdit) { return FALSE; } return TRUE; @@ -227,9 +227,9 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( } CXFA_Node* pRawValueNode = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); while (pRawValueNode && - pRawValueNode->GetClassID() != XFA_ELEMENT_SharpxHTML && - pRawValueNode->GetClassID() != XFA_ELEMENT_Sharptext && - pRawValueNode->GetClassID() != XFA_ELEMENT_Sharpxml) { + pRawValueNode->GetClassID() != XFA_Element::SharpxHTML && + pRawValueNode->GetClassID() != XFA_Element::Sharptext && + pRawValueNode->GetClassID() != XFA_Element::Sharpxml) { pRawValueNode = pRawValueNode->GetNodeItem(XFA_NODEITEM_NextSibling); } if (!pRawValueNode) { @@ -237,7 +237,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( } CFX_WideString wsContentType; pNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); - if (pRawValueNode->GetClassID() == XFA_ELEMENT_SharpxHTML && + if (pRawValueNode->GetClassID() == XFA_Element::SharpxHTML && wsContentType == FX_WSTRC(L"text/html")) { CFDE_XMLNode* pExDataXML = pNode->GetXMLMappingNode(); if (!pExDataXML) { @@ -259,7 +259,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( CFX_ByteStringC(pMemStream->GetBuffer(), pMemStream->GetSize())); pTempStream->Release(); pMemStream->Release(); - } else if (pRawValueNode->GetClassID() == XFA_ELEMENT_Sharpxml && + } else if (pRawValueNode->GetClassID() == XFA_Element::Sharpxml && wsContentType == FX_WSTRC(L"text/xml")) { CFX_WideString wsRawValue; pRawValueNode->GetAttribute(XFA_ATTRIBUTE_Value, wsRawValue, FALSE); @@ -313,11 +313,11 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( wsChildren += XFA_ExportEncodeContent(wsValue); } break; default: - if (pNode->GetClassID() == XFA_ELEMENT_Items) { + if (pNode->GetClassID() == XFA_Element::Items) { CXFA_Node* pTemplateNode = pNode->GetTemplateNode(); if (!pTemplateNode || - pTemplateNode->CountChildren(XFA_ELEMENT_UNKNOWN) != - pNode->CountChildren(XFA_ELEMENT_UNKNOWN)) { + pTemplateNode->CountChildren(XFA_Element::Unknown) != + pNode->CountChildren(XFA_Element::Unknown)) { bSaveXML = TRUE; } } @@ -331,7 +331,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling); } if (!bSaveXML && !wsChildren.IsEmpty() && - pNode->GetClassID() == XFA_ELEMENT_Items) { + pNode->GetClassID() == XFA_Element::Items) { wsChildren.clear(); bSaveXML = TRUE; CXFA_Node* pChild = pNode->GetNodeItem(XFA_NODEITEM_FirstChild); @@ -370,8 +370,8 @@ static void XFA_DataExporter_RegenerateFormFile_Container( CXFA_Node* pNode, IFX_Stream* pStream, FX_BOOL bSaveXML = FALSE) { - XFA_ELEMENT eElement = pNode->GetClassID(); - if (eElement == XFA_ELEMENT_Field || eElement == XFA_ELEMENT_Draw || + XFA_Element eElement = pNode->GetClassID(); + if (eElement == XFA_Element::Field || eElement == XFA_Element::Draw || !pNode->IsContainerNode()) { CFX_WideTextBuf buf; XFA_DataExporter_RegenerateFormFile_Changed(pNode, buf, bSaveXML); @@ -551,7 +551,7 @@ FX_BOOL CXFA_DataExporter::Export(IFX_Stream* pStream, return TRUE; } void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode) { - if (!pDataNode || pDataNode->GetClassID() == XFA_ELEMENT_DataValue) { + if (!pDataNode || pDataNode->GetClassID() == XFA_Element::DataValue) { return; } int32_t iChildNum = 0; @@ -561,7 +561,7 @@ void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode) { iChildNum++; XFA_DataExporter_DealWithDataGroupNode(pChildNode); } - if (pDataNode->GetClassID() == XFA_ELEMENT_DataGroup) { + if (pDataNode->GetClassID() == XFA_Element::DataGroup) { if (iChildNum > 0) { CFDE_XMLNode* pXMLNode = pDataNode->GetXMLMappingNode(); ASSERT(pXMLNode->GetType() == FDE_XMLNODE_Element); diff --git a/xfa/fxfa/parser/xfa_layout_appadapter.cpp b/xfa/fxfa/parser/xfa_layout_appadapter.cpp index 0d74a577b4..252774ca15 100644 --- a/xfa/fxfa/parser/xfa_layout_appadapter.cpp +++ b/xfa/fxfa/parser/xfa_layout_appadapter.cpp @@ -34,7 +34,7 @@ void XFA_ReleaseLayoutItem(CXFA_LayoutItem* pLayoutItem) { pNode = pNext; } pNotify->OnLayoutItemRemoving(pDocLayout, pLayoutItem); - if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageArea) { + if (pLayoutItem->m_pFormNode->GetClassID() == XFA_Element::PageArea) { pNotify->OnPageEvent(static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem), XFA_PAGEVIEWEVENT_PostRemoved); } diff --git a/xfa/fxfa/parser/xfa_layout_appadapter.h b/xfa/fxfa/parser/xfa_layout_appadapter.h index d41b90a9c7..118c273f84 100644 --- a/xfa/fxfa/parser/xfa_layout_appadapter.h +++ b/xfa/fxfa/parser/xfa_layout_appadapter.h @@ -13,7 +13,7 @@ class CXFA_TraverseStrategy_PageAreaContainerLayoutItem { public: static inline CXFA_ContainerLayoutItem* GetFirstChild( CXFA_ContainerLayoutItem* pLayoutItem) { - if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_PageSet) { + if (pLayoutItem->m_pFormNode->GetClassID() == XFA_Element::PageSet) { return static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pFirstChild); } return NULL; diff --git a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp index 5c6d40a554..abb888990b 100644 --- a/xfa/fxfa/parser/xfa_layout_itemlayout.cpp +++ b/xfa/fxfa/parser/xfa_layout_itemlayout.cpp @@ -73,7 +73,7 @@ CXFA_ItemLayoutProcessor::CXFA_ItemLayoutProcessor(CXFA_Node* pNode, m_ePreProcessRs(XFA_ItemLayoutProcessorResult_Done), m_bHasAvailHeight(TRUE) { ASSERT(m_pFormNode && (m_pFormNode->IsContainerNode() || - m_pFormNode->GetClassID() == XFA_ELEMENT_Form)); + m_pFormNode->GetClassID() == XFA_Element::Form)); m_pOldLayoutItem = (CXFA_ContentLayoutItem*)m_pFormNode->GetUserData(XFA_LAYOUTITEMKEY); } @@ -125,7 +125,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::FindLayoutItemSplitPos( CXFA_FFNotify* pNotify = pDocument->GetParser()->GetNotify(); FX_FLOAT fCurTopMargin = 0, fCurBottomMargin = 0; CXFA_Node* pMarginNode = - pFormNode->GetFirstChildByClass(XFA_ELEMENT_Margin); + pFormNode->GetFirstChildByClass(XFA_Element::Margin); if (pMarginNode && bCalculateMargin) { fCurTopMargin = pMarginNode->GetMeasure(XFA_ATTRIBUTE_TopInset) .ToUnit(XFA_UNIT_Pt); @@ -200,7 +200,7 @@ static XFA_ATTRIBUTEENUM XFA_ItemLayoutProcessor_GetLayout( return eLayoutMode; } CXFA_Node* pParentNode = pFormNode->GetNodeItem(XFA_NODEITEM_Parent); - if (pParentNode && pParentNode->GetClassID() == XFA_ELEMENT_Form) { + if (pParentNode && pParentNode->GetClassID() == XFA_Element::Form) { bRootForceTb = TRUE; return XFA_ATTRIBUTEENUM_Tb; } @@ -219,7 +219,7 @@ static FX_BOOL XFA_ExistContainerKeep(CXFA_Node* pCurNode, FX_BOOL bPreFind) { if (pPreContainer == NULL) { return FALSE; } - CXFA_Node* pKeep = pCurNode->GetFirstChildByClass(XFA_ELEMENT_Keep); + CXFA_Node* pKeep = pCurNode->GetFirstChildByClass(XFA_Element::Keep); if (pKeep) { XFA_ATTRIBUTEENUM ePrevious; XFA_ATTRIBUTE eKeepType = XFA_ATTRIBUTE_Previous; @@ -233,7 +233,7 @@ static FX_BOOL XFA_ExistContainerKeep(CXFA_Node* pCurNode, FX_BOOL bPreFind) { } } } - pKeep = pPreContainer->GetFirstChildByClass(XFA_ELEMENT_Keep); + pKeep = pPreContainer->GetFirstChildByClass(XFA_Element::Keep); if (!pKeep) { return FALSE; } @@ -278,7 +278,7 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem( bCalculateMargin = FALSE; } CXFA_Node* pMarginNode = - pLayoutItem->m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Margin); + pLayoutItem->m_pFormNode->GetFirstChildByClass(XFA_Element::Margin); if (pMarginNode && bCalculateMargin) { fCurTopMargin = pMarginNode->GetMeasure(XFA_ATTRIBUTE_TopInset).ToUnit(XFA_UNIT_Pt); @@ -387,7 +387,7 @@ void CXFA_ItemLayoutProcessor::SplitLayoutItem(FX_FLOAT fSplitPos) { CXFA_ContainerLayoutItem* CXFA_LayoutItem::GetPage() const { for (CXFA_LayoutItem* pCurNode = const_cast<CXFA_LayoutItem*>(this); pCurNode; pCurNode = pCurNode->m_pParent) { - if (pCurNode->m_pFormNode->GetClassID() == XFA_ELEMENT_PageArea) + if (pCurNode->m_pFormNode->GetClassID() == XFA_Element::PageArea) return static_cast<CXFA_ContainerLayoutItem*>(pCurNode); } return nullptr; @@ -411,14 +411,15 @@ void CXFA_LayoutItem::GetRect(CFX_RectF& rtLayout, FX_BOOL bRelative) const { sPos += pContent->m_sPos; if (CXFA_Node* pMarginNode = pLayoutItem->m_pFormNode->GetFirstChildByClass( - XFA_ELEMENT_Margin)) { + XFA_Element::Margin)) { sPos += CFX_PointF(pMarginNode->GetMeasure(XFA_ATTRIBUTE_LeftInset) .ToUnit(XFA_UNIT_Pt), pMarginNode->GetMeasure(XFA_ATTRIBUTE_TopInset) .ToUnit(XFA_UNIT_Pt)); } } else { - if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_ContentArea) { + if (pLayoutItem->m_pFormNode->GetClassID() == + XFA_Element::ContentArea) { sPos += CFX_PointF(pLayoutItem->m_pFormNode->GetMeasure(XFA_ATTRIBUTE_X) .ToUnit(XFA_UNIT_Pt), @@ -426,7 +427,7 @@ void CXFA_LayoutItem::GetRect(CFX_RectF& rtLayout, FX_BOOL bRelative) const { .ToUnit(XFA_UNIT_Pt)); break; } else if (pLayoutItem->m_pFormNode->GetClassID() == - XFA_ELEMENT_PageArea) { + XFA_Element::PageArea) { break; } } @@ -612,21 +613,21 @@ static FX_BOOL XFA_ItemLayoutProcessor_FindBreakNode( eAttributeType = XFA_ATTRIBUTE_After; } switch (pBreakNode->GetClassID()) { - case XFA_ELEMENT_BreakBefore: { + case XFA_Element::BreakBefore: { if (bBreakBefore) { pCurActionNode = pBreakNode; nCurStage = XFA_ItemLayoutProcessorStages_BreakBefore; bFindRs = TRUE; } } break; - case XFA_ELEMENT_BreakAfter: { + case XFA_Element::BreakAfter: { if (!bBreakBefore) { pCurActionNode = pBreakNode; nCurStage = XFA_ItemLayoutProcessorStages_BreakAfter; bFindRs = TRUE; } } break; - case XFA_ELEMENT_Break: + case XFA_Element::Break: if (pBreakNode->GetEnum(eAttributeType) != XFA_ATTRIBUTEENUM_Auto) { pCurActionNode = pBreakNode; nCurStage = XFA_ItemLayoutProcessorStages_BreakBefore; @@ -707,8 +708,8 @@ void CXFA_ItemLayoutProcessor::XFA_ItemLayoutProcessor_GotoNextContainerNode( pBookendNode; pBookendNode = pBookendNode->GetNodeItem( XFA_NODEITEM_NextSibling)) { switch (pBookendNode->GetClassID()) { - case XFA_ELEMENT_Bookend: - case XFA_ELEMENT_Break: + case XFA_Element::Bookend: + case XFA_Element::Break: pCurActionNode = pBookendNode; nCurStage = XFA_ItemLayoutProcessorStages_BookendLeader; return; @@ -810,8 +811,8 @@ void CXFA_ItemLayoutProcessor::XFA_ItemLayoutProcessor_GotoNextContainerNode( pBookendNode; pBookendNode = pBookendNode->GetNodeItem( XFA_NODEITEM_NextSibling)) { switch (pBookendNode->GetClassID()) { - case XFA_ELEMENT_Bookend: - case XFA_ELEMENT_Break: + case XFA_Element::Bookend: + case XFA_Element::Break: pCurActionNode = pBookendNode; nCurStage = XFA_ItemLayoutProcessorStages_BookendTrailer; return; @@ -900,29 +901,29 @@ static inline void XFA_ItemLayoutProcessor_CalculateContainerSpecfiedSize( fContainerHeight = 0; bContainerWidthAutoSize = TRUE; bContainerHeightAutoSize = TRUE; - XFA_ELEMENT eClassID = pFormNode->GetClassID(); + XFA_Element eClassID = pFormNode->GetClassID(); CXFA_Measurement mTmpValue; - if (bContainerWidthAutoSize && - (eClassID == XFA_ELEMENT_Subform || eClassID == XFA_ELEMENT_ExclGroup) && + if (bContainerWidthAutoSize && (eClassID == XFA_Element::Subform || + eClassID == XFA_Element::ExclGroup) && pFormNode->TryMeasure(XFA_ATTRIBUTE_W, mTmpValue, FALSE) && mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) { fContainerWidth = mTmpValue.ToUnit(XFA_UNIT_Pt); bContainerWidthAutoSize = FALSE; } - if (bContainerHeightAutoSize && - (eClassID == XFA_ELEMENT_Subform || eClassID == XFA_ELEMENT_ExclGroup) && + if (bContainerHeightAutoSize && (eClassID == XFA_Element::Subform || + eClassID == XFA_Element::ExclGroup) && pFormNode->TryMeasure(XFA_ATTRIBUTE_H, mTmpValue, FALSE) && mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) { fContainerHeight = mTmpValue.ToUnit(XFA_UNIT_Pt); bContainerHeightAutoSize = FALSE; } - if (bContainerWidthAutoSize && eClassID == XFA_ELEMENT_Subform && + if (bContainerWidthAutoSize && eClassID == XFA_Element::Subform && pFormNode->TryMeasure(XFA_ATTRIBUTE_MaxW, mTmpValue, FALSE) && mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) { fContainerWidth = mTmpValue.ToUnit(XFA_UNIT_Pt); bContainerWidthAutoSize = FALSE; } - if (bContainerHeightAutoSize && eClassID == XFA_ELEMENT_Subform && + if (bContainerHeightAutoSize && eClassID == XFA_Element::Subform && pFormNode->TryMeasure(XFA_ATTRIBUTE_MaxH, mTmpValue, FALSE) && mTmpValue.GetValue() > XFA_LAYOUT_FLOAT_PERCISION) { fContainerHeight = mTmpValue.ToUnit(XFA_UNIT_Pt); @@ -938,7 +939,7 @@ XFA_ItemLayoutProcessor_CalculateContainerComponentSizeFromContentSize( FX_BOOL bContainerHeightAutoSize, FX_FLOAT fContentCalculatedHeight, FX_FLOAT& fContainerHeight) { - CXFA_Node* pMarginNode = pFormNode->GetFirstChildByClass(XFA_ELEMENT_Margin); + CXFA_Node* pMarginNode = pFormNode->GetFirstChildByClass(XFA_Element::Margin); CXFA_Measurement mTmpValue; if (bContainerWidthAutoSize) { fContainerWidth = fContentCalculatedWidth; @@ -1057,7 +1058,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPageArea( if (nCurChildNodeStage != XFA_ItemLayoutProcessorStages_Container) { continue; } - if (pCurChildNode->GetClassID() == XFA_ELEMENT_Variables) { + if (pCurChildNode->GetClassID() == XFA_Element::Variables) { continue; } CXFA_ItemLayoutProcessor* pProcessor = @@ -1086,11 +1087,11 @@ void CXFA_ItemLayoutProcessor::DoLayoutPageArea( CXFA_LayoutItem* pLayoutItem = pPageAreaLayoutItem->m_pFirstChild; while (pLayoutItem) { if (!pLayoutItem->IsContentLayoutItem() || - pLayoutItem->m_pFormNode->GetClassID() != XFA_ELEMENT_Draw) { + pLayoutItem->m_pFormNode->GetClassID() != XFA_Element::Draw) { pLayoutItem = pLayoutItem->m_pNextSibling; continue; } - if (pLayoutItem->m_pFormNode->GetClassID() == XFA_ELEMENT_Draw) { + if (pLayoutItem->m_pFormNode->GetClassID() == XFA_Element::Draw) { CXFA_LayoutItem* pNextLayoutItem = pLayoutItem->m_pNextSibling; pPageAreaLayoutItem->RemoveChild(pLayoutItem); if (pBeforeItem == NULL) { @@ -1129,7 +1130,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer( if (m_nCurChildNodeStage != XFA_ItemLayoutProcessorStages_Container) { continue; } - if (m_pCurChildNode->GetClassID() == XFA_ELEMENT_Variables) { + if (m_pCurChildNode->GetClassID() == XFA_Element::Variables) { continue; } CXFA_ItemLayoutProcessor* pProcessor = @@ -1177,7 +1178,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer( } } else { if (fHiddenContentCalculatedWidth < fChildSuppliedWidth && - m_pCurChildNode->GetClassID() != XFA_ELEMENT_Subform) { + m_pCurChildNode->GetClassID() != XFA_Element::Subform) { fHiddenContentCalculatedWidth = fChildSuppliedWidth; } } @@ -1190,7 +1191,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutPositionedContainer( } } else { if (fHiddenContentCalculatedHeight < fChildSuppliedHeight && - m_pCurChildNode->GetClassID() != XFA_ELEMENT_Subform) { + m_pCurChildNode->GetClassID() != XFA_Element::Subform) { fHiddenContentCalculatedHeight = fChildSuppliedHeight; } } @@ -1217,12 +1218,12 @@ static inline void XFA_ItemLayoutProcessor_UpdateWidgetSize( FX_FLOAT& fHeight) { CXFA_Node* pNode = pLayoutItem->m_pFormNode; ASSERT(pNode); - XFA_ELEMENT eClassID = pNode->GetClassID(); + XFA_Element eClassID = pNode->GetClassID(); switch (eClassID) { - case XFA_ELEMENT_Subform: - case XFA_ELEMENT_Area: - case XFA_ELEMENT_ExclGroup: - case XFA_ELEMENT_SubformSet: { + case XFA_Element::Subform: + case XFA_Element::Area: + case XFA_Element::ExclGroup: + case XFA_Element::SubformSet: { if (fWidth < -XFA_LAYOUT_FLOAT_PERCISION) { fWidth = pLayoutItem->m_sSize.x; } @@ -1231,8 +1232,8 @@ static inline void XFA_ItemLayoutProcessor_UpdateWidgetSize( } break; } - case XFA_ELEMENT_Draw: - case XFA_ELEMENT_Field: { + case XFA_Element::Draw: + case XFA_Element::Field: { pNode->GetDocument()->GetParser()->GetNotify()->StartFieldDrawLayout( pNode, fWidth, fHeight); break; @@ -1251,7 +1252,7 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells( pLayoutRow->m_pFormNode, fContainerWidth, fContainerHeight, bContainerWidthAutoSize, bContainerHeightAutoSize); CXFA_Node* pMarginNode = - pLayoutRow->m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Margin); + pLayoutRow->m_pFormNode->GetFirstChildByClass(XFA_Element::Margin); FX_FLOAT fLeftInset = 0, fTopInset = 0, fRightInset = 0, fBottomInset = 0; if (pMarginNode) { fLeftInset = @@ -1322,7 +1323,7 @@ static inline void XFA_ItemLayoutProcessor_RelocateTableRowCells( FX_FLOAT fOldChildHeight = pLayoutChild->m_sSize.y; pLayoutChild->m_sSize.y = fContentCalculatedHeight; CXFA_Node* pParaNode = - pLayoutChild->m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Para); + pLayoutChild->m_pFormNode->GetFirstChildByClass(XFA_Element::Para); if (pParaNode && pLayoutChild->m_pFirstChild) { FX_FLOAT fOffHeight = fContentCalculatedHeight - fOldChildHeight; XFA_ATTRIBUTEENUM eVType = pParaNode->GetEnum(XFA_ATTRIBUTE_VAlign); @@ -1393,7 +1394,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) { bContainerHeightAutoSize); FX_FLOAT fContentCalculatedWidth = 0, fContentCalculatedHeight = 0; CXFA_Node* pMarginNode = - m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Margin); + m_pFormNode->GetFirstChildByClass(XFA_Element::Margin); FX_FLOAT fLeftInset = 0; FX_FLOAT fRightInset = 0; if (pMarginNode) { @@ -1458,7 +1459,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) { (CXFA_ContentLayoutItem*)m_pLayoutItem->m_pFirstChild; pLayoutChild; pLayoutChild = (CXFA_ContentLayoutItem*)pLayoutChild->m_pNextSibling) { - if (pLayoutChild->m_pFormNode->GetClassID() != XFA_ELEMENT_Subform) { + if (pLayoutChild->m_pFormNode->GetClassID() != XFA_Element::Subform) { continue; } if (!XFA_ItemLayoutProcessor_IsTakingSpace(pLayoutChild->m_pFormNode)) { @@ -1547,7 +1548,7 @@ void CXFA_ItemLayoutProcessor::DoLayoutTableContainer(CXFA_Node* pLayoutNode) { if (!XFA_ItemLayoutProcessor_IsTakingSpace(pLayoutChild->m_pFormNode)) { continue; } - if (pLayoutChild->m_pFormNode->GetClassID() == XFA_ELEMENT_Subform) { + if (pLayoutChild->m_pFormNode->GetClassID() == XFA_Element::Subform) { XFA_ATTRIBUTEENUM eSubformLayout = pLayoutChild->m_pFormNode->GetEnum(XFA_ATTRIBUTE_Layout); if (eSubformLayout == XFA_ATTRIBUTEENUM_Row || @@ -1660,7 +1661,7 @@ static void XFA_ItemLayoutProcessor_AddTrailerBeforeSplit( XFA_ItemLayoutProcessor_UpdatePendedItemLayout(pProcessor, pTrailerLayoutItem); CXFA_Node* pMarginNode = - pProcessor->m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Margin); + pProcessor->m_pFormNode->GetFirstChildByClass(XFA_Element::Margin); FX_FLOAT fLeftInset = 0, fTopInset = 0, fRightInset = 0, fBottomInset = 0; if (pMarginNode) { fLeftInset = @@ -1714,7 +1715,7 @@ static void XFA_ItemLayoutProcessor_AddLeaderAfterSplit( CXFA_ContentLayoutItem* pLeaderLayoutItem) { XFA_ItemLayoutProcessor_UpdatePendedItemLayout(pProcessor, pLeaderLayoutItem); CXFA_Node* pMarginNode = - pProcessor->m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Margin); + pProcessor->m_pFormNode->GetFirstChildByClass(XFA_Element::Margin); FX_FLOAT fLeftInset = 0; FX_FLOAT fRightInset = 0; if (pMarginNode) { @@ -1908,8 +1909,8 @@ void CXFA_ItemLayoutProcessor::ProcessUnUseOverFlow( if (pFormNode == NULL) { return; } - if (pFormNode->GetClassID() == XFA_ELEMENT_Overflow || - pFormNode->GetClassID() == XFA_ELEMENT_Break) { + if (pFormNode->GetClassID() == XFA_Element::Overflow || + pFormNode->GetClassID() == XFA_Element::Break) { pFormNode = pFormNode->GetNodeItem(XFA_NODEITEM_Parent); } if (pLeaderNode && pFormNode) { @@ -2312,7 +2313,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer( } } CXFA_Node* pMarginNode = - m_pFormNode->GetFirstChildByClass(XFA_ELEMENT_Margin); + m_pFormNode->GetFirstChildByClass(XFA_Element::Margin); FX_FLOAT fLeftInset = 0, fTopInset = 0, fRightInset = 0, fBottomInset = 0; if (pMarginNode) { fLeftInset = @@ -2468,13 +2469,13 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer( m_pPageMgr->ProcessBreakBeforeOrAfter(m_pCurChildNode, TRUE, pLeaderNode, pTrailerNode, bCreatePage) && - m_pFormNode->GetClassID() != XFA_ELEMENT_Form && bCreatePage) { + m_pFormNode->GetClassID() != XFA_Element::Form && bCreatePage) { if (JudgeLeaderOrTrailerForOccur(pLeaderNode)) { XFA_ItemLayoutProcessor_AddPendingNode(this, pLeaderNode, TRUE); } if (JudgeLeaderOrTrailerForOccur(pTrailerNode)) { if (m_pFormNode->GetNodeItem(XFA_NODEITEM_Parent)->GetClassID() == - XFA_ELEMENT_Form && + XFA_Element::Form && m_pLayoutItem == NULL) { XFA_ItemLayoutProcessor_AddPendingNode(this, pTrailerNode, TRUE); @@ -2505,7 +2506,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer( m_pPageMgr->ProcessBreakBeforeOrAfter(m_pCurChildNode, FALSE, pLeaderNode, pTrailerNode, bCreatePage) && - m_pFormNode->GetClassID() != XFA_ELEMENT_Form) { + m_pFormNode->GetClassID() != XFA_Element::Form) { if (JudgeLeaderOrTrailerForOccur(pTrailerNode)) { std::unique_ptr<CXFA_ItemLayoutProcessor> pTempProcessor( new CXFA_ItemLayoutProcessor(pTrailerNode, nullptr)); @@ -2608,7 +2609,7 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayoutFlowedContainer( } break; case XFA_ItemLayoutProcessorStages_Container: ASSERT(m_pCurChildNode->IsContainerNode()); - if (m_pCurChildNode->GetClassID() == XFA_ELEMENT_Variables) { + if (m_pCurChildNode->GetClassID() == XFA_Element::Variables) { break; } if (fContentCurRowY >= fHeightLimit + XFA_LAYOUT_FLOAT_PERCISION && @@ -2869,10 +2870,10 @@ FX_BOOL CXFA_ItemLayoutProcessor::CalculateRowChildPosition( } CXFA_Node* CXFA_ItemLayoutProcessor::GetSubformSetParent( CXFA_Node* pSubformSet) { - if (pSubformSet && pSubformSet->GetClassID() == XFA_ELEMENT_SubformSet) { + if (pSubformSet && pSubformSet->GetClassID() == XFA_Element::SubformSet) { CXFA_Node* pParent = pSubformSet->GetNodeItem(XFA_NODEITEM_Parent); while (pParent) { - if (pParent->GetClassID() != XFA_ELEMENT_SubformSet) { + if (pParent->GetClassID() != XFA_Element::SubformSet) { return pParent; } pParent = pParent->GetNodeItem(XFA_NODEITEM_Parent); @@ -2909,12 +2910,12 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayout( FX_FLOAT fHeightLimit, FX_FLOAT fRealHeight, CXFA_LayoutContext* pContext) { - XFA_ELEMENT eClassID = m_pFormNode->GetClassID(); + XFA_Element eClassID = m_pFormNode->GetClassID(); switch (eClassID) { - case XFA_ELEMENT_Subform: - case XFA_ELEMENT_Area: - case XFA_ELEMENT_ExclGroup: - case XFA_ELEMENT_SubformSet: { + case XFA_Element::Subform: + case XFA_Element::Area: + case XFA_Element::ExclGroup: + case XFA_Element::SubformSet: { FX_BOOL bRootForceTb = FALSE; CXFA_Node* pLayoutNode = GetSubformSetParent(m_pFormNode); XFA_ATTRIBUTEENUM eLayoutStrategy = @@ -2939,12 +2940,12 @@ XFA_ItemLayoutProcessorResult CXFA_ItemLayoutProcessor::DoLayout( return XFA_ItemLayoutProcessorResult_Done; } } - case XFA_ELEMENT_Draw: - case XFA_ELEMENT_Field: + case XFA_Element::Draw: + case XFA_Element::Field: DoLayoutField(); m_nCurChildNodeStage = XFA_ItemLayoutProcessorStages_Done; return XFA_ItemLayoutProcessorResult_Done; - case XFA_ELEMENT_ContentArea: + case XFA_Element::ContentArea: return XFA_ItemLayoutProcessorResult_Done; default: return XFA_ItemLayoutProcessorResult_Done; @@ -2980,7 +2981,7 @@ FX_BOOL CXFA_ItemLayoutProcessor::JudgeLeaderOrTrailerForOccur( if (!pTemplate) pTemplate = pFormNode; - CXFA_Occur NodeOccur(pTemplate->GetFirstChildByClass(XFA_ELEMENT_Occur)); + CXFA_Occur NodeOccur(pTemplate->GetFirstChildByClass(XFA_Element::Occur)); int32_t iMax = NodeOccur.GetMax(); if (iMax < 0) return TRUE; diff --git a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp index 653ec93b26..4757ef53a3 100644 --- a/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp +++ b/xfa/fxfa/parser/xfa_layout_pagemgr_new.cpp @@ -27,13 +27,13 @@ class PageSetContainerLayoutItem { public: static inline CXFA_ContainerLayoutItem* GetFirstChild( CXFA_ContainerLayoutItem* pLayoutItem) { - if (pLayoutItem->m_pFormNode->GetClassID() != XFA_ELEMENT_PageSet) + if (pLayoutItem->m_pFormNode->GetClassID() != XFA_Element::PageSet) return nullptr; CXFA_ContainerLayoutItem* pChildItem = static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pFirstChild); while (pChildItem && - pChildItem->m_pFormNode->GetClassID() != XFA_ELEMENT_PageSet) { + pChildItem->m_pFormNode->GetClassID() != XFA_Element::PageSet) { pChildItem = static_cast<CXFA_ContainerLayoutItem*>(pChildItem->m_pNextSibling); } @@ -45,7 +45,7 @@ class PageSetContainerLayoutItem { CXFA_ContainerLayoutItem* pChildItem = static_cast<CXFA_ContainerLayoutItem*>(pLayoutItem->m_pNextSibling); while (pChildItem && - pChildItem->m_pFormNode->GetClassID() != XFA_ELEMENT_PageSet) { + pChildItem->m_pFormNode->GetClassID() != XFA_Element::PageSet) { pChildItem = static_cast<CXFA_ContainerLayoutItem*>(pChildItem->m_pNextSibling); } @@ -246,7 +246,7 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) { if (!pTemplateNode) { return FALSE; } - m_pTemplatePageSetRoot = pTemplateNode->GetProperty(0, XFA_ELEMENT_PageSet); + m_pTemplatePageSetRoot = pTemplateNode->GetProperty(0, XFA_Element::PageSet); ASSERT(m_pTemplatePageSetRoot); if (m_pPageSetLayoutItemRoot) { m_pPageSetLayoutItemRoot->m_pParent = NULL; @@ -271,9 +271,9 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) { for (pPageArea = m_pTemplatePageSetRoot->GetNodeItem(XFA_NODEITEM_FirstChild); pPageArea; pPageArea = pPageArea->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pPageArea->GetClassID() == XFA_ELEMENT_PageArea) { + if (pPageArea->GetClassID() == XFA_Element::PageArea) { iCount++; - if (pPageArea->GetFirstChildByClass(XFA_ELEMENT_ContentArea)) { + if (pPageArea->GetFirstChildByClass(XFA_Element::ContentArea)) { return TRUE; } } @@ -283,20 +283,20 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) { } CXFA_Document* pDocument = pTemplateNode->GetDocument(); CXFA_Document* pObjFactory = pDocument->GetParser()->GetFactory(); - pPageArea = m_pTemplatePageSetRoot->GetChild(0, XFA_ELEMENT_PageArea); + pPageArea = m_pTemplatePageSetRoot->GetChild(0, XFA_Element::PageArea); if (!pPageArea) { pPageArea = pObjFactory->CreateNode(m_pTemplatePageSetRoot->GetPacketID(), - XFA_ELEMENT_PageArea); + XFA_Element::PageArea); if (!pPageArea) { return FALSE; } m_pTemplatePageSetRoot->InsertChild(pPageArea, NULL); pPageArea->SetFlag(XFA_NodeFlag_Initialized, true); } - CXFA_Node* pContentArea = pPageArea->GetChild(0, XFA_ELEMENT_ContentArea); + CXFA_Node* pContentArea = pPageArea->GetChild(0, XFA_Element::ContentArea); if (!pContentArea) { pContentArea = pObjFactory->CreateNode(pPageArea->GetPacketID(), - XFA_ELEMENT_ContentArea); + XFA_Element::ContentArea); if (!pContentArea) { return FALSE; } @@ -311,10 +311,10 @@ FX_BOOL CXFA_LayoutPageMgr::InitLayoutPage(CXFA_Node* pFormNode) { pContentArea->SetMeasure(XFA_ATTRIBUTE_H, CXFA_Measurement(10.5f, XFA_UNIT_In)); } - CXFA_Node* pMedium = pPageArea->GetChild(0, XFA_ELEMENT_Medium); + CXFA_Node* pMedium = pPageArea->GetChild(0, XFA_Element::Medium); if (!pMedium) { pMedium = - pObjFactory->CreateNode(pPageArea->GetPacketID(), XFA_ELEMENT_Medium); + pObjFactory->CreateNode(pPageArea->GetPacketID(), XFA_Element::Medium); if (!pContentArea) { return FALSE; } @@ -335,9 +335,9 @@ FX_BOOL CXFA_LayoutPageMgr::PrepareFirstPage(CXFA_Node* pRootSubform) { pRootSubform->GetNodeItem(XFA_NODEITEM_FirstChild); pBreakNode; pBreakNode = pBreakNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - XFA_ELEMENT eType = pBreakNode->GetClassID(); - if (eType == XFA_ELEMENT_BreakBefore || - (eType == XFA_ELEMENT_Break && + XFA_Element eType = pBreakNode->GetClassID(); + if (eType == XFA_Element::BreakBefore || + (eType == XFA_Element::Break && pBreakNode->GetEnum(XFA_ATTRIBUTE_Before) != XFA_ATTRIBUTEENUM_Auto)) { bProBreakBefore = TRUE; @@ -349,10 +349,11 @@ FX_BOOL CXFA_LayoutPageMgr::PrepareFirstPage(CXFA_Node* pRootSubform) { break; } bProBreakBefore = TRUE; - pRootSubform = pRootSubform->GetFirstChildByClass(XFA_ELEMENT_Subform); + pRootSubform = pRootSubform->GetFirstChildByClass(XFA_Element::Subform); while (pRootSubform && !XFA_ItemLayoutProcessor_IsTakingSpace(pRootSubform)) { - pRootSubform = pRootSubform->GetNextSameClassSibling(XFA_ELEMENT_Subform); + pRootSubform = + pRootSubform->GetNextSameClassSibling(XFA_Element::Subform); } } CXFA_Node *pLeader, *pTrailer; @@ -586,7 +587,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { pPageAreaLayoutItem; pPageAreaLayoutItem = pPageAreaLayoutItem->m_pNextSibling) { if (pPageAreaLayoutItem->m_pFormNode->GetClassID() != - XFA_ELEMENT_PageArea) { + XFA_Element::PageArea) { continue; } nPageAreaCount++; @@ -629,7 +630,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { pChildLayoutItem; pChildLayoutItem = pChildLayoutItem->m_pNextSibling) { if (pChildLayoutItem->m_pFormNode->GetClassID() != - XFA_ELEMENT_ContentArea) { + XFA_Element::ContentArea) { continue; } FX_FLOAT fUsedHeight = 0; @@ -651,7 +652,7 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { pContentAreaNode; pContentAreaNode = pContentAreaNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pContentAreaNode->GetClassID() != XFA_ELEMENT_ContentArea) { + if (pContentAreaNode->GetClassID() != XFA_Element::ContentArea) { continue; } iCurContentAreaIndex++; @@ -671,11 +672,11 @@ void CXFA_LayoutPageMgr::FinishPaginatedPageSets() { pLastPageAreaLayoutItem->m_pFormNode = pNode; while (pChildLayoutItem && pContentAreaNode) { if (pChildLayoutItem->m_pFormNode->GetClassID() != - XFA_ELEMENT_ContentArea) { + XFA_Element::ContentArea) { pChildLayoutItem = pChildLayoutItem->m_pNextSibling; continue; } - if (pContentAreaNode->GetClassID() != XFA_ELEMENT_ContentArea) { + if (pContentAreaNode->GetClassID() != XFA_Element::ContentArea) { pContentAreaNode = pContentAreaNode->GetNodeItem(XFA_NODEITEM_NextSibling); continue; @@ -708,14 +709,14 @@ int32_t CXFA_LayoutPageMgr::GetPageIndex( // FIXME: Find() method should take const. return m_PageArray.Find(const_cast<CXFA_ContainerLayoutItem*>(pPage)); } -FX_BOOL CXFA_LayoutPageMgr::RunBreak(XFA_ELEMENT eBreakType, +FX_BOOL CXFA_LayoutPageMgr::RunBreak(XFA_Element eBreakType, XFA_ATTRIBUTEENUM eTargetType, CXFA_Node* pTarget, FX_BOOL bStartNew) { FX_BOOL bRet = FALSE; switch (eTargetType) { case XFA_ATTRIBUTEENUM_ContentArea: - if (pTarget && pTarget->GetClassID() != XFA_ELEMENT_ContentArea) { + if (pTarget && pTarget->GetClassID() != XFA_Element::ContentArea) { pTarget = NULL; } if (!pTarget || !m_pCurrentContainerRecord || @@ -731,7 +732,7 @@ FX_BOOL CXFA_LayoutPageMgr::RunBreak(XFA_ELEMENT eBreakType, } break; case XFA_ATTRIBUTEENUM_PageArea: - if (pTarget && pTarget->GetClassID() != XFA_ELEMENT_PageArea) { + if (pTarget && pTarget->GetClassID() != XFA_Element::PageArea) { pTarget = NULL; } if (!pTarget || !m_pCurrentContainerRecord || @@ -742,12 +743,12 @@ FX_BOOL CXFA_LayoutPageMgr::RunBreak(XFA_ELEMENT eBreakType, } break; case XFA_ATTRIBUTEENUM_PageOdd: - if (pTarget && pTarget->GetClassID() != XFA_ELEMENT_PageArea) { + if (pTarget && pTarget->GetClassID() != XFA_Element::PageArea) { pTarget = NULL; } break; case XFA_ATTRIBUTEENUM_PageEven: - if (pTarget && pTarget->GetClassID() != XFA_ELEMENT_PageArea) { + if (pTarget && pTarget->GetClassID() != XFA_Element::PageArea) { pTarget = NULL; } break; @@ -762,16 +763,16 @@ FX_BOOL CXFA_LayoutPageMgr::ExecuteBreakBeforeOrAfter( FX_BOOL bBefore, CXFA_Node*& pBreakLeaderTemplate, CXFA_Node*& pBreakTrailerTemplate) { - XFA_ELEMENT eType = pCurNode->GetClassID(); + XFA_Element eType = pCurNode->GetClassID(); switch (eType) { - case XFA_ELEMENT_BreakBefore: - case XFA_ELEMENT_BreakAfter: { + case XFA_Element::BreakBefore: + case XFA_Element::BreakAfter: { CFX_WideStringC wsBreakLeader, wsBreakTrailer; CXFA_Node* pFormNode = pCurNode->GetNodeItem( XFA_NODEITEM_Parent, XFA_ObjectType::ContainerNode); CXFA_Node* pContainer = pFormNode->GetTemplateNode(); FX_BOOL bStartNew = pCurNode->GetInteger(XFA_ATTRIBUTE_StartNew) != 0; - CXFA_Node* pScript = pCurNode->GetFirstChildByClass(XFA_ELEMENT_Script); + CXFA_Node* pScript = pCurNode->GetFirstChildByClass(XFA_Element::Script); if (pScript && !XFA_LayoutPageMgr_RunBreakTestScript(pScript)) { return FALSE; } @@ -791,7 +792,7 @@ FX_BOOL CXFA_LayoutPageMgr::ExecuteBreakBeforeOrAfter( if (m_rgProposedContainerRecord.GetCount() > 0 && m_pCurrentContainerRecord == m_rgProposedContainerRecord.GetHeadPosition() && - eType == XFA_ELEMENT_BreakBefore) { + eType == XFA_Element::BreakBefore) { CXFA_Node* pParentNode = pFormNode->GetNodeItem( XFA_NODEITEM_Parent, XFA_ObjectType::ContainerNode); if (!pParentNode || @@ -801,20 +802,20 @@ FX_BOOL CXFA_LayoutPageMgr::ExecuteBreakBeforeOrAfter( break; } pParentNode = pParentNode->GetNodeItem(XFA_NODEITEM_Parent); - if (!pParentNode || pParentNode->GetClassID() != XFA_ELEMENT_Form) { + if (!pParentNode || pParentNode->GetClassID() != XFA_Element::Form) { break; } return TRUE; } } } break; - case XFA_ELEMENT_Break: { + case XFA_Element::Break: { FX_BOOL bStartNew = pCurNode->GetInteger(XFA_ATTRIBUTE_StartNew) != 0; CFX_WideStringC wsTarget = pCurNode->GetCData( bBefore ? XFA_ATTRIBUTE_BeforeTarget : XFA_ATTRIBUTE_AfterTarget); CXFA_Node* pTarget = ResolveBreakTarget(m_pTemplatePageSetRoot, TRUE, wsTarget); - if (RunBreak(bBefore ? XFA_ELEMENT_BreakBefore : XFA_ELEMENT_BreakAfter, + if (RunBreak(bBefore ? XFA_Element::BreakBefore : XFA_Element::BreakAfter, pCurNode->GetEnum(bBefore ? XFA_ATTRIBUTE_Before : XFA_ATTRIBUTE_After), pTarget, bStartNew)) { @@ -896,7 +897,7 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode, pOverflowNode ->GetNodeItem(XFA_NODEITEM_Parent, XFA_ObjectType::ContainerNode) ->GetTemplateNode(); - if (pOverflowNode->GetClassID() == XFA_ELEMENT_Break) { + if (pOverflowNode->GetClassID() == XFA_Element::Break) { CFX_WideStringC wsOverflowLeader; CFX_WideStringC wsOverflowTarget; CFX_WideStringC wsOverflowTrailer; @@ -912,12 +913,12 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode, if (pTarget) { m_bCreateOverFlowPage = TRUE; switch (pTarget->GetClassID()) { - case XFA_ELEMENT_PageArea: - RunBreak(XFA_ELEMENT_Overflow, XFA_ATTRIBUTEENUM_PageArea, + case XFA_Element::PageArea: + RunBreak(XFA_Element::Overflow, XFA_ATTRIBUTEENUM_PageArea, pTarget, TRUE); break; - case XFA_ELEMENT_ContentArea: - RunBreak(XFA_ELEMENT_Overflow, XFA_ATTRIBUTEENUM_ContentArea, + case XFA_Element::ContentArea: + RunBreak(XFA_Element::Overflow, XFA_ATTRIBUTEENUM_ContentArea, pTarget, TRUE); break; default: @@ -934,7 +935,7 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode, return pOverflowNode; } return NULL; - } else if (pOverflowNode->GetClassID() == XFA_ELEMENT_Overflow) { + } else if (pOverflowNode->GetClassID() == XFA_Element::Overflow) { CFX_WideStringC wsOverflowLeader; CFX_WideStringC wsOverflowTrailer; CFX_WideStringC wsOverflowTarget; @@ -947,12 +948,12 @@ CXFA_Node* CXFA_LayoutPageMgr::BreakOverflow(CXFA_Node* pOverflowNode, if (pTarget) { m_bCreateOverFlowPage = TRUE; switch (pTarget->GetClassID()) { - case XFA_ELEMENT_PageArea: - RunBreak(XFA_ELEMENT_Overflow, XFA_ATTRIBUTEENUM_PageArea, pTarget, + case XFA_Element::PageArea: + RunBreak(XFA_Element::Overflow, XFA_ATTRIBUTEENUM_PageArea, pTarget, TRUE); break; - case XFA_ELEMENT_ContentArea: - RunBreak(XFA_ELEMENT_Overflow, XFA_ATTRIBUTEENUM_ContentArea, + case XFA_Element::ContentArea: + RunBreak(XFA_Element::Overflow, XFA_ATTRIBUTEENUM_ContentArea, pTarget, TRUE); break; default: @@ -980,8 +981,8 @@ FX_BOOL CXFA_LayoutPageMgr::ProcessOverflow(CXFA_Node* pFormNode, } CXFA_Node *pLeaderTemplate = NULL, *pTrailerTemplate = NULL; FX_BOOL bIsOverflowNode = FALSE; - if (pFormNode->GetClassID() == XFA_ELEMENT_Overflow || - pFormNode->GetClassID() == XFA_ELEMENT_Break) { + if (pFormNode->GetClassID() == XFA_Element::Overflow || + pFormNode->GetClassID() == XFA_Element::Break) { bIsOverflowNode = TRUE; } for (CXFA_Node* pCurNode = @@ -1030,7 +1031,7 @@ FX_BOOL CXFA_LayoutPageMgr::ResolveBookendLeaderOrTrailer( pBookendNode ->GetNodeItem(XFA_NODEITEM_Parent, XFA_ObjectType::ContainerNode) ->GetTemplateNode(); - if (pBookendNode->GetClassID() == XFA_ELEMENT_Break) { + if (pBookendNode->GetClassID() == XFA_Element::Break) { pBookendNode->TryCData( bLeader ? XFA_ATTRIBUTE_BookendLeader : XFA_ATTRIBUTE_BookendTrailer, wsBookendLeader); @@ -1040,7 +1041,7 @@ FX_BOOL CXFA_LayoutPageMgr::ResolveBookendLeaderOrTrailer( return TRUE; } return FALSE; - } else if (pBookendNode->GetClassID() == XFA_ELEMENT_Bookend) { + } else if (pBookendNode->GetClassID() == XFA_Element::Bookend) { pBookendNode->TryCData( bLeader ? XFA_ATTRIBUTE_Leader : XFA_ATTRIBUTE_Trailer, wsBookendLeader); @@ -1083,7 +1084,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered( if (!pStartChild && !bQuery) { m_pPageSetMap.Lookup(pPageSet, iPageSetCount); int32_t iMax = -1; - CXFA_Node* pOccurNode = pPageSet->GetFirstChildByClass(XFA_ELEMENT_Occur); + CXFA_Node* pOccurNode = pPageSet->GetFirstChildByClass(XFA_Element::Occur); if (pOccurNode) { pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE); } @@ -1097,9 +1098,9 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered( : pPageSet->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pCurrentNode; pCurrentNode = pCurrentNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pCurrentNode->GetClassID() == XFA_ELEMENT_PageArea) { + if (pCurrentNode->GetClassID() == XFA_Element::PageArea) { if ((pTargetPageArea == pCurrentNode || pTargetPageArea == NULL)) { - if (pCurrentNode->GetFirstChildByClass(XFA_ELEMENT_ContentArea) == + if (pCurrentNode->GetFirstChildByClass(XFA_Element::ContentArea) == NULL) { if (pTargetPageArea == pCurrentNode) { CreateMinPageRecord(pCurrentNode, TRUE); @@ -1113,7 +1114,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered( AddPageAreaLayoutItem(pNewRecord, pCurrentNode); if (pTargetContentArea == NULL) { pTargetContentArea = - pCurrentNode->GetFirstChildByClass(XFA_ELEMENT_ContentArea); + pCurrentNode->GetFirstChildByClass(XFA_Element::ContentArea); } AddContentAreaLayoutItem(pNewRecord, pTargetContentArea); } @@ -1125,7 +1126,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_Ordered( if (!bQuery) { CreateMinPageRecord(pCurrentNode, FALSE); } - } else if (pCurrentNode->GetClassID() == XFA_ELEMENT_PageSet) { + } else if (pCurrentNode->GetClassID() == XFA_Element::PageSet) { if (FindPageAreaFromPageSet_Ordered(pCurrentNode, NULL, pTargetPageArea, pTargetContentArea, bNewPage, bQuery)) { @@ -1153,14 +1154,14 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex( const XFA_ATTRIBUTEENUM eFallbackPosition = XFA_ATTRIBUTEENUM_Any; CXFA_Node *pPreferredPageArea = NULL, *pFallbackPageArea = NULL; CXFA_Node* pCurrentNode = NULL; - if (!pStartChild || pStartChild->GetClassID() == XFA_ELEMENT_PageArea) { + if (!pStartChild || pStartChild->GetClassID() == XFA_Element::PageArea) { pCurrentNode = pPageSet->GetNodeItem(XFA_NODEITEM_FirstChild); } else { pCurrentNode = pStartChild->GetNodeItem(XFA_NODEITEM_NextSibling); } for (; pCurrentNode; pCurrentNode = pCurrentNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pCurrentNode->GetClassID() == XFA_ELEMENT_PageArea) { + if (pCurrentNode->GetClassID() == XFA_Element::PageArea) { if (!MatchPageAreaOddOrEven(pCurrentNode, FALSE)) { continue; } @@ -1179,7 +1180,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex( CXFA_ContainerRecord* pNewRecord = CreateContainerRecord(); AddPageAreaLayoutItem(pNewRecord, pCurrentNode); AddContentAreaLayoutItem(pNewRecord, pCurrentNode->GetFirstChildByClass( - XFA_ELEMENT_ContentArea)); + XFA_Element::ContentArea)); pPreferredPageArea = pCurrentNode; return FALSE; } else if (ePreferredPosition == XFA_ATTRIBUTEENUM_Only) { @@ -1195,7 +1196,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex( return FALSE; } if ((pTargetPageArea == pCurrentNode || pTargetPageArea == NULL)) { - if (pCurrentNode->GetFirstChildByClass(XFA_ELEMENT_ContentArea) == + if (pCurrentNode->GetFirstChildByClass(XFA_Element::ContentArea) == NULL) { if (pTargetPageArea == pCurrentNode) { CXFA_ContainerRecord* pNewRecord = CreateContainerRecord(); @@ -1218,9 +1219,9 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex( CXFA_ContainerRecord* pNewRecord = CreateContainerRecord(); AddPageAreaLayoutItem(pNewRecord, pCurrentNode); AddContentAreaLayoutItem(pNewRecord, pCurrentNode->GetFirstChildByClass( - XFA_ELEMENT_ContentArea)); + XFA_Element::ContentArea)); } - } else if (pCurrentNode->GetClassID() == XFA_ELEMENT_PageSet) { + } else if (pCurrentNode->GetClassID() == XFA_Element::PageSet) { if (FindPageAreaFromPageSet_SimplexDuplex( pCurrentNode, NULL, pTargetPageArea, pTargetContentArea, bNewPage, bQuery, ePreferredPosition)) { @@ -1242,7 +1243,7 @@ FX_BOOL CXFA_LayoutPageMgr::FindPageAreaFromPageSet_SimplexDuplex( AddPageAreaLayoutItem(pNewRecord, pCurPageArea); if (pTargetContentArea == NULL) { pTargetContentArea = - pCurPageArea->GetFirstChildByClass(XFA_ELEMENT_ContentArea); + pCurPageArea->GetFirstChildByClass(XFA_Element::ContentArea); } AddContentAreaLayoutItem(pNewRecord, pTargetContentArea); } @@ -1285,7 +1286,7 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea( if (IsPageSetRootOrderedOccurrence()) { int32_t iMax = -1; CXFA_Node* pOccurNode = - m_pCurPageArea->GetFirstChildByClass(XFA_ELEMENT_Occur); + m_pCurPageArea->GetFirstChildByClass(XFA_Element::Occur); if (pOccurNode) { pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE); } @@ -1296,7 +1297,7 @@ CXFA_Node* CXFA_LayoutPageMgr::GetNextAvailPageArea( AddPageAreaLayoutItem(pNewRecord, m_pCurPageArea); if (pTargetContentArea == NULL) { pTargetContentArea = - m_pCurPageArea->GetFirstChildByClass(XFA_ELEMENT_ContentArea); + m_pCurPageArea->GetFirstChildByClass(XFA_Element::ContentArea); } AddContentAreaLayoutItem(pNewRecord, pTargetContentArea); } @@ -1339,7 +1340,7 @@ FX_BOOL CXFA_LayoutPageMgr::GetNextContentArea(CXFA_Node* pContentArea) { GetCurrentContainerRecord()->pCurContentArea->m_pFormNode; if (pContentArea == NULL) { pContentArea = - pCurContentNode->GetNextSameClassSibling(XFA_ELEMENT_ContentArea); + pCurContentNode->GetNextSameClassSibling(XFA_Element::ContentArea); if (pContentArea == NULL) { return FALSE; } @@ -1373,7 +1374,7 @@ void CXFA_LayoutPageMgr::InitPageSetMap() { CXFA_NodeIterator sIterator(m_pTemplatePageSetRoot); for (CXFA_Node* pPageSetNode = sIterator.GetCurrent(); pPageSetNode; pPageSetNode = sIterator.MoveToNext()) { - if (pPageSetNode->GetClassID() == XFA_ELEMENT_PageSet) { + if (pPageSetNode->GetClassID() == XFA_Element::PageSet) { XFA_ATTRIBUTEENUM eRelation = pPageSetNode->GetEnum(XFA_ATTRIBUTE_Relation); if (eRelation == XFA_ATTRIBUTEENUM_OrderedOccurrence) { @@ -1388,12 +1389,12 @@ int32_t CXFA_LayoutPageMgr::CreateMinPageRecord(CXFA_Node* pPageArea, if (pPageArea == NULL) { return 0; } - CXFA_Node* pOccurNode = pPageArea->GetFirstChildByClass(XFA_ELEMENT_Occur); + CXFA_Node* pOccurNode = pPageArea->GetFirstChildByClass(XFA_Element::Occur); int32_t iMin = 0; if ((pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, FALSE)) || bTargetPageArea) { CXFA_Node* pContentArea = - pPageArea->GetFirstChildByClass(XFA_ELEMENT_ContentArea); + pPageArea->GetFirstChildByClass(XFA_Element::ContentArea); if (iMin < 1 && bTargetPageArea && !pContentArea) { iMin = 1; } @@ -1421,7 +1422,7 @@ void CXFA_LayoutPageMgr::CreateMinPageSetRecord(CXFA_Node* pPageSet, if (bCreateAll) { iCurSetCount = 0; } - CXFA_Node* pOccurNode = pPageSet->GetFirstChildByClass(XFA_ELEMENT_Occur); + CXFA_Node* pOccurNode = pPageSet->GetFirstChildByClass(XFA_Element::Occur); int32_t iMin = 0; if (pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Min, iMin, FALSE)) { if (iCurSetCount < iMin) { @@ -1430,9 +1431,9 @@ void CXFA_LayoutPageMgr::CreateMinPageSetRecord(CXFA_Node* pPageSet, pPageSet->GetNodeItem(XFA_NODEITEM_FirstChild); pCurrentPageNode; pCurrentPageNode = pCurrentPageNode->GetNodeItem( XFA_NODEITEM_NextSibling)) { - if (pCurrentPageNode->GetClassID() == XFA_ELEMENT_PageArea) { + if (pCurrentPageNode->GetClassID() == XFA_Element::PageArea) { CreateMinPageRecord(pCurrentPageNode, FALSE); - } else if (pCurrentPageNode->GetClassID() == XFA_ELEMENT_PageSet) { + } else if (pCurrentPageNode->GetClassID() == XFA_Element::PageSet) { CreateMinPageSetRecord(pCurrentPageNode, TRUE); } } @@ -1449,9 +1450,9 @@ void CXFA_LayoutPageMgr::CreateNextMinRecord(CXFA_Node* pRecordNode) { pRecordNode->GetNodeItem(XFA_NODEITEM_NextSibling); pCurrentNode; pCurrentNode = pCurrentNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pCurrentNode->GetClassID() == XFA_ELEMENT_PageArea) { + if (pCurrentNode->GetClassID() == XFA_Element::PageArea) { CreateMinPageRecord(pCurrentNode, FALSE); - } else if (pCurrentNode->GetClassID() == XFA_ELEMENT_PageSet) { + } else if (pCurrentNode->GetClassID() == XFA_Element::PageSet) { CreateMinPageSetRecord(pCurrentNode, TRUE); } } @@ -1476,14 +1477,14 @@ FX_BOOL CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) { return FALSE; } pCurContentNode = - pCurContentNode->GetNextSameClassSibling(XFA_ELEMENT_ContentArea); + pCurContentNode->GetNextSameClassSibling(XFA_Element::ContentArea); if (pCurContentNode) { FX_FLOAT fNextContentHeight = pCurContentNode->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt); return fNextContentHeight > fChildHeight; } CXFA_Node* pPageNode = GetCurrentContainerRecord()->pCurPageArea->m_pFormNode; - CXFA_Node* pOccurNode = pPageNode->GetFirstChildByClass(XFA_ELEMENT_Occur); + CXFA_Node* pOccurNode = pPageNode->GetFirstChildByClass(XFA_Element::Occur); int32_t iMax = 0; if (pOccurNode && pOccurNode->TryInteger(XFA_ATTRIBUTE_Max, iMax, FALSE)) { if (m_nCurPageCount == iMax) { @@ -1507,7 +1508,7 @@ FX_BOOL CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) { } if (pNextPage) { CXFA_Node* pContentArea = - pNextPage->GetFirstChildByClass(XFA_ELEMENT_ContentArea); + pNextPage->GetFirstChildByClass(XFA_Element::ContentArea); if (pContentArea) { FX_FLOAT fNextContentHeight = pContentArea->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt); @@ -1520,7 +1521,7 @@ FX_BOOL CXFA_LayoutPageMgr::GetNextAvailContentHeight(FX_FLOAT fChildHeight) { } } CXFA_Node* pContentArea = - pPageNode->GetFirstChildByClass(XFA_ELEMENT_ContentArea); + pPageNode->GetFirstChildByClass(XFA_Element::ContentArea); FX_FLOAT fNextContentHeight = pContentArea->GetMeasure(XFA_ATTRIBUTE_H).ToUnit(XFA_UNIT_Pt); if (fNextContentHeight < XFA_LAYOUT_FLOAT_PERCISION) { @@ -1595,7 +1596,7 @@ void CXFA_LayoutPageMgr::SaveLayoutItem(CXFA_LayoutItem* pParentLayoutItem) { pCurLayoutItem->m_pNextSibling = NULL; pCurLayoutItem->m_pFirstChild = NULL; if (!pCurLayoutItem->IsContentLayoutItem() && - pCurLayoutItem->m_pFormNode->GetClassID() != XFA_ELEMENT_PageArea) { + pCurLayoutItem->m_pFormNode->GetClassID() != XFA_Element::PageArea) { delete pCurLayoutItem; } pCurLayoutItem = pNextLayoutItem; @@ -1606,7 +1607,7 @@ CXFA_Node* CXFA_LayoutPageMgr::QueryOverflow( CXFA_LayoutContext* pLayoutContext) { for (CXFA_Node* pCurNode = pFormNode->GetNodeItem(XFA_NODEITEM_FirstChild); pCurNode; pCurNode = pCurNode->GetNodeItem((XFA_NODEITEM_NextSibling))) { - if (pCurNode->GetClassID() == XFA_ELEMENT_Break) { + if (pCurNode->GetClassID() == XFA_Element::Break) { CFX_WideStringC wsOverflowLeader; CFX_WideStringC wsOverflowTarget; CFX_WideStringC wsOverflowTrailer; @@ -1618,7 +1619,7 @@ CXFA_Node* CXFA_LayoutPageMgr::QueryOverflow( return pCurNode; } return NULL; - } else if (pCurNode->GetClassID() == XFA_ELEMENT_Overflow) { + } else if (pCurNode->GetClassID() == XFA_Element::Overflow) { return pCurNode; } } @@ -1658,7 +1659,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { iterator(pRootLayout); CXFA_ContainerLayoutItem* pRootPageSetContainerItem = iterator.GetCurrent(); ASSERT(pRootPageSetContainerItem->m_pFormNode->GetClassID() == - XFA_ELEMENT_PageSet); + XFA_Element::PageSet); if (iIndex < pDocument->m_pPendingPageSet.GetSize()) { pPendingPageSet = pDocument->m_pPendingPageSet.GetAt(iIndex); iIndex++; @@ -1686,12 +1687,12 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { continue; } switch (pNode->GetClassID()) { - case XFA_ELEMENT_PageSet: { + case XFA_Element::PageSet: { CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode; pContainerItem->m_pFormNode = XFA_NodeMerge_CloneOrMergeContainer( pDocument, pParentNode, pContainerItem->m_pFormNode, TRUE); } break; - case XFA_ELEMENT_PageArea: { + case XFA_Element::PageArea: { CXFA_ContainerLayoutItem* pFormLayout = pContainerItem; CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode; FX_BOOL bIsExistForm = TRUE; @@ -1720,7 +1721,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { CXFA_ContainerIterator sIterator(pExistingNode); for (CXFA_Node* pIter = sIterator.GetCurrent(); pIter; pIter = sIterator.MoveToNext()) { - if (pIter->GetClassID() != XFA_ELEMENT_ContentArea) { + if (pIter->GetClassID() != XFA_Element::ContentArea) { CXFA_LayoutItem* pLayoutItem = static_cast<CXFA_LayoutItem*>( pIter->GetUserData(XFA_LAYOUTITEMKEY)); if (pLayoutItem) { @@ -1739,7 +1740,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { pContainerItem->m_pFormNode, pParentNode, ToNode(pDocument->GetXFAObject(XFA_HASHCODE_Record)), TRUE); } break; - case XFA_ELEMENT_ContentArea: { + case XFA_Element::ContentArea: { CXFA_Node* pParentNode = pContainerItem->m_pParent->m_pFormNode; for (CXFA_Node* pChildNode = pParentNode->GetNodeItem(XFA_NODEITEM_FirstChild); @@ -1760,7 +1761,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { CXFA_Node* pFormToplevelSubform = pDocument->GetXFAObject(XFA_HASHCODE_Form) ->AsNode() - ->GetFirstChildByClass(XFA_ELEMENT_Subform); + ->GetFirstChildByClass(XFA_Element::Subform); pFormToplevelSubform->InsertChild(pPendingPageSet); } pDocument->DataMerge_UpdateBindingRelations(pPendingPageSet); @@ -1769,15 +1770,16 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { CXFA_Node* pPageSet = GetRootLayoutItem()->m_pFormNode; while (pPageSet) { CXFA_Node* pNextPageSet = - pPageSet->GetNextSameClassSibling(XFA_ELEMENT_PageSet); + pPageSet->GetNextSameClassSibling(XFA_Element::PageSet); CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFANode> sIterator(pPageSet); CXFA_Node* pNode = sIterator.GetCurrent(); while (pNode) { if (pNode->IsUnusedNode()) { if (pNode->IsContainerNode()) { - XFA_ELEMENT eCurId = pNode->GetClassID(); - if (eCurId == XFA_ELEMENT_PageArea || eCurId == XFA_ELEMENT_PageSet) { + XFA_Element eCurId = pNode->GetClassID(); + if (eCurId == XFA_Element::PageArea || + eCurId == XFA_Element::PageSet) { CXFA_ContainerIterator iteChild(pNode); CXFA_Node* pChildNode = iteChild.MoveToNext(); for (; pChildNode; pChildNode = iteChild.MoveToNext()) { @@ -1788,7 +1790,7 @@ void CXFA_LayoutPageMgr::MergePageSetContents() { delete pLayoutItem; } } - } else if (eCurId != XFA_ELEMENT_ContentArea) { + } else if (eCurId != XFA_Element::ContentArea) { CXFA_LayoutItem* pLayoutItem = static_cast<CXFA_LayoutItem*>( pNode->GetUserData(XFA_LAYOUTITEMKEY)); if (pLayoutItem) { @@ -1826,7 +1828,7 @@ void CXFA_LayoutPageMgr::LayoutPageSetContents() { pContainerItem; pContainerItem = iterator.MoveToNext()) { CXFA_Node* pNode = pContainerItem->m_pFormNode; switch (pNode->GetClassID()) { - case XFA_ELEMENT_PageArea: + case XFA_Element::PageArea: m_pLayoutProcessor->GetRootRootItemLayoutProcessor() ->DoLayoutPageArea(pContainerItem); break; @@ -1854,7 +1856,7 @@ void CXFA_LayoutPageMgr::SyncLayoutData() { for (CXFA_ContainerLayoutItem* pContainerItem = iteratorParent.GetCurrent(); pContainerItem; pContainerItem = iteratorParent.MoveToNext()) { switch (pContainerItem->m_pFormNode->GetClassID()) { - case XFA_ELEMENT_PageArea: { + case XFA_Element::PageArea: { nPageIdx++; uint32_t dwRelevant = XFA_WidgetStatus_Viewable | XFA_WidgetStatus_Printable; @@ -1901,7 +1903,7 @@ void XFA_ReleaseLayoutItem_NoPageArea(CXFA_LayoutItem* pLayoutItem) { XFA_ReleaseLayoutItem_NoPageArea(pNode); pNode = pNext; } - if (pLayoutItem->m_pFormNode->GetClassID() != XFA_ELEMENT_PageArea) { + if (pLayoutItem->m_pFormNode->GetClassID() != XFA_Element::PageArea) { delete pLayoutItem; } } @@ -1927,7 +1929,7 @@ void CXFA_LayoutPageMgr::PrepareLayout() { } while (pPageSetFormNode) { CXFA_Node* pNextPageSet = - pPageSetFormNode->GetNextSameClassSibling(XFA_ELEMENT_PageSet); + pPageSetFormNode->GetNextSameClassSibling(XFA_Element::PageSet); pPageSetFormNode->GetNodeItem(XFA_NODEITEM_Parent) ->RemoveChild(pPageSetFormNode, FALSE); pRootLayoutItem->m_pFormNode->GetDocument()->m_pPendingPageSet.Add( diff --git a/xfa/fxfa/parser/xfa_layout_pagemgr_new.h b/xfa/fxfa/parser/xfa_layout_pagemgr_new.h index b992a228dd..91dd2bf306 100644 --- a/xfa/fxfa/parser/xfa_layout_pagemgr_new.h +++ b/xfa/fxfa/parser/xfa_layout_pagemgr_new.h @@ -78,7 +78,7 @@ class CXFA_LayoutPageMgr { CXFA_Node* pNewPageArea); void AddContentAreaLayoutItem(CXFA_ContainerRecord* pNewRecord, CXFA_Node* pContentArea); - FX_BOOL RunBreak(XFA_ELEMENT eBreakType, + FX_BOOL RunBreak(XFA_Element eBreakType, XFA_ATTRIBUTEENUM eTargetType, CXFA_Node* pTarget, FX_BOOL bStartNew); diff --git a/xfa/fxfa/parser/xfa_locale.cpp b/xfa/fxfa/parser/xfa_locale.cpp index bebb3ba6c5..6287547431 100644 --- a/xfa/fxfa/parser/xfa_locale.cpp +++ b/xfa/fxfa/parser/xfa_locale.cpp @@ -232,70 +232,73 @@ void CXFA_NodeLocale::GetNumbericSymbol(FX_LOCALENUMSYMBOL eType, CFX_WideString& wsNumSymbol) const { switch (eType) { case FX_LOCALENUMSYMBOL_Decimal: - wsNumSymbol = GetSymbol(XFA_ELEMENT_NumberSymbols, FX_WSTRC(L"decimal")); + wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"decimal")); break; case FX_LOCALENUMSYMBOL_Grouping: - wsNumSymbol = GetSymbol(XFA_ELEMENT_NumberSymbols, FX_WSTRC(L"grouping")); + wsNumSymbol = + GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"grouping")); break; case FX_LOCALENUMSYMBOL_Percent: - wsNumSymbol = GetSymbol(XFA_ELEMENT_NumberSymbols, FX_WSTRC(L"percent")); + wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"percent")); break; case FX_LOCALENUMSYMBOL_Minus: - wsNumSymbol = GetSymbol(XFA_ELEMENT_NumberSymbols, FX_WSTRC(L"minus")); + wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"minus")); break; case FX_LOCALENUMSYMBOL_Zero: - wsNumSymbol = GetSymbol(XFA_ELEMENT_NumberSymbols, FX_WSTRC(L"zero")); + wsNumSymbol = GetSymbol(XFA_Element::NumberSymbols, FX_WSTRC(L"zero")); break; case FX_LOCALENUMSYMBOL_CurrencySymbol: - wsNumSymbol = GetSymbol(XFA_ELEMENT_CurrencySymbols, FX_WSTRC(L"symbol")); + wsNumSymbol = + GetSymbol(XFA_Element::CurrencySymbols, FX_WSTRC(L"symbol")); break; case FX_LOCALENUMSYMBOL_CurrencyName: wsNumSymbol = - GetSymbol(XFA_ELEMENT_CurrencySymbols, FX_WSTRC(L"isoname")); + GetSymbol(XFA_Element::CurrencySymbols, FX_WSTRC(L"isoname")); break; } } void CXFA_NodeLocale::GetDateTimeSymbols(CFX_WideString& wsDtSymbol) const { CXFA_Node* pSymbols = - m_pLocale ? m_pLocale->GetChild(0, XFA_ELEMENT_DateTimeSymbols) : NULL; + m_pLocale ? m_pLocale->GetChild(0, XFA_Element::DateTimeSymbols) + : nullptr; wsDtSymbol = pSymbols ? pSymbols->GetContent() : CFX_WideString(); } void CXFA_NodeLocale::GetMonthName(int32_t nMonth, CFX_WideString& wsMonthName, FX_BOOL bAbbr) const { - wsMonthName = GetCalendarSymbol(XFA_ELEMENT_MonthNames, nMonth, bAbbr); + wsMonthName = GetCalendarSymbol(XFA_Element::MonthNames, nMonth, bAbbr); } void CXFA_NodeLocale::GetDayName(int32_t nWeek, CFX_WideString& wsDayName, FX_BOOL bAbbr) const { - wsDayName = GetCalendarSymbol(XFA_ELEMENT_DayNames, nWeek, bAbbr); + wsDayName = GetCalendarSymbol(XFA_Element::DayNames, nWeek, bAbbr); } void CXFA_NodeLocale::GetMeridiemName(CFX_WideString& wsMeridiemName, FX_BOOL bAM) const { wsMeridiemName = - GetCalendarSymbol(XFA_ELEMENT_MeridiemNames, bAM ? 0 : 1, FALSE); + GetCalendarSymbol(XFA_Element::MeridiemNames, bAM ? 0 : 1, FALSE); } void CXFA_NodeLocale::GetTimeZone(FX_TIMEZONE& tz) const { CXFA_TimeZoneProvider::Get()->GetTimeZone(tz); } void CXFA_NodeLocale::GetEraName(CFX_WideString& wsEraName, FX_BOOL bAD) const { - wsEraName = GetCalendarSymbol(XFA_ELEMENT_EraNames, bAD ? 1 : 0, FALSE); + wsEraName = GetCalendarSymbol(XFA_Element::EraNames, bAD ? 1 : 0, FALSE); } void CXFA_NodeLocale::GetDatePattern(FX_LOCALEDATETIMESUBCATEGORY eType, CFX_WideString& wsPattern) const { switch (eType) { case FX_LOCALEDATETIMESUBCATEGORY_Short: - wsPattern = GetSymbol(XFA_ELEMENT_DatePatterns, FX_WSTRC(L"short")); + wsPattern = GetSymbol(XFA_Element::DatePatterns, FX_WSTRC(L"short")); break; case FX_LOCALEDATETIMESUBCATEGORY_Medium: case FX_LOCALEDATETIMESUBCATEGORY_Default: - wsPattern = GetSymbol(XFA_ELEMENT_DatePatterns, FX_WSTRC(L"med")); + wsPattern = GetSymbol(XFA_Element::DatePatterns, FX_WSTRC(L"med")); break; case FX_LOCALEDATETIMESUBCATEGORY_Full: - wsPattern = GetSymbol(XFA_ELEMENT_DatePatterns, FX_WSTRC(L"full")); + wsPattern = GetSymbol(XFA_Element::DatePatterns, FX_WSTRC(L"full")); break; case FX_LOCALEDATETIMESUBCATEGORY_Long: - wsPattern = GetSymbol(XFA_ELEMENT_DatePatterns, FX_WSTRC(L"long")); + wsPattern = GetSymbol(XFA_Element::DatePatterns, FX_WSTRC(L"long")); break; } } @@ -303,17 +306,17 @@ void CXFA_NodeLocale::GetTimePattern(FX_LOCALEDATETIMESUBCATEGORY eType, CFX_WideString& wsPattern) const { switch (eType) { case FX_LOCALEDATETIMESUBCATEGORY_Short: - wsPattern = GetSymbol(XFA_ELEMENT_TimePatterns, FX_WSTRC(L"short")); + wsPattern = GetSymbol(XFA_Element::TimePatterns, FX_WSTRC(L"short")); break; case FX_LOCALEDATETIMESUBCATEGORY_Medium: case FX_LOCALEDATETIMESUBCATEGORY_Default: - wsPattern = GetSymbol(XFA_ELEMENT_TimePatterns, FX_WSTRC(L"med")); + wsPattern = GetSymbol(XFA_Element::TimePatterns, FX_WSTRC(L"med")); break; case FX_LOCALEDATETIMESUBCATEGORY_Full: - wsPattern = GetSymbol(XFA_ELEMENT_TimePatterns, FX_WSTRC(L"full")); + wsPattern = GetSymbol(XFA_Element::TimePatterns, FX_WSTRC(L"full")); break; case FX_LOCALEDATETIMESUBCATEGORY_Long: - wsPattern = GetSymbol(XFA_ELEMENT_TimePatterns, FX_WSTRC(L"long")); + wsPattern = GetSymbol(XFA_Element::TimePatterns, FX_WSTRC(L"long")); break; } } @@ -350,22 +353,23 @@ CXFA_Node* CXFA_NodeLocale::GetNodeByName(CXFA_Node* pParent, return NULL; } CFX_WideString CXFA_NodeLocale::GetSymbol( - XFA_ELEMENT eElement, + XFA_Element eElement, const CFX_WideStringC& symbol_type) const { - CXFA_Node* pSymbols = m_pLocale ? m_pLocale->GetChild(0, eElement) : NULL; + CXFA_Node* pSymbols = m_pLocale ? m_pLocale->GetChild(0, eElement) : nullptr; CXFA_Node* pSymbol = GetNodeByName(pSymbols, symbol_type); return pSymbol ? pSymbol->GetContent() : CFX_WideString(); } -CFX_WideString CXFA_NodeLocale::GetCalendarSymbol(XFA_ELEMENT eElement, +CFX_WideString CXFA_NodeLocale::GetCalendarSymbol(XFA_Element eElement, int index, FX_BOOL bAbbr) const { CXFA_Node* pCalendar = - m_pLocale ? m_pLocale->GetChild(0, XFA_ELEMENT_CalendarSymbols) : NULL; + m_pLocale ? m_pLocale->GetChild(0, XFA_Element::CalendarSymbols) + : nullptr; if (pCalendar) { CXFA_Node* pNode = pCalendar->GetFirstChildByClass(eElement); for (; pNode; pNode = pNode->GetNextSameClassSibling(eElement)) { if (pNode->GetBoolean(XFA_ATTRIBUTE_Abbr) == bAbbr) { - CXFA_Node* pSymbol = pNode->GetChild(index, XFA_ELEMENT_UNKNOWN); + CXFA_Node* pSymbol = pNode->GetChild(index, XFA_Element::Unknown); return pSymbol ? pSymbol->GetContent() : CFX_WideString(); } } diff --git a/xfa/fxfa/parser/xfa_locale.h b/xfa/fxfa/parser/xfa_locale.h index 5a79e20a3f..0c72381cd5 100644 --- a/xfa/fxfa/parser/xfa_locale.h +++ b/xfa/fxfa/parser/xfa_locale.h @@ -88,9 +88,9 @@ class CXFA_NodeLocale : public IFX_Locale { CXFA_Node* GetNodeByName(CXFA_Node* pParent, const CFX_WideStringC& wsName) const; - CFX_WideString GetSymbol(XFA_ELEMENT eElement, + CFX_WideString GetSymbol(XFA_Element eElement, const CFX_WideStringC& symbol_type) const; - CFX_WideString GetCalendarSymbol(XFA_ELEMENT eElement, + CFX_WideString GetCalendarSymbol(XFA_Element eElement, int index, FX_BOOL bAbbr) const; diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp index 8f779d191c..8911a41b96 100644 --- a/xfa/fxfa/parser/xfa_localemgr.cpp +++ b/xfa/fxfa/parser/xfa_localemgr.cpp @@ -1249,16 +1249,16 @@ CFX_WideStringC CXFA_LocaleMgr::GetConfigLocaleName(CXFA_Node* pConfig) { m_wsConfigLocale.clear(); if (pConfig) { CXFA_Node* pChildfConfig = - pConfig->GetFirstChildByClass(XFA_ELEMENT_Acrobat); + pConfig->GetFirstChildByClass(XFA_Element::Acrobat); if (!pChildfConfig) { - pChildfConfig = pConfig->GetFirstChildByClass(XFA_ELEMENT_Present); + pChildfConfig = pConfig->GetFirstChildByClass(XFA_Element::Present); } CXFA_Node* pCommon = pChildfConfig - ? pChildfConfig->GetFirstChildByClass(XFA_ELEMENT_Common) + ? pChildfConfig->GetFirstChildByClass(XFA_Element::Common) : NULL; CXFA_Node* pLocale = - pCommon ? pCommon->GetFirstChildByClass(XFA_ELEMENT_Locale) : NULL; + pCommon ? pCommon->GetFirstChildByClass(XFA_Element::Locale) : NULL; if (pLocale) { pLocale->TryCData(XFA_ATTRIBUTE_Value, m_wsConfigLocale, FALSE); } diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h index 6b2e4d8d40..aac4839936 100644 --- a/xfa/fxfa/parser/xfa_object.h +++ b/xfa/fxfa/parser/xfa_object.h @@ -90,7 +90,7 @@ class CXFA_Object : public CFXJSE_HostObject { const CXFA_OrdinaryObject* AsOrdinaryObject() const; const CXFA_NodeList* AsNodeList() const; - XFA_ELEMENT GetClassID() const; + XFA_Element GetClassID() const; void GetClassName(CFX_WideStringC& wsName) const; uint32_t GetClassHashCode() const; void Script_ObjectClass_ClassName(CFXJSE_Value* pValue, @@ -150,7 +150,7 @@ struct XFA_MAPMODULEDATA { class CXFA_Node : public CXFA_Object { public: - XFA_ELEMENT GetClassID() const { return m_eNodeClass; } + XFA_Element GetClassID() const { return m_eNodeClass; } uint32_t GetPacketID() const { return m_ePacket; } void SetFlag(uint32_t dwFlag, bool bNotify); @@ -292,11 +292,11 @@ class CXFA_Node : public CXFA_Object { return TryUserData(pKey, pData, bProtoAlso) ? pData : NULL; } CXFA_Node* GetProperty(int32_t index, - XFA_ELEMENT eProperty, + XFA_Element eProperty, FX_BOOL bCreateProperty = TRUE); - int32_t CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild = FALSE); + int32_t CountChildren(XFA_Element eElement, FX_BOOL bOnlyChild = FALSE); CXFA_Node* GetChild(int32_t index, - XFA_ELEMENT eElement, + XFA_Element eElement, FX_BOOL bOnlyChild = FALSE); int32_t InsertChild(int32_t index, CXFA_Node* pNode); FX_BOOL InsertChild(CXFA_Node* pNode, CXFA_Node* pBeforeNode = NULL); @@ -307,9 +307,9 @@ class CXFA_Node : public CXFA_Object { int32_t GetNodeList(CXFA_NodeArray& nodes, uint32_t dwTypeFilter = XFA_NODEFILTER_Children | XFA_NODEFILTER_Properties, - XFA_ELEMENT eElementFilter = XFA_ELEMENT_UNKNOWN, + XFA_Element eElementFilter = XFA_Element::Unknown, int32_t iLevel = 1); - CXFA_Node* CreateSamePacketNode(XFA_ELEMENT eElement, + CXFA_Node* CreateSamePacketNode(XFA_Element eElement, uint32_t dwFlags = XFA_NodeFlag_Initialized); CXFA_Node* CloneTemplateToForm(FX_BOOL bRecursive); CXFA_Node* GetTemplateNode() const; @@ -327,10 +327,10 @@ class CXFA_Node : public CXFA_Object { XFA_ATTRIBUTEENUM GetIntact(); CXFA_Node* GetFirstChildByName(const CFX_WideStringC& wsNodeName) const; CXFA_Node* GetFirstChildByName(uint32_t dwNodeNameHash) const; - CXFA_Node* GetFirstChildByClass(XFA_ELEMENT eNodeClass) const; + CXFA_Node* GetFirstChildByClass(XFA_Element eNodeClass) const; CXFA_Node* GetNextSameNameSibling(uint32_t dwNodeNameHash) const; CXFA_Node* GetNextSameNameSibling(const CFX_WideStringC& wsNodeName) const; - CXFA_Node* GetNextSameClassSibling(XFA_ELEMENT eNodeClass) const; + CXFA_Node* GetNextSameClassSibling(XFA_Element eNodeClass) const; int32_t GetNodeSameNameIndex() const; int32_t GetNodeSameClassIndex() const; void GetSOMExpression(CFX_WideString& wsSOMExpression); @@ -623,7 +623,7 @@ class CXFA_Node : public CXFA_Object { protected: friend class CXFA_Document; - CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_ELEMENT eElement); + CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_Element eElement); ~CXFA_Node() override; bool HasFlag(XFA_NodeFlag dwFlag) const; @@ -640,7 +640,7 @@ class CXFA_Node : public CXFA_Object { void OnChanging(XFA_ATTRIBUTE eAttr, bool bNotify); void OnChanged(XFA_ATTRIBUTE eAttr, bool bNotify, FX_BOOL bScriptModify); int32_t execSingleEventByName(const CFX_WideStringC& wsEventName, - XFA_ELEMENT eElementType); + XFA_Element eElementType); FX_BOOL SetScriptContent(const CFX_WideString& wsContent, const CFX_WideString& wsXMLValue, bool bNotify = true, @@ -675,7 +675,7 @@ class CXFA_Node : public CXFA_Object { CXFA_Node* m_pLastChild; CXFA_Node* m_pParent; CFDE_XMLNode* m_pXMLNode; - XFA_ELEMENT m_eNodeClass; + XFA_Element m_eNodeClass; uint16_t m_ePacket; uint16_t m_uNodeFlags; uint32_t m_dwNameHash; @@ -685,14 +685,14 @@ class CXFA_Node : public CXFA_Object { class CXFA_OrdinaryObject : public CXFA_Object { public: - CXFA_OrdinaryObject(CXFA_Document* pDocument, XFA_ELEMENT eElement); + CXFA_OrdinaryObject(CXFA_Document* pDocument, XFA_Element eElement); ~CXFA_OrdinaryObject() override; - XFA_ELEMENT GetClassID() const; + XFA_Element GetClassID() const; uint32_t GetScriptObjHash() const; protected: - XFA_ELEMENT m_eNodeClass; + XFA_Element m_eNodeClass; uint32_t m_uScriptHash; }; @@ -714,7 +714,7 @@ class CXFA_NodeList : public CXFA_Object { explicit CXFA_NodeList(CXFA_Document* pDocument); ~CXFA_NodeList() override; - XFA_ELEMENT GetClassID() const; + XFA_Element GetClassID() const; CXFA_Node* NamedItem(const CFX_WideStringC& wsName); virtual int32_t GetLength() = 0; virtual FX_BOOL Append(CXFA_Node* pNode) = 0; diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp index b2ddab1eb8..c4dd9413cc 100644 --- a/xfa/fxfa/parser/xfa_object_imp.cpp +++ b/xfa/fxfa/parser/xfa_object_imp.cpp @@ -43,7 +43,7 @@ void XFA_CopyWideString(void*& pData) { XFA_MAPDATABLOCKCALLBACKINFO deleteWideStringCallBack = {XFA_DeleteWideString, XFA_CopyWideString}; -XFA_ObjectType XFA_GetElementObjectType(XFA_ELEMENT eElement) { +XFA_ObjectType XFA_GetElementObjectType(XFA_Element eElement) { return XFA_GetElementByID(eElement)->eObjectType; } @@ -69,7 +69,7 @@ uint32_t CXFA_Object::GetClassHashCode() const { return XFA_GetElementByID(GetClassID())->uHash; } -XFA_ELEMENT CXFA_Object::GetClassID() const { +XFA_Element CXFA_Object::GetClassID() const { if (IsNode()) return AsNode()->GetClassID(); if (IsOrdinaryObject()) @@ -77,9 +77,9 @@ XFA_ELEMENT CXFA_Object::GetClassID() const { if (IsNodeList()) return AsNodeList()->GetClassID(); if (IsOrdinaryList()) - return XFA_ELEMENT_List; + return XFA_Element::List; ASSERT(FALSE); - return (XFA_ELEMENT)0; + return XFA_Element::Unknown; } void CXFA_Object::Script_ObjectClass_ClassName(CFXJSE_Value* pValue, @@ -115,7 +115,7 @@ XFA_MAPMODULEDATA::~XFA_MAPMODULEDATA() {} CXFA_Node::CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, - XFA_ELEMENT eElement) + XFA_Element eElement) : CXFA_Object(pDoc, XFA_GetElementObjectType(eElement)), m_pNext(nullptr), m_pChild(nullptr), @@ -246,12 +246,12 @@ CXFA_Node* CXFA_Node::GetNodeItem(XFA_NODEITEM eItem, int32_t CXFA_Node::GetNodeList(CXFA_NodeArray& nodes, uint32_t dwTypeFilter, - XFA_ELEMENT eElementFilter, + XFA_Element eElementFilter, int32_t iLevel) { if (--iLevel < 0) { return nodes.GetSize(); } - if (eElementFilter != XFA_ELEMENT_UNKNOWN) { + if (eElementFilter != XFA_Element::Unknown) { CXFA_Node* pChild = m_pChild; while (pChild) { if (pChild->GetClassID() == eElementFilter) { @@ -288,8 +288,8 @@ int32_t CXFA_Node::GetNodeList(CXFA_NodeArray& nodes, (pProperty->uFlags & XFA_PROPERTYFLAG_OneOf)) { nodes.Add(pChild); } else if (bFilterChildren && - (pChild->GetClassID() == XFA_ELEMENT_Variables || - pChild->GetClassID() == XFA_ELEMENT_PageSet)) { + (pChild->GetClassID() == XFA_Element::Variables || + pChild->GetClassID() == XFA_Element::PageSet)) { nodes.Add(pChild); } } else if (bFilterChildren) { @@ -308,7 +308,7 @@ int32_t CXFA_Node::GetNodeList(CXFA_NodeArray& nodes, CXFA_Document* pFactory = m_pDocument->GetParser()->GetFactory(); const XFA_PACKETINFO* pPacket = XFA_GetPacketByID(GetPacketID()); CXFA_Node* pNewNode = - pFactory->CreateNode(pPacket, (XFA_ELEMENT)pProperty[i].eName); + pFactory->CreateNode(pPacket, pProperty[i].eName); if (!pNewNode) break; InsertChild(pNewNode, nullptr); @@ -322,7 +322,7 @@ int32_t CXFA_Node::GetNodeList(CXFA_NodeArray& nodes, return nodes.GetSize(); } -CXFA_Node* CXFA_Node::CreateSamePacketNode(XFA_ELEMENT eElement, +CXFA_Node* CXFA_Node::CreateSamePacketNode(XFA_Element eElement, uint32_t dwFlags) { CXFA_Document* pFactory = m_pDocument->GetParser()->GetFactory(); CXFA_Node* pNode = pFactory->CreateNode(m_ePacket, eElement); @@ -445,14 +445,14 @@ CXFA_WidgetData* CXFA_Node::GetWidgetData() { CXFA_WidgetData* CXFA_Node::GetContainerWidgetData() { if (GetPacketID() != XFA_XDPPACKET_Form) return nullptr; - XFA_ELEMENT classID = GetClassID(); - if (classID == XFA_ELEMENT_ExclGroup) + XFA_Element classID = GetClassID(); + if (classID == XFA_Element::ExclGroup) return nullptr; CXFA_Node* pParentNode = GetNodeItem(XFA_NODEITEM_Parent); - if (pParentNode && pParentNode->GetClassID() == XFA_ELEMENT_ExclGroup) + if (pParentNode && pParentNode->GetClassID() == XFA_Element::ExclGroup) return nullptr; - if (classID == XFA_ELEMENT_Field) { + if (classID == XFA_Element::Field) { CXFA_WidgetData* pFieldWidgetData = GetWidgetData(); if (pFieldWidgetData && pFieldWidgetData->GetChoiceListOpen() == @@ -491,11 +491,11 @@ CXFA_WidgetData* CXFA_Node::GetContainerWidgetData() { CXFA_Node* pGrandNode = pParentNode ? pParentNode->GetNodeItem(XFA_NODEITEM_Parent) : nullptr; CXFA_Node* pValueNode = - (pParentNode && pParentNode->GetClassID() == XFA_ELEMENT_Value) + (pParentNode && pParentNode->GetClassID() == XFA_Element::Value) ? pParentNode : nullptr; if (!pValueNode) { - pValueNode = (pGrandNode && pGrandNode->GetClassID() == XFA_ELEMENT_Value) + pValueNode = (pGrandNode && pGrandNode->GetClassID() == XFA_Element::Value) ? pGrandNode : nullptr; } @@ -507,7 +507,7 @@ CXFA_WidgetData* CXFA_Node::GetContainerWidgetData() { FX_BOOL CXFA_Node::GetLocaleName(CFX_WideString& wsLocaleName) { CXFA_Node* pForm = GetDocument()->GetXFAObject(XFA_HASHCODE_Form)->AsNode(); - CXFA_Node* pTopSubform = pForm->GetFirstChildByClass(XFA_ELEMENT_Subform); + CXFA_Node* pTopSubform = pForm->GetFirstChildByClass(XFA_Element::Subform); ASSERT(pTopSubform); CXFA_Node* pLocaleNode = this; FX_BOOL bLocale = FALSE; @@ -536,8 +536,8 @@ FX_BOOL CXFA_Node::GetLocaleName(CFX_WideString& wsLocaleName) { } XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() { - XFA_ELEMENT eElement = GetClassID(); - CXFA_Node* pKeep = GetFirstChildByClass(XFA_ELEMENT_Keep); + XFA_Element eElement = GetClassID(); + CXFA_Node* pKeep = GetFirstChildByClass(XFA_Element::Keep); XFA_ATTRIBUTEENUM eLayoutType = GetEnum(XFA_ATTRIBUTE_Layout); if (pKeep) { XFA_ATTRIBUTEENUM eIntact; @@ -557,7 +557,7 @@ XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() { return XFA_ATTRIBUTEENUM_ContentArea; } CXFA_Node* pNode = - pPreviewRow->GetFirstChildByClass(XFA_ELEMENT_Keep); + pPreviewRow->GetFirstChildByClass(XFA_Element::Keep); if (pNode && pNode->TryEnum(XFA_ATTRIBUTE_Next, eValue, FALSE) && (eValue == XFA_ATTRIBUTEENUM_ContentArea || eValue == XFA_ATTRIBUTEENUM_PageArea)) { @@ -569,7 +569,7 @@ XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() { } } switch (eElement) { - case XFA_ELEMENT_Subform: + case XFA_Element::Subform: switch (eLayoutType) { case XFA_ATTRIBUTEENUM_Position: case XFA_ATTRIBUTEENUM_Row: @@ -583,9 +583,9 @@ XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() { break; } break; - case XFA_ELEMENT_Field: { + case XFA_Element::Field: { CXFA_Node* pParentNode = GetNodeItem(XFA_NODEITEM_Parent); - if (!pParentNode || pParentNode->GetClassID() == XFA_ELEMENT_PageArea) + if (!pParentNode || pParentNode->GetClassID() == XFA_Element::PageArea) return XFA_ATTRIBUTEENUM_ContentArea; if (pParentNode->GetIntact() == XFA_ATTRIBUTEENUM_None) { XFA_ATTRIBUTEENUM eParLayout = @@ -605,7 +605,7 @@ XFA_ATTRIBUTEENUM CXFA_Node::GetIntact() { } return XFA_ATTRIBUTEENUM_ContentArea; } - case XFA_ELEMENT_Draw: + case XFA_Element::Draw: return XFA_ATTRIBUTEENUM_ContentArea; default: break; @@ -636,7 +636,7 @@ void CXFA_Node::Script_TreeClass_ResolveNode(CFXJSE_Arguments* pArguments) { if (!pScriptContext) return; CXFA_Node* refNode = this; - if (refNode->GetClassID() == XFA_ELEMENT_Xfa) + if (refNode->GetClassID() == XFA_Element::Xfa) refNode = ToNode(pScriptContext->GetThisObject()); uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | @@ -682,7 +682,7 @@ void CXFA_Node::Script_TreeClass_ResolveNodes(CFXJSE_Arguments* pArguments) { XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | XFA_RESOLVENODE_Siblings; CXFA_Node* refNode = this; - if (refNode->GetClassID() == XFA_ELEMENT_Xfa) + if (refNode->GetClassID() == XFA_Element::Xfa) refNode = ToNode(m_pDocument->GetScriptContext()->GetThisObject()); Script_Som_ResolveNodeList(pValue, wsExpression, dwFlag, refNode); } @@ -1017,7 +1017,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) { pChild = pItem; } if (GetPacketID() == XFA_XDPPACKET_Form && - GetClassID() == XFA_ELEMENT_ExData) { + GetClassID() == XFA_Element::ExData) { CFDE_XMLNode* pTempXMLNode = GetXMLMappingNode(); SetXMLMappingNode(pFakeXMLRoot); SetFlag(XFA_NodeFlag_OwnXMLNode, false); @@ -1176,7 +1176,7 @@ void CXFA_Node::Script_NodeClass_IsNull(CFXJSE_Value* pValue, if (bSetting) { ThrowException(XFA_IDS_INVAlID_PROP_SET); } else { - if (GetClassID() == XFA_ELEMENT_Subform) { + if (GetClassID() == XFA_Element::Subform) { pValue->SetBoolean(FALSE); return; } @@ -1290,47 +1290,47 @@ void CXFA_Node::Script_Attribute_SendAttributeChangeMessage( } bool bNeedFindContainer = false; - XFA_ELEMENT eType = GetClassID(); + XFA_Element eType = GetClassID(); switch (eType) { - case XFA_ELEMENT_Caption: + case XFA_Element::Caption: bNeedFindContainer = true; pNotify->OnValueChanged(this, eAttribute, this, GetNodeItem(XFA_NODEITEM_Parent)); break; - case XFA_ELEMENT_Font: - case XFA_ELEMENT_Para: { + case XFA_Element::Font: + case XFA_Element::Para: { bNeedFindContainer = true; CXFA_Node* pParentNode = GetNodeItem(XFA_NODEITEM_Parent); - if (pParentNode->GetClassID() == XFA_ELEMENT_Caption) { + if (pParentNode->GetClassID() == XFA_Element::Caption) { pNotify->OnValueChanged(this, eAttribute, pParentNode, pParentNode->GetNodeItem(XFA_NODEITEM_Parent)); } else { pNotify->OnValueChanged(this, eAttribute, this, pParentNode); } } break; - case XFA_ELEMENT_Margin: { + case XFA_Element::Margin: { bNeedFindContainer = true; CXFA_Node* pParentNode = GetNodeItem(XFA_NODEITEM_Parent); - XFA_ELEMENT eParentType = pParentNode->GetClassID(); + XFA_Element eParentType = pParentNode->GetClassID(); if (pParentNode->IsContainerNode()) { pNotify->OnValueChanged(this, eAttribute, this, pParentNode); - } else if (eParentType == XFA_ELEMENT_Caption) { + } else if (eParentType == XFA_Element::Caption) { pNotify->OnValueChanged(this, eAttribute, pParentNode, pParentNode->GetNodeItem(XFA_NODEITEM_Parent)); } else { CXFA_Node* pNode = pParentNode->GetNodeItem(XFA_NODEITEM_Parent); - if (pNode && pNode->GetClassID() == XFA_ELEMENT_Ui) { + if (pNode && pNode->GetClassID() == XFA_Element::Ui) { pNotify->OnValueChanged(this, eAttribute, pNode, pNode->GetNodeItem(XFA_NODEITEM_Parent)); } } } break; - case XFA_ELEMENT_Comb: { + case XFA_Element::Comb: { CXFA_Node* pEditNode = GetNodeItem(XFA_NODEITEM_Parent); - XFA_ELEMENT eUIType = pEditNode->GetClassID(); - if (pEditNode && (eUIType == XFA_ELEMENT_DateTimeEdit || - eUIType == XFA_ELEMENT_NumericEdit || - eUIType == XFA_ELEMENT_TextEdit)) { + XFA_Element eUIType = pEditNode->GetClassID(); + if (pEditNode && (eUIType == XFA_Element::DateTimeEdit || + eUIType == XFA_Element::NumericEdit || + eUIType == XFA_Element::TextEdit)) { CXFA_Node* pUINode = pEditNode->GetNodeItem(XFA_NODEITEM_Parent); if (pUINode) { pNotify->OnValueChanged(this, eAttribute, pUINode, @@ -1338,20 +1338,20 @@ void CXFA_Node::Script_Attribute_SendAttributeChangeMessage( } } } break; - case XFA_ELEMENT_Button: - case XFA_ELEMENT_Barcode: - case XFA_ELEMENT_ChoiceList: - case XFA_ELEMENT_DateTimeEdit: - case XFA_ELEMENT_NumericEdit: - case XFA_ELEMENT_PasswordEdit: - case XFA_ELEMENT_TextEdit: { + case XFA_Element::Button: + case XFA_Element::Barcode: + case XFA_Element::ChoiceList: + case XFA_Element::DateTimeEdit: + case XFA_Element::NumericEdit: + case XFA_Element::PasswordEdit: + case XFA_Element::TextEdit: { CXFA_Node* pUINode = GetNodeItem(XFA_NODEITEM_Parent); if (pUINode) { pNotify->OnValueChanged(this, eAttribute, pUINode, pUINode->GetNodeItem(XFA_NODEITEM_Parent)); } } break; - case XFA_ELEMENT_CheckButton: { + case XFA_Element::CheckButton: { bNeedFindContainer = true; CXFA_Node* pUINode = GetNodeItem(XFA_NODEITEM_Parent); if (pUINode) { @@ -1359,26 +1359,26 @@ void CXFA_Node::Script_Attribute_SendAttributeChangeMessage( pUINode->GetNodeItem(XFA_NODEITEM_Parent)); } } break; - case XFA_ELEMENT_Keep: - case XFA_ELEMENT_Bookend: - case XFA_ELEMENT_Break: - case XFA_ELEMENT_BreakAfter: - case XFA_ELEMENT_BreakBefore: - case XFA_ELEMENT_Overflow: + case XFA_Element::Keep: + case XFA_Element::Bookend: + case XFA_Element::Break: + case XFA_Element::BreakAfter: + case XFA_Element::BreakBefore: + case XFA_Element::Overflow: bNeedFindContainer = true; break; - case XFA_ELEMENT_Area: - case XFA_ELEMENT_Draw: - case XFA_ELEMENT_ExclGroup: - case XFA_ELEMENT_Field: - case XFA_ELEMENT_Subform: - case XFA_ELEMENT_SubformSet: + case XFA_Element::Area: + case XFA_Element::Draw: + case XFA_Element::ExclGroup: + case XFA_Element::Field: + case XFA_Element::Subform: + case XFA_Element::SubformSet: pLayoutPro->AddChangedContainer(this); pNotify->OnValueChanged(this, eAttribute, this, this); break; - case XFA_ELEMENT_Sharptext: - case XFA_ELEMENT_Sharpxml: - case XFA_ELEMENT_SharpxHTML: { + case XFA_Element::Sharptext: + case XFA_Element::Sharpxml: + case XFA_Element::SharpxHTML: { CXFA_Node* pTextNode = GetNodeItem(XFA_NODEITEM_Parent); if (!pTextNode) { return; @@ -1387,8 +1387,8 @@ void CXFA_Node::Script_Attribute_SendAttributeChangeMessage( if (!pValueNode) { return; } - XFA_ELEMENT eNodeType = pValueNode->GetClassID(); - if (eNodeType == XFA_ELEMENT_Value) { + XFA_Element eNodeType = pValueNode->GetClassID(); + if (eNodeType == XFA_Element::Value) { bNeedFindContainer = true; CXFA_Node* pNode = pValueNode->GetNodeItem(XFA_NODEITEM_Parent); if (pNode && pNode->IsContainerNode()) { @@ -1401,7 +1401,7 @@ void CXFA_Node::Script_Attribute_SendAttributeChangeMessage( pNode->GetNodeItem(XFA_NODEITEM_Parent)); } } else { - if (eNodeType == XFA_ELEMENT_Items) { + if (eNodeType == XFA_Element::Items) { CXFA_Node* pNode = pValueNode->GetNodeItem(XFA_NODEITEM_Parent); if (pNode && pNode->IsContainerNode()) { pNotify->OnValueChanged(this, eAttribute, pValueNode, pNode); @@ -1432,12 +1432,12 @@ void CXFA_Node::Script_Attribute_String(CFXJSE_Value* pValue, if (bSetting) { CFX_WideString wsValue = pValue->ToWideString(); SetAttribute(eAttribute, wsValue.AsStringC(), true); - if (eAttribute == XFA_ATTRIBUTE_Use && GetClassID() == XFA_ELEMENT_Desc) { + if (eAttribute == XFA_ATTRIBUTE_Use && GetClassID() == XFA_Element::Desc) { CXFA_Node* pTemplateNode = ToNode(m_pDocument->GetXFAObject(XFA_HASHCODE_Template)); CXFA_Node* pProtoRoot = - pTemplateNode->GetFirstChildByClass(XFA_ELEMENT_Subform) - ->GetFirstChildByClass(XFA_ELEMENT_Proto); + pTemplateNode->GetFirstChildByClass(XFA_Element::Subform) + ->GetFirstChildByClass(XFA_Element::Proto); CFX_WideString wsID; CFX_WideString wsSOM; @@ -1601,14 +1601,14 @@ void CXFA_Node::Script_Field_Length(CFXJSE_Value* pValue, void CXFA_Node::Script_Som_DefaultValue(CFXJSE_Value* pValue, FX_BOOL bSetting, XFA_ATTRIBUTE eAttribute) { - XFA_ELEMENT classID = GetClassID(); - if (classID == XFA_ELEMENT_Field) { + XFA_Element classID = GetClassID(); + if (classID == XFA_Element::Field) { Script_Field_DefaultValue(pValue, bSetting, eAttribute); return; - } else if (classID == XFA_ELEMENT_Draw) { + } else if (classID == XFA_Element::Draw) { Script_Draw_DefaultValue(pValue, bSetting, eAttribute); return; - } else if (classID == XFA_ELEMENT_Boolean) { + } else if (classID == XFA_Element::Boolean) { Script_Boolean_Value(pValue, bSetting, eAttribute); return; } @@ -1647,12 +1647,13 @@ void CXFA_Node::Script_Som_DefaultValue(CFXJSE_Value* pValue, SetScriptContent(wsNewValue, wsFormatValue, true, TRUE); } else { CFX_WideString content = GetScriptContent(TRUE); - if (content.IsEmpty() && classID != XFA_ELEMENT_Text && - classID != XFA_ELEMENT_SubmitUrl) { + if (content.IsEmpty() && classID != XFA_Element::Text && + classID != XFA_Element::SubmitUrl) { pValue->SetNull(); - } else if (classID == XFA_ELEMENT_Integer) { + } else if (classID == XFA_Element::Integer) { pValue->SetInteger(FXSYS_wtoi(content.c_str())); - } else if (classID == XFA_ELEMENT_Float || classID == XFA_ELEMENT_Decimal) { + } else if (classID == XFA_Element::Float || + classID == XFA_Element::Decimal) { CFX_Decimal decimal(content.AsStringC()); pValue->SetFloat((FX_FLOAT)(double)decimal); } else { @@ -1892,8 +1893,8 @@ void CXFA_Node::Script_Draw_DefaultValue(CFXJSE_Value* pValue, if (pValue && pValue->IsString()) { CXFA_WidgetData* pWidgetData = GetWidgetData(); ASSERT(pWidgetData); - XFA_ELEMENT uiType = pWidgetData->GetUIType(); - if (uiType == XFA_ELEMENT_Text) { + XFA_Element uiType = pWidgetData->GetUIType(); + if (uiType == XFA_Element::Text) { CFX_WideString wsNewValue = pValue->ToWideString(); CFX_WideString wsFormatValue(wsNewValue); SetScriptContent(wsNewValue, wsFormatValue, true, TRUE); @@ -1929,7 +1930,7 @@ void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue, wsNewText = pValue->ToWideString(); CXFA_Node* pUIChild = pWidgetData->GetUIChild(); - if (pUIChild->GetClassID() == XFA_ELEMENT_NumericEdit) { + if (pUIChild->GetClassID() == XFA_Element::NumericEdit) { int32_t iLeadDigits = 0; int32_t iFracDigits = 0; pWidgetData->GetLeadDigits(iLeadDigits); @@ -1949,11 +1950,11 @@ void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue, pValue->SetNull(); } else { CXFA_Node* pUIChild = pWidgetData->GetUIChild(); - XFA_ELEMENT eUI = pUIChild->GetClassID(); + XFA_Element eUI = pUIChild->GetClassID(); CXFA_Value defVal = pWidgetData->GetFormValue(); CXFA_Node* pNode = defVal.GetNode()->GetNodeItem(XFA_NODEITEM_FirstChild); - if (pNode && pNode->GetClassID() == XFA_ELEMENT_Decimal) { - if (eUI == XFA_ELEMENT_NumericEdit && + if (pNode && pNode->GetClassID() == XFA_Element::Decimal) { + if (eUI == XFA_Element::NumericEdit && (pNode->GetInteger(XFA_ATTRIBUTE_FracDigits) == -1)) { pValue->SetString( FX_UTF8Encode(content.c_str(), content.GetLength()).AsStringC()); @@ -1961,11 +1962,11 @@ void CXFA_Node::Script_Field_DefaultValue(CFXJSE_Value* pValue, CFX_Decimal decimal(content.AsStringC()); pValue->SetFloat((FX_FLOAT)(double)decimal); } - } else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Integer) { + } else if (pNode && pNode->GetClassID() == XFA_Element::Integer) { pValue->SetInteger(FXSYS_wtoi(content.c_str())); - } else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Boolean) { + } else if (pNode && pNode->GetClassID() == XFA_Element::Boolean) { pValue->SetBoolean(FXSYS_wtoi(content.c_str()) == 0 ? FALSE : TRUE); - } else if (pNode && pNode->GetClassID() == XFA_ELEMENT_Float) { + } else if (pNode && pNode->GetClassID() == XFA_Element::Float) { CFX_Decimal decimal(content.AsStringC()); pValue->SetFloat((FX_FLOAT)(double)decimal); } else { @@ -2106,7 +2107,7 @@ void CXFA_Node::Script_Field_ExecEvent(CFXJSE_Arguments* pArguments) { CFX_ByteString eventString = pArguments->GetUTF8String(0); int32_t iRet = execSingleEventByName( CFX_WideString::FromUTF8(eventString.AsStringC()).AsStringC(), - XFA_ELEMENT_Field); + XFA_Element::Field); if (eventString == "validate") { pArguments->GetReturnValue()->SetBoolean( (iRet == XFA_EVENTERROR_Error) ? FALSE : TRUE); @@ -2333,7 +2334,7 @@ void CXFA_Node::Script_ExclGroup_ExecEvent(CFXJSE_Arguments* pArguments) { CFX_ByteString eventString = pArguments->GetUTF8String(0); execSingleEventByName( CFX_WideString::FromUTF8(eventString.AsStringC()).AsStringC(), - XFA_ELEMENT_ExclGroup); + XFA_Element::ExclGroup); } else { ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent"); } @@ -2415,12 +2416,12 @@ static CXFA_Node* XFA_ScriptInstanceManager_GetItem(CXFA_Node* pInstMgrNode, uint32_t dwNameHash = 0; for (CXFA_Node* pNode = pInstMgrNode->GetNodeItem(XFA_NODEITEM_NextSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - XFA_ELEMENT eCurType = pNode->GetClassID(); - if (eCurType == XFA_ELEMENT_InstanceManager) { + XFA_Element eCurType = pNode->GetClassID(); + if (eCurType == XFA_Element::InstanceManager) { break; } - if ((eCurType != XFA_ELEMENT_Subform) && - (eCurType != XFA_ELEMENT_SubformSet)) { + if ((eCurType != XFA_Element::Subform) && + (eCurType != XFA_Element::SubformSet)) { continue; } if (iCount == 0) { @@ -2451,7 +2452,7 @@ void CXFA_Node::Script_Som_InstanceIndex(CFXJSE_Value* pValue, CXFA_Node* pManagerNode = nullptr; for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_PrevSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_PrevSibling)) { - if (pNode->GetClassID() == XFA_ELEMENT_InstanceManager) { + if (pNode->GetClassID() == XFA_Element::InstanceManager) { pManagerNode = pNode; break; } @@ -2464,12 +2465,13 @@ void CXFA_Node::Script_Som_InstanceIndex(CFXJSE_Value* pValue, } CXFA_Node* pToInstance = XFA_ScriptInstanceManager_GetItem(pManagerNode, iTo); - if (pToInstance && pToInstance->GetClassID() == XFA_ELEMENT_Subform) { + if (pToInstance && pToInstance->GetClassID() == XFA_Element::Subform) { pNotify->RunSubformIndexChange(pToInstance); } CXFA_Node* pFromInstance = XFA_ScriptInstanceManager_GetItem(pManagerNode, iFrom); - if (pFromInstance && pFromInstance->GetClassID() == XFA_ELEMENT_Subform) { + if (pFromInstance && + pFromInstance->GetClassID() == XFA_Element::Subform) { pNotify->RunSubformIndexChange(pFromInstance); } } @@ -2485,7 +2487,7 @@ void CXFA_Node::Script_Subform_InstanceManager(CFXJSE_Value* pValue, CXFA_Node* pInstanceMgr = nullptr; for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_PrevSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_PrevSibling)) { - if (pNode->GetClassID() == XFA_ELEMENT_InstanceManager) { + if (pNode->GetClassID() == XFA_Element::InstanceManager) { CFX_WideStringC wsInstMgrName = pNode->GetCData(XFA_ATTRIBUTE_Name); if (wsInstMgrName.GetLength() >= 1 && wsInstMgrName.GetAt(0) == '_' && wsInstMgrName.Mid(1) == wsName) { @@ -2523,7 +2525,7 @@ void CXFA_Node::Script_Subform_ExecEvent(CFXJSE_Arguments* pArguments) { CFX_ByteString eventString = pArguments->GetUTF8String(0); execSingleEventByName( CFX_WideString::FromUTF8(eventString.AsStringC()).AsStringC(), - XFA_ELEMENT_Subform); + XFA_Element::Subform); } else { ThrowException(XFA_IDS_INCORRECT_NUMBER_OF_METHOD, L"execEvent"); } @@ -2578,8 +2580,8 @@ int32_t CXFA_Node::Subform_and_SubformSet_InstanceIndex() { int32_t index = 0; for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_PrevSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_PrevSibling)) { - if ((pNode->GetClassID() == XFA_ELEMENT_Subform) || - (pNode->GetClassID() == XFA_ELEMENT_SubformSet)) { + if ((pNode->GetClassID() == XFA_Element::Subform) || + (pNode->GetClassID() == XFA_Element::SubformSet)) { index++; } else { break; @@ -2732,12 +2734,12 @@ static int32_t XFA_ScriptInstanceManager_GetCount(CXFA_Node* pInstMgrNode) { uint32_t dwNameHash = 0; for (CXFA_Node* pNode = pInstMgrNode->GetNodeItem(XFA_NODEITEM_NextSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - XFA_ELEMENT eCurType = pNode->GetClassID(); - if (eCurType == XFA_ELEMENT_InstanceManager) { + XFA_Element eCurType = pNode->GetClassID(); + if (eCurType == XFA_Element::InstanceManager) { break; } - if ((eCurType != XFA_ELEMENT_Subform) && - (eCurType != XFA_ELEMENT_SubformSet)) { + if ((eCurType != XFA_Element::Subform) && + (eCurType != XFA_Element::SubformSet)) { continue; } if (iCount == 0) { @@ -3023,11 +3025,11 @@ void CXFA_Node::Script_InstanceManager_MoveInstance( return; } CXFA_Node* pToInstance = XFA_ScriptInstanceManager_GetItem(this, iTo); - if (pToInstance && pToInstance->GetClassID() == XFA_ELEMENT_Subform) { + if (pToInstance && pToInstance->GetClassID() == XFA_Element::Subform) { pNotify->RunSubformIndexChange(pToInstance); } CXFA_Node* pFromInstance = XFA_ScriptInstanceManager_GetItem(this, iFrom); - if (pFromInstance && pFromInstance->GetClassID() == XFA_ELEMENT_Subform) { + if (pFromInstance && pFromInstance->GetClassID() == XFA_Element::Subform) { pNotify->RunSubformIndexChange(pFromInstance); } } @@ -3057,7 +3059,7 @@ void CXFA_Node::Script_InstanceManager_RemoveInstance( for (int32_t i = iIndex; i < iCount - 1; i++) { CXFA_Node* pSubformInstance = XFA_ScriptInstanceManager_GetItem(this, i); if (pSubformInstance && - pSubformInstance->GetClassID() == XFA_ELEMENT_Subform) { + pSubformInstance->GetClassID() == XFA_Element::Subform) { pNotify->RunSubformIndexChange(pSubformInstance); } } @@ -3185,11 +3187,11 @@ int32_t CXFA_Node::InstanceManager_SetInstances(int32_t iDesired) { while (iCount > iDesired) { CXFA_Node* pRemoveInstance = pPrevSibling->GetNodeItem(XFA_NODEITEM_NextSibling); - if (pRemoveInstance->GetClassID() != XFA_ELEMENT_Subform && - pRemoveInstance->GetClassID() != XFA_ELEMENT_SubformSet) { + if (pRemoveInstance->GetClassID() != XFA_Element::Subform && + pRemoveInstance->GetClassID() != XFA_Element::SubformSet) { continue; } - if (pRemoveInstance->GetClassID() == XFA_ELEMENT_InstanceManager) { + if (pRemoveInstance->GetClassID() == XFA_Element::InstanceManager) { ASSERT(FALSE); break; } @@ -3600,9 +3602,9 @@ void* XFA_GetMapKey_Custom(const CFX_WideStringC& wsKey) { uint32_t dwKey = FX_HashCode_GetW(wsKey, false); return (void*)(uintptr_t)((dwKey << 1) | XFA_KEYTYPE_Custom); } -void* XFA_GetMapKey_Element(XFA_ELEMENT eElement, XFA_ATTRIBUTE eAttribute) { - return (void*)(uintptr_t)((eElement << 16) | (eAttribute << 8) | - XFA_KEYTYPE_Element); +void* XFA_GetMapKey_Element(XFA_Element eElement, XFA_ATTRIBUTE eAttribute) { + return (void*)(uintptr_t)((static_cast<int32_t>(eElement) << 16) | + (eAttribute << 8) | XFA_KEYTYPE_Element); } FX_BOOL CXFA_Node::HasAttribute(XFA_ATTRIBUTE eAttr, FX_BOOL bCanInherit) { void* pKey = XFA_GetMapKey_Element(GetClassID(), eAttr); @@ -3817,8 +3819,8 @@ FX_BOOL CXFA_Node::SetCData(XFA_ATTRIBUTE eAttr, return TRUE; } - if (eAttr == XFA_ATTRIBUTE_Name && (m_eNodeClass == XFA_ELEMENT_DataValue || - m_eNodeClass == XFA_ELEMENT_DataGroup)) { + if (eAttr == XFA_ATTRIBUTE_Name && (m_eNodeClass == XFA_Element::DataValue || + m_eNodeClass == XFA_Element::DataGroup)) { return TRUE; } @@ -4060,7 +4062,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, switch (GetObjectType()) { case XFA_ObjectType::ContainerNode: { if (XFA_FieldIsMultiListBox(this)) { - CXFA_Node* pValue = GetProperty(0, XFA_ELEMENT_Value); + CXFA_Node* pValue = GetProperty(0, XFA_Element::Value); CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild); ASSERT(pChildValue); pChildValue->SetCData(XFA_ATTRIBUTE_ContentType, L"text/xml"); @@ -4096,13 +4098,13 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, } else { CXFA_NodeArray valueNodes; int32_t iDatas = pBind->GetNodeList( - valueNodes, XFA_NODEFILTER_Children, XFA_ELEMENT_DataValue); + valueNodes, XFA_NODEFILTER_Children, XFA_Element::DataValue); if (iDatas < iSize) { int32_t iAddNodes = iSize - iDatas; CXFA_Node* pValueNodes = nullptr; while (iAddNodes-- > 0) { pValueNodes = - pBind->CreateSamePacketNode(XFA_ELEMENT_DataValue); + pBind->CreateSamePacketNode(XFA_Element::DataValue); pValueNodes->SetCData(XFA_ATTRIBUTE_Name, L"value"); pValueNodes->CreateXMLMappingNode(); pBind->InsertChild(pValueNodes); @@ -4134,10 +4136,10 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, } } break; - } else if (GetClassID() == XFA_ELEMENT_ExclGroup) { + } else if (GetClassID() == XFA_Element::ExclGroup) { pNode = this; } else { - CXFA_Node* pValue = GetProperty(0, XFA_ELEMENT_Value); + CXFA_Node* pValue = GetProperty(0, XFA_Element::Value); CXFA_Node* pChildValue = pValue->GetNodeItem(XFA_NODEITEM_FirstChild); ASSERT(pChildValue); pChildValue->SetScriptContent(wsContent, wsContent, bNotify, @@ -4161,7 +4163,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, } case XFA_ObjectType::ContentNode: { CFX_WideString wsContentType; - if (GetClassID() == XFA_ELEMENT_ExData) { + if (GetClassID() == XFA_Element::ExData) { GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); if (wsContentType == FX_WSTRC(L"text/html")) { wsContentType = FX_WSTRC(L""); @@ -4171,8 +4173,8 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, CXFA_Node* pContentRawDataNode = GetNodeItem(XFA_NODEITEM_FirstChild); if (!pContentRawDataNode) { pContentRawDataNode = CreateSamePacketNode( - (wsContentType == FX_WSTRC(L"text/xml")) ? XFA_ELEMENT_Sharpxml - : XFA_ELEMENT_Sharptext); + (wsContentType == FX_WSTRC(L"text/xml")) ? XFA_Element::Sharpxml + : XFA_Element::Sharptext); InsertChild(pContentRawDataNode); } return pContentRawDataNode->SetScriptContent( @@ -4189,7 +4191,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, if (pParent) { pParent = pParent->GetNodeItem(XFA_NODEITEM_Parent); } - if (pParent && pParent->GetClassID() == XFA_ELEMENT_Value) { + if (pParent && pParent->GetClassID() == XFA_Element::Value) { pParent = pParent->GetNodeItem(XFA_NODEITEM_Parent); if (pParent && pParent->IsContainerNode()) { pBindNode = pParent->GetBindData(); @@ -4202,7 +4204,7 @@ FX_BOOL CXFA_Node::SetScriptContent(const CFX_WideString& wsContent, } break; default: - if (GetClassID() == XFA_ELEMENT_DataValue) { + if (GetClassID() == XFA_Element::DataValue) { pNode = this; pBindNode = this; } @@ -4243,10 +4245,10 @@ FX_BOOL CXFA_Node::TryContent(CFX_WideString& wsContent, CXFA_Node* pNode = nullptr; switch (GetObjectType()) { case XFA_ObjectType::ContainerNode: - if (GetClassID() == XFA_ELEMENT_ExclGroup) { + if (GetClassID() == XFA_Element::ExclGroup) { pNode = this; } else { - CXFA_Node* pValue = GetChild(0, XFA_ELEMENT_Value); + CXFA_Node* pValue = GetChild(0, XFA_Element::Value); if (!pValue) { return FALSE; } @@ -4263,14 +4265,14 @@ FX_BOOL CXFA_Node::TryContent(CFX_WideString& wsContent, case XFA_ObjectType::ContentNode: { CXFA_Node* pContentRawDataNode = GetNodeItem(XFA_NODEITEM_FirstChild); if (!pContentRawDataNode) { - XFA_ELEMENT element = XFA_ELEMENT_Sharptext; - if (GetClassID() == XFA_ELEMENT_ExData) { + XFA_Element element = XFA_Element::Sharptext; + if (GetClassID() == XFA_Element::ExData) { CFX_WideString wsContentType; GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE); if (wsContentType == FX_WSTRC(L"text/html")) { - element = XFA_ELEMENT_SharpxHTML; + element = XFA_Element::SharpxHTML; } else if (wsContentType == FX_WSTRC(L"text/xml")) { - element = XFA_ELEMENT_Sharpxml; + element = XFA_Element::Sharpxml; } } pContentRawDataNode = CreateSamePacketNode(element); @@ -4283,7 +4285,7 @@ FX_BOOL CXFA_Node::TryContent(CFX_WideString& wsContent, case XFA_ObjectType::TextNode: pNode = this; default: - if (GetClassID() == XFA_ELEMENT_DataValue) { + if (GetClassID() == XFA_Element::DataValue) { pNode = this; } break; @@ -4325,7 +4327,7 @@ CXFA_Node* CXFA_Node::GetModelNode() { } FX_BOOL CXFA_Node::TryNamespace(CFX_WideString& wsNamespace) { wsNamespace.clear(); - if (IsModelNode() || GetClassID() == XFA_ELEMENT_Packet) { + if (IsModelNode() || GetClassID() == XFA_Element::Packet) { CFDE_XMLNode* pXMLNode = GetXMLMappingNode(); if (!pXMLNode || pXMLNode->GetType() != FDE_XMLNODE_Element) { return FALSE; @@ -4340,7 +4342,7 @@ FX_BOOL CXFA_Node::TryNamespace(CFX_WideString& wsNamespace) { if (pXMLNode->GetType() != FDE_XMLNODE_Element) { return TRUE; } - if (GetClassID() == XFA_ELEMENT_DataValue && + if (GetClassID() == XFA_Element::DataValue && GetEnum(XFA_ATTRIBUTE_Contains) == XFA_ATTRIBUTEENUM_MetaData) { return XFA_FDEExtension_ResolveNamespaceQualifier( static_cast<CFDE_XMLElement*>(pXMLNode), @@ -4354,9 +4356,9 @@ FX_BOOL CXFA_Node::TryNamespace(CFX_WideString& wsNamespace) { } } CXFA_Node* CXFA_Node::GetProperty(int32_t index, - XFA_ELEMENT eProperty, + XFA_Element eProperty, FX_BOOL bCreateProperty) { - XFA_ELEMENT eElement = GetClassID(); + XFA_Element eElement = GetClassID(); uint32_t dwPacket = GetPacketID(); const XFA_PROPERTY* pProperty = XFA_GetPropertyOfElement(eElement, eProperty, dwPacket); @@ -4397,11 +4399,11 @@ CXFA_Node* CXFA_Node::GetProperty(int32_t index, } return pNewNode; } -int32_t CXFA_Node::CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild) { +int32_t CXFA_Node::CountChildren(XFA_Element eElement, FX_BOOL bOnlyChild) { CXFA_Node* pNode = m_pChild; int32_t iCount = 0; for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pNode->GetClassID() == eElement || eElement == XFA_ELEMENT_UNKNOWN) { + if (pNode->GetClassID() == eElement || eElement == XFA_Element::Unknown) { if (bOnlyChild) { const XFA_PROPERTY* pProperty = XFA_GetPropertyOfElement( GetClassID(), pNode->GetClassID(), XFA_XDPPACKET_UNKNOWN); @@ -4415,13 +4417,13 @@ int32_t CXFA_Node::CountChildren(XFA_ELEMENT eElement, FX_BOOL bOnlyChild) { return iCount; } CXFA_Node* CXFA_Node::GetChild(int32_t index, - XFA_ELEMENT eElement, + XFA_Element eElement, FX_BOOL bOnlyChild) { ASSERT(index > -1); CXFA_Node* pNode = m_pChild; int32_t iCount = 0; for (; pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { - if (pNode->GetClassID() == eElement || eElement == XFA_ELEMENT_UNKNOWN) { + if (pNode->GetClassID() == eElement || eElement == XFA_Element::Unknown) { if (bOnlyChild) { const XFA_PROPERTY* pProperty = XFA_GetPropertyOfElement( GetClassID(), pNode->GetClassID(), XFA_XDPPACKET_UNKNOWN); @@ -4606,7 +4608,7 @@ CXFA_Node* CXFA_Node::GetFirstChildByName(uint32_t dwNameHash) const { } return nullptr; } -CXFA_Node* CXFA_Node::GetFirstChildByClass(XFA_ELEMENT eElement) const { +CXFA_Node* CXFA_Node::GetFirstChildByClass(XFA_Element eElement) const { for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_FirstChild); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { if (pNode->GetClassID() == eElement) { @@ -4628,7 +4630,7 @@ CXFA_Node* CXFA_Node::GetNextSameNameSibling( const CFX_WideStringC& wsNodeName) const { return GetNextSameNameSibling(FX_HashCode_GetW(wsNodeName, false)); } -CXFA_Node* CXFA_Node::GetNextSameClassSibling(XFA_ELEMENT eElement) const { +CXFA_Node* CXFA_Node::GetNextSameClassSibling(XFA_Element eElement) const { for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_NextSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling)) { if (pNode->GetClassID() == eElement) { @@ -4662,17 +4664,17 @@ CXFA_Node* CXFA_Node::GetInstanceMgrOfSubform() { CXFA_Node* pInstanceMgr = nullptr; if (m_ePacket == XFA_XDPPACKET_Form) { CXFA_Node* pParentNode = GetNodeItem(XFA_NODEITEM_Parent); - if (!pParentNode || pParentNode->GetClassID() == XFA_ELEMENT_Area) { + if (!pParentNode || pParentNode->GetClassID() == XFA_Element::Area) { return pInstanceMgr; } for (CXFA_Node* pNode = GetNodeItem(XFA_NODEITEM_PrevSibling); pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_PrevSibling)) { - XFA_ELEMENT eType = pNode->GetClassID(); - if ((eType == XFA_ELEMENT_Subform || eType == XFA_ELEMENT_SubformSet) && + XFA_Element eType = pNode->GetClassID(); + if ((eType == XFA_Element::Subform || eType == XFA_Element::SubformSet) && pNode->m_dwNameHash != m_dwNameHash) { break; } - if (eType == XFA_ELEMENT_InstanceManager) { + if (eType == XFA_Element::InstanceManager) { CFX_WideStringC wsName = GetCData(XFA_ATTRIBUTE_Name); CFX_WideStringC wsInstName = pNode->GetCData(XFA_ATTRIBUTE_Name); if (wsInstName.GetLength() > 0 && wsInstName.GetAt(0) == '_' && @@ -4686,7 +4688,7 @@ CXFA_Node* CXFA_Node::GetInstanceMgrOfSubform() { return pInstanceMgr; } CXFA_Node* CXFA_Node::GetOccurNode() { - return GetFirstChildByClass(XFA_ELEMENT_Occur); + return GetFirstChildByClass(XFA_Element::Occur); } bool CXFA_Node::HasFlag(XFA_NodeFlag dwFlag) const { if (m_uNodeFlags & dwFlag) @@ -4741,7 +4743,7 @@ void CXFA_Node::OnChanged(XFA_ATTRIBUTE eAttr, } int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName, - XFA_ELEMENT eElementType) { + XFA_Element eElementType) { int32_t iRet = XFA_EVENTERROR_NotExist; const XFA_ExecEventParaInfo* eventParaInfo = GetEventParaInfoByName(wsEventName); @@ -4757,15 +4759,16 @@ int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName, iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType, FALSE, FALSE); } else if (validFlags == 3) { - if (eElementType == XFA_ELEMENT_Subform) { + if (eElementType == XFA_Element::Subform) { iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType, FALSE, FALSE); } } else if (validFlags == 4) { - if (eElementType == XFA_ELEMENT_ExclGroup || - eElementType == XFA_ELEMENT_Field) { + if (eElementType == XFA_Element::ExclGroup || + eElementType == XFA_Element::Field) { CXFA_Node* pParentNode = GetNodeItem(XFA_NODEITEM_Parent); - if (pParentNode && pParentNode->GetClassID() == XFA_ELEMENT_ExclGroup) { + if (pParentNode && + pParentNode->GetClassID() == XFA_Element::ExclGroup) { iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType, FALSE, FALSE); } @@ -4773,7 +4776,7 @@ int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName, FALSE, FALSE); } } else if (validFlags == 5) { - if (eElementType == XFA_ELEMENT_Field) { + if (eElementType == XFA_Element::Field) { iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType, FALSE, FALSE); } @@ -4781,7 +4784,7 @@ int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName, CXFA_WidgetData* pWidgetData = GetWidgetData(); if (pWidgetData) { CXFA_Node* pUINode = pWidgetData->GetUIChild(); - if (pUINode->m_eNodeClass == XFA_ELEMENT_Signature) { + if (pUINode->m_eNodeClass == XFA_Element::Signature) { iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType, FALSE, FALSE); } @@ -4790,7 +4793,7 @@ int32_t CXFA_Node::execSingleEventByName(const CFX_WideStringC& wsEventName, CXFA_WidgetData* pWidgetData = GetWidgetData(); if (pWidgetData) { CXFA_Node* pUINode = pWidgetData->GetUIChild(); - if ((pUINode->m_eNodeClass == XFA_ELEMENT_ChoiceList) && + if ((pUINode->m_eNodeClass == XFA_Element::ChoiceList) && (!pWidgetData->IsListBox())) { iRet = pNotify->ExecEventByDeepFirst(this, eventParaInfo->m_eventType, FALSE, FALSE); @@ -4822,7 +4825,7 @@ CFDE_XMLNode* CXFA_Node::CreateXMLMappingNode() { } FX_BOOL CXFA_Node::IsNeedSavingXMLNode() { return m_pXMLNode && (GetPacketID() == XFA_XDPPACKET_Datasets || - GetClassID() == XFA_ELEMENT_Xfa); + GetClassID() == XFA_Element::Xfa); } XFA_MAPMODULEDATA* CXFA_Node::CreateMapModuleData() { @@ -5078,14 +5081,14 @@ void CXFA_Node::MoveBufferMapData(CXFA_Node* pSrcModule, } CXFA_OrdinaryObject::CXFA_OrdinaryObject(CXFA_Document* pDocument, - XFA_ELEMENT eElement) + XFA_Element eElement) : CXFA_Object(pDocument, XFA_ObjectType::OrdinaryObject), m_uScriptHash(0) { m_eNodeClass = eElement; } CXFA_OrdinaryObject::~CXFA_OrdinaryObject() {} -XFA_ELEMENT CXFA_OrdinaryObject::GetClassID() const { +XFA_Element CXFA_OrdinaryObject::GetClassID() const { return m_eNodeClass; } @@ -5117,8 +5120,8 @@ CXFA_NodeList::CXFA_NodeList(CXFA_Document* pDocument) std::unique_ptr<CXFA_NodeList>(this)); } CXFA_NodeList::~CXFA_NodeList() {} -XFA_ELEMENT CXFA_NodeList::GetClassID() const { - return XFA_ELEMENT_NodeList; +XFA_Element CXFA_NodeList::GetClassID() const { + return XFA_Element::NodeList; } CXFA_Node* CXFA_NodeList::NamedItem(const CFX_WideStringC& wsName) { uint32_t dwHashCode = FX_HashCode_GetW(wsName, false); @@ -5265,7 +5268,8 @@ CXFA_AttachNodeList::CXFA_AttachNodeList(CXFA_Document* pDocument, } int32_t CXFA_AttachNodeList::GetLength() { return m_pAttachNode->CountChildren( - XFA_ELEMENT_UNKNOWN, m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform); + XFA_Element::Unknown, + m_pAttachNode->GetClassID() == XFA_Element::Subform); } FX_BOOL CXFA_AttachNodeList::Append(CXFA_Node* pNode) { CXFA_Node* pParent = pNode->GetNodeItem(XFA_NODEITEM_Parent); @@ -5287,6 +5291,6 @@ FX_BOOL CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { } CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { return m_pAttachNode->GetChild( - iIndex, XFA_ELEMENT_UNKNOWN, - m_pAttachNode->GetClassID() == XFA_ELEMENT_Subform); + iIndex, XFA_Element::Unknown, + m_pAttachNode->GetClassID() == XFA_Element::Subform); } diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp index 8d6d7b778e..daf5b473e2 100644 --- a/xfa/fxfa/parser/xfa_parser_imp.cpp +++ b/xfa/fxfa/parser/xfa_parser_imp.cpp @@ -152,7 +152,7 @@ void CXFA_SimpleParser::ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) { XFA_XDPPACKET ePacketID = (XFA_XDPPACKET)pXFANode->GetPacketID(); if (ePacketID == XFA_XDPPACKET_Datasets) { - if (pXFANode->GetClassID() == XFA_ELEMENT_DataValue) { + if (pXFANode->GetClassID() == XFA_Element::DataValue) { for (CFDE_XMLNode* pXMLChild = pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild); pXMLChild; @@ -163,7 +163,7 @@ void CXFA_SimpleParser::ConstructXFANode(CXFA_Node* pXFANode, if (eNodeType == FDE_XMLNODE_Element) { CXFA_Node* pXFAChild = m_pFactory->CreateNode(XFA_XDPPACKET_Datasets, - XFA_ELEMENT_DataValue); + XFA_Element::DataValue); if (!pXFAChild) return; @@ -387,7 +387,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( return nullptr; } CXFA_Node* pXFARootNode = - m_pFactory->CreateNode(XFA_XDPPACKET_XDP, XFA_ELEMENT_Xfa); + m_pFactory->CreateNode(XFA_XDPPACKET_XDP, XFA_Element::Xfa); if (!pXFARootNode) { return nullptr; } @@ -525,7 +525,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Config( return NULL; } CXFA_Node* pNode = - m_pFactory->CreateNode(XFA_XDPPACKET_Config, XFA_ELEMENT_Config); + m_pFactory->CreateNode(XFA_XDPPACKET_Config, XFA_Element::Config); if (!pNode) { return NULL; } @@ -547,7 +547,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm( XFA_GetPacketByIndex(XFA_PACKET_Template)->pURI, XFA_GetPacketByIndex(XFA_PACKET_Template)->eFlags)) { pNode = - m_pFactory->CreateNode(XFA_XDPPACKET_Template, XFA_ELEMENT_Template); + m_pFactory->CreateNode(XFA_XDPPACKET_Template, XFA_Element::Template); if (!pNode) { return NULL; } @@ -591,7 +591,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm( if (bsCheck != wsChecksum.UTF8Encode()) return nullptr; - pNode = m_pFactory->CreateNode(XFA_XDPPACKET_Form, XFA_ELEMENT_Form); + pNode = m_pFactory->CreateNode(XFA_XDPPACKET_Form, XFA_Element::Form); if (!pNode) return nullptr; @@ -599,10 +599,10 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_TemplateForm( XFA_GetPacketByIndex(XFA_PACKET_Form)->pName); pNode->SetAttribute(XFA_ATTRIBUTE_Checksum, wsChecksum.AsStringC()); CXFA_Node* pTemplateRoot = - m_pRootNode->GetFirstChildByClass(XFA_ELEMENT_Template); + m_pRootNode->GetFirstChildByClass(XFA_Element::Template); CXFA_Node* pTemplateChosen = pTemplateRoot - ? pTemplateRoot->GetFirstChildByClass(XFA_ELEMENT_Subform) + ? pTemplateRoot->GetFirstChildByClass(XFA_Element::Subform) : NULL; FX_BOOL bUseAttribute = TRUE; if (pTemplateChosen && @@ -653,7 +653,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data( CFDE_XMLNode* pDatasetsXMLNode = XFA_GetDataSetsFromXDP(pXMLDocumentNode); if (pDatasetsXMLNode) { CXFA_Node* pNode = - m_pFactory->CreateNode(XFA_XDPPACKET_Datasets, XFA_ELEMENT_DataModel); + m_pFactory->CreateNode(XFA_XDPPACKET_Datasets, XFA_Element::DataModel); if (!pNode) { return NULL; } @@ -690,7 +690,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data( } if (pDataXMLNode) { CXFA_Node* pNode = - m_pFactory->CreateNode(XFA_XDPPACKET_Datasets, XFA_ELEMENT_DataGroup); + m_pFactory->CreateNode(XFA_XDPPACKET_Datasets, XFA_Element::DataGroup); if (!pNode) { if (pDataXMLNode != pXMLDocumentNode) { pDataXMLNode->Release(); @@ -721,7 +721,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_LocaleConnectionSourceSet( XFA_GetPacketByIndex(XFA_PACKET_LocaleSet)->pURI, XFA_GetPacketByIndex(XFA_PACKET_LocaleSet)->eFlags)) { pNode = m_pFactory->CreateNode(XFA_XDPPACKET_LocaleSet, - XFA_ELEMENT_LocaleSet); + XFA_Element::LocaleSet); if (!pNode) { return NULL; } @@ -738,7 +738,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_LocaleConnectionSourceSet( XFA_GetPacketByIndex(XFA_PACKET_ConnectionSet)->pURI, XFA_GetPacketByIndex(XFA_PACKET_ConnectionSet)->eFlags)) { pNode = m_pFactory->CreateNode(XFA_XDPPACKET_ConnectionSet, - XFA_ELEMENT_ConnectionSet); + XFA_Element::ConnectionSet); if (!pNode) { return NULL; } @@ -754,7 +754,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_LocaleConnectionSourceSet( XFA_GetPacketByIndex(XFA_PACKET_SourceSet)->pURI, XFA_GetPacketByIndex(XFA_PACKET_SourceSet)->eFlags)) { pNode = m_pFactory->CreateNode(XFA_XDPPACKET_SourceSet, - XFA_ELEMENT_SourceSet); + XFA_Element::SourceSet); if (!pNode) { return NULL; } @@ -778,7 +778,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Xdc( XFA_GetPacketByIndex(XFA_PACKET_Xdc)->pURI, XFA_GetPacketByIndex(XFA_PACKET_Xdc)->eFlags)) { CXFA_Node* pNode = - m_pFactory->CreateNode(XFA_XDPPACKET_Xdc, XFA_ELEMENT_Xdc); + m_pFactory->CreateNode(XFA_XDPPACKET_Xdc, XFA_Element::Xdc); if (!pNode) { return NULL; } @@ -793,7 +793,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_User( CFDE_XMLNode* pXMLDocumentNode, XFA_XDPPACKET ePacketID) { CXFA_Node* pNode = - m_pFactory->CreateNode(XFA_XDPPACKET_XDP, XFA_ELEMENT_Packet); + m_pFactory->CreateNode(XFA_XDPPACKET_XDP, XFA_Element::Packet); if (!pNode) { return NULL; } @@ -881,8 +881,8 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode, pXFAChild->SetAttribute(lpAttrInfo->eName, wsAttrValue.AsStringC()); } pXFANode->InsertChild(pXFAChild); - if (pElemInfo->eName == XFA_ELEMENT_Validate || - pElemInfo->eName == XFA_ELEMENT_Locale) { + if (pElemInfo->eName == XFA_Element::Validate || + pElemInfo->eName == XFA_Element::Locale) { if (ePacketID == XFA_XDPPACKET_Config) { ParseContentNode(pXFAChild, pXMLElement, ePacketID); } else { @@ -979,16 +979,16 @@ void XFA_ConvertXMLToPlainText(CFDE_XMLElement* pRootXMLNode, void CXFA_SimpleParser::ParseContentNode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode, XFA_XDPPACKET ePacketID) { - XFA_ELEMENT element = XFA_ELEMENT_Sharptext; - if (pXFANode->GetClassID() == XFA_ELEMENT_ExData) { + XFA_Element element = XFA_Element::Sharptext; + if (pXFANode->GetClassID() == XFA_Element::ExData) { CFX_WideStringC wsContentType = pXFANode->GetCData(XFA_ATTRIBUTE_ContentType); if (wsContentType == FX_WSTRC(L"text/html")) - element = XFA_ELEMENT_SharpxHTML; + element = XFA_Element::SharpxHTML; else if (wsContentType == FX_WSTRC(L"text/xml")) - element = XFA_ELEMENT_Sharpxml; + element = XFA_Element::Sharpxml; } - if (element == XFA_ELEMENT_SharpxHTML) + if (element == XFA_Element::SharpxHTML) pXFANode->SetXMLMappingNode(pXMLNode); CFX_WideString wsValue; @@ -1000,14 +1000,14 @@ void CXFA_SimpleParser::ParseContentNode(CXFA_Node* pXFANode, if (eNodeType == FDE_XMLNODE_Instruction) continue; - if (element == XFA_ELEMENT_SharpxHTML) { + if (element == XFA_Element::SharpxHTML) { if (eNodeType != FDE_XMLNODE_Element) break; if (XFA_RecognizeRichText(static_cast<CFDE_XMLElement*>(pXMLChild))) XFA_GetPlainTextFromRichText(static_cast<CFDE_XMLElement*>(pXMLChild), wsValue); - } else if (element == XFA_ELEMENT_Sharpxml) { + } else if (element == XFA_Element::Sharpxml) { if (eNodeType != FDE_XMLNODE_Element) break; XFA_ConvertXMLToPlainText(static_cast<CFDE_XMLElement*>(pXMLChild), @@ -1061,32 +1061,32 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode, continue; } } - XFA_ELEMENT eNodeType = XFA_ELEMENT_DataModel; - if (eNodeType == XFA_ELEMENT_DataModel) { + XFA_Element eNodeType = XFA_Element::DataModel; + if (eNodeType == XFA_Element::DataModel) { CFX_WideString wsDataNodeAttr; if (XFA_FDEExtension_FindAttributeWithNS( pXMLElement, FX_WSTRC(L"dataNode"), FX_WSTRC(L"http://www.xfa.org/schema/xfa-data/1.0/"), wsDataNodeAttr)) { if (wsDataNodeAttr == FX_WSTRC(L"dataGroup")) { - eNodeType = XFA_ELEMENT_DataGroup; + eNodeType = XFA_Element::DataGroup; } else if (wsDataNodeAttr == FX_WSTRC(L"dataValue")) { - eNodeType = XFA_ELEMENT_DataValue; + eNodeType = XFA_Element::DataValue; } } } CFX_WideString wsContentType; - if (eNodeType == XFA_ELEMENT_DataModel) { + if (eNodeType == XFA_Element::DataModel) { if (XFA_FDEExtension_FindAttributeWithNS( pXMLElement, FX_WSTRC(L"contentType"), FX_WSTRC(L"http://www.xfa.org/schema/xfa-data/1.0/"), wsContentType)) { if (!wsContentType.IsEmpty()) { - eNodeType = XFA_ELEMENT_DataValue; + eNodeType = XFA_Element::DataValue; } } } - if (eNodeType == XFA_ELEMENT_DataModel) { + if (eNodeType == XFA_Element::DataModel) { for (CFDE_XMLNode* pXMLDataChild = pXMLElement->GetNodeItem(CFDE_XMLNode::FirstChild); pXMLDataChild; pXMLDataChild = pXMLDataChild->GetNodeItem( @@ -1094,14 +1094,14 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode, if (pXMLDataChild->GetType() == FDE_XMLNODE_Element) { if (!XFA_RecognizeRichText( static_cast<CFDE_XMLElement*>(pXMLDataChild))) { - eNodeType = XFA_ELEMENT_DataGroup; + eNodeType = XFA_Element::DataGroup; break; } } } } - if (eNodeType == XFA_ELEMENT_DataModel) { - eNodeType = XFA_ELEMENT_DataValue; + if (eNodeType == XFA_Element::DataModel) { + eNodeType = XFA_Element::DataValue; } CXFA_Node* pXFAChild = m_pFactory->CreateNode(XFA_XDPPACKET_Datasets, eNodeType); @@ -1144,7 +1144,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode, continue; } CXFA_Node* pXFAMetaData = m_pFactory->CreateNode( - XFA_XDPPACKET_Datasets, XFA_ELEMENT_DataValue); + XFA_XDPPACKET_Datasets, XFA_Element::DataValue); if (pXFAMetaData == NULL) { return; } @@ -1164,7 +1164,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode, } } pXFANode->InsertChild(pXFAChild); - if (eNodeType == XFA_ELEMENT_DataGroup) { + if (eNodeType == XFA_Element::DataGroup) { ParseDataGroup(pXFAChild, pXMLElement, ePacketID); } else { if (bNeedValue) { @@ -1184,7 +1184,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode, continue; } CXFA_Node* pXFAChild = m_pFactory->CreateNode(XFA_XDPPACKET_Datasets, - XFA_ELEMENT_DataValue); + XFA_Element::DataValue); if (pXFAChild == NULL) { return; } @@ -1202,7 +1202,7 @@ void CXFA_SimpleParser::ParseDataGroup(CXFA_Node* pXFANode, continue; } CXFA_Node* pXFAChild = m_pFactory->CreateNode(XFA_XDPPACKET_Datasets, - XFA_ELEMENT_DataValue); + XFA_Element::DataValue); if (pXFAChild == NULL) { return; } @@ -1262,7 +1262,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode, CFX_WideString wsCurValue = wsCurValueTextBuf.MakeString(); if (!wsCurValue.IsEmpty()) { CXFA_Node* pXFAChild = - m_pFactory->CreateNode(ePacketID, XFA_ELEMENT_DataValue); + m_pFactory->CreateNode(ePacketID, XFA_Element::DataValue); if (!pXFAChild) return; @@ -1277,7 +1277,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode, pXMLCurValueNode = nullptr; } CXFA_Node* pXFAChild = - m_pFactory->CreateNode(ePacketID, XFA_ELEMENT_DataValue); + m_pFactory->CreateNode(ePacketID, XFA_Element::DataValue); if (!pXFAChild) return; @@ -1297,7 +1297,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode, if (!wsCurValue.IsEmpty()) { if (bMarkAsCompound) { CXFA_Node* pXFAChild = - m_pFactory->CreateNode(ePacketID, XFA_ELEMENT_DataValue); + m_pFactory->CreateNode(ePacketID, XFA_Element::DataValue); if (!pXFAChild) return; diff --git a/xfa/fxfa/parser/xfa_script_datawindow.cpp b/xfa/fxfa/parser/xfa_script_datawindow.cpp index d825ee634f..8bf1520ca9 100644 --- a/xfa/fxfa/parser/xfa_script_datawindow.cpp +++ b/xfa/fxfa/parser/xfa_script_datawindow.cpp @@ -16,7 +16,7 @@ #include "xfa/fxfa/parser/xfa_utils.h" CScript_DataWindow::CScript_DataWindow(CXFA_Document* pDocument) - : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_DataWindow) { + : CXFA_OrdinaryObject(pDocument, XFA_Element::DataWindow) { m_uScriptHash = XFA_HASHCODE_DataWindow; } CScript_DataWindow::~CScript_DataWindow() {} diff --git a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp index e1bfd6b326..7277240f43 100644 --- a/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_eventpseudomodel.cpp @@ -21,7 +21,7 @@ #include "xfa/fxfa/parser/xfa_utils.h" CScript_EventPseudoModel::CScript_EventPseudoModel(CXFA_Document* pDocument) - : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_EventPseudoModel) { + : CXFA_OrdinaryObject(pDocument, XFA_Element::EventPseudoModel) { m_uScriptHash = XFA_HASHCODE_Event; } CScript_EventPseudoModel::~CScript_EventPseudoModel() {} diff --git a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp index 63bed46747..e4ba480dce 100644 --- a/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_hostpseudomodel.cpp @@ -28,7 +28,7 @@ CXFA_Node* ToNode(CFXJSE_Value* pValue, CFXJSE_Class* pClass) { } // namespace CScript_HostPseudoModel::CScript_HostPseudoModel(CXFA_Document* pDocument) - : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_HostPseudoModel) { + : CXFA_OrdinaryObject(pDocument, XFA_Element::HostPseudoModel) { m_uScriptHash = XFA_HASHCODE_Host; } CScript_HostPseudoModel::~CScript_HostPseudoModel() {} diff --git a/xfa/fxfa/parser/xfa_script_imp.cpp b/xfa/fxfa/parser/xfa_script_imp.cpp index e9b70202be..eeb9ba93c1 100644 --- a/xfa/fxfa/parser/xfa_script_imp.cpp +++ b/xfa/fxfa/parser/xfa_script_imp.cpp @@ -357,7 +357,7 @@ int32_t CXFA_ScriptContext::NormalPropTypeGetter( CXFA_ScriptContext* lpScriptContext = pObject->GetDocument()->GetScriptContext(); pObject = lpScriptContext->GetVariablesThis(pObject); - XFA_ELEMENT objElement = pObject->GetClassID(); + XFA_Element objElement = pObject->GetClassID(); CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) { return FXJSE_ClassPropType_Method; @@ -379,7 +379,7 @@ int32_t CXFA_ScriptContext::GlobalPropTypeGetter( CXFA_ScriptContext* lpScriptContext = pObject->GetDocument()->GetScriptContext(); pObject = lpScriptContext->GetVariablesThis(pObject); - XFA_ELEMENT objElement = pObject->GetClassID(); + XFA_Element objElement = pObject->GetClassID(); CFX_WideString wsPropName = CFX_WideString::FromUTF8(szPropName); if (XFA_GetMethodByName(objElement, wsPropName.AsStringC())) { return FXJSE_ClassPropType_Method; @@ -443,11 +443,11 @@ FX_BOOL CXFA_ScriptContext::RunVariablesScript(CXFA_Node* pScriptNode) { if (!pScriptNode) return FALSE; - if (pScriptNode->GetClassID() != XFA_ELEMENT_Script) + if (pScriptNode->GetClassID() != XFA_Element::Script) return TRUE; CXFA_Node* pParent = pScriptNode->GetNodeItem(XFA_NODEITEM_Parent); - if (!pParent || pParent->GetClassID() != XFA_ELEMENT_Variables) + if (!pParent || pParent->GetClassID() != XFA_Element::Variables) return FALSE; if (m_mapVariableToContext.GetValueAt(pScriptNode)) @@ -480,11 +480,11 @@ FX_BOOL CXFA_ScriptContext::QueryVariableValue( const CFX_ByteStringC& szPropName, CFXJSE_Value* pValue, FX_BOOL bGetter) { - if (!pScriptNode || pScriptNode->GetClassID() != XFA_ELEMENT_Script) + if (!pScriptNode || pScriptNode->GetClassID() != XFA_Element::Script) return FALSE; CXFA_Node* variablesNode = pScriptNode->GetNodeItem(XFA_NODEITEM_Parent); - if (!variablesNode || variablesNode->GetClassID() != XFA_ELEMENT_Variables) + if (!variablesNode || variablesNode->GetClassID() != XFA_Element::Variables) return FALSE; void* lpVariables = m_mapVariableToContext.GetValueAt(pScriptNode); diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp index 67416f2166..3617b6487e 100644 --- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp @@ -24,7 +24,7 @@ #include "xfa/fxfa/parser/xfa_utils.h" CScript_LayoutPseudoModel::CScript_LayoutPseudoModel(CXFA_Document* pDocument) - : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_LayoutPseudoModel) { + : CXFA_OrdinaryObject(pDocument, XFA_Element::LayoutPseudoModel) { m_uScriptHash = XFA_HASHCODE_Layout; } CScript_LayoutPseudoModel::~CScript_LayoutPseudoModel() {} @@ -224,7 +224,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray( if (wsType == FX_WSTRC(L"contentArea")) { for (CXFA_LayoutItem* pItem = pLayoutPage->m_pFirstChild; pItem; pItem = pItem->m_pNextSibling) { - if (pItem->m_pFormNode->GetClassID() == XFA_ELEMENT_ContentArea) { + if (pItem->m_pFormNode->GetClassID() == XFA_Element::ContentArea) { retArray.Add(pItem->m_pFormNode); } } @@ -237,7 +237,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray( } for (CXFA_LayoutItem* pItem = pLayoutPage->m_pFirstChild; pItem; pItem = pItem->m_pNextSibling) { - if (pItem->m_pFormNode->GetClassID() == XFA_ELEMENT_ContentArea) { + if (pItem->m_pFormNode->GetClassID() == XFA_Element::ContentArea) { retArray.Add(pItem->m_pFormNode); if (!bOnPageArea) { CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItem, @@ -248,11 +248,11 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray( if (!pItemChild->IsContentLayoutItem()) { continue; } - XFA_ELEMENT eElementType = pItemChild->m_pFormNode->GetClassID(); - if (eElementType != XFA_ELEMENT_Field && - eElementType != XFA_ELEMENT_Draw && - eElementType != XFA_ELEMENT_Subform && - eElementType != XFA_ELEMENT_Area) { + XFA_Element eElementType = pItemChild->m_pFormNode->GetClassID(); + if (eElementType != XFA_Element::Field && + eElementType != XFA_Element::Draw && + eElementType != XFA_Element::Subform && + eElementType != XFA_Element::Area) { continue; } if (pdfium::ContainsValue(formItems, pItemChild->m_pFormNode)) @@ -272,11 +272,11 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray( if (!pItemChild->IsContentLayoutItem()) { continue; } - XFA_ELEMENT eElementType = pItemChild->m_pFormNode->GetClassID(); - if (eElementType != XFA_ELEMENT_Field && - eElementType != XFA_ELEMENT_Draw && - eElementType != XFA_ELEMENT_Subform && - eElementType != XFA_ELEMENT_Area) { + XFA_Element eElementType = pItemChild->m_pFormNode->GetClassID(); + if (eElementType != XFA_Element::Field && + eElementType != XFA_Element::Draw && + eElementType != XFA_Element::Subform && + eElementType != XFA_Element::Area) { continue; } if (pdfium::ContainsValue(formItems, pItemChild->m_pFormNode)) @@ -289,20 +289,20 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray( } return; } - XFA_ELEMENT eType = XFA_ELEMENT_UNKNOWN; + XFA_Element eType = XFA_Element::Unknown; if (wsType == FX_WSTRC(L"field")) { - eType = XFA_ELEMENT_Field; + eType = XFA_Element::Field; } else if (wsType == FX_WSTRC(L"draw")) { - eType = XFA_ELEMENT_Draw; + eType = XFA_Element::Draw; } else if (wsType == FX_WSTRC(L"subform")) { - eType = XFA_ELEMENT_Subform; + eType = XFA_Element::Subform; } else if (wsType == FX_WSTRC(L"area")) { - eType = XFA_ELEMENT_Area; + eType = XFA_Element::Area; } - if (eType != XFA_ELEMENT_UNKNOWN) { + if (eType != XFA_Element::Unknown) { for (CXFA_LayoutItem* pItem = pLayoutPage->m_pFirstChild; pItem; pItem = pItem->m_pNextSibling) { - if (pItem->m_pFormNode->GetClassID() == XFA_ELEMENT_ContentArea) { + if (pItem->m_pFormNode->GetClassID() == XFA_Element::ContentArea) { if (!bOnPageArea) { CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItem, CXFA_TraverseStrategy_ContentLayoutItem> @@ -408,7 +408,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_SheetCountInBatch( void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_Relayout( CFXJSE_Arguments* pArguments) { CXFA_Node* pRootNode = m_pDocument->GetRoot(); - CXFA_Node* pFormRoot = pRootNode->GetFirstChildByClass(XFA_ELEMENT_Form); + CXFA_Node* pFormRoot = pRootNode->GetFirstChildByClass(XFA_Element::Form); ASSERT(pFormRoot); CXFA_Node* pContentRootNode = pFormRoot->GetNodeItem(XFA_NODEITEM_FirstChild); CXFA_LayoutProcessor* pLayoutProcessor = m_pDocument->GetLayoutProcessor(); diff --git a/xfa/fxfa/parser/xfa_script_logpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_logpseudomodel.cpp index ea94ca996d..bd404b83dd 100644 --- a/xfa/fxfa/parser/xfa_script_logpseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_logpseudomodel.cpp @@ -16,7 +16,7 @@ #include "xfa/fxfa/parser/xfa_utils.h" CScript_LogPseudoModel::CScript_LogPseudoModel(CXFA_Document* pDocument) - : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_LogPseudoModel) { + : CXFA_OrdinaryObject(pDocument, XFA_Element::LogPseudoModel) { m_uScriptHash = XFA_HASHCODE_Log; } CScript_LogPseudoModel::~CScript_LogPseudoModel() {} diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.cpp b/xfa/fxfa/parser/xfa_script_nodehelper.cpp index 80c9020d73..1bf8a12ff1 100644 --- a/xfa/fxfa/parser/xfa_script_nodehelper.cpp +++ b/xfa/fxfa/parser/xfa_script_nodehelper.cpp @@ -17,7 +17,7 @@ #include "xfa/fxfa/parser/xfa_utils.h" CXFA_NodeHelper::CXFA_NodeHelper() - : m_eLastCreateType(XFA_ELEMENT_DataValue), + : m_eLastCreateType(XFA_Element::DataValue), m_pCreateParent(NULL), m_iCreateCount(0), m_iCreateFlag(XFA_RESOLVENODE_RSTYPE_CreateNodeOne), @@ -154,15 +154,15 @@ int32_t CXFA_NodeHelper::XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, } } else { if (child->GetNameHash() == dNameHash) { - if (child->GetClassID() != XFA_ELEMENT_PageSet && - child->GetClassID() != XFA_ELEMENT_Extras && - child->GetClassID() != XFA_ELEMENT_Items) { + if (child->GetClassID() != XFA_Element::PageSet && + child->GetClassID() != XFA_Element::Extras && + child->GetClassID() != XFA_Element::Items) { pSiblings->Add(child); nCount++; } } } - if (child->IsUnnamed() && child->GetClassID() == XFA_ELEMENT_PageSet) { + if (child->IsUnnamed() && child->GetClassID() == XFA_Element::PageSet) { nCount += XFA_NodeAcc_TraverseSiblings(child, dNameHash, pSiblings, eLogicType, bIsClassName, FALSE); } @@ -176,7 +176,7 @@ int32_t CXFA_NodeHelper::XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, int32_t nChildren = children.GetSize(); for (i = 0; i < nChildren; i++) { CXFA_Node* child = children[i]; - if (child->GetClassID() == XFA_ELEMENT_Variables) { + if (child->GetClassID() == XFA_Element::Variables) { continue; } if (bIsClassName) { @@ -198,7 +198,7 @@ int32_t CXFA_NodeHelper::XFA_NodeAcc_TraverseSiblings(CXFA_Node* parent, continue; } if (XFA_NodeIsTransparent(child) && - child->GetClassID() != XFA_ELEMENT_PageSet) { + child->GetClassID() != XFA_Element::PageSet) { nCount += XFA_NodeAcc_TraverseSiblings(child, dNameHash, pSiblings, eLogicType, bIsClassName, FALSE); } @@ -222,9 +222,9 @@ CXFA_Node* CXFA_NodeHelper::XFA_ResolveNodes_GetParent( if (parent == NULL) { break; } - XFA_ELEMENT parentElement = parent->GetClassID(); - if ((!parent->IsUnnamed() && parentElement != XFA_ELEMENT_SubformSet) || - parentElement == XFA_ELEMENT_Variables) { + XFA_Element parentElement = parent->GetClassID(); + if ((!parent->IsUnnamed() && parentElement != XFA_Element::SubformSet) || + parentElement == XFA_Element::Variables) { break; } node = parent; @@ -287,7 +287,7 @@ void CXFA_NodeHelper::XFA_GetNameExpression(CXFA_Node* refNode, CFX_WideString ws; FX_BOOL bIsProperty = XFA_NodeIsProperty(refNode); if (refNode->IsUnnamed() || - (bIsProperty && refNode->GetClassID() != XFA_ELEMENT_PageSet)) { + (bIsProperty && refNode->GetClassID() != XFA_Element::PageSet)) { refNode->GetClassName(wsTagName); ws = wsTagName; wsName.Format(L"#%s[%d]", ws.c_str(), @@ -304,10 +304,10 @@ FX_BOOL CXFA_NodeHelper::XFA_NodeIsTransparent(CXFA_Node* refNode) { if (refNode == NULL) { return FALSE; } - XFA_ELEMENT eRefNode = refNode->GetClassID(); + XFA_Element eRefNode = refNode->GetClassID(); if ((refNode->IsUnnamed() && refNode->IsContainerNode()) || - eRefNode == XFA_ELEMENT_SubformSet || eRefNode == XFA_ELEMENT_Area || - eRefNode == XFA_ELEMENT_Proto) { + eRefNode == XFA_Element::SubformSet || eRefNode == XFA_Element::Area || + eRefNode == XFA_Element::Proto) { return TRUE; } return FALSE; @@ -391,7 +391,7 @@ FX_BOOL CXFA_NodeHelper::XFA_ResolveNodes_CreateNode( } } } else { - XFA_ELEMENT eClassType = XFA_ELEMENT_DataGroup; + XFA_Element eClassType = XFA_Element::DataGroup; if (bLastNode) { eClassType = m_eLastCreateType; } @@ -418,14 +418,14 @@ void CXFA_NodeHelper::XFA_SetCreateNodeType(CXFA_Node* refNode) { if (refNode == NULL) { return; } - if (refNode->GetClassID() == XFA_ELEMENT_Subform) { - m_eLastCreateType = XFA_ELEMENT_DataGroup; - } else if (refNode->GetClassID() == XFA_ELEMENT_Field) { + if (refNode->GetClassID() == XFA_Element::Subform) { + m_eLastCreateType = XFA_Element::DataGroup; + } else if (refNode->GetClassID() == XFA_Element::Field) { m_eLastCreateType = XFA_FieldIsMultiListBox(refNode) - ? XFA_ELEMENT_DataGroup - : XFA_ELEMENT_DataValue; - } else if (refNode->GetClassID() == XFA_ELEMENT_ExclGroup) { - m_eLastCreateType = XFA_ELEMENT_DataValue; + ? XFA_Element::DataGroup + : XFA_Element::DataValue; + } else if (refNode->GetClassID() == XFA_Element::ExclGroup) { + m_eLastCreateType = XFA_Element::DataValue; } } diff --git a/xfa/fxfa/parser/xfa_script_nodehelper.h b/xfa/fxfa/parser/xfa_script_nodehelper.h index 76d1302818..ac00f40194 100644 --- a/xfa/fxfa/parser/xfa_script_nodehelper.h +++ b/xfa/fxfa/parser/xfa_script_nodehelper.h @@ -62,7 +62,7 @@ class CXFA_NodeHelper { FX_BOOL XFA_NodeIsProperty(CXFA_Node* refNode); public: - XFA_ELEMENT m_eLastCreateType; + XFA_Element m_eLastCreateType; CXFA_Node* m_pCreateParent; int32_t m_iCreateCount; XFA_RESOVENODE_RSTYPE m_iCreateFlag; diff --git a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp index dd6fb686c9..1f24176a84 100644 --- a/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp +++ b/xfa/fxfa/parser/xfa_script_resolveprocessor.cpp @@ -57,7 +57,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes(CXFA_ResolveNodesData& rnd) { if (rnd.m_uHashName == XFA_HASHCODE_This && rnd.m_nLevel == 0) { rnd.m_Nodes.Add(rnd.m_pSC->GetThisObject()); return 1; - } else if (rnd.m_CurNode->GetClassID() == XFA_ELEMENT_Xfa) { + } else if (rnd.m_CurNode->GetClassID() == XFA_Element::Xfa) { CXFA_Object* pObjNode = rnd.m_pSC->GetDocument()->GetXFAObject(rnd.m_uHashName); if (pObjNode) { @@ -230,11 +230,11 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( CXFA_Node* pPageSetNode = NULL; CXFA_Node* pChild = curNode->GetNodeItem(XFA_NODEITEM_FirstChild); while (pChild) { - if (pChild->GetClassID() == XFA_ELEMENT_Variables) { + if (pChild->GetClassID() == XFA_Element::Variables) { pVariablesNode = pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); continue; - } else if (pChild->GetClassID() == XFA_ELEMENT_PageSet) { + } else if (pChild->GetClassID() == XFA_Element::PageSet) { pPageSetNode = pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling); continue; @@ -288,7 +288,7 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( nodes.Add(child); } if (m_pNodeHelper->XFA_NodeIsTransparent(child) && - child->GetClassID() != XFA_ELEMENT_PageSet) { + child->GetClassID() != XFA_Element::PageSet) { if (!bSetFlag) { XFA_ResolveNodes_SetStylesForChild(dwStyles, rndFind); bSetFlag = TRUE; @@ -340,8 +340,8 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( nodes.Add(childProperty); } } else if (childProperty->GetNameHash() == uNameHash && - childProperty->GetClassID() != XFA_ELEMENT_Extras && - childProperty->GetClassID() != XFA_ELEMENT_Items) { + childProperty->GetClassID() != XFA_Element::Extras && + childProperty->GetClassID() != XFA_Element::Items) { nodes.Add(childProperty); } } @@ -353,19 +353,19 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( return 0; } CXFA_Node* pProp = NULL; - if (XFA_ELEMENT_Subform == curNode->GetClassID() && + if (XFA_Element::Subform == curNode->GetClassID() && XFA_HASHCODE_Occur == uNameHash) { CXFA_Node* pInstanceManager = curNode->AsNode()->GetInstanceMgrOfSubform(); if (pInstanceManager) { - pProp = pInstanceManager->GetProperty(0, XFA_ELEMENT_Occur, TRUE); + pProp = pInstanceManager->GetProperty(0, XFA_Element::Occur, TRUE); } } else { const XFA_ELEMENTINFO* pElement = XFA_GetElementByName(wsName.AsStringC()); if (pElement) { pProp = curNode->AsNode()->GetProperty( - 0, pElement->eName, pElement->eName != XFA_ELEMENT_PageSet); + 0, pElement->eName, pElement->eName != XFA_Element::PageSet); } } if (pProp) { @@ -427,8 +427,8 @@ int32_t CXFA_ResolveProcessor::XFA_ResolveNodes_Normal( parentNode->GetClassID(), child->GetClassID(), XFA_XDPPACKET_UNKNOWN); FX_BOOL bInnerSearch = FALSE; if (pPropert) { - if ((child->GetClassID() == XFA_ELEMENT_Variables || - child->GetClassID() == XFA_ELEMENT_PageSet)) { + if ((child->GetClassID() == XFA_Element::Variables || + child->GetClassID() == XFA_Element::PageSet)) { bInnerSearch = TRUE; } } else { @@ -728,7 +728,7 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_FilterCondition( CXFA_Node* curNode = array[iSize - 1]; FX_BOOL bIsProperty = m_pNodeHelper->XFA_NodeIsProperty(curNode); if (curNode->IsUnnamed() || - (bIsProperty && curNode->GetClassID() != XFA_ELEMENT_PageSet)) { + (bIsProperty && curNode->GetClassID() != XFA_Element::PageSet)) { iCurrIndex = m_pNodeHelper->XFA_GetIndex(curNode, XFA_LOGIC_Transparent, bIsProperty, TRUE); } else { @@ -813,7 +813,7 @@ void CXFA_ResolveProcessor::XFA_ResolveNode_SetIndexDataBind( int32_t& iIndex, int32_t iCount) { if (m_pNodeHelper->XFA_CreateNode_ForCondition(wsNextCondition)) { - if (m_pNodeHelper->m_eLastCreateType == XFA_ELEMENT_DataGroup) { + if (m_pNodeHelper->m_eLastCreateType == XFA_Element::DataGroup) { iIndex = 0; } else { iIndex = iCount - 1; diff --git a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp index 845317c5f8..a528d5c18f 100644 --- a/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp +++ b/xfa/fxfa/parser/xfa_script_signaturepseudomodel.cpp @@ -20,7 +20,7 @@ CScript_SignaturePseudoModel::CScript_SignaturePseudoModel( CXFA_Document* pDocument) - : CXFA_OrdinaryObject(pDocument, XFA_ELEMENT_SignaturePseudoModel) { + : CXFA_OrdinaryObject(pDocument, XFA_Element::SignaturePseudoModel) { m_uScriptHash = XFA_HASHCODE_Signature; } CScript_SignaturePseudoModel::~CScript_SignaturePseudoModel() {} diff --git a/xfa/fxfa/parser/xfa_utils.h b/xfa/fxfa/parser/xfa_utils.h index 5b8057526a..bf050e7a3c 100644 --- a/xfa/fxfa/parser/xfa_utils.h +++ b/xfa/fxfa/parser/xfa_utils.h @@ -167,7 +167,7 @@ class CXFA_NodeIteratorTemplate { CFX_StackTemplate<NodeType*> m_NodeStack; }; -CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType); +CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType); CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData); FX_DOUBLE XFA_WideStringToDouble(const CFX_WideString& wsStringVal); FX_DOUBLE XFA_ByteStringToDouble(const CFX_ByteStringC& szStringVal); @@ -178,7 +178,7 @@ void XFA_GetPlainTextFromRichText(CFDE_XMLNode* pXMLNode, CFX_WideString& wsPlainText); FX_BOOL XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode); IFX_Stream* XFA_CreateWideTextRead(const CFX_WideString& wsBuffer); -FX_BOOL XFA_IsLayoutElement(XFA_ELEMENT eElement, +FX_BOOL XFA_IsLayoutElement(XFA_Element eElement, FX_BOOL bLayoutContainer = FALSE); void XFA_DataExporter_DealWithDataGroupNode(CXFA_Node* pDataNode); diff --git a/xfa/fxfa/parser/xfa_utils_imp.cpp b/xfa/fxfa/parser/xfa_utils_imp.cpp index d644880c4c..1e6cc1eb44 100644 --- a/xfa/fxfa/parser/xfa_utils_imp.cpp +++ b/xfa/fxfa/parser/xfa_utils_imp.cpp @@ -16,125 +16,126 @@ #include "xfa/fxfa/parser/xfa_parser.h" #include "xfa/fxfa/parser/xfa_script.h" -CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType) { - XFA_ELEMENT eType = pNode->GetClassID(); +CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_Element& eWidgetType) { + XFA_Element eType = pNode->GetClassID(); eWidgetType = eType; - if (eType != XFA_ELEMENT_Field && eType != XFA_ELEMENT_Draw) { + if (eType != XFA_Element::Field && eType != XFA_Element::Draw) { return NULL; } - eWidgetType = XFA_ELEMENT_UNKNOWN; - XFA_ELEMENT eUIType = XFA_ELEMENT_UNKNOWN; - CXFA_Value defValue(pNode->GetProperty(0, XFA_ELEMENT_Value, TRUE)); - XFA_ELEMENT eValueType = (XFA_ELEMENT)defValue.GetChildValueClassID(); + eWidgetType = XFA_Element::Unknown; + XFA_Element eUIType = XFA_Element::Unknown; + CXFA_Value defValue(pNode->GetProperty(0, XFA_Element::Value, TRUE)); + XFA_Element eValueType = defValue.GetChildValueClassID(); switch (eValueType) { - case XFA_ELEMENT_Boolean: - eUIType = XFA_ELEMENT_CheckButton; + case XFA_Element::Boolean: + eUIType = XFA_Element::CheckButton; break; - case XFA_ELEMENT_Integer: - case XFA_ELEMENT_Decimal: - case XFA_ELEMENT_Float: - eUIType = XFA_ELEMENT_NumericEdit; + case XFA_Element::Integer: + case XFA_Element::Decimal: + case XFA_Element::Float: + eUIType = XFA_Element::NumericEdit; break; - case XFA_ELEMENT_ExData: - case XFA_ELEMENT_Text: - eUIType = XFA_ELEMENT_TextEdit; - eWidgetType = XFA_ELEMENT_Text; + case XFA_Element::ExData: + case XFA_Element::Text: + eUIType = XFA_Element::TextEdit; + eWidgetType = XFA_Element::Text; break; - case XFA_ELEMENT_Date: - case XFA_ELEMENT_Time: - case XFA_ELEMENT_DateTime: - eUIType = XFA_ELEMENT_DateTimeEdit; + case XFA_Element::Date: + case XFA_Element::Time: + case XFA_Element::DateTime: + eUIType = XFA_Element::DateTimeEdit; break; - case XFA_ELEMENT_Image: - eUIType = XFA_ELEMENT_ImageEdit; - eWidgetType = XFA_ELEMENT_Image; + case XFA_Element::Image: + eUIType = XFA_Element::ImageEdit; + eWidgetType = XFA_Element::Image; break; - case XFA_ELEMENT_Arc: - case XFA_ELEMENT_Line: - case XFA_ELEMENT_Rectangle: - eUIType = XFA_ELEMENT_DefaultUi; + case XFA_Element::Arc: + case XFA_Element::Line: + case XFA_Element::Rectangle: + eUIType = XFA_Element::DefaultUi; eWidgetType = eValueType; break; default: break; } CXFA_Node* pUIChild = NULL; - CXFA_Node* pUI = pNode->GetProperty(0, XFA_ELEMENT_Ui, TRUE); + CXFA_Node* pUI = pNode->GetProperty(0, XFA_Element::Ui, TRUE); CXFA_Node* pChild = pUI->GetNodeItem(XFA_NODEITEM_FirstChild); for (; pChild; pChild = pChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { - XFA_ELEMENT eChild = pChild->GetClassID(); - if (eChild == XFA_ELEMENT_Extras || eChild == XFA_ELEMENT_Picture) { + XFA_Element eChild = pChild->GetClassID(); + if (eChild == XFA_Element::Extras || eChild == XFA_Element::Picture) { continue; } const XFA_PROPERTY* pProperty = - XFA_GetPropertyOfElement(XFA_ELEMENT_Ui, eChild, XFA_XDPPACKET_Form); + XFA_GetPropertyOfElement(XFA_Element::Ui, eChild, XFA_XDPPACKET_Form); if (pProperty && (pProperty->uFlags & XFA_PROPERTYFLAG_OneOf)) { pUIChild = pChild; break; } } - if (eType == XFA_ELEMENT_Draw) { - XFA_ELEMENT eDraw = pUIChild ? pUIChild->GetClassID() : XFA_ELEMENT_UNKNOWN; + if (eType == XFA_Element::Draw) { + XFA_Element eDraw = + pUIChild ? pUIChild->GetClassID() : XFA_Element::Unknown; switch (eDraw) { - case XFA_ELEMENT_TextEdit: - eWidgetType = XFA_ELEMENT_Text; + case XFA_Element::TextEdit: + eWidgetType = XFA_Element::Text; break; - case XFA_ELEMENT_ImageEdit: - eWidgetType = XFA_ELEMENT_Image; + case XFA_Element::ImageEdit: + eWidgetType = XFA_Element::Image; break; default: - eWidgetType = - eWidgetType == XFA_ELEMENT_UNKNOWN ? XFA_ELEMENT_Text : eWidgetType; + eWidgetType = eWidgetType == XFA_Element::Unknown ? XFA_Element::Text + : eWidgetType; break; } } else { - if (pUIChild && pUIChild->GetClassID() == XFA_ELEMENT_DefaultUi) { - eWidgetType = XFA_ELEMENT_TextEdit; + if (pUIChild && pUIChild->GetClassID() == XFA_Element::DefaultUi) { + eWidgetType = XFA_Element::TextEdit; } else { - eWidgetType = pUIChild - ? pUIChild->GetClassID() - : (eUIType == XFA_ELEMENT_UNKNOWN ? XFA_ELEMENT_TextEdit - : eUIType); + eWidgetType = + pUIChild ? pUIChild->GetClassID() + : (eUIType == XFA_Element::Unknown ? XFA_Element::TextEdit + : eUIType); } } if (!pUIChild) { - if (eUIType == XFA_ELEMENT_UNKNOWN) { - eUIType = XFA_ELEMENT_TextEdit; - defValue.GetNode()->GetProperty(0, XFA_ELEMENT_Text, TRUE); + if (eUIType == XFA_Element::Unknown) { + eUIType = XFA_Element::TextEdit; + defValue.GetNode()->GetProperty(0, XFA_Element::Text, TRUE); } pUIChild = pUI->GetProperty(0, eUIType, TRUE); - } else if (eUIType == XFA_ELEMENT_UNKNOWN) { + } else if (eUIType == XFA_Element::Unknown) { switch (pUIChild->GetClassID()) { - case XFA_ELEMENT_CheckButton: { - eValueType = XFA_ELEMENT_Text; - if (CXFA_Node* pItems = pNode->GetChild(0, XFA_ELEMENT_Items)) { - if (CXFA_Node* pItem = pItems->GetChild(0, XFA_ELEMENT_UNKNOWN)) { + case XFA_Element::CheckButton: { + eValueType = XFA_Element::Text; + if (CXFA_Node* pItems = pNode->GetChild(0, XFA_Element::Items)) { + if (CXFA_Node* pItem = pItems->GetChild(0, XFA_Element::Unknown)) { eValueType = pItem->GetClassID(); } } } break; - case XFA_ELEMENT_DateTimeEdit: - eValueType = XFA_ELEMENT_DateTime; + case XFA_Element::DateTimeEdit: + eValueType = XFA_Element::DateTime; break; - case XFA_ELEMENT_ImageEdit: - eValueType = XFA_ELEMENT_Image; + case XFA_Element::ImageEdit: + eValueType = XFA_Element::Image; break; - case XFA_ELEMENT_NumericEdit: - eValueType = XFA_ELEMENT_Float; + case XFA_Element::NumericEdit: + eValueType = XFA_Element::Float; break; - case XFA_ELEMENT_ChoiceList: { + case XFA_Element::ChoiceList: { eValueType = (pUIChild->GetEnum(XFA_ATTRIBUTE_Open) == XFA_ATTRIBUTEENUM_MultiSelect) - ? XFA_ELEMENT_ExData - : XFA_ELEMENT_Text; + ? XFA_Element::ExData + : XFA_Element::Text; } break; - case XFA_ELEMENT_Barcode: - case XFA_ELEMENT_Button: - case XFA_ELEMENT_PasswordEdit: - case XFA_ELEMENT_Signature: - case XFA_ELEMENT_TextEdit: + case XFA_Element::Barcode: + case XFA_Element::Button: + case XFA_Element::PasswordEdit: + case XFA_Element::Signature: + case XFA_Element::TextEdit: default: - eValueType = XFA_ELEMENT_Text; + eValueType = XFA_Element::Text; break; } defValue.GetNode()->GetProperty(0, eValueType, TRUE); @@ -143,7 +144,7 @@ CXFA_Node* XFA_CreateUIChild(CXFA_Node* pNode, XFA_ELEMENT& eWidgetType) { } CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData) { CXFA_Node* pNodeValue = - pWidgetData->GetNode()->GetChild(0, XFA_ELEMENT_Value); + pWidgetData->GetNode()->GetChild(0, XFA_Element::Value); if (!pNodeValue) { return CXFA_LocaleValue(); } @@ -152,30 +153,30 @@ CXFA_LocaleValue XFA_GetLocaleValue(CXFA_WidgetData* pWidgetData) { return CXFA_LocaleValue(); } int32_t iVTType = XFA_VT_NULL; - XFA_ELEMENT eType = pValueChild->GetClassID(); + XFA_Element eType = pValueChild->GetClassID(); switch (eType) { - case XFA_ELEMENT_Decimal: + case XFA_Element::Decimal: iVTType = XFA_VT_DECIMAL; break; - case XFA_ELEMENT_Float: + case XFA_Element::Float: iVTType = XFA_VT_FLOAT; break; - case XFA_ELEMENT_Date: + case XFA_Element::Date: iVTType = XFA_VT_DATE; break; - case XFA_ELEMENT_Time: + case XFA_Element::Time: iVTType = XFA_VT_TIME; break; - case XFA_ELEMENT_DateTime: + case XFA_Element::DateTime: iVTType = XFA_VT_DATETIME; break; - case XFA_ELEMENT_Boolean: + case XFA_Element::Boolean: iVTType = XFA_VT_BOOLEAN; break; - case XFA_ELEMENT_Integer: + case XFA_Element::Integer: iVTType = XFA_VT_INTEGER; break; - case XFA_ELEMENT_Text: + case XFA_Element::Text: iVTType = XFA_VT_TEXT; break; default: @@ -234,28 +235,28 @@ FX_BOOL XFA_FieldIsMultiListBox(CXFA_Node* pFieldNode) { if (!pFieldNode) { return bRet; } - CXFA_Node* pUIChild = pFieldNode->GetChild(0, XFA_ELEMENT_Ui); + CXFA_Node* pUIChild = pFieldNode->GetChild(0, XFA_Element::Ui); if (pUIChild) { CXFA_Node* pFirstChild = pUIChild->GetNodeItem(XFA_NODEITEM_FirstChild); - if (pFirstChild && pFirstChild->GetClassID() == XFA_ELEMENT_ChoiceList) { + if (pFirstChild && pFirstChild->GetClassID() == XFA_Element::ChoiceList) { bRet = pFirstChild->GetEnum(XFA_ATTRIBUTE_Open) == XFA_ATTRIBUTEENUM_MultiSelect; } } return bRet; } -FX_BOOL XFA_IsLayoutElement(XFA_ELEMENT eElement, FX_BOOL bLayoutContainer) { +FX_BOOL XFA_IsLayoutElement(XFA_Element eElement, FX_BOOL bLayoutContainer) { switch (eElement) { - case XFA_ELEMENT_Draw: - case XFA_ELEMENT_Field: - case XFA_ELEMENT_InstanceManager: + case XFA_Element::Draw: + case XFA_Element::Field: + case XFA_Element::InstanceManager: return !bLayoutContainer; - case XFA_ELEMENT_Area: - case XFA_ELEMENT_Subform: - case XFA_ELEMENT_ExclGroup: - case XFA_ELEMENT_SubformSet: - case XFA_ELEMENT_PageArea: - case XFA_ELEMENT_Form: + case XFA_Element::Area: + case XFA_Element::Subform: + case XFA_Element::ExclGroup: + case XFA_Element::SubformSet: + case XFA_Element::PageArea: + case XFA_Element::Form: return TRUE; default: return FALSE; |