From 098f454bddc57c9af00d725132a6d9ad8bdb171f Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 17 Nov 2016 09:25:05 -0800 Subject: Move the IFWL_Edit Events out of ifwl_edit.h This Cl moves the edit events to actual class files and renames to drop the Edt from the names. Review-Url: https://codereview.chromium.org/2515463002 --- xfa/fxfa/app/xfa_fftextedit.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'xfa/fxfa/app/xfa_fftextedit.cpp') diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp index 1c6c28352b..8475f293d3 100644 --- a/xfa/fxfa/app/xfa_fftextedit.cpp +++ b/xfa/fxfa/app/xfa_fftextedit.cpp @@ -10,11 +10,13 @@ #include "xfa/fwl/core/cfwl_datetimepicker.h" #include "xfa/fwl/core/cfwl_edit.h" +#include "xfa/fwl/core/cfwl_evtcheckword.h" +#include "xfa/fwl/core/cfwl_evttextchanged.h" +#include "xfa/fwl/core/cfwl_evtvalidate.h" #include "xfa/fwl/core/cfwl_msgkillfocus.h" #include "xfa/fwl/core/cfwl_msgmouse.h" #include "xfa/fwl/core/cfwl_msgsetfocus.h" #include "xfa/fwl/core/fwl_noteimp.h" -#include "xfa/fwl/core/ifwl_edit.h" #include "xfa/fxfa/app/xfa_fffield.h" #include "xfa/fxfa/app/xfa_fwladapter.h" #include "xfa/fxfa/app/xfa_textlayout.h" @@ -338,7 +340,7 @@ void CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); switch (pEvent->GetClassID()) { case CFWL_EventType::TextChanged: { - CFWL_EvtEdtTextChanged* event = (CFWL_EvtEdtTextChanged*)pEvent; + CFWL_EvtTextChanged* event = static_cast(pEvent); CFX_WideString wsChange; OnTextChanged(m_pNormalWidget->GetWidget(), wsChange, event->wsPrevText); break; @@ -349,7 +351,7 @@ void CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) { } case CFWL_EventType::CheckWord: { CFX_WideString wstr(L"FWL_EVENT_DTP_SelectChanged"); - CFWL_EvtEdtCheckWord* event = (CFWL_EvtEdtCheckWord*)pEvent; + CFWL_EvtCheckWord* event = static_cast(pEvent); event->bCheckWord = CheckWord(event->bsWord.AsStringC()); break; } @@ -417,9 +419,9 @@ void CXFA_FFNumericEdit::UpdateWidgetProperty() { void CXFA_FFNumericEdit::OnProcessEvent(CFWL_Event* pEvent) { if (pEvent->GetClassID() == CFWL_EventType::Validate) { - CFWL_EvtEdtValidate* event = (CFWL_EvtEdtValidate*)pEvent; - CFX_WideString wsChange = event->wsInsert; - event->bValidate = OnValidate(m_pNormalWidget->GetWidget(), wsChange); + CFWL_EvtValidate* event = static_cast(pEvent); + event->bValidate = + OnValidate(m_pNormalWidget->GetWidget(), event->wsInsert); return; } CXFA_FFTextEdit::OnProcessEvent(pEvent); -- cgit v1.2.3