summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffnotify.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-06-22 22:04:54 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-22 22:04:54 -0700
commit070fcdfeafb17a9d3ada1418f48fd7f19aa4cf83 (patch)
tree2e9d0daaf76b0d2ac13f8b6d0b10dec11d1c6264 /xfa/fxfa/app/xfa_ffnotify.cpp
parenta5ab26b8aa9ed12af8bdf323cb297f61cbfeb1fa (diff)
downloadpdfium-070fcdfeafb17a9d3ada1418f48fd7f19aa4cf83.tar.xz
Update GetClassID to GetElementType
The GetClassID method actually returns the XFA_Element, change the name of the method to be more suggestive of the return value. The GetClassID was sort-of polymorphich and would call down to subclasses. This CL changes the data to be stored on the CXFA_Object class and just returns what is set. The values are set in the constructor as needed. Review-Url: https://codereview.chromium.org/2082573007
Diffstat (limited to 'xfa/fxfa/app/xfa_ffnotify.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp
index 1a89ceaba5..e4b8312841 100644
--- a/xfa/fxfa/app/xfa_ffnotify.cpp
+++ b/xfa/fxfa/app/xfa_ffnotify.cpp
@@ -89,7 +89,7 @@ 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();
+ XFA_Element eType = pNode->GetElementType();
if (eType == XFA_Element::PageArea)
return new CXFA_FFPageView(pDocView, pNode);
@@ -320,7 +320,7 @@ void CXFA_FFNotify::OnNodeReady(CXFA_Node* pNode) {
if (!pDocView)
return;
- XFA_Element iType = pNode->GetClassID();
+ XFA_Element iType = pNode->GetElementType();
if (XFA_IsCreateWidget(iType)) {
CXFA_WidgetAcc* pAcc = new CXFA_WidgetAcc(pDocView, pNode);
pNode->SetObject(XFA_ATTRIBUTE_WidgetData, pAcc, &gs_XFADeleteWidgetAcc);
@@ -381,7 +381,7 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
return;
}
- XFA_Element ePType = pParentNode->GetClassID();
+ XFA_Element ePType = pParentNode->GetElementType();
FX_BOOL bIsContainerNode = pParentNode->IsContainerNode();
CXFA_WidgetAcc* pWidgetAcc =
static_cast<CXFA_WidgetAcc*>(pWidgetNode->GetWidgetData());
@@ -415,8 +415,8 @@ void CXFA_FFNotify::OnValueChanged(CXFA_Node* pSender,
pWidgetAcc->UpdateUIDisplay();
pDocView->AddCalculateWidgetAcc(pWidgetAcc);
pDocView->AddValidateWidget(pWidgetAcc);
- } else if (pWidgetNode->GetNodeItem(XFA_NODEITEM_Parent)->GetClassID() ==
- XFA_Element::ExclGroup) {
+ } else if (pWidgetNode->GetNodeItem(XFA_NODEITEM_Parent)
+ ->GetElementType() == XFA_Element::ExclGroup) {
pWidgetAcc->UpdateUIDisplay();
}
return;