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/cxfa_ffcombobox.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/cxfa_ffcombobox.cpp') diff --git a/xfa/fxfa/cxfa_ffcombobox.cpp b/xfa/fxfa/cxfa_ffcombobox.cpp index 87c1c3e43f..87e14d205f 100644 --- a/xfa/fxfa/cxfa_ffcombobox.cpp +++ b/xfa/fxfa/cxfa_ffcombobox.cpp @@ -80,7 +80,7 @@ void CXFA_FFComboBox::UpdateWidgetProperty() { dwEditStyles &= ~FWL_STYLEEXT_EDT_ReadOnly; dwExtendedStyle |= FWL_STYLEEXT_CMB_DropDown; } - if (m_pDataAcc->GetAccess() != XFA_ATTRIBUTEENUM_Open || + if (!m_pDataAcc->IsOpenAccess() || !m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { dwEditStyles |= FWL_STYLEEXT_EDT_ReadOnly; dwExtendedStyle |= FWL_STYLEEXT_CMB_ReadOnly; @@ -227,14 +227,13 @@ bool CXFA_FFComboBox::CanCopy() { } bool CXFA_FFComboBox::CanCut() { - return m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open && + return m_pDataAcc->IsOpenAccess() && m_pDataAcc->IsChoiceListAllowTextEntry() && ToComboBox(m_pNormalWidget.get())->EditCanCut(); } bool CXFA_FFComboBox::CanPaste() { - return m_pDataAcc->IsChoiceListAllowTextEntry() && - m_pDataAcc->GetAccess() == XFA_ATTRIBUTEENUM_Open; + return m_pDataAcc->IsChoiceListAllowTextEntry() && m_pDataAcc->IsOpenAccess(); } bool CXFA_FFComboBox::CanSelectAll() { -- cgit v1.2.3