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_FXCRT_XML_INT_H_ | 7 #ifndef CORE_FXCRT_XML_INT_H_ |
8 #define CORE_FXCRT_XML_INT_H_ | 8 #define CORE_FXCRT_XML_INT_H_ |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 protected: | 42 protected: |
43 const uint8_t* m_pBuffer; | 43 const uint8_t* m_pBuffer; |
44 size_t m_dwSize; | 44 size_t m_dwSize; |
45 size_t m_dwCurPos; | 45 size_t m_dwCurPos; |
46 }; | 46 }; |
47 | 47 |
48 class CXML_DataStmAcc : public IFX_BufferRead { | 48 class CXML_DataStmAcc : public IFX_BufferRead { |
49 public: | 49 public: |
50 explicit CXML_DataStmAcc(IFX_FileRead* pFileRead) | 50 explicit CXML_DataStmAcc(IFX_FileRead* pFileRead) |
51 : m_pFileRead(pFileRead), m_pBuffer(NULL), m_nStart(0), m_dwSize(0) { | 51 : m_pFileRead(pFileRead), m_pBuffer(nullptr), m_nStart(0), m_dwSize(0) { |
52 ASSERT(m_pFileRead); | 52 ASSERT(m_pFileRead); |
53 } | 53 } |
54 ~CXML_DataStmAcc() override { FX_Free(m_pBuffer); } | 54 ~CXML_DataStmAcc() override { FX_Free(m_pBuffer); } |
55 | 55 |
56 void Release() override { delete this; } | 56 void Release() override { delete this; } |
57 FX_BOOL IsEOF() override { | 57 FX_BOOL IsEOF() override { |
58 return m_nStart + (FX_FILESIZE)m_dwSize >= m_pFileRead->GetSize(); | 58 return m_nStart + (FX_FILESIZE)m_dwSize >= m_pFileRead->GetSize(); |
59 } | 59 } |
60 FX_FILESIZE GetPosition() override { | 60 FX_FILESIZE GetPosition() override { |
61 return m_nStart + (FX_FILESIZE)m_dwSize; | 61 return m_nStart + (FX_FILESIZE)m_dwSize; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 const CFX_WideStringC& content, | 121 const CFX_WideStringC& content, |
122 CXML_Element* pElement); | 122 CXML_Element* pElement); |
123 void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXML_Element* pElement); | 123 void InsertCDATASegment(CFX_UTF8Decoder& decoder, CXML_Element* pElement); |
124 }; | 124 }; |
125 | 125 |
126 void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName, | 126 void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName, |
127 CFX_ByteStringC& bsSpace, | 127 CFX_ByteStringC& bsSpace, |
128 CFX_ByteStringC& bsName); | 128 CFX_ByteStringC& bsName); |
129 | 129 |
130 #endif // CORE_FXCRT_XML_INT_H_ | 130 #endif // CORE_FXCRT_XML_INT_H_ |
OLD | NEW |