summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffdocview.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_ffdocview.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_ffdocview.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index d42dce3ea0..6d38cf589c 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -209,7 +209,7 @@ CXFA_LayoutProcessor* CXFA_FFDocView::GetXFALayout() const {
}
FX_BOOL CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) {
CXFA_Node* pNode = pWidgetAcc->GetNode();
- XFA_Element eType = pNode->GetClassID();
+ XFA_Element eType = pNode->GetElementType();
if (eType != XFA_Element::Field && eType != XFA_Element::ExclGroup) {
return FALSE;
}
@@ -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->GetElementType() != XFA_Element::Field &&
+ pFormNode->GetElementType() != 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()->GetElementType() == XFA_Element::ExclGroup) {
Iterator.SkipTree();
}
}
@@ -401,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->GetElementType() == XFA_Element::Draw) {
return XFA_EVENTERROR_NotExist;
}
switch (pParam->m_eType) {
@@ -441,7 +441,7 @@ int32_t CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode,
if (pFormNode == pExclude) {
return iRet;
}
- XFA_Element elementType = pFormNode->GetClassID();
+ XFA_Element elementType = pFormNode->GetElementType();
if (elementType == XFA_Element::Field) {
if (eEventType == XFA_EVENT_IndexChange) {
return iRet;
@@ -461,7 +461,7 @@ int32_t CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode,
XFA_NODEITEM_FirstChild, XFA_ObjectType::ContainerNode);
pNode; pNode = pNode->GetNodeItem(XFA_NODEITEM_NextSibling,
XFA_ObjectType::ContainerNode)) {
- elementType = pNode->GetClassID();
+ elementType = pNode->GetElementType();
if (elementType != XFA_Element::Variables &&
elementType != XFA_Element::Draw) {
iRet |= ExecEventActivityByDeepFirst(pNode, eEventType, bIsFormReady,
@@ -600,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->GetElementType() == XFA_Element::Subform);
m_IndexChangedSubforms.Add(pNode);
}
void CXFA_FFDocView::RunDocClose() {