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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 // Choose the right sub-ap | 558 // Choose the right sub-ap |
559 const FX_CHAR* ap_entry = "N"; | 559 const FX_CHAR* ap_entry = "N"; |
560 if (mode == CPDF_Annot::Down) | 560 if (mode == CPDF_Annot::Down) |
561 ap_entry = "D"; | 561 ap_entry = "D"; |
562 else if (mode == CPDF_Annot::Rollover) | 562 else if (mode == CPDF_Annot::Rollover) |
563 ap_entry = "R"; | 563 ap_entry = "R"; |
564 if (!pAP->KeyExist(ap_entry)) | 564 if (!pAP->KeyExist(ap_entry)) |
565 ap_entry = "N"; | 565 ap_entry = "N"; |
566 | 566 |
567 // Get the AP stream or subdirectory | 567 // Get the AP stream or subdirectory |
568 CPDF_Object* psub = pAP->GetElementValue(ap_entry); | 568 CPDF_Object* psub = pAP->GetDirectObjectBy(ap_entry); |
569 return !!psub; | 569 return !!psub; |
570 } | 570 } |
571 | 571 |
572 void CPDFSDK_BAAnnot::DrawBorder(CFX_RenderDevice* pDevice, | 572 void CPDFSDK_BAAnnot::DrawBorder(CFX_RenderDevice* pDevice, |
573 const CFX_Matrix* pUser2Device, | 573 const CFX_Matrix* pUser2Device, |
574 const CPDF_RenderOptions* pOptions) { | 574 const CPDF_RenderOptions* pOptions) { |
575 m_pAnnot->DrawBorder(pDevice, pUser2Device, pOptions); | 575 m_pAnnot->DrawBorder(pDevice, pUser2Device, pOptions); |
576 } | 576 } |
577 | 577 |
578 void CPDFSDK_BAAnnot::ClearCachedAP() { | 578 void CPDFSDK_BAAnnot::ClearCachedAP() { |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 | 958 |
959 CPDF_Page* CPDFSDK_Annot::GetPDFPage() { | 959 CPDF_Page* CPDFSDK_Annot::GetPDFPage() { |
960 return m_pPageView ? m_pPageView->GetPDFPage() : nullptr; | 960 return m_pPageView ? m_pPageView->GetPDFPage() : nullptr; |
961 } | 961 } |
962 | 962 |
963 #ifdef PDF_ENABLE_XFA | 963 #ifdef PDF_ENABLE_XFA |
964 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { | 964 CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { |
965 return m_pPageView ? m_pPageView->GetPDFXFAPage() : nullptr; | 965 return m_pPageView ? m_pPageView->GetPDFXFAPage() : nullptr; |
966 } | 966 } |
967 #endif // PDF_ENABLE_XFA | 967 #endif // PDF_ENABLE_XFA |
OLD | NEW |