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 "../include/fsdk_define.h" | 8 #include "../include/fsdk_define.h" |
9 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
10 #include "../include/fpdfxfa/fpdfxfa_page.h" | 10 #include "../include/fpdfxfa/fpdfxfa_page.h" |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) { | 1066 if (CPDFSDK_Annot* pAnnot = GetFocusAnnot()) { |
1067 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); | 1067 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); |
1068 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); | 1068 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); |
1069 ASSERT(pAnnotHandlerMgr); | 1069 ASSERT(pAnnotHandlerMgr); |
1070 return pAnnotHandlerMgr->Annot_OnKeyDown(pAnnot, nKeyCode, nFlag); | 1070 return pAnnotHandlerMgr->Annot_OnKeyDown(pAnnot, nKeyCode, nFlag); |
1071 } | 1071 } |
1072 return FALSE; | 1072 return FALSE; |
1073 } | 1073 } |
1074 | 1074 |
1075 FX_BOOL CPDFSDK_PageView::OnKeyUp(int nKeyCode, int nFlag) { | 1075 FX_BOOL CPDFSDK_PageView::OnKeyUp(int nKeyCode, int nFlag) { |
1076 // if(CPDFSDK_Annot* pAnnot = GetFocusAnnot()) | |
1077 // { | |
1078 // CFFL_IFormFiller* pIFormFiller = g_pFormFillApp->GetIFormFiller(); | |
1079 // return pIFormFiller->OnKeyUp(pAnnot, nKeyCode, nFlag); | |
1080 // } | |
1081 return FALSE; | 1076 return FALSE; |
1082 } | 1077 } |
1083 | 1078 |
1084 extern void CheckUnSupportAnnot(CPDF_Document* pDoc, CPDF_Annot* pPDFAnnot); | |
1085 | |
1086 void CPDFSDK_PageView::LoadFXAnnots() { | 1079 void CPDFSDK_PageView::LoadFXAnnots() { |
1087 ASSERT(m_page != NULL); | 1080 ASSERT(m_page != NULL); |
1088 | 1081 |
1089 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); | 1082 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); |
1090 ASSERT(pEnv != NULL); | 1083 ASSERT(pEnv != NULL); |
1091 | 1084 |
1092 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); | 1085 CPDFSDK_AnnotHandlerMgr* pAnnotHandlerMgr = pEnv->GetAnnotHandlerMgr(); |
1093 ASSERT(pAnnotHandlerMgr != NULL); | 1086 ASSERT(pAnnotHandlerMgr != NULL); |
1094 | 1087 |
1095 SetLock(TRUE); | 1088 SetLock(TRUE); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 if (!pFocusAnnot) | 1188 if (!pFocusAnnot) |
1196 return NULL; | 1189 return NULL; |
1197 | 1190 |
1198 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { | 1191 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { |
1199 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); | 1192 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); |
1200 if (pAnnot == pFocusAnnot) | 1193 if (pAnnot == pFocusAnnot) |
1201 return pAnnot; | 1194 return pAnnot; |
1202 } | 1195 } |
1203 return NULL; | 1196 return NULL; |
1204 } | 1197 } |
OLD | NEW |