summaryrefslogtreecommitdiff
path: root/xfa/src/fxfa/parser/xfa_basic_imp.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2016-03-08 13:49:22 -0500
committerDan Sinclair <dsinclair@chromium.org>2016-03-08 13:49:22 -0500
commit6cdf084fa40a62eb33185171622ad12d95c6009e (patch)
treedaeea24a81365ed27582f280b7f19add0cb7b0d7 /xfa/src/fxfa/parser/xfa_basic_imp.h
parent653e0797debddb4e9aecbc6cde65748d43b18b79 (diff)
downloadpdfium-6cdf084fa40a62eb33185171622ad12d95c6009e.tar.xz
Remove xfa/src/fxfa/src/common and xfa/src/fxfa/src
This Cl moves the code in xfa/src/fxfa/src/common to the diretory which contains the respective implementations and removes the xfa/src/fxfa/src/common directory. It them moves all of the code in xfa/src/fxfa/src up one level and removes the xfa/src/fxfa/src directory. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1770073003 .
Diffstat (limited to 'xfa/src/fxfa/parser/xfa_basic_imp.h')
-rw-r--r--xfa/src/fxfa/parser/xfa_basic_imp.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/xfa/src/fxfa/parser/xfa_basic_imp.h b/xfa/src/fxfa/parser/xfa_basic_imp.h
new file mode 100644
index 0000000000..55b3c1d4cb
--- /dev/null
+++ b/xfa/src/fxfa/parser/xfa_basic_imp.h
@@ -0,0 +1,71 @@
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef XFA_SRC_FXFA_PARSER_XFA_BASIC_IMP_H_
+#define XFA_SRC_FXFA_PARSER_XFA_BASIC_IMP_H_
+
+#include "xfa/include/fxfa/fxfa_basic.h"
+#include "xfa/src/fgas/include/fx_stm.h"
+
+struct XFA_NOTSUREATTRIBUTE {
+ XFA_ELEMENT eElement;
+ XFA_ATTRIBUTE eAttribute;
+ XFA_ATTRIBUTETYPE eType;
+ void* pValue;
+};
+const XFA_NOTSUREATTRIBUTE* XFA_GetNotsureAttribute(
+ XFA_ELEMENT eElement,
+ XFA_ATTRIBUTE eAttribute,
+ XFA_ATTRIBUTETYPE eType = XFA_ATTRIBUTETYPE_NOTSURE);
+
+class CXFA_WideTextRead : public IFX_Stream {
+ public:
+ CXFA_WideTextRead(const CFX_WideString& wsBuffer);
+ virtual void Release();
+ virtual IFX_Stream* Retain();
+
+ virtual FX_DWORD GetAccessModes() const;
+ virtual int32_t GetLength() const;
+ virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset);
+ virtual int32_t GetPosition();
+ virtual FX_BOOL IsEOF() const;
+
+ virtual int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) { return 0; }
+ virtual int32_t ReadString(FX_WCHAR* pStr,
+ int32_t iMaxLength,
+ FX_BOOL& bEOS,
+ int32_t const* pByteSize = NULL);
+ virtual int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) {
+ return 0;
+ }
+ virtual int32_t WriteString(const FX_WCHAR* pStr, int32_t iLength) {
+ return 0;
+ }
+ virtual void Flush() {}
+ virtual FX_BOOL SetLength(int32_t iLength) { return FALSE; }
+
+ virtual int32_t GetBOM(uint8_t bom[4]) const { return 0; }
+ virtual FX_WORD GetCodePage() const;
+ virtual FX_WORD SetCodePage(FX_WORD wCodePage);
+
+ virtual void Lock() {}
+ virtual void Unlock() {}
+
+ virtual IFX_Stream* CreateSharedStream(FX_DWORD dwAccess,
+ int32_t iOffset,
+ int32_t iLength) {
+ return NULL;
+ }
+
+ CFX_WideString GetSrcText() const { return m_wsBuffer; }
+
+ protected:
+ CFX_WideString m_wsBuffer;
+ int32_t m_iPosition;
+ int32_t m_iRefCount;
+};
+
+#endif // XFA_SRC_FXFA_PARSER_XFA_BASIC_IMP_H_