diff options
Diffstat (limited to 'xfa/fgas/crt')
-rw-r--r-- | xfa/fgas/crt/ifgas_stream.cpp | 34 | ||||
-rw-r--r-- | xfa/fgas/crt/ifgas_stream.h | 2 |
2 files changed, 0 insertions, 36 deletions
diff --git a/xfa/fgas/crt/ifgas_stream.cpp b/xfa/fgas/crt/ifgas_stream.cpp index 874330165b..dcd13b162e 100644 --- a/xfa/fgas/crt/ifgas_stream.cpp +++ b/xfa/fgas/crt/ifgas_stream.cpp @@ -169,19 +169,6 @@ class CFGAS_TextStream : public IFGAS_Stream { CFX_RetainPtr<IFGAS_Stream> m_pStreamImp; }; -class CFGAS_FileRead : public IFX_SeekableReadStream { - public: - explicit CFGAS_FileRead(const CFX_RetainPtr<IFGAS_Stream>& pStream); - ~CFGAS_FileRead() override; - - // IFX_SeekableReadStream - FX_FILESIZE GetSize() override; - bool ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) override; - - protected: - CFX_RetainPtr<IFGAS_Stream> m_pStream; -}; - IFGAS_StreamImp::IFGAS_StreamImp() : m_dwAccess(0) {} CFGAS_FileReadStreamImp::CFGAS_FileReadStreamImp() @@ -663,23 +650,6 @@ uint16_t CFGAS_Stream::SetCodePage(uint16_t wCodePage) { #endif } -CFGAS_FileRead::CFGAS_FileRead(const CFX_RetainPtr<IFGAS_Stream>& pStream) - : m_pStream(pStream) { - ASSERT(m_pStream); -} - -CFGAS_FileRead::~CFGAS_FileRead() {} - -FX_FILESIZE CFGAS_FileRead::GetSize() { - return (FX_FILESIZE)m_pStream->GetLength(); -} - -bool CFGAS_FileRead::ReadBlock(void* buffer, FX_FILESIZE offset, size_t size) { - m_pStream->Seek(FX_STREAMSEEK_Begin, (int32_t)offset); - int32_t iLen = m_pStream->ReadData((uint8_t*)buffer, (int32_t)size); - return iLen == (int32_t)size; -} - } // namespace // static @@ -714,7 +684,3 @@ CFX_RetainPtr<IFGAS_Stream> IFGAS_Stream::CreateWriteStream( return pdfium::MakeRetain<CFGAS_TextStream>( pdfium::MakeRetain<CFGAS_Stream>(std::move(pImp), FX_STREAMACCESS_Write)); } - -CFX_RetainPtr<IFX_SeekableReadStream> IFGAS_Stream::MakeSeekableReadStream() { - return pdfium::MakeRetain<CFGAS_FileRead>(CFX_RetainPtr<IFGAS_Stream>(this)); -} diff --git a/xfa/fgas/crt/ifgas_stream.h b/xfa/fgas/crt/ifgas_stream.h index cfb0722b21..d8efc41afd 100644 --- a/xfa/fgas/crt/ifgas_stream.h +++ b/xfa/fgas/crt/ifgas_stream.h @@ -42,8 +42,6 @@ class IFGAS_Stream : public CFX_Retainable { virtual int32_t GetBOM(uint8_t bom[4]) const = 0; virtual uint16_t GetCodePage() const = 0; virtual uint16_t SetCodePage(uint16_t wCodePage) = 0; - - CFX_RetainPtr<IFX_SeekableReadStream> MakeSeekableReadStream(); }; #endif // XFA_FGAS_CRT_IFGAS_STREAM_H_ |