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 "../../include/formfiller/FormFiller.h" | 7 #include "../../include/formfiller/FormFiller.h" |
8 #include "../../include/formfiller/FFL_FormFiller.h" | 8 #include "../../include/formfiller/FFL_FormFiller.h" |
9 #include "../../include/formfiller/FFL_IFormFiller.h" | 9 #include "../../include/formfiller/FFL_IFormFiller.h" |
10 #include "../../include/formfiller/FFL_CBA_Fontmap.h" | 10 #include "../../include/formfiller/FFL_CBA_Fontmap.h" |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 nCharacters, TRUE); | 304 nCharacters, TRUE); |
305 | 305 |
306 pEdit->SetEditNotify(this); | 306 pEdit->SetEditNotify(this); |
307 } | 307 } |
308 } | 308 } |
309 | 309 |
310 void CFFL_ComboBox::OnKillFocus(CPWL_Wnd* pWnd) { | 310 void CFFL_ComboBox::OnKillFocus(CPWL_Wnd* pWnd) { |
311 ASSERT(m_pApp != NULL); | 311 ASSERT(m_pApp != NULL); |
312 } | 312 } |
313 | 313 |
314 FX_BOOL CFFL_ComboBox::CanCopy(CPDFSDK_Document* pDocument) { | |
315 ASSERT(pDocument != NULL); | |
316 | |
317 return FALSE; | |
318 } | |
319 | |
320 FX_BOOL CFFL_ComboBox::CanCut(CPDFSDK_Document* pDocument) { | |
321 ASSERT(pDocument != NULL); | |
322 | |
323 return FALSE; | |
324 } | |
325 | |
326 FX_BOOL CFFL_ComboBox::CanPaste(CPDFSDK_Document* pDocument) { | |
327 ASSERT(pDocument != NULL); | |
328 | |
329 return FALSE; | |
330 } | |
331 | |
332 void CFFL_ComboBox::OnAddUndo(CPWL_Edit* pEdit) { | 314 void CFFL_ComboBox::OnAddUndo(CPWL_Edit* pEdit) { |
333 ASSERT(pEdit != NULL); | 315 ASSERT(pEdit != NULL); |
334 } | 316 } |
335 | 317 |
336 CFX_WideString CFFL_ComboBox::GetSelectExportText() { | 318 CFX_WideString CFFL_ComboBox::GetSelectExportText() { |
337 CFX_WideString swRet; | 319 CFX_WideString swRet; |
338 | 320 |
339 int nExport = -1; | 321 int nExport = -1; |
340 CPDFSDK_PageView* pPageView = GetCurPageView(); | 322 CPDFSDK_PageView* pPageView = GetCurPageView(); |
341 if (CPWL_ComboBox* pComboBox = | 323 if (CPWL_ComboBox* pComboBox = |
342 (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE)) { | 324 (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE)) { |
343 nExport = pComboBox->GetSelect(); | 325 nExport = pComboBox->GetSelect(); |
344 } | 326 } |
345 | 327 |
346 if (nExport >= 0) { | 328 if (nExport >= 0) { |
347 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) { | 329 if (CPDF_FormField* pFormField = m_pWidget->GetFormField()) { |
348 swRet = pFormField->GetOptionValue(nExport); | 330 swRet = pFormField->GetOptionValue(nExport); |
349 if (swRet.IsEmpty()) | 331 if (swRet.IsEmpty()) |
350 swRet = pFormField->GetOptionLabel(nExport); | 332 swRet = pFormField->GetOptionLabel(nExport); |
351 } | 333 } |
352 } | 334 } |
353 | 335 |
354 return swRet; | 336 return swRet; |
355 } | 337 } |
OLD | NEW |