summaryrefslogtreecommitdiff
path: root/xfa/fgas/crt/ifgas_stream.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-10 16:29:57 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-10 21:12:34 +0000
commitd562ef07d9faf211f1f6218f0879f02b60a05f18 (patch)
treeb058eb7a610a3ba7b93d5051c79eb12649d9a4d4 /xfa/fgas/crt/ifgas_stream.cpp
parentc6c71f1062aa8b22d432af5cbbfddf038a6d2d3f (diff)
downloadpdfium-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>
Diffstat (limited to 'xfa/fgas/crt/ifgas_stream.cpp')
-rw-r--r--xfa/fgas/crt/ifgas_stream.cpp59
1 files changed, 0 insertions, 59 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);