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

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

Issue 1413103007: Merge to XFA: Use standard true and false to replace 'TRUE' and 'FALSE' in pdfium_test (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
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 | core/src/fpdfapi/fpdf_parser/parser_int.h » ('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 <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 4664 matching lines...) Expand 10 before | Expand all | Expand 10 after
4675 FX_DWORD dwSharedObjBits = hStream->GetBits(16); 4675 FX_DWORD dwSharedObjBits = hStream->GetBits(16);
4676 // Item 11: The number of bits needed to represent the numerically 4676 // Item 11: The number of bits needed to represent the numerically
4677 // greatest shared object identifier used by the pages. 4677 // greatest shared object identifier used by the pages.
4678 FX_DWORD dwSharedIdBits = hStream->GetBits(16); 4678 FX_DWORD dwSharedIdBits = hStream->GetBits(16);
4679 // Item 12: The number of bits needed to represent the numerator of 4679 // Item 12: The number of bits needed to represent the numerator of
4680 // the fractional position for each shared object reference. For each 4680 // the fractional position for each shared object reference. For each
4681 // shared object referenced from a page, there is an indication of 4681 // shared object referenced from a page, there is an indication of
4682 // where in the page's content stream the object is first referenced. 4682 // where in the page's content stream the object is first referenced.
4683 FX_DWORD dwSharedNumeratorBits = hStream->GetBits(16); 4683 FX_DWORD dwSharedNumeratorBits = hStream->GetBits(16);
4684 // Item 13: Skip Item 13 which has 16 bits. 4684 // Item 13: Skip Item 13 which has 16 bits.
4685 FX_DWORD dwSharedDenominator = hStream->GetBits(16); 4685 hStream->SkipBits(16);
4686 CPDF_Object* pPageNum = m_pLinearizedDict->GetElementValue(FX_BSTRC("N")); 4686 CPDF_Object* pPageNum = m_pLinearizedDict->GetElementValue(FX_BSTRC("N"));
4687 int nPages = pPageNum ? pPageNum->GetInteger() : 0; 4687 int nPages = pPageNum ? pPageNum->GetInteger() : 0;
4688 if (nPages < 1) 4688 if (nPages < 1)
4689 return FALSE; 4689 return FALSE;
4690 for (int i = 0; i < nPages; ++i) { 4690 for (int i = 0; i < nPages; ++i) {
4691 FX_SAFE_DWORD safeDeltaObj = hStream->GetBits(dwDeltaObjectsBits); 4691 FX_SAFE_DWORD safeDeltaObj = hStream->GetBits(dwDeltaObjectsBits);
4692 safeDeltaObj += dwObjLeastNum; 4692 safeDeltaObj += dwObjLeastNum;
4693 if (!safeDeltaObj.IsValid()) 4693 if (!safeDeltaObj.IsValid())
4694 return FALSE; 4694 return FALSE;
4695 m_dwDeltaNObjsArray.Add(safeDeltaObj.ValueOrDie()); 4695 m_dwDeltaNObjsArray.Add(safeDeltaObj.ValueOrDie());
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
4945 if (!m_pLinearizedDict) 4945 if (!m_pLinearizedDict)
4946 return -1; 4946 return -1;
4947 CPDF_Array* pRange = m_pLinearizedDict->GetArray(FX_BSTRC("H")); 4947 CPDF_Array* pRange = m_pLinearizedDict->GetArray(FX_BSTRC("H"));
4948 if (!pRange) 4948 if (!pRange)
4949 return -1; 4949 return -1;
4950 CPDF_Object* pStreamLen = pRange->GetElementValue(1); 4950 CPDF_Object* pStreamLen = pRange->GetElementValue(1);
4951 if (!pStreamLen) 4951 if (!pStreamLen)
4952 return -1; 4952 return -1;
4953 return pStreamLen->GetInteger(); 4953 return pStreamLen->GetInteger();
4954 } 4954 }
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_parser/parser_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698