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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp

Issue 1430643007: Remove state from RebuildCrossRef state-machine. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | 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 <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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698