From d49254bc9323883deba14d27026ec2bb9af096fa Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 22 Nov 2017 22:11:12 +0000 Subject: 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 Reviewed-by: Henrique Nakashima --- xfa/fxfa/parser/cxfa_widgetdata.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'xfa/fxfa/parser/cxfa_widgetdata.cpp') 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() { -- cgit v1.2.3