Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Unified Diff: xfa/fxfa/app/xfa_fffield.cpp

Issue 2089443002: Convert XFA_ELEMENT to an enum class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: More unknown checks Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_ffdocview.cpp ('k') | xfa/fxfa/app/xfa_ffnotify.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_fffield.cpp
diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp
index 6d2f1e8db7394198be6818ea9da51780c13484d0..59374cdbec153e9e7b0e1a4cf88c324460f007fe 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<CXFA_FFField*>(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;
« no previous file with comments | « xfa/fxfa/app/xfa_ffdocview.cpp ('k') | xfa/fxfa/app/xfa_ffnotify.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698