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

Side by Side Diff: fpdfsdk/fsdk_baseannot.cpp

Issue 1841173002: Rename GetElementValue() to GetDirectObject{By,At}(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix test name Created 4 years, 8 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/fpdfxfa/fpdfxfa_doc.cpp ('k') | fpdfsdk/fsdk_baseform.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 <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
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
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
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp ('k') | fpdfsdk/fsdk_baseform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698