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 "../../../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 Loading... |
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 Loading... |
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 } |
OLD | NEW |