summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffwidgetacc.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_ffwidgetacc.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_ffwidgetacc.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffwidgetacc.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxfa/app/xfa_ffwidgetacc.cpp b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
index 3d8d7e18dc..1e5bd0ac34 100644
--- a/xfa/fxfa/app/xfa_ffwidgetacc.cpp
+++ b/xfa/fxfa/app/xfa_ffwidgetacc.cpp
@@ -281,7 +281,7 @@ void CXFA_WidgetAcc::SetImageEdit(const CFX_WideString& wsContentType,
CXFA_WidgetAcc* CXFA_WidgetAcc::GetExclGroup() {
CXFA_Node* pExcl = m_pNode->GetNodeItem(XFA_NODEITEM_Parent);
- if (!pExcl || pExcl->GetClassID() != XFA_Element::ExclGroup) {
+ if (!pExcl || pExcl->GetElementType() != XFA_Element::ExclGroup) {
return NULL;
}
return static_cast<CXFA_WidgetAcc*>(pExcl->GetWidgetData());
@@ -300,7 +300,7 @@ IXFA_AppProvider* CXFA_WidgetAcc::GetAppProvider() {
}
int32_t CXFA_WidgetAcc::ProcessEvent(int32_t iActivity,
CXFA_EventParam* pEventParam) {
- if (GetClassID() == XFA_Element::Draw) {
+ if (GetElementType() == XFA_Element::Draw) {
return XFA_EVENTERROR_NotExist;
}
int32_t iRet = XFA_EVENTERROR_NotExist;
@@ -343,7 +343,7 @@ int32_t CXFA_WidgetAcc::ProcessEvent(CXFA_Event& event,
}
int32_t CXFA_WidgetAcc::ProcessCalculate() {
- if (GetClassID() == XFA_Element::Draw)
+ if (GetElementType() == XFA_Element::Draw)
return XFA_EVENTERROR_NotExist;
CXFA_Calculate calc = GetCalculate();
@@ -569,7 +569,7 @@ void CXFA_WidgetAcc::GetValidateMessage(IXFA_AppProvider* pAppProvider,
wsCaptionName.c_str());
}
int32_t CXFA_WidgetAcc::ProcessValidate(int32_t iFlags) {
- if (GetClassID() == XFA_Element::Draw) {
+ if (GetElementType() == XFA_Element::Draw) {
return XFA_EVENTERROR_NotExist;
}
CXFA_Validate validate = GetValidate();
@@ -1407,7 +1407,7 @@ void CXFA_WidgetAcc::InitLayoutData() {
default:
break;
}
- if (GetClassID() == XFA_Element::Field) {
+ if (GetElementType() == XFA_Element::Field) {
m_pLayoutData.reset(new CXFA_FieldLayoutData);
return;
}
@@ -1556,7 +1556,7 @@ FX_ARGB CXFA_WidgetAcc::GetTextColor() {
CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
bRichText = FALSE;
if (m_pTextNode) {
- if (m_pTextNode->GetClassID() == XFA_Element::ExData) {
+ if (m_pTextNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
m_pTextNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType,
FALSE);
@@ -1573,7 +1573,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
return NULL;
}
CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild);
- if (pChildNode && pChildNode->GetClassID() == XFA_Element::ExData) {
+ if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
if (wsContentType == FX_WSTRC(L"text/html")) {
@@ -1608,7 +1608,7 @@ CXFA_Node* CXFA_TextProvider::GetTextNode(FX_BOOL& bRichText) {
return NULL;
}
CXFA_Node* pChildNode = pValueNode->GetNodeItem(XFA_NODEITEM_FirstChild);
- if (pChildNode && pChildNode->GetClassID() == XFA_Element::ExData) {
+ if (pChildNode && pChildNode->GetElementType() == XFA_Element::ExData) {
CFX_WideString wsContentType;
pChildNode->GetAttribute(XFA_ATTRIBUTE_ContentType, wsContentType, FALSE);
if (wsContentType == FX_WSTRC(L"text/html")) {