diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-10 16:29:57 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-10 21:12:34 +0000 |
commit | d562ef07d9faf211f1f6218f0879f02b60a05f18 (patch) | |
tree | b058eb7a610a3ba7b93d5051c79eb12649d9a4d4 | |
parent | c6c71f1062aa8b22d432af5cbbfddf038a6d2d3f (diff) | |
download | pdfium-d562ef07d9faf211f1f6218f0879f02b60a05f18.tar.xz |
Remove unused CreateSharedStream
The CreateShreadStream code is not called, remove.
Change-Id: I62871ce190e50598b7c82ab3b43355dbde6b8b4b
Reviewed-on: https://pdfium-review.googlesource.com/4013
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r-- | xfa/fgas/crt/ifgas_stream.cpp | 59 | ||||
-rw-r--r-- | xfa/fgas/crt/ifgas_stream.h | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widetextread.cpp | 7 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_widetextread.h | 3 |
4 files changed, 0 insertions, 73 deletions
diff --git a/xfa/fgas/crt/ifgas_stream.cpp b/xfa/fgas/crt/ifgas_stream.cpp index 0edf2ccbbd..ae479964d0 100644 --- a/xfa/fgas/crt/ifgas_stream.cpp +++ b/xfa/fgas/crt/ifgas_stream.cpp @@ -220,9 +220,6 @@ class CFGAS_Stream : public IFGAS_Stream { int32_t GetBOM(uint8_t bom[4]) const override; uint16_t GetCodePage() const override; uint16_t SetCodePage(uint16_t wCodePage) override; - CFX_RetainPtr<IFGAS_Stream> CreateSharedStream(uint32_t dwAccess, - int32_t iOffset, - int32_t iLength) override; protected: CFGAS_Stream(); @@ -258,9 +255,6 @@ class CFGAS_TextStream : public IFGAS_Stream { int32_t GetBOM(uint8_t bom[4]) const override; uint16_t GetCodePage() const override; uint16_t SetCodePage(uint16_t wCodePage) override; - CFX_RetainPtr<IFGAS_Stream> CreateSharedStream(uint32_t dwAccess, - int32_t iOffset, - int32_t iLength) override; protected: explicit CFGAS_TextStream(const CFX_RetainPtr<IFGAS_Stream>& pStream); @@ -957,21 +951,6 @@ uint16_t CFGAS_TextStream::GetCodePage() const { return m_wCodePage; } -CFX_RetainPtr<IFGAS_Stream> CFGAS_TextStream::CreateSharedStream( - uint32_t dwAccess, - int32_t iOffset, - int32_t iLength) { - CFX_RetainPtr<IFGAS_Stream> pSR = - m_pStreamImp->CreateSharedStream(dwAccess, iOffset, iLength); - if (!pSR) - return nullptr; - - if (dwAccess & FX_STREAMACCESS_Text) - return pdfium::MakeRetain<CFGAS_TextStream>(pSR); - - return pSR; -} - int32_t CFGAS_TextStream::GetBOM(uint8_t bom[4]) const { if (m_wBOMLength < 1) return 0; @@ -1364,44 +1343,6 @@ uint16_t CFGAS_Stream::SetCodePage(uint16_t wCodePage) { #endif } -CFX_RetainPtr<IFGAS_Stream> CFGAS_Stream::CreateSharedStream(uint32_t dwAccess, - int32_t iOffset, - int32_t iLength) { - ASSERT(iLength > 0); - if (!m_pStreamImp) - return nullptr; - - if ((m_dwAccess & FX_STREAMACCESS_Text) != 0 && - (dwAccess & FX_STREAMACCESS_Text) == 0) { - return nullptr; - } - if ((m_dwAccess & FX_STREAMACCESS_Write) == 0 && - (dwAccess & FX_STREAMACCESS_Write) != 0) { - return nullptr; - } - int32_t iStart = m_iStart + iOffset; - int32_t iTotal = m_iStart + m_iLength; - if (iStart < m_iStart || iStart >= iTotal) - return nullptr; - - int32_t iEnd = iStart + iLength; - if (iEnd < iStart || iEnd > iTotal) - return nullptr; - - auto pShared = pdfium::MakeRetain<CFGAS_Stream>(); - pShared->m_eStreamType = FX_STREAMTYPE_Stream; - pShared->m_pStreamImp = m_pStreamImp; - pShared->m_dwAccess = dwAccess; - pShared->m_iTotalSize = iLength; - pShared->m_iPosition = iStart; - pShared->m_iStart = iStart; - pShared->m_iLength = (dwAccess & FX_STREAMACCESS_Write) != 0 ? 0 : iLength; - if (dwAccess & FX_STREAMACCESS_Text) - return IFGAS_Stream::CreateTextStream(pShared); - - return pShared; -} - CFX_RetainPtr<CFGAS_FileRead> CFGAS_FileRead::Create( const CFX_RetainPtr<IFGAS_Stream>& pStream) { return pdfium::MakeRetain<CFGAS_FileRead>(pStream); diff --git a/xfa/fgas/crt/ifgas_stream.h b/xfa/fgas/crt/ifgas_stream.h index 3ffead96dd..d3b3ef545c 100644 --- a/xfa/fgas/crt/ifgas_stream.h +++ b/xfa/fgas/crt/ifgas_stream.h @@ -41,10 +41,6 @@ class IFGAS_Stream : public CFX_Retainable { static CFX_RetainPtr<IFGAS_Stream> CreateTextStream( const CFX_RetainPtr<IFGAS_Stream>& pBaseStream); - virtual CFX_RetainPtr<IFGAS_Stream> CreateSharedStream(uint32_t dwAccess, - int32_t iOffset, - int32_t iLength) = 0; - virtual uint32_t GetAccessModes() const = 0; virtual int32_t GetLength() const = 0; virtual int32_t Seek(FX_STREAMSEEK eSeek, int32_t iOffset) = 0; diff --git a/xfa/fxfa/parser/cxfa_widetextread.cpp b/xfa/fxfa/parser/cxfa_widetextread.cpp index 73da5c670b..842e7ba0cd 100644 --- a/xfa/fxfa/parser/cxfa_widetextread.cpp +++ b/xfa/fxfa/parser/cxfa_widetextread.cpp @@ -91,13 +91,6 @@ uint16_t CXFA_WideTextRead::SetCodePage(uint16_t wCodePage) { return GetCodePage(); } -CFX_RetainPtr<IFGAS_Stream> CXFA_WideTextRead::CreateSharedStream( - uint32_t dwAccess, - int32_t iOffset, - int32_t iLength) { - return nullptr; -} - CFX_WideString CXFA_WideTextRead::GetSrcText() const { return m_wsBuffer; } diff --git a/xfa/fxfa/parser/cxfa_widetextread.h b/xfa/fxfa/parser/cxfa_widetextread.h index e6abac5adb..648e14ed0d 100644 --- a/xfa/fxfa/parser/cxfa_widetextread.h +++ b/xfa/fxfa/parser/cxfa_widetextread.h @@ -30,9 +30,6 @@ class CXFA_WideTextRead : public IFGAS_Stream { int32_t GetBOM(uint8_t bom[4]) const override; uint16_t GetCodePage() const override; uint16_t SetCodePage(uint16_t wCodePage) override; - CFX_RetainPtr<IFGAS_Stream> CreateSharedStream(uint32_t dwAccess, - int32_t iOffset, - int32_t iLength) override; CFX_WideString GetSrcText() const; |