| 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_listbox.h" | 7 #include "fpdfsdk/formfiller/cffl_listbox.h" |
| 8 | 8 |
| 9 #include "fpdfsdk/cpdfsdk_formfillenvironment.h" | 9 #include "fpdfsdk/cpdfsdk_formfillenvironment.h" |
| 10 #include "fpdfsdk/cpdfsdk_widget.h" | 10 #include "fpdfsdk/cpdfsdk_widget.h" |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 int32_t nCurSel = m_pWidget->GetSelectedIndex(0); | 157 int32_t nCurSel = m_pWidget->GetSelectedIndex(0); |
| 158 if (nCurSel >= 0) | 158 if (nCurSel >= 0) |
| 159 fa.sValue = m_pWidget->GetOptionLabel(nCurSel); | 159 fa.sValue = m_pWidget->GetOptionLabel(nCurSel); |
| 160 } | 160 } |
| 161 break; | 161 break; |
| 162 default: | 162 default: |
| 163 break; | 163 break; |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | 166 |
| 167 void CFFL_ListBox::SetActionData(CPDFSDK_PageView* pPageView, | |
| 168 CPDF_AAction::AActionType type, | |
| 169 const PDFSDK_FieldAction& fa) {} | |
| 170 | |
| 171 void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView) { | 167 void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView) { |
| 172 ASSERT(pPageView); | 168 ASSERT(pPageView); |
| 173 | 169 |
| 174 if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) { | 170 if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) { |
| 175 for (int32_t i = 0, sz = pListBox->GetCount(); i < sz; i++) { | 171 for (int32_t i = 0, sz = pListBox->GetCount(); i < sz; i++) { |
| 176 if (pListBox->IsItemSelected(i)) { | 172 if (pListBox->IsItemSelected(i)) { |
| 177 m_State.Add(i); | 173 m_State.Add(i); |
| 178 } | 174 } |
| 179 } | 175 } |
| 180 } | 176 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 200 RestoreState(pPageView); | 196 RestoreState(pPageView); |
| 201 pRet = GetPDFWindow(pPageView, FALSE); | 197 pRet = GetPDFWindow(pPageView, FALSE); |
| 202 } else { | 198 } else { |
| 203 pRet = GetPDFWindow(pPageView, TRUE); | 199 pRet = GetPDFWindow(pPageView, TRUE); |
| 204 } | 200 } |
| 205 | 201 |
| 206 m_pWidget->UpdateField(); | 202 m_pWidget->UpdateField(); |
| 207 | 203 |
| 208 return pRet; | 204 return pRet; |
| 209 } | 205 } |
| OLD | NEW |