Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: fpdfsdk/fsdk_annothandler.cpp

Issue 2062313002: Make code compile with clang_use_chrome_plugin (part IV) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove unused file Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/fsdk_actionhandler.cpp ('k') | fpdfsdk/fsdk_baseannot.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/include/fsdk_annothandler.h" 7 #include "fpdfsdk/include/fsdk_annothandler.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
11 11
12 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 12 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
13 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 13 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
14 #include "fpdfsdk/formfiller/cffl_formfiller.h" 14 #include "fpdfsdk/formfiller/cffl_formfiller.h"
15 #include "fpdfsdk/include/fsdk_define.h" 15 #include "fpdfsdk/include/fsdk_define.h"
16 #include "fpdfsdk/include/fsdk_mgr.h" 16 #include "fpdfsdk/include/fsdk_mgr.h"
17 17
18 #ifdef PDF_ENABLE_XFA 18 #ifdef PDF_ENABLE_XFA
19 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h" 19 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_doc.h"
20 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_page.h" 20 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_page.h"
21 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h" 21 #include "fpdfsdk/fpdfxfa/include/fpdfxfa_util.h"
22 #include "xfa/fwl/core/include/fwl_widgethit.h" 22 #include "xfa/fwl/core/include/fwl_widgethit.h"
23 #include "xfa/fxfa/include/xfa_ffwidget.h" 23 #include "xfa/fxfa/include/xfa_ffwidget.h"
24 #include "xfa/fxfa/include/xfa_ffdocview.h"
25 #include "xfa/fxfa/include/xfa_ffpageview.h"
26 #include "xfa/fxfa/include/xfa_ffwidgethandler.h"
24 #include "xfa/fxgraphics/include/cfx_graphics.h" 27 #include "xfa/fxgraphics/include/cfx_graphics.h"
25 #endif // PDF_ENABLE_XFA 28 #endif // PDF_ENABLE_XFA
26 29
27 CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp) { 30 CPDFSDK_AnnotHandlerMgr::CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp) {
28 m_pApp = pApp; 31 m_pApp = pApp;
29 32
30 CPDFSDK_BFAnnotHandler* pHandler = new CPDFSDK_BFAnnotHandler(m_pApp); 33 CPDFSDK_BFAnnotHandler* pHandler = new CPDFSDK_BFAnnotHandler(m_pApp);
31 pHandler->SetFormFiller(m_pApp->GetIFormFiller()); 34 pHandler->SetFormFiller(m_pApp->GetIFormFiller());
32 RegisterAnnotHandler(pHandler); 35 RegisterAnnotHandler(pHandler);
33 #ifdef PDF_ENABLE_XFA 36 #ifdef PDF_ENABLE_XFA
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 if (!hNextFocus && pSDKAnnot) 393 if (!hNextFocus && pSDKAnnot)
391 hNextFocus = pWidgetIterator->MoveToFirst(); 394 hNextFocus = pWidgetIterator->MoveToFirst();
392 395
393 return pPageView->GetAnnotByXFAWidget(hNextFocus); 396 return pPageView->GetAnnotByXFAWidget(hNextFocus);
394 #else // PDF_ENABLE_XFA 397 #else // PDF_ENABLE_XFA
395 CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), "Widget", ""); 398 CBA_AnnotIterator ai(pSDKAnnot->GetPageView(), "Widget", "");
396 return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot); 399 return bNext ? ai.GetNextAnnot(pSDKAnnot) : ai.GetPrevAnnot(pSDKAnnot);
397 #endif // PDF_ENABLE_XFA 400 #endif // PDF_ENABLE_XFA
398 } 401 }
399 402
403 CPDFSDK_BFAnnotHandler::CPDFSDK_BFAnnotHandler(CPDFDoc_Environment* pApp)
404 : m_pApp(pApp), m_pFormFiller(nullptr) {}
405
406 CPDFSDK_BFAnnotHandler::~CPDFSDK_BFAnnotHandler() {}
407
408 CFX_ByteString CPDFSDK_BFAnnotHandler::GetType() {
409 return CFX_ByteString("Widget");
410 }
411
412 CFX_ByteString CPDFSDK_BFAnnotHandler::GetName() {
413 return CFX_ByteString("WidgetHandler");
414 }
415
400 FX_BOOL CPDFSDK_BFAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot) { 416 FX_BOOL CPDFSDK_BFAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
401 ASSERT(pAnnot->GetType() == "Widget"); 417 ASSERT(pAnnot->GetType() == "Widget");
402 if (pAnnot->GetSubType() == BFFT_SIGNATURE) 418 if (pAnnot->GetSubType() == BFFT_SIGNATURE)
403 return FALSE; 419 return FALSE;
404 420
405 CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot); 421 CPDFSDK_Widget* pWidget = static_cast<CPDFSDK_Widget*>(pAnnot);
406 if (!pWidget->IsVisible()) 422 if (!pWidget->IsVisible())
407 return FALSE; 423 return FALSE;
408 424
409 int nFieldFlags = pWidget->GetFieldFlags(); 425 int nFieldFlags = pWidget->GetFieldFlags();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 466
451 if (m_pFormFiller) 467 if (m_pFormFiller)
452 m_pFormFiller->OnDelete(pAnnot); 468 m_pFormFiller->OnDelete(pAnnot);
453 469
454 std::unique_ptr<CPDFSDK_Widget> pWidget(static_cast<CPDFSDK_Widget*>(pAnnot)); 470 std::unique_ptr<CPDFSDK_Widget> pWidget(static_cast<CPDFSDK_Widget*>(pAnnot));
455 CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm(); 471 CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm();
456 CPDF_FormControl* pControl = pWidget->GetFormControl(); 472 CPDF_FormControl* pControl = pWidget->GetFormControl();
457 pInterForm->RemoveMap(pControl); 473 pInterForm->RemoveMap(pControl);
458 } 474 }
459 475
476 void CPDFSDK_BFAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {}
477
460 void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, 478 void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView,
461 CPDFSDK_Annot* pAnnot, 479 CPDFSDK_Annot* pAnnot,
462 CFX_RenderDevice* pDevice, 480 CFX_RenderDevice* pDevice,
463 CFX_Matrix* pUser2Device, 481 CFX_Matrix* pUser2Device,
464 uint32_t dwFlags) { 482 uint32_t dwFlags) {
465 CFX_ByteString sSubType = pAnnot->GetSubType(); 483 CFX_ByteString sSubType = pAnnot->GetSubType();
466 484
467 if (sSubType == BFFT_SIGNATURE) { 485 if (sSubType == BFFT_SIGNATURE) {
468 static_cast<CPDFSDK_BAAnnot*>(pAnnot) 486 static_cast<CPDFSDK_BAAnnot*>(pAnnot)
469 ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); 487 ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr);
470 } else { 488 } else {
471 if (m_pFormFiller) { 489 if (m_pFormFiller) {
472 m_pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); 490 m_pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags);
473 } 491 }
474 } 492 }
475 } 493 }
476 494
495 void CPDFSDK_BFAnnotHandler::OnDrawSleep(CPDFSDK_PageView* pPageView,
496 CPDFSDK_Annot* pAnnot,
497 CFX_RenderDevice* pDevice,
498 CFX_Matrix* pUser2Device,
499 const CFX_FloatRect& rcWindow,
500 uint32_t dwFlags) {}
501
502 void CPDFSDK_BFAnnotHandler::OnDelete(CPDFSDK_Annot* pAnnot) {}
503
504 void CPDFSDK_BFAnnotHandler::OnRelease(CPDFSDK_Annot* pAnnot) {}
505
477 void CPDFSDK_BFAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView, 506 void CPDFSDK_BFAnnotHandler::OnMouseEnter(CPDFSDK_PageView* pPageView,
478 CPDFSDK_Annot* pAnnot, 507 CPDFSDK_Annot* pAnnot,
479 uint32_t nFlag) { 508 uint32_t nFlag) {
480 CFX_ByteString sSubType = pAnnot->GetSubType(); 509 CFX_ByteString sSubType = pAnnot->GetSubType();
481 510
482 if (sSubType == BFFT_SIGNATURE) { 511 if (sSubType == BFFT_SIGNATURE) {
483 } else { 512 } else {
484 if (m_pFormFiller) 513 if (m_pFormFiller)
485 m_pFormFiller->OnMouseEnter(pPageView, pAnnot, nFlag); 514 m_pFormFiller->OnMouseEnter(pPageView, pAnnot, nFlag);
486 } 515 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 624
596 if (sSubType == BFFT_SIGNATURE) { 625 if (sSubType == BFFT_SIGNATURE) {
597 } else { 626 } else {
598 if (m_pFormFiller) 627 if (m_pFormFiller)
599 return m_pFormFiller->OnRButtonUp(pPageView, pAnnot, nFlags, point); 628 return m_pFormFiller->OnRButtonUp(pPageView, pAnnot, nFlags, point);
600 } 629 }
601 630
602 return FALSE; 631 return FALSE;
603 } 632 }
604 633
634 FX_BOOL CPDFSDK_BFAnnotHandler::OnRButtonDblClk(CPDFSDK_PageView* pPageView,
635 CPDFSDK_Annot* pAnnot,
636 uint32_t nFlags,
637 const CFX_FloatPoint& point) {
638 return FALSE;
639 }
640
605 FX_BOOL CPDFSDK_BFAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot, 641 FX_BOOL CPDFSDK_BFAnnotHandler::OnChar(CPDFSDK_Annot* pAnnot,
606 uint32_t nChar, 642 uint32_t nChar,
607 uint32_t nFlags) { 643 uint32_t nFlags) {
608 CFX_ByteString sSubType = pAnnot->GetSubType(); 644 CFX_ByteString sSubType = pAnnot->GetSubType();
609 645
610 if (sSubType == BFFT_SIGNATURE) { 646 if (sSubType == BFFT_SIGNATURE) {
611 } else { 647 } else {
612 if (m_pFormFiller) 648 if (m_pFormFiller)
613 return m_pFormFiller->OnChar(pAnnot, nChar, nFlags); 649 return m_pFormFiller->OnChar(pAnnot, nChar, nFlags);
614 } 650 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 729
694 if (sSubType == BFFT_SIGNATURE) { 730 if (sSubType == BFFT_SIGNATURE) {
695 } else { 731 } else {
696 if (m_pFormFiller) 732 if (m_pFormFiller)
697 return m_pFormFiller->OnKillFocus(pAnnot, nFlag); 733 return m_pFormFiller->OnKillFocus(pAnnot, nFlag);
698 } 734 }
699 735
700 return TRUE; 736 return TRUE;
701 } 737 }
702 738
739 #ifdef PDF_ENABLE_XFA
740
741 FX_BOOL CPDFSDK_BFAnnotHandler::OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot,
742 CPDFSDK_Annot* pNewAnnot) {
743 return TRUE;
744 }
745
746 #endif // PDF_ENABLE_XFA
747
703 CFX_FloatRect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, 748 CFX_FloatRect CPDFSDK_BFAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
704 CPDFSDK_Annot* pAnnot) { 749 CPDFSDK_Annot* pAnnot) {
705 CFX_ByteString sSubType = pAnnot->GetSubType(); 750 CFX_ByteString sSubType = pAnnot->GetSubType();
706 if (sSubType != BFFT_SIGNATURE && m_pFormFiller) 751 if (sSubType != BFFT_SIGNATURE && m_pFormFiller)
707 return CFX_FloatRect(m_pFormFiller->GetViewBBox(pPageView, pAnnot)); 752 return CFX_FloatRect(m_pFormFiller->GetViewBBox(pPageView, pAnnot));
708 753
709 return CFX_FloatRect(0, 0, 0, 0); 754 return CFX_FloatRect(0, 0, 0, 0);
710 } 755 }
711 756
712 FX_BOOL CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView* pPageView, 757 FX_BOOL CPDFSDK_BFAnnotHandler::HitTest(CPDFSDK_PageView* pPageView,
713 CPDFSDK_Annot* pAnnot, 758 CPDFSDK_Annot* pAnnot,
714 const CFX_FloatPoint& point) { 759 const CFX_FloatPoint& point) {
715 ASSERT(pPageView); 760 ASSERT(pPageView);
716 ASSERT(pAnnot); 761 ASSERT(pAnnot);
717 762
718 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot); 763 CFX_FloatRect rect = GetViewBBox(pPageView, pAnnot);
719 return rect.Contains(point.x, point.y); 764 return rect.Contains(point.x, point.y);
720 } 765 }
721 766
722 #ifdef PDF_ENABLE_XFA 767 #ifdef PDF_ENABLE_XFA
723 768
724 CPDFSDK_XFAAnnotHandler::CPDFSDK_XFAAnnotHandler(CPDFDoc_Environment* pApp) 769 CPDFSDK_XFAAnnotHandler::CPDFSDK_XFAAnnotHandler(CPDFDoc_Environment* pApp)
725 : m_pApp(pApp) {} 770 : m_pApp(pApp) {}
726 771
772 CPDFSDK_XFAAnnotHandler::~CPDFSDK_XFAAnnotHandler() {}
773
774 CFX_ByteString CPDFSDK_XFAAnnotHandler::GetType() {
775 return FSDK_XFAWIDGET_TYPENAME;
776 }
777
778 CFX_ByteString CPDFSDK_XFAAnnotHandler::GetName() {
779 return "XFAWidgetHandler";
780 }
781
782 FX_BOOL CPDFSDK_XFAAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
783 return !!pAnnot->GetXFAWidget();
784 }
785
786 CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(CPDF_Annot* pAnnot,
787 CPDFSDK_PageView* pPage) {
788 return nullptr;
789 }
790
727 CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(CXFA_FFWidget* pAnnot, 791 CPDFSDK_Annot* CPDFSDK_XFAAnnotHandler::NewAnnot(CXFA_FFWidget* pAnnot,
728 CPDFSDK_PageView* pPage) { 792 CPDFSDK_PageView* pPage) {
729 CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument(); 793 CPDFSDK_Document* pSDKDoc = m_pApp->GetSDKDocument();
730 CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm(); 794 CPDFSDK_InterForm* pInterForm = pSDKDoc->GetInterForm();
731 CPDFSDK_XFAWidget* pWidget = new CPDFSDK_XFAWidget(pAnnot, pPage, pInterForm); 795 CPDFSDK_XFAWidget* pWidget = new CPDFSDK_XFAWidget(pAnnot, pPage, pInterForm);
732 pInterForm->AddXFAMap(pAnnot, pWidget); 796 pInterForm->AddXFAMap(pAnnot, pWidget);
733 return pWidget; 797 return pWidget;
734 } 798 }
735 799
736 FX_BOOL CPDFSDK_XFAAnnotHandler::CanAnswer(CPDFSDK_Annot* pAnnot) {
737 return !!pAnnot->GetXFAWidget();
738 }
739
740 void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, 800 void CPDFSDK_XFAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView,
741 CPDFSDK_Annot* pAnnot, 801 CPDFSDK_Annot* pAnnot,
742 CFX_RenderDevice* pDevice, 802 CFX_RenderDevice* pDevice,
743 CFX_Matrix* pUser2Device, 803 CFX_Matrix* pUser2Device,
744 uint32_t dwFlags) { 804 uint32_t dwFlags) {
745 ASSERT(pPageView); 805 ASSERT(pPageView);
746 ASSERT(pAnnot); 806 ASSERT(pAnnot);
747 807
748 CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument(); 808 CPDFSDK_Document* pSDKDoc = pPageView->GetSDKDocument();
749 CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); 809 CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot);
750 810
751 CFX_Graphics gs; 811 CFX_Graphics gs;
752 gs.Create(pDevice); 812 gs.Create(pDevice);
753 813
754 CFX_Matrix mt; 814 CFX_Matrix mt;
755 mt = *(CFX_Matrix*)pUser2Device; 815 mt = *(CFX_Matrix*)pUser2Device;
756 816
757 FX_BOOL bIsHighlight = FALSE; 817 FX_BOOL bIsHighlight = FALSE;
758 if (pSDKDoc->GetFocusAnnot() != pAnnot) 818 if (pSDKDoc->GetFocusAnnot() != pAnnot)
759 bIsHighlight = TRUE; 819 bIsHighlight = TRUE;
760 820
761 pWidgetHandler->RenderWidget(pAnnot->GetXFAWidget(), &gs, &mt, bIsHighlight); 821 pWidgetHandler->RenderWidget(pAnnot->GetXFAWidget(), &gs, &mt, bIsHighlight);
762 822
763 // to do highlight and shadow 823 // to do highlight and shadow
764 } 824 }
765 825
826 void CPDFSDK_XFAAnnotHandler::OnDrawSleep(CPDFSDK_PageView* pPageView,
827 CPDFSDK_Annot* pAnnot,
828 CFX_RenderDevice* pDevice,
829 CFX_Matrix* pUser2Device,
830 const CFX_FloatRect& rcWindow,
831 uint32_t dwFlags) {}
832
833 void CPDFSDK_XFAAnnotHandler::OnCreate(CPDFSDK_Annot* pAnnot) {}
834
835 void CPDFSDK_XFAAnnotHandler::OnLoad(CPDFSDK_Annot* pAnnot) {}
836
837 void CPDFSDK_XFAAnnotHandler::OnDelete(CPDFSDK_Annot* pAnnot) {}
838
839 void CPDFSDK_XFAAnnotHandler::OnRelease(CPDFSDK_Annot* pAnnot) {}
840
766 void CPDFSDK_XFAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { 841 void CPDFSDK_XFAAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) {
767 CPDFSDK_XFAWidget* pWidget = (CPDFSDK_XFAWidget*)pAnnot; 842 CPDFSDK_XFAWidget* pWidget = (CPDFSDK_XFAWidget*)pAnnot;
768 CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm(); 843 CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm();
769 pInterForm->RemoveXFAMap(pWidget->GetXFAWidget()); 844 pInterForm->RemoveXFAMap(pWidget->GetXFAWidget());
770 845
771 delete pWidget; 846 delete pWidget;
772 } 847 }
773 848
849 void CPDFSDK_XFAAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {}
850
774 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView, 851 CFX_FloatRect CPDFSDK_XFAAnnotHandler::GetViewBBox(CPDFSDK_PageView* pPageView,
775 CPDFSDK_Annot* pAnnot) { 852 CPDFSDK_Annot* pAnnot) {
776 ASSERT(pAnnot); 853 ASSERT(pAnnot);
777 854
778 CFX_RectF rcBBox; 855 CFX_RectF rcBBox;
779 XFA_ELEMENT eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType(); 856 XFA_ELEMENT eType = pAnnot->GetXFAWidget()->GetDataAcc()->GetUIType();
780 if (eType == XFA_ELEMENT_Signature) 857 if (eType == XFA_ELEMENT_Signature)
781 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_Visible, TRUE); 858 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_Visible, TRUE);
782 else 859 else
783 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_None); 860 pAnnot->GetXFAWidget()->GetBBox(rcBBox, XFA_WidgetStatus_None);
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 int nKeyCode, 1038 int nKeyCode,
962 int nFlag) { 1039 int nFlag) {
963 if (!pAnnot) 1040 if (!pAnnot)
964 return FALSE; 1041 return FALSE;
965 1042
966 CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot); 1043 CXFA_FFWidgetHandler* pWidgetHandler = GetXFAWidgetHandler(pAnnot);
967 return pWidgetHandler->OnKeyUp(pAnnot->GetXFAWidget(), nKeyCode, 1044 return pWidgetHandler->OnKeyUp(pAnnot->GetXFAWidget(), nKeyCode,
968 GetFWLFlags(nFlag)); 1045 GetFWLFlags(nFlag));
969 } 1046 }
970 1047
1048 void CPDFSDK_XFAAnnotHandler::OnDeSelected(CPDFSDK_Annot* pAnnot) {}
1049
1050 void CPDFSDK_XFAAnnotHandler::OnSelected(CPDFSDK_Annot* pAnnot) {}
1051
971 FX_BOOL CPDFSDK_XFAAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot, 1052 FX_BOOL CPDFSDK_XFAAnnotHandler::OnSetFocus(CPDFSDK_Annot* pAnnot,
972 uint32_t nFlag) { 1053 uint32_t nFlag) {
973 return TRUE; 1054 return TRUE;
974 } 1055 }
975 1056
976 FX_BOOL CPDFSDK_XFAAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot, 1057 FX_BOOL CPDFSDK_XFAAnnotHandler::OnKillFocus(CPDFSDK_Annot* pAnnot,
977 uint32_t nFlag) { 1058 uint32_t nFlag) {
978 return TRUE; 1059 return TRUE;
979 } 1060 }
980 1061
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 1170
1090 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() { 1171 CPDFSDK_Annot* CPDFSDK_AnnotIterator::PrevAnnot() {
1091 if (m_pos < m_iteratorAnnotList.size()) 1172 if (m_pos < m_iteratorAnnotList.size())
1092 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos]; 1173 return m_iteratorAnnotList[m_iteratorAnnotList.size() - ++m_pos];
1093 return nullptr; 1174 return nullptr;
1094 } 1175 }
1095 1176
1096 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() { 1177 CPDFSDK_Annot* CPDFSDK_AnnotIterator::Next() {
1097 return m_bReverse ? PrevAnnot() : NextAnnot(); 1178 return m_bReverse ? PrevAnnot() : NextAnnot();
1098 } 1179 }
OLDNEW
« no previous file with comments | « fpdfsdk/fsdk_actionhandler.cpp ('k') | fpdfsdk/fsdk_baseannot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698