| 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 XFA_FDE_XML_FDE_XML_IMP_H_ | 7 #ifndef XFA_FDE_XML_FDE_XML_IMP_H_ |
| 8 #define XFA_FDE_XML_FDE_XML_IMP_H_ | 8 #define XFA_FDE_XML_FDE_XML_IMP_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_system.h" | 10 #include "core/fxcrt/include/fx_system.h" |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 #define FDE_XMLSYNTAXMODE_SkipCommentOrDecl 17 | 286 #define FDE_XMLSYNTAXMODE_SkipCommentOrDecl 17 |
| 287 #define FDE_XMLSYNTAXMODE_TargetData 18 | 287 #define FDE_XMLSYNTAXMODE_TargetData 18 |
| 288 class CFDE_XMLSyntaxParser : public IFDE_XMLSyntaxParser, public CFX_Target { | 288 class CFDE_XMLSyntaxParser : public IFDE_XMLSyntaxParser, public CFX_Target { |
| 289 public: | 289 public: |
| 290 CFDE_XMLSyntaxParser(); | 290 CFDE_XMLSyntaxParser(); |
| 291 ~CFDE_XMLSyntaxParser(); | 291 ~CFDE_XMLSyntaxParser(); |
| 292 virtual void Release() { delete this; } | 292 virtual void Release() { delete this; } |
| 293 virtual void Init(IFX_Stream* pStream, | 293 virtual void Init(IFX_Stream* pStream, |
| 294 int32_t iXMLPlaneSize, | 294 int32_t iXMLPlaneSize, |
| 295 int32_t iTextDataSize = 256); | 295 int32_t iTextDataSize = 256); |
| 296 virtual FX_DWORD DoSyntaxParse(); | 296 virtual uint32_t DoSyntaxParse(); |
| 297 virtual int32_t GetStatus() const; | 297 virtual int32_t GetStatus() const; |
| 298 virtual int32_t GetCurrentPos() const { | 298 virtual int32_t GetCurrentPos() const { |
| 299 return m_iParsedChars + (m_pStart - m_pBuffer); | 299 return m_iParsedChars + (m_pStart - m_pBuffer); |
| 300 } | 300 } |
| 301 virtual FX_FILESIZE GetCurrentBinaryPos() const; | 301 virtual FX_FILESIZE GetCurrentBinaryPos() const; |
| 302 virtual int32_t GetCurrentNodeNumber() const { return m_iCurrentNodeNum; } | 302 virtual int32_t GetCurrentNodeNumber() const { return m_iCurrentNodeNum; } |
| 303 virtual int32_t GetLastNodeNumber() const { return m_iLastNodeNum; } | 303 virtual int32_t GetLastNodeNumber() const { return m_iLastNodeNum; } |
| 304 | 304 |
| 305 virtual void GetTargetName(CFX_WideString& wsTarget) const { | 305 virtual void GetTargetName(CFX_WideString& wsTarget) const { |
| 306 m_BlockBuffer.GetTextData(wsTarget, 0, m_iTextDataLength); | 306 m_BlockBuffer.GetTextData(wsTarget, 0, m_iTextDataLength); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 335 FX_WCHAR* m_pStart; | 335 FX_WCHAR* m_pStart; |
| 336 FX_WCHAR* m_pEnd; | 336 FX_WCHAR* m_pEnd; |
| 337 FDE_XMLNODE m_CurNode; | 337 FDE_XMLNODE m_CurNode; |
| 338 CFDE_XMLNodeStack m_XMLNodeStack; | 338 CFDE_XMLNodeStack m_XMLNodeStack; |
| 339 CFDE_BlockBuffer m_BlockBuffer; | 339 CFDE_BlockBuffer m_BlockBuffer; |
| 340 int32_t m_iAllocStep; | 340 int32_t m_iAllocStep; |
| 341 int32_t& m_iDataLength; | 341 int32_t& m_iDataLength; |
| 342 FX_WCHAR* m_pCurrentBlock; | 342 FX_WCHAR* m_pCurrentBlock; |
| 343 int32_t m_iIndexInBlock; | 343 int32_t m_iIndexInBlock; |
| 344 int32_t m_iTextDataLength; | 344 int32_t m_iTextDataLength; |
| 345 FX_DWORD m_dwStatus; | 345 uint32_t m_dwStatus; |
| 346 FX_DWORD m_dwMode; | 346 uint32_t m_dwMode; |
| 347 FX_WCHAR m_wQuotationMark; | 347 FX_WCHAR m_wQuotationMark; |
| 348 int32_t m_iEntityStart; | 348 int32_t m_iEntityStart; |
| 349 CFX_DWordStack m_SkipStack; | 349 CFX_DWordStack m_SkipStack; |
| 350 FX_WCHAR m_SkipChar; | 350 FX_WCHAR m_SkipChar; |
| 351 inline void ParseTextChar(FX_WCHAR ch); | 351 inline void ParseTextChar(FX_WCHAR ch); |
| 352 }; | 352 }; |
| 353 | 353 |
| 354 #endif // XFA_FDE_XML_FDE_XML_IMP_H_ | 354 #endif // XFA_FDE_XML_FDE_XML_IMP_H_ |
| OLD | NEW |