| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 if (pWidget->GetAAction(CPDF_AAction::CursorEnter).GetDict()) { | 131 if (pWidget->GetAAction(CPDF_AAction::CursorEnter).GetDict()) { |
| 132 m_bNotifying = TRUE; | 132 m_bNotifying = TRUE; |
| 133 | 133 |
| 134 int nValueAge = pWidget->GetValueAge(); | 134 int nValueAge = pWidget->GetValueAge(); |
| 135 | 135 |
| 136 pWidget->ClearAppModified(); | 136 pWidget->ClearAppModified(); |
| 137 | 137 |
| 138 ASSERT(pPageView); | 138 ASSERT(pPageView); |
| 139 | 139 |
| 140 PDFSDK_FieldAction fa; | 140 PDFSDK_FieldAction fa; |
| 141 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 141 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 142 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 142 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 143 pWidget->OnAAction(CPDF_AAction::CursorEnter, fa, pPageView); | 143 pWidget->OnAAction(CPDF_AAction::CursorEnter, fa, pPageView); |
| 144 m_bNotifying = FALSE; | 144 m_bNotifying = FALSE; |
| 145 | 145 |
| 146 if (pWidget->IsAppModified()) { | 146 if (pWidget->IsAppModified()) { |
| 147 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { | 147 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { |
| 148 pFormFiller->ResetPDFWindow(pPageView, | 148 pFormFiller->ResetPDFWindow(pPageView, |
| 149 pWidget->GetValueAge() == nValueAge); | 149 pWidget->GetValueAge() == nValueAge); |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 } | 152 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 166 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 166 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
| 167 if (pWidget->GetAAction(CPDF_AAction::CursorExit).GetDict()) { | 167 if (pWidget->GetAAction(CPDF_AAction::CursorExit).GetDict()) { |
| 168 m_bNotifying = TRUE; | 168 m_bNotifying = TRUE; |
| 169 pWidget->GetAppearanceAge(); | 169 pWidget->GetAppearanceAge(); |
| 170 int nValueAge = pWidget->GetValueAge(); | 170 int nValueAge = pWidget->GetValueAge(); |
| 171 pWidget->ClearAppModified(); | 171 pWidget->ClearAppModified(); |
| 172 | 172 |
| 173 ASSERT(pPageView); | 173 ASSERT(pPageView); |
| 174 | 174 |
| 175 PDFSDK_FieldAction fa; | 175 PDFSDK_FieldAction fa; |
| 176 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 176 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 177 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 177 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 178 | 178 |
| 179 pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView); | 179 pWidget->OnAAction(CPDF_AAction::CursorExit, fa, pPageView); |
| 180 m_bNotifying = FALSE; | 180 m_bNotifying = FALSE; |
| 181 | 181 |
| 182 if (pWidget->IsAppModified()) { | 182 if (pWidget->IsAppModified()) { |
| 183 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { | 183 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { |
| 184 pFormFiller->ResetPDFWindow(pPageView, | 184 pFormFiller->ResetPDFWindow(pPageView, |
| 185 nValueAge == pWidget->GetValueAge()); | 185 nValueAge == pWidget->GetValueAge()); |
| 186 } | 186 } |
| 187 } | 187 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 204 if (Annot_HitTest(pPageView, pAnnot, point) && | 204 if (Annot_HitTest(pPageView, pAnnot, point) && |
| 205 pWidget->GetAAction(CPDF_AAction::ButtonDown).GetDict()) { | 205 pWidget->GetAAction(CPDF_AAction::ButtonDown).GetDict()) { |
| 206 m_bNotifying = TRUE; | 206 m_bNotifying = TRUE; |
| 207 pWidget->GetAppearanceAge(); | 207 pWidget->GetAppearanceAge(); |
| 208 int nValueAge = pWidget->GetValueAge(); | 208 int nValueAge = pWidget->GetValueAge(); |
| 209 pWidget->ClearAppModified(); | 209 pWidget->ClearAppModified(); |
| 210 | 210 |
| 211 ASSERT(pPageView); | 211 ASSERT(pPageView); |
| 212 | 212 |
| 213 PDFSDK_FieldAction fa; | 213 PDFSDK_FieldAction fa; |
| 214 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlags); | 214 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlags); |
| 215 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlags); | 215 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlags); |
| 216 pWidget->OnAAction(CPDF_AAction::ButtonDown, fa, pPageView); | 216 pWidget->OnAAction(CPDF_AAction::ButtonDown, fa, pPageView); |
| 217 m_bNotifying = FALSE; | 217 m_bNotifying = FALSE; |
| 218 | 218 |
| 219 if (!IsValidAnnot(pPageView, pAnnot)) | 219 if (!IsValidAnnot(pPageView, pAnnot)) |
| 220 return TRUE; | 220 return TRUE; |
| 221 | 221 |
| 222 if (pWidget->IsAppModified()) { | 222 if (pWidget->IsAppModified()) { |
| 223 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { | 223 if (CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE)) { |
| 224 pFormFiller->ResetPDFWindow(pPageView, | 224 pFormFiller->ResetPDFWindow(pPageView, |
| 225 nValueAge == pWidget->GetValueAge()); | 225 nValueAge == pWidget->GetValueAge()); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 if (!m_bNotifying) { | 286 if (!m_bNotifying) { |
| 287 if (pWidget->GetAAction(CPDF_AAction::ButtonUp).GetDict()) { | 287 if (pWidget->GetAAction(CPDF_AAction::ButtonUp).GetDict()) { |
| 288 m_bNotifying = TRUE; | 288 m_bNotifying = TRUE; |
| 289 int nAge = pWidget->GetAppearanceAge(); | 289 int nAge = pWidget->GetAppearanceAge(); |
| 290 int nValueAge = pWidget->GetValueAge(); | 290 int nValueAge = pWidget->GetValueAge(); |
| 291 | 291 |
| 292 ASSERT(pPageView); | 292 ASSERT(pPageView); |
| 293 | 293 |
| 294 PDFSDK_FieldAction fa; | 294 PDFSDK_FieldAction fa; |
| 295 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 295 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 296 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 296 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 297 | 297 |
| 298 pWidget->OnAAction(CPDF_AAction::ButtonUp, fa, pPageView); | 298 pWidget->OnAAction(CPDF_AAction::ButtonUp, fa, pPageView); |
| 299 m_bNotifying = FALSE; | 299 m_bNotifying = FALSE; |
| 300 | 300 |
| 301 if (!IsValidAnnot(pPageView, pWidget)) { | 301 if (!IsValidAnnot(pPageView, pWidget)) { |
| 302 bExit = TRUE; | 302 bExit = TRUE; |
| 303 return; | 303 return; |
| 304 } | 304 } |
| 305 | 305 |
| 306 if (nAge != pWidget->GetAppearanceAge()) { | 306 if (nAge != pWidget->GetAppearanceAge()) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 m_bNotifying = TRUE; | 419 m_bNotifying = TRUE; |
| 420 pWidget->GetAppearanceAge(); | 420 pWidget->GetAppearanceAge(); |
| 421 | 421 |
| 422 int nValueAge = pWidget->GetValueAge(); | 422 int nValueAge = pWidget->GetValueAge(); |
| 423 pWidget->ClearAppModified(); | 423 pWidget->ClearAppModified(); |
| 424 | 424 |
| 425 CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); | 425 CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); |
| 426 ASSERT(pPageView); | 426 ASSERT(pPageView); |
| 427 | 427 |
| 428 PDFSDK_FieldAction fa; | 428 PDFSDK_FieldAction fa; |
| 429 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 429 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 430 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 430 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 431 | 431 |
| 432 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, TRUE); | 432 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, TRUE); |
| 433 if (!pFormFiller) | 433 if (!pFormFiller) |
| 434 return FALSE; | 434 return FALSE; |
| 435 pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa); | 435 pFormFiller->GetActionData(pPageView, CPDF_AAction::GetFocus, fa); |
| 436 pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView); | 436 pWidget->OnAAction(CPDF_AAction::GetFocus, fa, pPageView); |
| 437 m_bNotifying = FALSE; | 437 m_bNotifying = FALSE; |
| 438 | 438 |
| 439 if (pWidget->IsAppModified()) { | 439 if (pWidget->IsAppModified()) { |
| 440 if (CFFL_FormFiller* pFiller = GetFormFiller(pWidget, FALSE)) { | 440 if (CFFL_FormFiller* pFiller = GetFormFiller(pWidget, FALSE)) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 462 if (!m_bNotifying) { | 462 if (!m_bNotifying) { |
| 463 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; | 463 CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; |
| 464 if (pWidget->GetAAction(CPDF_AAction::LoseFocus).GetDict()) { | 464 if (pWidget->GetAAction(CPDF_AAction::LoseFocus).GetDict()) { |
| 465 m_bNotifying = TRUE; | 465 m_bNotifying = TRUE; |
| 466 pWidget->ClearAppModified(); | 466 pWidget->ClearAppModified(); |
| 467 | 467 |
| 468 CPDFSDK_PageView* pPageView = pWidget->GetPageView(); | 468 CPDFSDK_PageView* pPageView = pWidget->GetPageView(); |
| 469 ASSERT(pPageView); | 469 ASSERT(pPageView); |
| 470 | 470 |
| 471 PDFSDK_FieldAction fa; | 471 PDFSDK_FieldAction fa; |
| 472 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 472 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 473 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 473 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 474 | 474 |
| 475 pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa); | 475 pFormFiller->GetActionData(pPageView, CPDF_AAction::LoseFocus, fa); |
| 476 | 476 |
| 477 pWidget->OnAAction(CPDF_AAction::LoseFocus, fa, pPageView); | 477 pWidget->OnAAction(CPDF_AAction::LoseFocus, fa, pPageView); |
| 478 m_bNotifying = FALSE; | 478 m_bNotifying = FALSE; |
| 479 } | 479 } |
| 480 } | 480 } |
| 481 } | 481 } |
| 482 | 482 |
| 483 return TRUE; | 483 return TRUE; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 FX_BOOL& bExit, | 641 FX_BOOL& bExit, |
| 642 uint32_t nFlag) { | 642 uint32_t nFlag) { |
| 643 if (!m_bNotifying) { | 643 if (!m_bNotifying) { |
| 644 if (pWidget->GetAAction(CPDF_AAction::KeyStroke).GetDict()) { | 644 if (pWidget->GetAAction(CPDF_AAction::KeyStroke).GetDict()) { |
| 645 m_bNotifying = TRUE; | 645 m_bNotifying = TRUE; |
| 646 pWidget->ClearAppModified(); | 646 pWidget->ClearAppModified(); |
| 647 | 647 |
| 648 ASSERT(pPageView); | 648 ASSERT(pPageView); |
| 649 | 649 |
| 650 PDFSDK_FieldAction fa; | 650 PDFSDK_FieldAction fa; |
| 651 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 651 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 652 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 652 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 653 fa.bWillCommit = TRUE; | 653 fa.bWillCommit = TRUE; |
| 654 fa.bKeyDown = TRUE; | 654 fa.bKeyDown = TRUE; |
| 655 fa.bRC = TRUE; | 655 fa.bRC = TRUE; |
| 656 | 656 |
| 657 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE); | 657 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE); |
| 658 pFormFiller->GetActionData(pPageView, CPDF_AAction::KeyStroke, fa); | 658 pFormFiller->GetActionData(pPageView, CPDF_AAction::KeyStroke, fa); |
| 659 pFormFiller->SaveState(pPageView); | 659 pFormFiller->SaveState(pPageView); |
| 660 | 660 |
| 661 pWidget->OnAAction(CPDF_AAction::KeyStroke, fa, pPageView); | 661 pWidget->OnAAction(CPDF_AAction::KeyStroke, fa, pPageView); |
| 662 | 662 |
| 663 bRC = fa.bRC; | 663 bRC = fa.bRC; |
| 664 m_bNotifying = FALSE; | 664 m_bNotifying = FALSE; |
| 665 } | 665 } |
| 666 } | 666 } |
| 667 } | 667 } |
| 668 | 668 |
| 669 void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, | 669 void CFFL_IFormFiller::OnValidate(CPDFSDK_Widget* pWidget, |
| 670 CPDFSDK_PageView* pPageView, | 670 CPDFSDK_PageView* pPageView, |
| 671 FX_BOOL& bRC, | 671 FX_BOOL& bRC, |
| 672 FX_BOOL& bExit, | 672 FX_BOOL& bExit, |
| 673 uint32_t nFlag) { | 673 uint32_t nFlag) { |
| 674 if (!m_bNotifying) { | 674 if (!m_bNotifying) { |
| 675 if (pWidget->GetAAction(CPDF_AAction::Validate).GetDict()) { | 675 if (pWidget->GetAAction(CPDF_AAction::Validate).GetDict()) { |
| 676 m_bNotifying = TRUE; | 676 m_bNotifying = TRUE; |
| 677 pWidget->ClearAppModified(); | 677 pWidget->ClearAppModified(); |
| 678 | 678 |
| 679 ASSERT(pPageView); | 679 ASSERT(pPageView); |
| 680 | 680 |
| 681 PDFSDK_FieldAction fa; | 681 PDFSDK_FieldAction fa; |
| 682 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 682 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 683 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 683 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 684 fa.bKeyDown = TRUE; | 684 fa.bKeyDown = TRUE; |
| 685 fa.bRC = TRUE; | 685 fa.bRC = TRUE; |
| 686 | 686 |
| 687 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE); | 687 CFFL_FormFiller* pFormFiller = GetFormFiller(pWidget, FALSE); |
| 688 pFormFiller->GetActionData(pPageView, CPDF_AAction::Validate, fa); | 688 pFormFiller->GetActionData(pPageView, CPDF_AAction::Validate, fa); |
| 689 pFormFiller->SaveState(pPageView); | 689 pFormFiller->SaveState(pPageView); |
| 690 | 690 |
| 691 pWidget->OnAAction(CPDF_AAction::Validate, fa, pPageView); | 691 pWidget->OnAAction(CPDF_AAction::Validate, fa, pPageView); |
| 692 | 692 |
| 693 bRC = fa.bRC; | 693 bRC = fa.bRC; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 FX_BOOL& bReset, | 740 FX_BOOL& bReset, |
| 741 FX_BOOL& bExit, | 741 FX_BOOL& bExit, |
| 742 FX_UINT nFlag) { | 742 FX_UINT nFlag) { |
| 743 if (!m_bNotifying) { | 743 if (!m_bNotifying) { |
| 744 if (pWidget->HasXFAAAction(PDFSDK_XFA_Click)) { | 744 if (pWidget->HasXFAAAction(PDFSDK_XFA_Click)) { |
| 745 m_bNotifying = TRUE; | 745 m_bNotifying = TRUE; |
| 746 int nAge = pWidget->GetAppearanceAge(); | 746 int nAge = pWidget->GetAppearanceAge(); |
| 747 int nValueAge = pWidget->GetValueAge(); | 747 int nValueAge = pWidget->GetValueAge(); |
| 748 | 748 |
| 749 PDFSDK_FieldAction fa; | 749 PDFSDK_FieldAction fa; |
| 750 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 750 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 751 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 751 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 752 | 752 |
| 753 pWidget->OnXFAAAction(PDFSDK_XFA_Click, fa, pPageView); | 753 pWidget->OnXFAAAction(PDFSDK_XFA_Click, fa, pPageView); |
| 754 m_bNotifying = FALSE; | 754 m_bNotifying = FALSE; |
| 755 | 755 |
| 756 if (!IsValidAnnot(pPageView, pWidget)) { | 756 if (!IsValidAnnot(pPageView, pWidget)) { |
| 757 bExit = TRUE; | 757 bExit = TRUE; |
| 758 return; | 758 return; |
| 759 } | 759 } |
| 760 | 760 |
| 761 if (nAge != pWidget->GetAppearanceAge()) { | 761 if (nAge != pWidget->GetAppearanceAge()) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 775 FX_BOOL& bReset, | 775 FX_BOOL& bReset, |
| 776 FX_BOOL& bExit, | 776 FX_BOOL& bExit, |
| 777 FX_UINT nFlag) { | 777 FX_UINT nFlag) { |
| 778 if (!m_bNotifying) { | 778 if (!m_bNotifying) { |
| 779 if (pWidget->HasXFAAAction(PDFSDK_XFA_Full)) { | 779 if (pWidget->HasXFAAAction(PDFSDK_XFA_Full)) { |
| 780 m_bNotifying = TRUE; | 780 m_bNotifying = TRUE; |
| 781 int nAge = pWidget->GetAppearanceAge(); | 781 int nAge = pWidget->GetAppearanceAge(); |
| 782 int nValueAge = pWidget->GetValueAge(); | 782 int nValueAge = pWidget->GetValueAge(); |
| 783 | 783 |
| 784 PDFSDK_FieldAction fa; | 784 PDFSDK_FieldAction fa; |
| 785 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 785 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 786 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 786 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 787 | 787 |
| 788 pWidget->OnXFAAAction(PDFSDK_XFA_Full, fa, pPageView); | 788 pWidget->OnXFAAAction(PDFSDK_XFA_Full, fa, pPageView); |
| 789 m_bNotifying = FALSE; | 789 m_bNotifying = FALSE; |
| 790 | 790 |
| 791 if (!IsValidAnnot(pPageView, pWidget)) { | 791 if (!IsValidAnnot(pPageView, pWidget)) { |
| 792 bExit = TRUE; | 792 bExit = TRUE; |
| 793 return; | 793 return; |
| 794 } | 794 } |
| 795 | 795 |
| 796 if (nAge != pWidget->GetAppearanceAge()) { | 796 if (nAge != pWidget->GetAppearanceAge()) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 FX_BOOL& bReset, | 842 FX_BOOL& bReset, |
| 843 FX_BOOL& bExit, | 843 FX_BOOL& bExit, |
| 844 FX_UINT nFlag) { | 844 FX_UINT nFlag) { |
| 845 if (!m_bNotifying) { | 845 if (!m_bNotifying) { |
| 846 if (pWidget->HasXFAAAction(PDFSDK_XFA_PreOpen)) { | 846 if (pWidget->HasXFAAAction(PDFSDK_XFA_PreOpen)) { |
| 847 m_bNotifying = TRUE; | 847 m_bNotifying = TRUE; |
| 848 int nAge = pWidget->GetAppearanceAge(); | 848 int nAge = pWidget->GetAppearanceAge(); |
| 849 int nValueAge = pWidget->GetValueAge(); | 849 int nValueAge = pWidget->GetValueAge(); |
| 850 | 850 |
| 851 PDFSDK_FieldAction fa; | 851 PDFSDK_FieldAction fa; |
| 852 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 852 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 853 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 853 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 854 | 854 |
| 855 pWidget->OnXFAAAction(PDFSDK_XFA_PreOpen, fa, pPageView); | 855 pWidget->OnXFAAAction(PDFSDK_XFA_PreOpen, fa, pPageView); |
| 856 m_bNotifying = FALSE; | 856 m_bNotifying = FALSE; |
| 857 | 857 |
| 858 if (!IsValidAnnot(pPageView, pWidget)) { | 858 if (!IsValidAnnot(pPageView, pWidget)) { |
| 859 bExit = TRUE; | 859 bExit = TRUE; |
| 860 return; | 860 return; |
| 861 } | 861 } |
| 862 | 862 |
| 863 if (nAge != pWidget->GetAppearanceAge()) { | 863 if (nAge != pWidget->GetAppearanceAge()) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 877 FX_BOOL& bReset, | 877 FX_BOOL& bReset, |
| 878 FX_BOOL& bExit, | 878 FX_BOOL& bExit, |
| 879 FX_UINT nFlag) { | 879 FX_UINT nFlag) { |
| 880 if (!m_bNotifying) { | 880 if (!m_bNotifying) { |
| 881 if (pWidget->HasXFAAAction(PDFSDK_XFA_PostOpen)) { | 881 if (pWidget->HasXFAAAction(PDFSDK_XFA_PostOpen)) { |
| 882 m_bNotifying = TRUE; | 882 m_bNotifying = TRUE; |
| 883 int nAge = pWidget->GetAppearanceAge(); | 883 int nAge = pWidget->GetAppearanceAge(); |
| 884 int nValueAge = pWidget->GetValueAge(); | 884 int nValueAge = pWidget->GetValueAge(); |
| 885 | 885 |
| 886 PDFSDK_FieldAction fa; | 886 PDFSDK_FieldAction fa; |
| 887 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 887 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 888 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 888 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 889 | 889 |
| 890 pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, fa, pPageView); | 890 pWidget->OnXFAAAction(PDFSDK_XFA_PostOpen, fa, pPageView); |
| 891 m_bNotifying = FALSE; | 891 m_bNotifying = FALSE; |
| 892 | 892 |
| 893 if (!IsValidAnnot(pPageView, pWidget)) { | 893 if (!IsValidAnnot(pPageView, pWidget)) { |
| 894 bExit = TRUE; | 894 bExit = TRUE; |
| 895 return; | 895 return; |
| 896 } | 896 } |
| 897 | 897 |
| 898 if (nAge != pWidget->GetAppearanceAge()) { | 898 if (nAge != pWidget->GetAppearanceAge()) { |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 | 945 |
| 946 if (!m_bNotifying) { | 946 if (!m_bNotifying) { |
| 947 if (pData->pWidget->GetAAction(CPDF_AAction::KeyStroke).GetDict()) { | 947 if (pData->pWidget->GetAAction(CPDF_AAction::KeyStroke).GetDict()) { |
| 948 m_bNotifying = TRUE; | 948 m_bNotifying = TRUE; |
| 949 int nAge = pData->pWidget->GetAppearanceAge(); | 949 int nAge = pData->pWidget->GetAppearanceAge(); |
| 950 int nValueAge = pData->pWidget->GetValueAge(); | 950 int nValueAge = pData->pWidget->GetValueAge(); |
| 951 | 951 |
| 952 CPDFSDK_Document* pDocument = pData->pPageView->GetSDKDocument(); | 952 CPDFSDK_Document* pDocument = pData->pPageView->GetSDKDocument(); |
| 953 | 953 |
| 954 PDFSDK_FieldAction fa; | 954 PDFSDK_FieldAction fa; |
| 955 fa.bModifier = m_pApp->FFI_IsCTRLKeyDown(nFlag); | 955 fa.bModifier = m_pApp->IsCTRLKeyDown(nFlag); |
| 956 fa.bShift = m_pApp->FFI_IsSHIFTKeyDown(nFlag); | 956 fa.bShift = m_pApp->IsSHIFTKeyDown(nFlag); |
| 957 fa.sChange = strChange; | 957 fa.sChange = strChange; |
| 958 fa.sChangeEx = strChangeEx; | 958 fa.sChangeEx = strChangeEx; |
| 959 fa.bKeyDown = bKeyDown; | 959 fa.bKeyDown = bKeyDown; |
| 960 fa.bWillCommit = FALSE; | 960 fa.bWillCommit = FALSE; |
| 961 fa.bRC = TRUE; | 961 fa.bRC = TRUE; |
| 962 fa.nSelStart = nSelStart; | 962 fa.nSelStart = nSelStart; |
| 963 fa.nSelEnd = nSelEnd; | 963 fa.nSelEnd = nSelEnd; |
| 964 | 964 |
| 965 pFormFiller->GetActionData(pData->pPageView, CPDF_AAction::KeyStroke, fa); | 965 pFormFiller->GetActionData(pData->pPageView, CPDF_AAction::KeyStroke, fa); |
| 966 pFormFiller->SaveState(pData->pPageView); | 966 pFormFiller->SaveState(pData->pPageView); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 bExit = TRUE; | 998 bExit = TRUE; |
| 999 m_bNotifying = FALSE; | 999 m_bNotifying = FALSE; |
| 1000 return; | 1000 return; |
| 1001 } | 1001 } |
| 1002 } | 1002 } |
| 1003 | 1003 |
| 1004 m_bNotifying = FALSE; | 1004 m_bNotifying = FALSE; |
| 1005 } | 1005 } |
| 1006 } | 1006 } |
| 1007 } | 1007 } |
| OLD | NEW |