diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-18 16:35:55 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-18 20:50:08 +0000 |
commit | bf510b7c520bccbd2edf5bb3e2f91b125ebfd6d7 (patch) | |
tree | 6ffafd1e5fcc767f5a4160d290e0b5f72d2ce271 /xfa/fde/css | |
parent | fdf7d4092a5fa9c79bbb4a626a4d3d087053ae2c (diff) | |
download | pdfium-bf510b7c520bccbd2edf5bb3e2f91b125ebfd6d7.tar.xz |
Rename IFGAS_Stream to CFGAS_Stream
This CL replaces IFGAS_Stream with the only implementation CFGAS_Stream.
The CreateReadStream and CreateWriteStream methods are removed in favour
of calling MakeRetain directly.
Change-Id: I882a89258f642e24fc3d631587db05652bd53ded
Reviewed-on: https://pdfium-review.googlesource.com/4210
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fde/css')
-rw-r--r-- | xfa/fde/css/cfde_csstextbuf.cpp | 18 | ||||
-rw-r--r-- | xfa/fde/css/cfde_csstextbuf.h | 6 | ||||
-rw-r--r-- | xfa/fde/css/fde_css.h | 2 |
3 files changed, 2 insertions, 24 deletions
diff --git a/xfa/fde/css/cfde_csstextbuf.cpp b/xfa/fde/css/cfde_csstextbuf.cpp index 149ed31e98..2d8f93f2b3 100644 --- a/xfa/fde/css/cfde_csstextbuf.cpp +++ b/xfa/fde/css/cfde_csstextbuf.cpp @@ -41,24 +41,6 @@ bool CFDE_CSSTextBuf::EstimateSize(int32_t iAllocSize) { return ExpandBuf(iAllocSize); } -int32_t CFDE_CSSTextBuf::LoadFromStream( - const CFX_RetainPtr<IFGAS_Stream>& pTxtStream, - int32_t iStreamOffset, - int32_t iMaxChars, - bool& bEOS) { - ASSERT(iStreamOffset >= 0 && iMaxChars > 0); - Clear(); - m_bExtBuf = false; - if (!ExpandBuf(iMaxChars)) - return 0; - - if (pTxtStream->GetPosition() != iStreamOffset) - pTxtStream->Seek(FX_STREAMSEEK_Begin, iStreamOffset); - - m_iDatLen = pTxtStream->ReadString(m_pBuffer, iMaxChars, &bEOS); - return m_iDatLen; -} - bool CFDE_CSSTextBuf::ExpandBuf(int32_t iDesiredSize) { if (m_bExtBuf) return false; diff --git a/xfa/fde/css/cfde_csstextbuf.h b/xfa/fde/css/cfde_csstextbuf.h index 52c76210ce..43ff03aa07 100644 --- a/xfa/fde/css/cfde_csstextbuf.h +++ b/xfa/fde/css/cfde_csstextbuf.h @@ -10,7 +10,7 @@ #include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/fx_memory.h" #include "core/fxcrt/fx_system.h" -#include "xfa/fgas/crt/ifgas_stream.h" +#include "xfa/fgas/crt/cfgas_stream.h" class CFDE_CSSTextBuf { public: @@ -19,10 +19,6 @@ class CFDE_CSSTextBuf { bool AttachBuffer(const wchar_t* pBuffer, int32_t iBufLen); bool EstimateSize(int32_t iAllocSize); - int32_t LoadFromStream(const CFX_RetainPtr<IFGAS_Stream>& pTxtStream, - int32_t iStreamOffset, - int32_t iMaxChars, - bool& bEOS); bool AppendChar(wchar_t wch) { if (m_iDatLen >= m_iBufLen && !ExpandBuf(m_iBufLen * 2)) return false; diff --git a/xfa/fde/css/fde_css.h b/xfa/fde/css/fde_css.h index ae4f36c93d..9e56fce59a 100644 --- a/xfa/fde/css/fde_css.h +++ b/xfa/fde/css/fde_css.h @@ -8,7 +8,7 @@ #define XFA_FDE_CSS_FDE_CSS_H_ #include "core/fxge/fx_dib.h" -#include "xfa/fgas/crt/ifgas_stream.h" +#include "xfa/fgas/crt/cfgas_stream.h" #include "xfa/fgas/font/cfgas_fontmgr.h" enum FDE_CSSVALUETYPE { |