OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_FXFA_PARSER_XFA_BASIC_IMP_H_ | |
8 #define XFA_FXFA_PARSER_XFA_BASIC_IMP_H_ | |
9 | |
10 #include "xfa/fgas/crt/fgas_stream.h" | |
11 #include "xfa/fxfa/include/fxfa_basic.h" | |
12 | |
13 struct XFA_NOTSUREATTRIBUTE { | |
14 XFA_Element eElement; | |
15 XFA_ATTRIBUTE eAttribute; | |
16 XFA_ATTRIBUTETYPE eType; | |
17 void* pValue; | |
18 }; | |
19 const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute( | |
20 XFA_Element eElement, | |
21 XFA_ATTRIBUTE eAttribute, | |
22 XFA_ATTRIBUTETYPE eType = XFA_ATTRIBUTETYPE_NOTSURE); | |
23 | |
24 class CXFA_WideTextRead : public IFX_Stream { | |
25 public: | |
26 CXFA_WideTextRead(const CFX_WideString& wsBuffer); | |
27 | |
28 // IFX_Stream | |
29 void Release() override; | |
30 IFX_Stream* Retain() override; | |
31 uint32_t GetAccessModes() const override; | |
32 int32_t GetLength() const override; | |
33 int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) override; | |
34 int32_t GetPosition() override; | |
35 FX_BOOL IsEOF() const override; | |
36 int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) override; | |
37 int32_t ReadString(FX_WCHAR* pStr, | |
38 int32_t iMaxLength, | |
39 FX_BOOL& bEOS) override; | |
40 int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) override; | |
41 int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) override; | |
42 void Flush() override {} | |
43 FX_BOOL SetLength(int32_t iLength) override; | |
44 int32_t GetBOM(uint8_t bom[4]) const override; | |
45 uint16_t GetCodePage() const override; | |
46 uint16_t SetCodePage(uint16_t wCodePage) override; | |
47 IFX_Stream* CreateSharedStream(uint32_t dwAccess, | |
48 int32_t iOffset, | |
49 int32_t iLength) override; | |
50 | |
51 virtual void Lock(); | |
52 virtual void Unlock(); | |
53 | |
54 CFX_WideString GetSrcText() const; | |
55 | |
56 protected: | |
57 CFX_WideString m_wsBuffer; | |
58 int32_t m_iPosition; | |
59 int32_t m_iRefCount; | |
60 }; | |
61 | |
62 #endif // XFA_FXFA_PARSER_XFA_BASIC_IMP_H_ | |
OLD | NEW |