summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_script_layoutpseudomodel.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/parser/xfa_script_layoutpseudomodel.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/parser/xfa_script_layoutpseudomodel.cpp')
-rw-r--r--xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
index 39ca8028df..128f5e1d47 100644
--- a/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
+++ b/xfa/fxfa/parser/xfa_script_layoutpseudomodel.cpp
@@ -223,7 +223,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->GetElementType() == XFA_Element::ContentArea) {
retArray.Add(pItem->m_pFormNode);
}
}
@@ -236,7 +236,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->GetElementType() == XFA_Element::ContentArea) {
retArray.Add(pItem->m_pFormNode);
if (!bOnPageArea) {
CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItem,
@@ -247,7 +247,8 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
if (!pItemChild->IsContentLayoutItem()) {
continue;
}
- XFA_Element eElementType = pItemChild->m_pFormNode->GetClassID();
+ XFA_Element eElementType =
+ pItemChild->m_pFormNode->GetElementType();
if (eElementType != XFA_Element::Field &&
eElementType != XFA_Element::Draw &&
eElementType != XFA_Element::Subform &&
@@ -271,7 +272,8 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
if (!pItemChild->IsContentLayoutItem()) {
continue;
}
- XFA_Element eElementType = pItemChild->m_pFormNode->GetClassID();
+ XFA_Element eElementType =
+ pItemChild->m_pFormNode->GetElementType();
if (eElementType != XFA_Element::Field &&
eElementType != XFA_Element::Draw &&
eElementType != XFA_Element::Subform &&
@@ -301,7 +303,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
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->GetElementType() == XFA_Element::ContentArea) {
if (!bOnPageArea) {
CXFA_NodeIteratorTemplate<CXFA_ContentLayoutItem,
CXFA_TraverseStrategy_ContentLayoutItem>
@@ -310,7 +312,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
pItemChild; pItemChild = iterator.MoveToNext()) {
if (!pItemChild->IsContentLayoutItem())
continue;
- if (pItemChild->m_pFormNode->GetClassID() != eType)
+ if (pItemChild->m_pFormNode->GetElementType() != eType)
continue;
if (pdfium::ContainsValue(formItems, pItemChild->m_pFormNode))
continue;
@@ -327,7 +329,7 @@ void CScript_LayoutPseudoModel::Script_LayoutPseudoModel_GetObjArray(
pItemChild; pItemChild = iterator.MoveToNext()) {
if (!pItemChild->IsContentLayoutItem())
continue;
- if (pItemChild->m_pFormNode->GetClassID() != eType)
+ if (pItemChild->m_pFormNode->GetElementType() != eType)
continue;
if (pdfium::ContainsValue(formItems, pItemChild->m_pFormNode))
continue;