summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_widgetdata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-22 22:11:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-22 22:11:12 +0000
commitd49254bc9323883deba14d27026ec2bb9af096fa (patch)
treeb4e541dee8be646bfa4533bf61dad8c710c8293f /xfa/fxfa/parser/cxfa_widgetdata.cpp
parentfd16e44aa9b0e63e6d25254a3b812fb27152b6f4 (diff)
downloadpdfium-d49254bc9323883deba14d27026ec2bb9af096fa.tar.xz
Rename CXFA_WidgetData::GetAccess to ::IsOpenAccess
We never use ::GetAccess to get the value in general, just to see if it's set to Open or not. This CL makes the usage clearer. Change-Id: I0e978a8b8e642c7441ab2ceb8062f672ceea7d55 Reviewed-on: https://pdfium-review.googlesource.com/19210 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_widgetdata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 13b1c7a3ae..9b0bbccde8 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -219,21 +219,19 @@ XFA_Element CXFA_WidgetData::GetUIType() {
return m_eUIType;
}
-WideString CXFA_WidgetData::GetRawValue() {
+WideString CXFA_WidgetData::GetRawValue() const {
return m_pNode->JSNode()->GetContent(false);
}
-int32_t CXFA_WidgetData::GetAccess() {
- CXFA_Node* pNode = m_pNode;
- while (pNode) {
- int32_t iAcc = pNode->JSNode()->GetEnum(XFA_Attribute::Access);
+bool CXFA_WidgetData::IsOpenAccess() const {
+ for (CXFA_Node* pNode = m_pNode; pNode;
+ pNode = pNode->GetNodeItem(XFA_NODEITEM_Parent,
+ XFA_ObjectType::ContainerNode)) {
+ XFA_ATTRIBUTEENUM iAcc = pNode->JSNode()->GetEnum(XFA_Attribute::Access);
if (iAcc != XFA_ATTRIBUTEENUM_Open)
- return iAcc;
-
- pNode =
- pNode->GetNodeItem(XFA_NODEITEM_Parent, XFA_ObjectType::ContainerNode);
+ return false;
}
- return XFA_ATTRIBUTEENUM_Open;
+ return true;
}
int32_t CXFA_WidgetData::GetRotate() {