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_parser.h" | 7 #include "../../../include/fpdfapi/fpdf_parser.h" |
8 const char PDF_CharType[256] = { | 8 const char PDF_CharType[256] = { |
9 //NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO S
I | 9 //NUL SOH STX ETX EOT ENQ ACK BEL BS HT LF VT FF CR SO S
I |
10 'W', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'W', 'W', 'R', 'W', 'W', 'R', '
R', | 10 'W', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'W', 'W', 'R', 'W', 'W', 'R', '
R', |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 int type; | 158 int type; |
159 ParseWord(pStart, dwSize, type); | 159 ParseWord(pStart, dwSize, type); |
160 if (dwSize == 1 && pStart[0] == '<') { | 160 if (dwSize == 1 && pStart[0] == '<') { |
161 while (m_dwCurPos < m_dwSize && m_pData[m_dwCurPos] != '>') { | 161 while (m_dwCurPos < m_dwSize && m_pData[m_dwCurPos] != '>') { |
162 m_dwCurPos ++; | 162 m_dwCurPos ++; |
163 } | 163 } |
164 if (m_dwCurPos < m_dwSize) { | 164 if (m_dwCurPos < m_dwSize) { |
165 m_dwCurPos ++; | 165 m_dwCurPos ++; |
166 } | 166 } |
167 return CFX_ByteStringC(pStart, (FX_STRSIZE)(m_dwCurPos - (pStart - m_pDa
ta))); | 167 return CFX_ByteStringC(pStart, (FX_STRSIZE)(m_dwCurPos - (pStart - m_pDa
ta))); |
168 } else if (dwSize == 1 && pStart[0] == '(') { | 168 } |
| 169 if (dwSize == 1 && pStart[0] == '(') { |
169 int level = 1; | 170 int level = 1; |
170 while (m_dwCurPos < m_dwSize) { | 171 while (m_dwCurPos < m_dwSize) { |
171 if (m_pData[m_dwCurPos] == ')') { | 172 if (m_pData[m_dwCurPos] == ')') { |
172 level --; | 173 level --; |
173 if (level == 0) { | 174 if (level == 0) { |
174 break; | 175 break; |
175 } | 176 } |
176 } | 177 } |
177 if (m_pData[m_dwCurPos] == '\\') { | 178 if (m_pData[m_dwCurPos] == '\\') { |
178 if (m_dwSize <= m_dwCurPos) { | 179 if (m_dwSize <= m_dwCurPos) { |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 if (pFound) { | 471 if (pFound) { |
471 return pFound; | 472 return pFound; |
472 } | 473 } |
473 } | 474 } |
474 return NULL; | 475 return NULL; |
475 } | 476 } |
476 CPDF_Object* CPDF_NumberTree::LookupValue(int num) | 477 CPDF_Object* CPDF_NumberTree::LookupValue(int num) |
477 { | 478 { |
478 return SearchNumberNode(m_pRoot, num); | 479 return SearchNumberNode(m_pRoot, num); |
479 } | 480 } |
OLD | NEW |