summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_validate.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-21 14:15:25 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-21 14:15:26 -0700
commit56a8b1944d555ed65dda97164b702a9a657485ca (patch)
tree0bfead2fa031b2c162a5992d29a11f872cf77135 /xfa/fxfa/parser/cxfa_validate.cpp
parentbb8b63d6b762393e6e7460351375d596bdabef0c (diff)
downloadpdfium-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/fxfa/parser/cxfa_validate.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_validate.cpp14
1 files changed, 7 insertions, 7 deletions
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));
}