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 "xfa/src/fde/xml/fde_xml_imp.h" | 7 #include "xfa/fde/xml/fde_xml_imp.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "xfa/src/fgas/crt/fgas_system.h" | 11 #include "xfa/fgas/crt/fgas_codepage.h" |
12 #include "xfa/src/fgas/crt/fgas_codepage.h" | 12 #include "xfa/fgas/crt/fgas_system.h" |
13 | 13 |
14 #define FDE_XMLVALIDCHARRANGENUM 5 | 14 #define FDE_XMLVALIDCHARRANGENUM 5 |
15 | 15 |
16 static const FX_WCHAR g_XMLValidCharRange[FDE_XMLVALIDCHARRANGENUM][2] = { | 16 static const FX_WCHAR g_XMLValidCharRange[FDE_XMLVALIDCHARRANGENUM][2] = { |
17 {0x09, 0x09}, | 17 {0x09, 0x09}, |
18 {0x0A, 0x0A}, | 18 {0x0A, 0x0A}, |
19 {0x0D, 0x0D}, | 19 {0x0D, 0x0D}, |
20 {0x20, 0xD7FF}, | 20 {0x20, 0xD7FF}, |
21 {0xE000, 0xFFFD}}; | 21 {0xE000, 0xFFFD}}; |
22 | 22 |
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 m_BlockBuffer.DeleteTextChars(m_iDataLength - m_iEntityStart, FALSE); | 2091 m_BlockBuffer.DeleteTextChars(m_iDataLength - m_iEntityStart, FALSE); |
2092 m_pCurrentBlock = m_BlockBuffer.GetAvailableBlock(m_iIndexInBlock); | 2092 m_pCurrentBlock = m_BlockBuffer.GetAvailableBlock(m_iIndexInBlock); |
2093 m_iEntityStart = -1; | 2093 m_iEntityStart = -1; |
2094 } else { | 2094 } else { |
2095 if (m_iEntityStart < 0 && ch == L'&') { | 2095 if (m_iEntityStart < 0 && ch == L'&') { |
2096 m_iEntityStart = m_iDataLength - 1; | 2096 m_iEntityStart = m_iDataLength - 1; |
2097 } | 2097 } |
2098 } | 2098 } |
2099 m_pStart++; | 2099 m_pStart++; |
2100 } | 2100 } |
OLD | NEW |