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

Side by Side Diff: xfa/fxfa/app/xfa_ffchoicelist.cpp

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Mac XFA build Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/app/xfa_ffchoicelist.h" 7 #include "xfa/fxfa/app/xfa_ffchoicelist.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_edit.h" 9 #include "xfa/fwl/basewidget/ifwl_edit.h"
10 #include "xfa/fwl/core/fwl_noteimp.h" 10 #include "xfa/fwl/core/fwl_noteimp.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } else { 176 } else {
177 ((CFWL_ListBox*)m_pNormalWidget) 177 ((CFWL_ListBox*)m_pNormalWidget)
178 ->DeleteString(((CFWL_ListBox*)m_pNormalWidget)->GetItem(nIndex)); 178 ->DeleteString(((CFWL_ListBox*)m_pNormalWidget)->GetItem(nIndex));
179 } 179 }
180 m_pNormalWidget->Update(); 180 m_pNormalWidget->Update();
181 AddInvalidateRect(); 181 AddInvalidateRect();
182 } 182 }
183 int32_t CXFA_FFListBox::OnProcessMessage(CFWL_Message* pMessage) { 183 int32_t CXFA_FFListBox::OnProcessMessage(CFWL_Message* pMessage) {
184 return m_pOldDelegate->OnProcessMessage(pMessage); 184 return m_pOldDelegate->OnProcessMessage(pMessage);
185 } 185 }
186 FWL_ERR CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) { 186 FWL_Error CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) {
187 CXFA_FFField::OnProcessEvent(pEvent); 187 CXFA_FFField::OnProcessEvent(pEvent);
188 switch (pEvent->GetClassID()) { 188 switch (pEvent->GetClassID()) {
189 case CFWL_EventType::SelectChanged: { 189 case CFWL_EventType::SelectChanged: {
190 CFX_Int32Array arrSels; 190 CFX_Int32Array arrSels;
191 OnSelectChanged(m_pNormalWidget->GetWidget(), arrSels); 191 OnSelectChanged(m_pNormalWidget->GetWidget(), arrSels);
192 break; 192 break;
193 } 193 }
194 default: 194 default:
195 break; 195 break;
196 } 196 }
197 return m_pOldDelegate->OnProcessEvent(pEvent); 197 return m_pOldDelegate->OnProcessEvent(pEvent);
198 } 198 }
199 FWL_ERR CXFA_FFListBox::OnDrawWidget(CFX_Graphics* pGraphics, 199 FWL_Error CXFA_FFListBox::OnDrawWidget(CFX_Graphics* pGraphics,
200 const CFX_Matrix* pMatrix) { 200 const CFX_Matrix* pMatrix) {
201 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); 201 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
202 } 202 }
203 203
204 CXFA_FFComboBox::CXFA_FFComboBox(CXFA_FFPageView* pPageView, 204 CXFA_FFComboBox::CXFA_FFComboBox(CXFA_FFPageView* pPageView,
205 CXFA_WidgetAcc* pDataAcc) 205 CXFA_WidgetAcc* pDataAcc)
206 : CXFA_FFField(pPageView, pDataAcc), m_pOldDelegate(NULL) {} 206 : CXFA_FFField(pPageView, pDataAcc), m_pOldDelegate(NULL) {}
207 207
208 CXFA_FFComboBox::~CXFA_FFComboBox() {} 208 CXFA_FFComboBox::~CXFA_FFComboBox() {}
209 209
210 FX_BOOL CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox, 210 FX_BOOL CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox,
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 CXFA_EventParam eParam; 492 CXFA_EventParam eParam;
493 eParam.m_eType = XFA_EVENT_PostOpen; 493 eParam.m_eType = XFA_EVENT_PostOpen;
494 eParam.m_pTarget = m_pDataAcc; 494 eParam.m_pTarget = m_pDataAcc;
495 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PostOpen, &eParam); 495 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PostOpen, &eParam);
496 } 496 }
497 497
498 int32_t CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) { 498 int32_t CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) {
499 return m_pOldDelegate->OnProcessMessage(pMessage); 499 return m_pOldDelegate->OnProcessMessage(pMessage);
500 } 500 }
501 501
502 FWL_ERR CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) { 502 FWL_Error CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) {
503 CXFA_FFField::OnProcessEvent(pEvent); 503 CXFA_FFField::OnProcessEvent(pEvent);
504 switch (pEvent->GetClassID()) { 504 switch (pEvent->GetClassID()) {
505 case CFWL_EventType::SelectChanged: { 505 case CFWL_EventType::SelectChanged: {
506 CFWL_EvtCmbSelChanged* postEvent = (CFWL_EvtCmbSelChanged*)pEvent; 506 CFWL_EvtCmbSelChanged* postEvent = (CFWL_EvtCmbSelChanged*)pEvent;
507 OnSelectChanged(m_pNormalWidget->GetWidget(), postEvent->iArraySels, 507 OnSelectChanged(m_pNormalWidget->GetWidget(), postEvent->iArraySels,
508 postEvent->bLButtonUp); 508 postEvent->bLButtonUp);
509 break; 509 break;
510 } 510 }
511 case CFWL_EventType::EditChanged: { 511 case CFWL_EventType::EditChanged: {
512 CFX_WideString wsChanged; 512 CFX_WideString wsChanged;
513 OnTextChanged(m_pNormalWidget->GetWidget(), wsChanged); 513 OnTextChanged(m_pNormalWidget->GetWidget(), wsChanged);
514 break; 514 break;
515 } 515 }
516 case CFWL_EventType::PreDropDown: { 516 case CFWL_EventType::PreDropDown: {
517 OnPreOpen(m_pNormalWidget->GetWidget()); 517 OnPreOpen(m_pNormalWidget->GetWidget());
518 break; 518 break;
519 } 519 }
520 case CFWL_EventType::PostDropDown: { 520 case CFWL_EventType::PostDropDown: {
521 OnPostOpen(m_pNormalWidget->GetWidget()); 521 OnPostOpen(m_pNormalWidget->GetWidget());
522 break; 522 break;
523 } 523 }
524 default: 524 default:
525 break; 525 break;
526 } 526 }
527 return m_pOldDelegate->OnProcessEvent(pEvent); 527 return m_pOldDelegate->OnProcessEvent(pEvent);
528 } 528 }
529 529
530 FWL_ERR CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics, 530 FWL_Error CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics,
531 const CFX_Matrix* pMatrix) { 531 const CFX_Matrix* pMatrix) {
532 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); 532 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
533 } 533 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698