| 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/FFL_FormFiller.h" | 7 #include "../../include/formfiller/FFL_FormFiller.h" |
| 8 #include "../../include/formfiller/FFL_IFormFiller.h" | 8 #include "../../include/formfiller/FFL_IFormFiller.h" |
| 9 #include "../../include/formfiller/FFL_CheckBox.h" | 9 #include "../../include/formfiller/FFL_CheckBox.h" |
| 10 #include "../../include/formfiller/FFL_ComboBox.h" | 10 #include "../../include/formfiller/FFL_ComboBox.h" |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 if (pWidget->IsAppModified()) { | 456 if (pWidget->IsAppModified()) { |
| 457 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { | 457 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { |
| 458 pFormFiller->ResetPDFWindow(pPageView, | 458 pFormFiller->ResetPDFWindow(pPageView, |
| 459 nValueAge == pWidget->GetValueAge()); | 459 nValueAge == pWidget->GetValueAge()); |
| 460 } | 460 } |
| 461 } | 461 } |
| 462 } | 462 } |
| 463 } | 463 } |
| 464 | 464 |
| 465 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE)) | 465 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, TRUE)) |
| 466 return pFormFiller->SetFocusForAnnot(pAnnot, nFlag); | 466 pFormFiller->SetFocusForAnnot(pAnnot, nFlag); |
| 467 | 467 |
| 468 return TRUE; | 468 return TRUE; |
| 469 } | 469 } |
| 470 | 470 |
| 471 FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) { | 471 FX_BOOL CFFL_IFormFiller::OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) { |
| 472 if (!pAnnot) | 472 if (!pAnnot) |
| 473 return FALSE; | 473 return FALSE; |
| 474 ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget"); | 474 ASSERT(pAnnot->GetPDFAnnot()->GetSubType() == "Widget"); |
| 475 | 475 |
| 476 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { | 476 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pAnnot, FALSE)) { |
| 477 if (!pFormFiller->KillFocusForAnnot(pAnnot, nFlag)) | 477 pFormFiller->KillFocusForAnnot(pAnnot, nFlag); |
| 478 return FALSE; | |
| 479 | 478 |
| 480 if (!m_bNotifying) { | 479 if (!m_bNotifying) { |
| 481 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 480 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
| 482 if (pWidget->GetAAction(CPDF_AAction::LoseFocus)) { | 481 if (pWidget->GetAAction(CPDF_AAction::LoseFocus)) { |
| 483 m_bNotifying = TRUE; | 482 m_bNotifying = TRUE; |
| 484 pWidget->ClearAppModified(); | 483 pWidget->ClearAppModified(); |
| 485 | 484 |
| 486 CPDFSDK_PageView* pPageView = pWidget->GetPageView(); | 485 CPDFSDK_PageView* pPageView = pWidget->GetPageView(); |
| 487 ASSERT(pPageView != NULL); | 486 ASSERT(pPageView != NULL); |
| 488 | 487 |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 FX_BOOL& bExit, | 1084 FX_BOOL& bExit, |
| 1086 FX_DWORD nFlag) { | 1085 FX_DWORD nFlag) { |
| 1087 CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; | 1086 CFFL_PrivateData* pData = (CFFL_PrivateData*)pPrivateData; |
| 1088 ASSERT(pData->pWidget); | 1087 ASSERT(pData->pWidget); |
| 1089 | 1088 |
| 1090 CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, FALSE); | 1089 CFFL_FormFiller* pFormFiller = GetFormFiller(pData->pWidget, FALSE); |
| 1091 | 1090 |
| 1092 if (!bEditOrList) | 1091 if (!bEditOrList) |
| 1093 pFormFiller->OnKeyStroke(bExit, nFlag); | 1092 pFormFiller->OnKeyStroke(bExit, nFlag); |
| 1094 } | 1093 } |
| OLD | NEW |