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

Side by Side Diff: xfa/fxfa/app/xfa_ffdoc.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/fsdk_baseform.cpp ('k') | no next file » | 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 "xfa/fxfa/app/xfa_ffdoc.h" 7 #include "xfa/fxfa/app/xfa_ffdoc.h"
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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 return FALSE; 222 return FALSE;
223 } 223 }
224 CPDF_Dictionary* pRoot = pPDFDoc->GetRoot(); 224 CPDF_Dictionary* pRoot = pPDFDoc->GetRoot();
225 if (pRoot == NULL) { 225 if (pRoot == NULL) {
226 return FALSE; 226 return FALSE;
227 } 227 }
228 CPDF_Dictionary* pAcroForm = pRoot->GetDictBy("AcroForm"); 228 CPDF_Dictionary* pAcroForm = pRoot->GetDictBy("AcroForm");
229 if (pAcroForm == NULL) { 229 if (pAcroForm == NULL) {
230 return FALSE; 230 return FALSE;
231 } 231 }
232 CPDF_Object* pElementXFA = pAcroForm->GetElementValue("XFA"); 232 CPDF_Object* pElementXFA = pAcroForm->GetDirectObjectBy("XFA");
233 if (pElementXFA == NULL) { 233 if (pElementXFA == NULL) {
234 return FALSE; 234 return FALSE;
235 } 235 }
236 CFX_ArrayTemplate<CPDF_Stream*> xfaStreams; 236 CFX_ArrayTemplate<CPDF_Stream*> xfaStreams;
237 if (pElementXFA->IsArray()) { 237 if (pElementXFA->IsArray()) {
238 CPDF_Array* pXFAArray = (CPDF_Array*)pElementXFA; 238 CPDF_Array* pXFAArray = (CPDF_Array*)pElementXFA;
239 uint32_t count = pXFAArray->GetCount() / 2; 239 uint32_t count = pXFAArray->GetCount() / 2;
240 for (uint32_t i = 0; i < count; i++) { 240 for (uint32_t i = 0; i < count; i++) {
241 if (CPDF_Stream* pStream = pXFAArray->GetStreamAt(i * 2 + 1)) 241 if (CPDF_Stream* pStream = pXFAArray->GetStreamAt(i * 2 + 1))
242 xfaStreams.Add(pStream); 242 xfaStreams.Add(pStream);
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 422 }
423 FX_BOOL CXFA_FFDoc::ImportData(IFX_FileRead* pStream, FX_BOOL bXDP) { 423 FX_BOOL CXFA_FFDoc::ImportData(IFX_FileRead* pStream, FX_BOOL bXDP) {
424 FX_BOOL bRet = FALSE; 424 FX_BOOL bRet = FALSE;
425 IXFA_PacketImport* pImport = IXFA_PacketImport::Create(m_pDocument); 425 IXFA_PacketImport* pImport = IXFA_PacketImport::Create(m_pDocument);
426 if (pImport) { 426 if (pImport) {
427 bRet = pImport->ImportData(pStream); 427 bRet = pImport->ImportData(pStream);
428 pImport->Release(); 428 pImport->Release();
429 } 429 }
430 return bRet; 430 return bRet;
431 } 431 }
OLDNEW
« no previous file with comments | « fpdfsdk/fsdk_baseform.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698