diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-12 13:29:37 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-12 17:52:56 +0000 |
commit | 51114964fdb2a98f763318ce9affca906ed079e3 (patch) | |
tree | 0b5499f30ab34cd1f4f37b5368a766e57eca678a /xfa/fxfa/parser/cxfa_widetextread.h | |
parent | 661fcc0156b78fd40937c0844034605f430b94c6 (diff) | |
download | pdfium-51114964fdb2a98f763318ce9affca906ed079e3.tar.xz |
Fold CXFA_WideTextRead into IFGAS_Stream
This Cl moves CXFA_WideTextRead to be in the anonymous namespace of
IFGAS_Stream and adds a IFGAS_Stream::CreateWideStringReadStream()
method.
This is done so we have all the implementations of IFGAS_Stream
centralized.
Change-Id: I9fbbf0a493fc2dd05fcd544e344268214a75d8a1
Reviewed-on: https://pdfium-review.googlesource.com/4052
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_widetextread.h')
-rw-r--r-- | xfa/fxfa/parser/cxfa_widetextread.h | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/xfa/fxfa/parser/cxfa_widetextread.h b/xfa/fxfa/parser/cxfa_widetextread.h deleted file mode 100644 index 648e14ed0d..0000000000 --- a/xfa/fxfa/parser/cxfa_widetextread.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2016 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_FXFA_PARSER_CXFA_WIDETEXTREAD_H_ -#define XFA_FXFA_PARSER_CXFA_WIDETEXTREAD_H_ - -#include "core/fxcrt/cfx_retain_ptr.h" -#include "xfa/fgas/crt/ifgas_stream.h" - -class CXFA_WideTextRead : public IFGAS_Stream { - public: - template <typename T, typename... Args> - friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args); - - // IFGAS_Stream - uint32_t GetAccessModes() const override; - int32_t GetLength() const override; - int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) override; - int32_t GetPosition() override; - bool IsEOF() const override; - int32_t ReadData(uint8_t* pBuffer, int32_t iBufferSize) override; - int32_t ReadString(wchar_t* pStr, int32_t iMaxLength, bool& bEOS) override; - int32_t WriteData(const uint8_t* pBuffer, int32_t iBufferSize) override; - int32_t WriteString(const wchar_t* pStr, int32_t iLength) override; - void Flush() override {} - bool SetLength(int32_t iLength) override; - int32_t GetBOM(uint8_t bom[4]) const override; - uint16_t GetCodePage() const override; - uint16_t SetCodePage(uint16_t wCodePage) override; - - CFX_WideString GetSrcText() const; - - private: - explicit CXFA_WideTextRead(const CFX_WideString& wsBuffer); - ~CXFA_WideTextRead() override; - - CFX_WideString m_wsBuffer; - int32_t m_iPosition; -}; - -#endif // XFA_FXFA_PARSER_CXFA_WIDETEXTREAD_H_ |