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

Side by Side Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp

Issue 1239313005: Merge to XFA - else after returns. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Fix issues. Created 5 years, 5 months 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
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 "../../../include/fpdfapi/fpdf_page.h" 7 #include "../../../include/fpdfapi/fpdf_page.h"
8 #include "../../../include/fpdfapi/fpdf_module.h" 8 #include "../../../include/fpdfapi/fpdf_module.h"
9 #include "../../../include/fpdfapi/fpdf_serial.h" 9 #include "../../../include/fpdfapi/fpdf_serial.h"
10 #include "pageint.h" 10 #include "pageint.h"
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 opid <<= 8; 330 opid <<= 8;
331 i ++; 331 i ++;
332 }; 332 };
333 int low = 0, high = sizeof g_OpCodes / sizeof(OpCode) - 1; 333 int low = 0, high = sizeof g_OpCodes / sizeof(OpCode) - 1;
334 while (low <= high) { 334 while (low <= high) {
335 int middle = (low + high) / 2; 335 int middle = (low + high) / 2;
336 int compare = opid - g_OpCodes[middle].m_OpId; 336 int compare = opid - g_OpCodes[middle].m_OpId;
337 if (compare == 0) { 337 if (compare == 0) {
338 (this->*g_OpCodes[middle].m_OpHandler)(); 338 (this->*g_OpCodes[middle].m_OpHandler)();
339 return TRUE; 339 return TRUE;
340 } else if (compare < 0) { 340 }
341 if (compare < 0) {
341 high = middle - 1; 342 high = middle - 1;
342 } else { 343 } else {
343 low = middle + 1; 344 low = middle + 1;
344 } 345 }
345 } 346 }
346 return m_CompatCount != 0; 347 return m_CompatCount != 0;
347 } 348 }
348 void CPDF_StreamContentParser::Handle_CloseFillStrokePath() 349 void CPDF_StreamContentParser::Handle_CloseFillStrokePath()
349 { 350 {
350 if (m_Options.m_bTextOnly) { 351 if (m_Options.m_bTextOnly) {
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1573 buf.AppendChar((char)code); 1574 buf.AppendChar((char)code);
1574 } 1575 }
1575 bFirst = !bFirst; 1576 bFirst = !bFirst;
1576 } 1577 }
1577 } 1578 }
1578 if (!bFirst) { 1579 if (!bFirst) {
1579 buf.AppendChar((char)code); 1580 buf.AppendChar((char)code);
1580 } 1581 }
1581 return buf.GetByteString(); 1582 return buf.GetByteString();
1582 } 1583 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698