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

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

Issue 1952693003: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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
« no previous file with comments | « xfa/fxfa/app/xfa_ffchoicelist.h ('k') | xfa/fxfa/app/xfa_fffield.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 void CXFA_FFListBox::DeleteItem(int32_t nIndex) { 173 void CXFA_FFListBox::DeleteItem(int32_t nIndex) {
174 if (nIndex < 0) { 174 if (nIndex < 0) {
175 ((CFWL_ListBox*)m_pNormalWidget)->DeleteAll(); 175 ((CFWL_ListBox*)m_pNormalWidget)->DeleteAll();
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
184 return m_pOldDelegate->OnProcessMessage(pMessage); 184 void CXFA_FFListBox::OnProcessMessage(CFWL_Message* pMessage) {
185 m_pOldDelegate->OnProcessMessage(pMessage);
185 } 186 }
186 FWL_ERR CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) { 187
188 void CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) {
187 CXFA_FFField::OnProcessEvent(pEvent); 189 CXFA_FFField::OnProcessEvent(pEvent);
188 switch (pEvent->GetClassID()) { 190 switch (pEvent->GetClassID()) {
189 case CFWL_EventType::SelectChanged: { 191 case CFWL_EventType::SelectChanged: {
190 CFX_Int32Array arrSels; 192 CFX_Int32Array arrSels;
191 OnSelectChanged(m_pNormalWidget->GetWidget(), arrSels); 193 OnSelectChanged(m_pNormalWidget->GetWidget(), arrSels);
192 break; 194 break;
193 } 195 }
194 default: 196 default:
195 break; 197 break;
196 } 198 }
197 return m_pOldDelegate->OnProcessEvent(pEvent); 199 m_pOldDelegate->OnProcessEvent(pEvent);
198 } 200 }
199 FWL_ERR CXFA_FFListBox::OnDrawWidget(CFX_Graphics* pGraphics, 201 void CXFA_FFListBox::OnDrawWidget(CFX_Graphics* pGraphics,
200 const CFX_Matrix* pMatrix) { 202 const CFX_Matrix* pMatrix) {
201 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); 203 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
202 } 204 }
203 205
204 CXFA_FFComboBox::CXFA_FFComboBox(CXFA_FFPageView* pPageView, 206 CXFA_FFComboBox::CXFA_FFComboBox(CXFA_FFPageView* pPageView,
205 CXFA_WidgetAcc* pDataAcc) 207 CXFA_WidgetAcc* pDataAcc)
206 : CXFA_FFField(pPageView, pDataAcc), m_pOldDelegate(NULL) {} 208 : CXFA_FFField(pPageView, pDataAcc), m_pOldDelegate(NULL) {}
207 209
208 CXFA_FFComboBox::~CXFA_FFComboBox() {} 210 CXFA_FFComboBox::~CXFA_FFComboBox() {}
209 211
210 FX_BOOL CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox, 212 FX_BOOL CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox,
211 uint32_t dwStatus, 213 uint32_t dwStatus,
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 eParam.m_pTarget = m_pDataAcc; 490 eParam.m_pTarget = m_pDataAcc;
489 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PreOpen, &eParam); 491 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PreOpen, &eParam);
490 } 492 }
491 void CXFA_FFComboBox::OnPostOpen(IFWL_Widget* pWidget) { 493 void CXFA_FFComboBox::OnPostOpen(IFWL_Widget* pWidget) {
492 CXFA_EventParam eParam; 494 CXFA_EventParam eParam;
493 eParam.m_eType = XFA_EVENT_PostOpen; 495 eParam.m_eType = XFA_EVENT_PostOpen;
494 eParam.m_pTarget = m_pDataAcc; 496 eParam.m_pTarget = m_pDataAcc;
495 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PostOpen, &eParam); 497 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PostOpen, &eParam);
496 } 498 }
497 499
498 int32_t CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) { 500 void CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) {
499 return m_pOldDelegate->OnProcessMessage(pMessage); 501 m_pOldDelegate->OnProcessMessage(pMessage);
500 } 502 }
501 503
502 FWL_ERR CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) { 504 void CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) {
503 CXFA_FFField::OnProcessEvent(pEvent); 505 CXFA_FFField::OnProcessEvent(pEvent);
504 switch (pEvent->GetClassID()) { 506 switch (pEvent->GetClassID()) {
505 case CFWL_EventType::SelectChanged: { 507 case CFWL_EventType::SelectChanged: {
506 CFWL_EvtCmbSelChanged* postEvent = (CFWL_EvtCmbSelChanged*)pEvent; 508 CFWL_EvtCmbSelChanged* postEvent = (CFWL_EvtCmbSelChanged*)pEvent;
507 OnSelectChanged(m_pNormalWidget->GetWidget(), postEvent->iArraySels, 509 OnSelectChanged(m_pNormalWidget->GetWidget(), postEvent->iArraySels,
508 postEvent->bLButtonUp); 510 postEvent->bLButtonUp);
509 break; 511 break;
510 } 512 }
511 case CFWL_EventType::EditChanged: { 513 case CFWL_EventType::EditChanged: {
512 CFX_WideString wsChanged; 514 CFX_WideString wsChanged;
513 OnTextChanged(m_pNormalWidget->GetWidget(), wsChanged); 515 OnTextChanged(m_pNormalWidget->GetWidget(), wsChanged);
514 break; 516 break;
515 } 517 }
516 case CFWL_EventType::PreDropDown: { 518 case CFWL_EventType::PreDropDown: {
517 OnPreOpen(m_pNormalWidget->GetWidget()); 519 OnPreOpen(m_pNormalWidget->GetWidget());
518 break; 520 break;
519 } 521 }
520 case CFWL_EventType::PostDropDown: { 522 case CFWL_EventType::PostDropDown: {
521 OnPostOpen(m_pNormalWidget->GetWidget()); 523 OnPostOpen(m_pNormalWidget->GetWidget());
522 break; 524 break;
523 } 525 }
524 default: 526 default:
525 break; 527 break;
526 } 528 }
527 return m_pOldDelegate->OnProcessEvent(pEvent); 529 m_pOldDelegate->OnProcessEvent(pEvent);
528 } 530 }
529 531
530 FWL_ERR CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics, 532 void CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics,
531 const CFX_Matrix* pMatrix) { 533 const CFX_Matrix* pMatrix) {
532 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); 534 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
533 } 535 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffchoicelist.h ('k') | xfa/fxfa/app/xfa_fffield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698