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 <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 depth--; | 919 depth--; |
920 } | 920 } |
921 } else if (byte == '(') { | 921 } else if (byte == '(') { |
922 depth++; | 922 depth++; |
923 } | 923 } |
924 if (!depth) { | 924 if (!depth) { |
925 status = 0; | 925 status = 0; |
926 } | 926 } |
927 break; | 927 break; |
928 case 11: | 928 case 11: |
929 if (byte == '<' && inside_index == 1) { | 929 if (byte == '>' || (byte == '<' && inside_index == 1)) |
930 status = 12; | |
931 } else if (byte == '>') { | |
932 status = 0; | 930 status = 0; |
933 } | |
934 inside_index = 0; | 931 inside_index = 0; |
935 break; | 932 break; |
936 case 12: | |
937 --i; | |
938 status = 0; | |
939 break; | |
940 case 13: | 933 case 13: |
941 if (PDFCharIsDelimiter(byte) || PDFCharIsWhitespace(byte)) { | 934 if (PDFCharIsDelimiter(byte) || PDFCharIsWhitespace(byte)) { |
942 --i; | 935 --i; |
943 status = 0; | 936 status = 0; |
944 } | 937 } |
945 break; | 938 break; |
946 case 14: | 939 case 14: |
947 if (PDFCharIsWhitespace(byte)) { | 940 if (PDFCharIsWhitespace(byte)) { |
948 status = 0; | 941 status = 0; |
949 } else if (byte == '%' || byte == '(' || byte == '<' || | 942 } else if (byte == '%' || byte == '(' || byte == '<' || |
(...skipping 4003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4953 if (!m_pLinearizedDict) | 4946 if (!m_pLinearizedDict) |
4954 return -1; | 4947 return -1; |
4955 CPDF_Array* pRange = m_pLinearizedDict->GetArray(FX_BSTRC("H")); | 4948 CPDF_Array* pRange = m_pLinearizedDict->GetArray(FX_BSTRC("H")); |
4956 if (!pRange) | 4949 if (!pRange) |
4957 return -1; | 4950 return -1; |
4958 CPDF_Object* pStreamLen = pRange->GetElementValue(1); | 4951 CPDF_Object* pStreamLen = pRange->GetElementValue(1); |
4959 if (!pStreamLen) | 4952 if (!pStreamLen) |
4960 return -1; | 4953 return -1; |
4961 return pStreamLen->GetInteger(); | 4954 return pStreamLen->GetInteger(); |
4962 } | 4955 } |
OLD | NEW |