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

Side by Side Diff: fpdfsdk/fpdfview.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/fpdfsave.cpp ('k') | fpdfsdk/fpdfxfa/fpdfxfa_doc.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 "public/fpdfview.h" 7 #include "public/fpdfview.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 return FALSE; 351 return FALSE;
352 352
353 CPDF_Dictionary* pRoot = pdfDoc->GetRoot(); 353 CPDF_Dictionary* pRoot = pdfDoc->GetRoot();
354 if (!pRoot) 354 if (!pRoot)
355 return FALSE; 355 return FALSE;
356 356
357 CPDF_Dictionary* pAcroForm = pRoot->GetDictBy("AcroForm"); 357 CPDF_Dictionary* pAcroForm = pRoot->GetDictBy("AcroForm");
358 if (!pAcroForm) 358 if (!pAcroForm)
359 return FALSE; 359 return FALSE;
360 360
361 CPDF_Object* pXFA = pAcroForm->GetElement("XFA"); 361 CPDF_Object* pXFA = pAcroForm->GetObjectBy("XFA");
362 if (!pXFA) 362 if (!pXFA)
363 return FALSE; 363 return FALSE;
364 364
365 FX_BOOL bDynamicXFA = pRoot->GetBooleanBy("NeedsRendering", FALSE); 365 FX_BOOL bDynamicXFA = pRoot->GetBooleanBy("NeedsRendering", FALSE);
366 366
367 if (bDynamicXFA) 367 if (bDynamicXFA)
368 *docType = DOCTYPE_DYNAMIC_XFA; 368 *docType = DOCTYPE_DYNAMIC_XFA;
369 else 369 else
370 *docType = DOCTYPE_STATIC_XFA; 370 *docType = DOCTYPE_STATIC_XFA;
371 371
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 if (!buffer) { 1158 if (!buffer) {
1159 *buflen = len; 1159 *buflen = len;
1160 } else if (*buflen >= len) { 1160 } else if (*buflen >= len) {
1161 memcpy(buffer, utf16Name.c_str(), len); 1161 memcpy(buffer, utf16Name.c_str(), len);
1162 *buflen = len; 1162 *buflen = len;
1163 } else { 1163 } else {
1164 *buflen = -1; 1164 *buflen = -1;
1165 } 1165 }
1166 return (FPDF_DEST)pDestObj; 1166 return (FPDF_DEST)pDestObj;
1167 } 1167 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdfsave.cpp ('k') | fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698