| 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 "../../public/fpdf_ext.h" | 7 #include "../../public/fpdf_ext.h" |
| 8 #include "../../third_party/base/nonstd_unique_ptr.h" | 8 #include "../../third_party/base/nonstd_unique_ptr.h" |
| 9 #include "../include/fsdk_define.h" | 9 #include "../include/fsdk_define.h" |
| 10 #include "../include/fsdk_mgr.h" | 10 #include "../include/fsdk_mgr.h" |
| (...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) { | 909 if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) { |
| 910 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); | 910 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); |
| 911 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); | 911 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); |
| 912 ASSERT(pAnnotHandlerMgr); | 912 ASSERT(pAnnotHandlerMgr); |
| 913 return pAnnotHandlerMgr->Annot_OnKeyDown(pAnnot, nKeyCode, nFlag); | 913 return pAnnotHandlerMgr->Annot_OnKeyDown(pAnnot, nKeyCode, nFlag); |
| 914 } | 914 } |
| 915 return FALSE; | 915 return FALSE; |
| 916 } | 916 } |
| 917 | 917 |
| 918 FX_BOOL CPDFSDK_PageView::OnKeyUp(int nKeyCode, int nFlag) { | 918 FX_BOOL CPDFSDK_PageView::OnKeyUp(int nKeyCode, int nFlag) { |
| 919 // if(CPDFSDK_Annot* pAnnot = GetFocusAnnot()) | |
| 920 // { | |
| 921 // CFFL_IFormFiller* pIFormFiller = g_pFormFillApp->GetIFormFiller(); | |
| 922 // return pIFormFiller->OnKeyUp(pAnnot, nKeyCode, nFlag); | |
| 923 // } | |
| 924 return FALSE; | 919 return FALSE; |
| 925 } | 920 } |
| 926 | 921 |
| 927 extern void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot); | |
| 928 | |
| 929 void CPDFSDK_PageView::LoadFXAnnots() { | 922 void CPDFSDK_PageView::LoadFXAnnots() { |
| 930 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); | 923 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); |
| 931 | 924 |
| 932 FX_BOOL enableAPUpdate = CPDF_InterForm::UpdatingAPEnabled(); | 925 FX_BOOL enableAPUpdate = CPDF_InterForm::UpdatingAPEnabled(); |
| 933 // Disable the default AP construction. | 926 // Disable the default AP construction. |
| 934 CPDF_InterForm::EnableUpdateAP(FALSE); | 927 CPDF_InterForm::EnableUpdateAP(FALSE); |
| 935 m_pAnnotList = new CPDF_AnnotList(m_page); | 928 m_pAnnotList = new CPDF_AnnotList(m_page); |
| 936 CPDF_InterForm::EnableUpdateAP(enableAPUpdate); | 929 CPDF_InterForm::EnableUpdateAP(enableAPUpdate); |
| 937 int nCount = m_pAnnotList->Count(); | 930 int nCount = m_pAnnotList->Count(); |
| 938 SetLock(TRUE); | 931 SetLock(TRUE); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 if (!pFocusAnnot) | 992 if (!pFocusAnnot) |
| 1000 return NULL; | 993 return NULL; |
| 1001 | 994 |
| 1002 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { | 995 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { |
| 1003 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); | 996 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); |
| 1004 if (pAnnot == pFocusAnnot) | 997 if (pAnnot == pFocusAnnot) |
| 1005 return pAnnot; | 998 return pAnnot; |
| 1006 } | 999 } |
| 1007 return NULL; | 1000 return NULL; |
| 1008 } | 1001 } |
| OLD | NEW |