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 #ifndef CORE_SRC_FXCRT_XML_INT_H_ | 7 #ifndef CORE_SRC_FXCRT_XML_INT_H_ |
8 #define CORE_SRC_FXCRT_XML_INT_H_ | 8 #define CORE_SRC_FXCRT_XML_INT_H_ |
9 | 9 |
10 class CXML_DataBufAcc : public IFX_BufferRead | 10 class CXML_DataBufAcc : public IFX_BufferRead |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 if (bRestart) { | 100 if (bRestart) { |
101 m_nStart = 0; | 101 m_nStart = 0; |
102 } | 102 } |
103 FX_FILESIZE nLength = m_pFileRead->GetSize(); | 103 FX_FILESIZE nLength = m_pFileRead->GetSize(); |
104 m_nStart += (FX_FILESIZE)m_dwSize; | 104 m_nStart += (FX_FILESIZE)m_dwSize; |
105 if (m_nStart >= nLength) { | 105 if (m_nStart >= nLength) { |
106 return FALSE; | 106 return FALSE; |
107 } | 107 } |
108 m_dwSize = (size_t)FX_MIN(FX_XMLDATASTREAM_BufferSize, nLength - m_nStar
t); | 108 m_dwSize = (size_t)FX_MIN(FX_XMLDATASTREAM_BufferSize, nLength - m_nStar
t); |
109 if (!m_pBuffer) { | 109 if (!m_pBuffer) { |
110 m_pBuffer = FX_Alloc(FX_BYTE, m_dwSize); | 110 m_pBuffer = FX_Alloc(uint8_t, m_dwSize); |
111 } | 111 } |
112 return m_pFileRead->ReadBlock(m_pBuffer, m_nStart, m_dwSize); | 112 return m_pFileRead->ReadBlock(m_pBuffer, m_nStart, m_dwSize); |
113 } | 113 } |
114 virtual FX_LPCBYTE GetBlockBuffer() | 114 virtual FX_LPCBYTE GetBlockBuffer() |
115 { | 115 { |
116 return (FX_LPCBYTE)m_pBuffer; | 116 return (FX_LPCBYTE)m_pBuffer; |
117 } | 117 } |
118 virtual size_t GetBlockSize() | 118 virtual size_t GetBlockSize() |
119 { | 119 { |
120 return m_dwSize; | 120 return m_dwSize; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 FX_DWORD GetCharRef(); | 154 FX_DWORD GetCharRef(); |
155 void GetTagName(CFX_ByteString &space, CFX_ByteString
&name, FX_BOOL &bEndTag, FX_BOOL bStartTag = FALSE); | 155 void GetTagName(CFX_ByteString &space, CFX_ByteString
&name, FX_BOOL &bEndTag, FX_BOOL bStartTag = FALSE); |
156 void SkipLiterals(FX_BSTR str); | 156 void SkipLiterals(FX_BSTR str); |
157 CXML_Element* ParseElement(CXML_Element* pParent, FX_BOOL bStartTag =
FALSE); | 157 CXML_Element* ParseElement(CXML_Element* pParent, FX_BOOL bStartTag =
FALSE); |
158 void InsertContentSegment(FX_BOOL bCDATA, FX_WSTR con
tent, CXML_Element* pElement); | 158 void InsertContentSegment(FX_BOOL bCDATA, FX_WSTR con
tent, CXML_Element* pElement); |
159 void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXM
L_Element* pElement); | 159 void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXM
L_Element* pElement); |
160 }; | 160 }; |
161 void FX_XML_SplitQualifiedName(FX_BSTR bsFullName, CFX_ByteStringC &bsSpace, CFX
_ByteStringC &bsName); | 161 void FX_XML_SplitQualifiedName(FX_BSTR bsFullName, CFX_ByteStringC &bsSpace, CFX
_ByteStringC &bsName); |
162 | 162 |
163 #endif // CORE_SRC_FXCRT_XML_INT_H_ | 163 #endif // CORE_SRC_FXCRT_XML_INT_H_ |
OLD | NEW |