summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffnotify.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-08 18:01:31 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-08 18:01:31 +0000
commit1d86501aa9ee49890fbb43db60333a42f947cd74 (patch)
tree65b0c342fa74b11371a640c4444b87b6d6a6f5ba /xfa/fxfa/cxfa_ffnotify.cpp
parent7055dffad92bd7be7cdb20ed12d5cc5890177e7a (diff)
downloadpdfium-1d86501aa9ee49890fbb43db60333a42f947cd74.tar.xz
Convert XFA_ATTRIBUTE to an enum class
This CL converts the XFA_ATTRIBUTE enum to an enum class and fixes up various usages. Change-Id: I3dd17cc412d97eb212a65ce63bb9fa19605e1e91 Reviewed-on: https://pdfium-review.googlesource.com/18050 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffnotify.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffnotify.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/cxfa_ffnotify.cpp b/xfa/fxfa/cxfa_ffnotify.cpp
index 9c2f475e51..6e3cdd9411 100644
--- a/xfa/fxfa/cxfa_ffnotify.cpp
+++ b/xfa/fxfa/cxfa_ffnotify.cpp
@@ -349,7 +349,7 @@ void CXFA_FFNotify::OnNodeReady(CXFA_Node* pNode) {
XFA_Element eType = pNode->GetElementType();
if (XFA_IsCreateWidget(eType)) {
CXFA_WidgetAcc* pAcc = new CXFA_WidgetAcc(pDocView, pNode);
- pNode->JSNode()->SetObject(XFA_ATTRIBUTE_WidgetData, pAcc,
+ pNode->JSNode()->SetObject(XFA_Attribute::WidgetData, pAcc,
&gs_XFADeleteWidgetAcc);
return;
}
@@ -365,8 +365,8 @@ void CXFA_FFNotify::OnNodeReady(CXFA_Node* pNode) {
}
}
-void CXFA_FFNotify::OnValueChanging(CXFA_Node* pSender, XFA_ATTRIBUTE eAttr) {
- if (eAttr != XFA_ATTRIBUTE_Presence)
+void CXFA_FFNotify::OnValueChanging(CXFA_Node* pSender, XFA_Attribute eAttr) {
+ if (eAttr != XFA_Attribute::Presence)
return;
if (pSender->GetPacketID() & XFA_XDPPACKET_Datasets)
return;
@@ -391,7 +391,7 @@ void CXFA_FFNotify::OnValueChanging(CXFA_Node* pSender, XFA_ATTRIBUTE eAttr) {
}
void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
- XFA_ATTRIBUTE eAttr,
+ XFA_Attribute eAttr,
CXFA_Node* pParentNode,
CXFA_Node* pWidgetNode) {
CXFA_FFDocView* pDocView = m_pDoc->GetDocView();
@@ -399,7 +399,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
return;
if (!(pSender->GetPacketID() & XFA_XDPPACKET_Form)) {
- if (eAttr == XFA_ATTRIBUTE_Value)
+ if (eAttr == XFA_Attribute::Value)
pDocView->AddCalculateNodeNotify(pSender);
return;
}
@@ -428,10 +428,10 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
default:
break;
}
- if (bIsContainerNode && eAttr == XFA_ATTRIBUTE_Access)
+ if (bIsContainerNode && eAttr == XFA_Attribute::Access)
bUpdateProperty = true;
- if (eAttr == XFA_ATTRIBUTE_Value) {
+ if (eAttr == XFA_Attribute::Value) {
pDocView->AddCalculateNodeNotify(pSender);
if (eType == XFA_Element::Value || bIsContainerNode) {
if (bIsContainerNode) {