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 "core/include/fpdfapi/cpdf_document.h" |
7 #include "core/include/fpdfapi/fpdf_page.h" | 8 #include "core/include/fpdfapi/fpdf_page.h" |
8 #include "core/include/fpdfapi/fpdf_parser.h" | 9 #include "core/include/fpdfapi/fpdf_parser.h" |
9 #include "core/include/fpdfdoc/fpdf_tagged.h" | 10 #include "core/include/fpdfdoc/fpdf_tagged.h" |
10 #include "core/src/fpdfdoc/tagged_int.h" | 11 #include "core/src/fpdfdoc/tagged_int.h" |
11 | 12 |
12 const int nMaxRecursion = 32; | 13 const int nMaxRecursion = 32; |
13 static FX_BOOL IsTagged(const CPDF_Document* pDoc) { | 14 static FX_BOOL IsTagged(const CPDF_Document* pDoc) { |
14 CPDF_Dictionary* pCatalog = pDoc->GetRoot(); | 15 CPDF_Dictionary* pCatalog = pDoc->GetRoot(); |
15 CPDF_Dictionary* pMarkInfo = pCatalog->GetDictBy("MarkInfo"); | 16 CPDF_Dictionary* pMarkInfo = pCatalog->GetDictBy("MarkInfo"); |
16 return pMarkInfo && pMarkInfo->GetIntegerBy("Marked"); | 17 return pMarkInfo && pMarkInfo->GetIntegerBy("Marked"); |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 return ToNumber(pAttr) ? pAttr->GetNumber() : default_value; | 426 return ToNumber(pAttr) ? pAttr->GetNumber() : default_value; |
426 } | 427 } |
427 int CPDF_StructElementImpl::GetInteger(const CFX_ByteStringC& owner, | 428 int CPDF_StructElementImpl::GetInteger(const CFX_ByteStringC& owner, |
428 const CFX_ByteStringC& name, | 429 const CFX_ByteStringC& name, |
429 int default_value, | 430 int default_value, |
430 FX_BOOL bInheritable, | 431 FX_BOOL bInheritable, |
431 int subindex) { | 432 int subindex) { |
432 CPDF_Object* pAttr = GetAttr(owner, name, bInheritable, subindex); | 433 CPDF_Object* pAttr = GetAttr(owner, name, bInheritable, subindex); |
433 return ToNumber(pAttr) ? pAttr->GetInteger() : default_value; | 434 return ToNumber(pAttr) ? pAttr->GetInteger() : default_value; |
434 } | 435 } |
OLD | NEW |