From 5d9da0c1255a75dd9b7b2005f8b7d6ae4948feaf Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 21 Apr 2016 13:12:06 -0700 Subject: Remove CFWL_Note. This CL removes the CFWL_Note class. The two subclasses, CFWL_Event and CFWL_Message are distinct types and should not be related by the subclass. The code has been updated to pass the correct types as needed. The various FWL_EVTHASH and FWL_MSGHASH defines have all been removed and turned into an FWL_EventType and FWL_MessageType enum classes. BUG=pdfium:474 Review URL: https://codereview.chromium.org/1901183002 --- xfa/fxfa/app/xfa_ffcheckbutton.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'xfa/fxfa/app/xfa_ffcheckbutton.cpp') diff --git a/xfa/fxfa/app/xfa_ffcheckbutton.cpp b/xfa/fxfa/app/xfa_ffcheckbutton.cpp index 85f445fedc..4527afef7d 100644 --- a/xfa/fxfa/app/xfa_ffcheckbutton.cpp +++ b/xfa/fxfa/app/xfa_ffcheckbutton.cpp @@ -298,11 +298,11 @@ FX_BOOL CXFA_FFCheckButton::UpdateFWLData() { int32_t CXFA_FFCheckButton::OnProcessMessage(CFWL_Message* pMessage) { return m_pOldDelegate->OnProcessMessage(pMessage); } + FWL_ERR CXFA_FFCheckButton::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); - uint32_t dwEventID = pEvent->GetClassID(); - switch (dwEventID) { - case FWL_EVTHASH_CKB_CheckStateChanged: { + switch (pEvent->GetClassID()) { + case CFWL_EventType::CheckStateChanged: { CXFA_EventParam eParam; eParam.m_eType = XFA_EVENT_Change; m_pDataAcc->GetValue(eParam.m_wsNewText, XFA_VALUEPICTURE_Raw); @@ -327,10 +327,12 @@ FWL_ERR CXFA_FFCheckButton::OnProcessEvent(CFWL_Event* pEvent) { m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); break; } - default: {} + default: + break; } return m_pOldDelegate->OnProcessEvent(pEvent); } + FWL_ERR CXFA_FFCheckButton::OnDrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) { return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); -- cgit v1.2.3