| 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/fsdk_mgr.h" | 9 #include "../include/fsdk_mgr.h" |
| 10 #include "../include/formfiller/FFL_FormFiller.h" | 10 #include "../include/formfiller/FFL_FormFiller.h" |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 return pSDKAnnot; | 744 return pSDKAnnot; |
| 745 } | 745 } |
| 746 } | 746 } |
| 747 | 747 |
| 748 return NULL; | 748 return NULL; |
| 749 } | 749 } |
| 750 | 750 |
| 751 | 751 |
| 752 FX_BOOL CPDFSDK_PageView::Annot_HasAppearance(CPDF_Annot* pAnnot) | 752 FX_BOOL CPDFSDK_PageView::Annot_HasAppearance(CPDF_Annot* pAnnot) |
| 753 { | 753 { |
| 754 » CPDF_Dictionary* pAnnotDic = pAnnot->m_pAnnotDict; | 754 » CPDF_Dictionary* pAnnotDic = pAnnot->GetAnnotDict(); |
| 755 if(pAnnotDic) | 755 if(pAnnotDic) |
| 756 return pAnnotDic->KeyExist("AS"); | 756 return pAnnotDic->KeyExist("AS"); |
| 757 return FALSE; | 757 return FALSE; |
| 758 } | 758 } |
| 759 | 759 |
| 760 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Annot * pPDFAnnot) | 760 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Annot * pPDFAnnot) |
| 761 { | 761 { |
| 762 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); | 762 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); |
| 763 ASSERT(pEnv); | 763 ASSERT(pEnv); |
| 764 CPDFSDK_AnnotHandlerMgr * pAnnotHandler= pEnv->GetAnnotHandlerMgr(); | 764 CPDFSDK_AnnotHandlerMgr * pAnnotHandler= pEnv->GetAnnotHandlerMgr(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 | 824 |
| 825 return (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(nIndex); | 825 return (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(nIndex); |
| 826 } | 826 } |
| 827 | 827 |
| 828 CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByDict(CPDF_Dictionary * pDict) | 828 CPDFSDK_Annot* CPDFSDK_PageView::GetAnnotByDict(CPDF_Dictionary * pDict) |
| 829 { | 829 { |
| 830 int nCount = m_fxAnnotArray.GetSize(); | 830 int nCount = m_fxAnnotArray.GetSize(); |
| 831 for(int i=0; i<nCount; i++) | 831 for(int i=0; i<nCount; i++) |
| 832 { | 832 { |
| 833 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); | 833 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); |
| 834 » » if(pDict==pAnnot->GetPDFAnnot()->m_pAnnotDict) | 834 » » if (pDict == pAnnot->GetPDFAnnot()->GetAnnotDict()) |
| 835 return pAnnot; | 835 return pAnnot; |
| 836 } | 836 } |
| 837 return NULL; | 837 return NULL; |
| 838 } | 838 } |
| 839 | 839 |
| 840 FX_BOOL CPDFSDK_PageView::OnLButtonDown(const CPDF_Point & point, FX_UINT nFlag) | 840 FX_BOOL CPDFSDK_PageView::OnLButtonDown(const CPDF_Point & point, FX_UINT nFlag) |
| 841 { | 841 { |
| 842 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); | 842 CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv(); |
| 843 ASSERT(pEnv); | 843 ASSERT(pEnv); |
| 844 CPDFSDK_Annot* pFXAnnot = GetFXWidgetAtPoint(point.x, point.y); | 844 CPDFSDK_Annot* pFXAnnot = GetFXWidgetAtPoint(point.x, point.y); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 | 1070 |
| 1071 for(int i=0; i<m_fxAnnotArray.GetSize(); i++) | 1071 for(int i=0; i<m_fxAnnotArray.GetSize(); i++) |
| 1072 { | 1072 { |
| 1073 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); | 1073 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); |
| 1074 if(pAnnot == pFocusAnnot) | 1074 if(pAnnot == pFocusAnnot) |
| 1075 return pAnnot; | 1075 return pAnnot; |
| 1076 } | 1076 } |
| 1077 return NULL; | 1077 return NULL; |
| 1078 } | 1078 } |
| 1079 | 1079 |
| OLD | NEW |