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 "fpdfsdk/formfiller/cffl_combobox.h" | 7 #include "fpdfsdk/formfiller/cffl_combobox.h" |
8 | 8 |
9 #include "fpdfsdk/formfiller/cba_fontmap.h" | 9 #include "fpdfsdk/formfiller/cba_fontmap.h" |
10 #include "fpdfsdk/formfiller/cffl_formfiller.h" | 10 #include "fpdfsdk/formfiller/cffl_formfiller.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 for (int32_t i = 0, sz = m_pWidget->CountOptions(); i < sz; i++) { | 67 for (int32_t i = 0, sz = m_pWidget->CountOptions(); i < sz; i++) { |
68 pWnd->AddString(m_pWidget->GetOptionLabel(i)); | 68 pWnd->AddString(m_pWidget->GetOptionLabel(i)); |
69 } | 69 } |
70 | 70 |
71 pWnd->SetSelect(nCurSel); | 71 pWnd->SetSelect(nCurSel); |
72 pWnd->SetText(swText); | 72 pWnd->SetText(swText); |
73 return pWnd; | 73 return pWnd; |
74 } | 74 } |
75 | 75 |
76 FX_BOOL CFFL_ComboBox::OnChar(CPDFSDK_Annot* pAnnot, | 76 FX_BOOL CFFL_ComboBox::OnChar(CPDFSDK_Annot* pAnnot, |
77 FX_UINT nChar, | 77 uint32_t nChar, |
78 FX_UINT nFlags) { | 78 uint32_t nFlags) { |
79 return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); | 79 return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); |
80 } | 80 } |
81 | 81 |
82 FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView) { | 82 FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView) { |
83 CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE); | 83 CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE); |
84 if (!pWnd) | 84 if (!pWnd) |
85 return FALSE; | 85 return FALSE; |
86 | 86 |
87 int32_t nCurSel = pWnd->GetSelect(); | 87 int32_t nCurSel = pWnd->GetSelect(); |
88 if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT)) | 88 if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT)) |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 if (nExport >= 0) { | 289 if (nExport >= 0) { |
290 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) { | 290 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) { |
291 swRet = pFormField->GetOptionValue(nExport); | 291 swRet = pFormField->GetOptionValue(nExport); |
292 if (swRet.IsEmpty()) | 292 if (swRet.IsEmpty()) |
293 swRet = pFormField->GetOptionLabel(nExport); | 293 swRet = pFormField->GetOptionLabel(nExport); |
294 } | 294 } |
295 } | 295 } |
296 | 296 |
297 return swRet; | 297 return swRet; |
298 } | 298 } |
OLD | NEW |