From 56a8b1944d555ed65dda97164b702a9a657485ca Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 21 Jun 2016 14:15:25 -0700 Subject: Convert XFA_ELEMENT to an enum class This CL changes XFA_ELEMENT From an enum to an enum class. The type name was updated to XFA_Element. Review-Url: https://codereview.chromium.org/2089443002 --- xfa/fxfa/app/xfa_fffield.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'xfa/fxfa/app/xfa_fffield.cpp') diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index 6d2f1e8db7..59374cdbec 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -36,10 +36,10 @@ FX_BOOL CXFA_FFField::GetBBox(CFX_RectF& rtBox, if (!bDrawFocus) return CXFA_FFWidget::GetBBox(rtBox, dwStatus); - XFA_ELEMENT type = (XFA_ELEMENT)m_pDataAcc->GetUIType(); - if (type == XFA_ELEMENT_Button || type == XFA_ELEMENT_CheckButton || - type == XFA_ELEMENT_ImageEdit || type == XFA_ELEMENT_Signature || - type == XFA_ELEMENT_ChoiceList) { + XFA_Element type = m_pDataAcc->GetUIType(); + if (type == XFA_Element::Button || type == XFA_Element::CheckButton || + type == XFA_Element::ImageEdit || type == XFA_Element::Signature || + type == XFA_Element::ChoiceList) { rtBox = m_rtUI; CFX_Matrix mt; GetRotateMatrix(mt); @@ -127,9 +127,9 @@ void CXFA_FFField::UnloadWidget() { m_pNormalWidget = nullptr; } void CXFA_FFField::SetEditScrollOffset() { - XFA_ELEMENT eType = m_pDataAcc->GetUIType(); - if (eType == XFA_ELEMENT_TextEdit || eType == XFA_ELEMENT_NumericEdit || - eType == XFA_ELEMENT_PasswordEdit) { + XFA_Element eType = m_pDataAcc->GetUIType(); + if (eType == XFA_Element::TextEdit || eType == XFA_Element::NumericEdit || + eType == XFA_Element::PasswordEdit) { FX_FLOAT fScrollOffset = 0; CXFA_FFField* pPrev = static_cast(GetPrev()); if (pPrev) { @@ -323,7 +323,7 @@ void CXFA_FFField::UpdateFWL() { uint32_t CXFA_FFField::UpdateUIProperty() { CXFA_Node* pUiNode = m_pDataAcc->GetUIChild(); uint32_t dwStyle = 0; - if (pUiNode && pUiNode->GetClassID() == XFA_ELEMENT_DefaultUi) { + if (pUiNode && pUiNode->GetClassID() == XFA_Element::DefaultUi) { dwStyle = FWL_STYLEEXT_EDT_ReadOnly; } return dwStyle; -- cgit v1.2.3