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

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

Issue 1410073009: Use standard true and false to replace 'TRUE' and 'FALSE' in pdfium_test (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Remove compiling warnings 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 4672 matching lines...) Expand 10 before | Expand all | Expand 10 after
4683 FX_DWORD dwSharedObjBits = hStream->GetBits(16); 4683 FX_DWORD dwSharedObjBits = hStream->GetBits(16);
4684 // Item 11: The number of bits needed to represent the numerically 4684 // Item 11: The number of bits needed to represent the numerically
4685 // greatest shared object identifier used by the pages. 4685 // greatest shared object identifier used by the pages.
4686 FX_DWORD dwSharedIdBits = hStream->GetBits(16); 4686 FX_DWORD dwSharedIdBits = hStream->GetBits(16);
4687 // Item 12: The number of bits needed to represent the numerator of 4687 // Item 12: The number of bits needed to represent the numerator of
4688 // the fractional position for each shared object reference. For each 4688 // the fractional position for each shared object reference. For each
4689 // shared object referenced from a page, there is an indication of 4689 // shared object referenced from a page, there is an indication of
4690 // where in the page's content stream the object is first referenced. 4690 // where in the page's content stream the object is first referenced.
4691 FX_DWORD dwSharedNumeratorBits = hStream->GetBits(16); 4691 FX_DWORD dwSharedNumeratorBits = hStream->GetBits(16);
4692 // Item 13: Skip Item 13 which has 16 bits. 4692 // Item 13: Skip Item 13 which has 16 bits.
4693 FX_DWORD dwSharedDenominator = hStream->GetBits(16); 4693 hStream->SkipBits(16);
4694 CPDF_Object* pPageNum = m_pLinearizedDict->GetElementValue(FX_BSTRC("N")); 4694 CPDF_Object* pPageNum = m_pLinearizedDict->GetElementValue(FX_BSTRC("N"));
4695 int nPages = pPageNum ? pPageNum->GetInteger() : 0; 4695 int nPages = pPageNum ? pPageNum->GetInteger() : 0;
4696 if (nPages < 1) 4696 if (nPages < 1)
4697 return FALSE; 4697 return FALSE;
4698 for (int i = 0; i < nPages; ++i) { 4698 for (int i = 0; i < nPages; ++i) {
4699 FX_SAFE_DWORD safeDeltaObj = hStream->GetBits(dwDeltaObjectsBits); 4699 FX_SAFE_DWORD safeDeltaObj = hStream->GetBits(dwDeltaObjectsBits);
4700 safeDeltaObj += dwObjLeastNum; 4700 safeDeltaObj += dwObjLeastNum;
4701 if (!safeDeltaObj.IsValid()) 4701 if (!safeDeltaObj.IsValid())
4702 return FALSE; 4702 return FALSE;
4703 m_dwDeltaNObjsArray.Add(safeDeltaObj.ValueOrDie()); 4703 m_dwDeltaNObjsArray.Add(safeDeltaObj.ValueOrDie());
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
4953 if (!m_pLinearizedDict) 4953 if (!m_pLinearizedDict)
4954 return -1; 4954 return -1;
4955 CPDF_Array* pRange = m_pLinearizedDict->GetArray(FX_BSTRC("H")); 4955 CPDF_Array* pRange = m_pLinearizedDict->GetArray(FX_BSTRC("H"));
4956 if (!pRange) 4956 if (!pRange)
4957 return -1; 4957 return -1;
4958 CPDF_Object* pStreamLen = pRange->GetElementValue(1); 4958 CPDF_Object* pStreamLen = pRange->GetElementValue(1);
4959 if (!pStreamLen) 4959 if (!pStreamLen)
4960 return -1; 4960 return -1;
4961 return pStreamLen->GetInteger(); 4961 return pStreamLen->GetInteger();
4962 } 4962 }
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