| 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_iformfiller.h" | 7 #include "fpdfsdk/formfiller/cffl_iformfiller.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" | 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" |
| 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 655 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); |
| 656 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 656 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); |
| 657 fa.bWillCommit = TRUE; | 657 fa.bWillCommit = TRUE; |
| 658 fa.bKeyDown = TRUE; | 658 fa.bKeyDown = TRUE; |
| 659 fa.bRC = TRUE; | 659 fa.bRC = TRUE; |
| 660 | 660 |
| 661 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE); | 661 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE); |
| 662 pFormFiller->GetActionData(pPageView, CPDF_AAction::KeyStroke, fa); | 662 pFormFiller->GetActionData(pPageView, CPDF_AAction::KeyStroke, fa); |
| 663 pFormFiller->SaveState(pPageView); | 663 pFormFiller->SaveState(pPageView); |
| 664 | 664 |
| 665 PDFSDK_FieldAction faOld = fa; | |
| 666 pWidget->OnAAction(CPDF_AAction::KeyStroke, fa, pPageView); | 665 pWidget->OnAAction(CPDF_AAction::KeyStroke, fa, pPageView); |
| 667 | 666 |
| 668 bRC = fa.bRC; | 667 bRC = fa.bRC; |
| 669 m_bNotifying = FALSE; | 668 m_bNotifying = FALSE; |
| 670 } | 669 } |
| 671 } | 670 } |
| 672 } | 671 } |
| 673 | 672 |
| 674 void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, | 673 void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, |
| 675 CPDFSDK_PageView* pPageView, | 674 CPDFSDK_PageView* pPageView, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 686 PDFSDK_FieldAction fa; | 685 PDFSDK_FieldAction fa; |
| 687 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 686 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); |
| 688 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 687 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); |
| 689 fa.bKeyDown = TRUE; | 688 fa.bKeyDown = TRUE; |
| 690 fa.bRC = TRUE; | 689 fa.bRC = TRUE; |
| 691 | 690 |
| 692 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE); | 691 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE); |
| 693 pFormFiller->GetActionData(pPageView, CPDF_AAction::Validate, fa); | 692 pFormFiller->GetActionData(pPageView, CPDF_AAction::Validate, fa); |
| 694 pFormFiller->SaveState(pPageView); | 693 pFormFiller->SaveState(pPageView); |
| 695 | 694 |
| 696 PDFSDK_FieldAction faOld = fa; | |
| 697 pWidget->OnAAction(CPDF_AAction::Validate, fa, pPageView); | 695 pWidget->OnAAction(CPDF_AAction::Validate, fa, pPageView); |
| 698 | 696 |
| 699 bRC = fa.bRC; | 697 bRC = fa.bRC; |
| 700 m_bNotifying = FALSE; | 698 m_bNotifying = FALSE; |
| 701 } | 699 } |
| 702 } | 700 } |
| 703 } | 701 } |
| 704 | 702 |
| 705 void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, | 703 void CFFL_IFormFiller::OnCalculate(CPDFSDK_Widget* pWidget, |
| 706 CPDFSDK_PageView* pPageView, | 704 CPDFSDK_PageView* pPageView, |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1005 bExit = TRUE; | 1003 bExit = TRUE; |
| 1006 m_bNotifying = FALSE; | 1004 m_bNotifying = FALSE; |
| 1007 return; | 1005 return; |
| 1008 } | 1006 } |
| 1009 } | 1007 } |
| 1010 | 1008 |
| 1011 m_bNotifying = FALSE; | 1009 m_bNotifying = FALSE; |
| 1012 } | 1010 } |
| 1013 } | 1011 } |
| 1014 } | 1012 } |
| OLD | NEW |