| OLD | NEW |
| 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/ifwl_app.h" | 10 #include "xfa/fwl/core/ifwl_app.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 CXFA_FFField::OnKillFocus(pNewFocus); | 70 CXFA_FFField::OnKillFocus(pNewFocus); |
| 71 return TRUE; | 71 return TRUE; |
| 72 } | 72 } |
| 73 FX_BOOL CXFA_FFListBox::CommitData() { | 73 FX_BOOL CXFA_FFListBox::CommitData() { |
| 74 CFWL_ListBox* pListBox = static_cast<CFWL_ListBox*>(m_pNormalWidget); | 74 CFWL_ListBox* pListBox = static_cast<CFWL_ListBox*>(m_pNormalWidget); |
| 75 int32_t iSels = pListBox->CountSelItems(); | 75 int32_t iSels = pListBox->CountSelItems(); |
| 76 CFX_Int32Array iSelArray; | 76 CFX_Int32Array iSelArray; |
| 77 for (int32_t i = 0; i < iSels; i++) { | 77 for (int32_t i = 0; i < iSels; i++) { |
| 78 iSelArray.Add(pListBox->GetSelIndex(i)); | 78 iSelArray.Add(pListBox->GetSelIndex(i)); |
| 79 } | 79 } |
| 80 m_pDataAcc->SetSelectdItems(iSelArray, TRUE); | 80 m_pDataAcc->SetSelectedItems(iSelArray, TRUE); |
| 81 return TRUE; | 81 return TRUE; |
| 82 } | 82 } |
| 83 FX_BOOL CXFA_FFListBox::IsDataChanged() { | 83 FX_BOOL CXFA_FFListBox::IsDataChanged() { |
| 84 CFX_Int32Array iSelArray; | 84 CFX_Int32Array iSelArray; |
| 85 m_pDataAcc->GetSelectedItems(iSelArray); | 85 m_pDataAcc->GetSelectedItems(iSelArray); |
| 86 int32_t iOldSels = iSelArray.GetSize(); | 86 int32_t iOldSels = iSelArray.GetSize(); |
| 87 CFWL_ListBox* pListBox = (CFWL_ListBox*)m_pNormalWidget; | 87 CFWL_ListBox* pListBox = (CFWL_ListBox*)m_pNormalWidget; |
| 88 int32_t iSels = pListBox->CountSelItems(); | 88 int32_t iSels = pListBox->CountSelItems(); |
| 89 if (iOldSels == iSels) { | 89 if (iOldSels == iSels) { |
| 90 int32_t iIndex = 0; | 90 int32_t iIndex = 0; |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 break; | 522 break; |
| 523 } | 523 } |
| 524 default: {} | 524 default: {} |
| 525 } | 525 } |
| 526 return m_pOldDelegate->OnProcessEvent(pEvent); | 526 return m_pOldDelegate->OnProcessEvent(pEvent); |
| 527 } | 527 } |
| 528 FWL_ERR CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics, | 528 FWL_ERR CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics, |
| 529 const CFX_Matrix* pMatrix) { | 529 const CFX_Matrix* pMatrix) { |
| 530 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); | 530 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); |
| 531 } | 531 } |
| OLD | NEW |