diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-09-26 09:23:29 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-26 13:43:25 +0000 |
commit | a7caeb52912150e59aadf49ed21a45a4a1260a4a (patch) | |
tree | ae1c21027979ad7bc168b4d8b3821ffe65e5f59f /fpdfsdk/fpdfview.cpp | |
parent | ba14c0a5f12b98c5eaed984f048def6262bab23f (diff) | |
download | pdfium-a7caeb52912150e59aadf49ed21a45a4a1260a4a.tar.xz |
Rename CFPDF_* classes
This CL removes the CFPDF_* prefix. The classes have been renamed to
their FPDF_* name with Context appended to the end. This makes it easier
to differentiate things like CPDF_DataAvail vs CFPDF_DataAvail as the
former is now FPDF_AvailContext.
Change-Id: I4a97727b3418de268c8494eaca2ed413b5cc2954
Reviewed-on: https://pdfium-review.googlesource.com/14810
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r-- | fpdfsdk/fpdfview.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index df46ec5218..5312383000 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -168,12 +168,12 @@ bool CPDF_CustomAccess::ReadBlock(void* buffer, } #ifdef PDF_ENABLE_XFA -class CFPDF_FileStream : public IFX_SeekableStream { +class FPDF_FileHandlerContext : public IFX_SeekableStream { public: template <typename T, typename... Args> friend RetainPtr<T> pdfium::MakeRetain(Args&&... args); - ~CFPDF_FileStream() override; + ~FPDF_FileHandlerContext() override; // IFX_SeekableStream: FX_FILESIZE GetSize() override; @@ -187,39 +187,39 @@ class CFPDF_FileStream : public IFX_SeekableStream { void SetPosition(FX_FILESIZE pos) { m_nCurPos = pos; } protected: - explicit CFPDF_FileStream(FPDF_FILEHANDLER* pFS); + explicit FPDF_FileHandlerContext(FPDF_FILEHANDLER* pFS); FPDF_FILEHANDLER* m_pFS; FX_FILESIZE m_nCurPos; }; -CFPDF_FileStream::CFPDF_FileStream(FPDF_FILEHANDLER* pFS) { +FPDF_FileHandlerContext::FPDF_FileHandlerContext(FPDF_FILEHANDLER* pFS) { m_pFS = pFS; m_nCurPos = 0; } -CFPDF_FileStream::~CFPDF_FileStream() { +FPDF_FileHandlerContext::~FPDF_FileHandlerContext() { if (m_pFS && m_pFS->Release) m_pFS->Release(m_pFS->clientData); } -FX_FILESIZE CFPDF_FileStream::GetSize() { +FX_FILESIZE FPDF_FileHandlerContext::GetSize() { if (m_pFS && m_pFS->GetSize) return (FX_FILESIZE)m_pFS->GetSize(m_pFS->clientData); return 0; } -bool CFPDF_FileStream::IsEOF() { +bool FPDF_FileHandlerContext::IsEOF() { return m_nCurPos >= GetSize(); } -FX_FILESIZE CFPDF_FileStream::GetPosition() { +FX_FILESIZE FPDF_FileHandlerContext::GetPosition() { return m_nCurPos; } -bool CFPDF_FileStream::ReadBlock(void* buffer, - FX_FILESIZE offset, - size_t size) { +bool FPDF_FileHandlerContext::ReadBlock(void* buffer, + FX_FILESIZE offset, + size_t size) { if (!buffer || !size || !m_pFS->ReadBlock) return false; @@ -231,7 +231,7 @@ bool CFPDF_FileStream::ReadBlock(void* buffer, return false; } -size_t CFPDF_FileStream::ReadBlock(void* buffer, size_t size) { +size_t FPDF_FileHandlerContext::ReadBlock(void* buffer, size_t size) { if (!buffer || !size || !m_pFS->ReadBlock) return 0; @@ -250,9 +250,9 @@ size_t CFPDF_FileStream::ReadBlock(void* buffer, size_t size) { return 0; } -bool CFPDF_FileStream::WriteBlock(const void* buffer, - FX_FILESIZE offset, - size_t size) { +bool FPDF_FileHandlerContext::WriteBlock(const void* buffer, + FX_FILESIZE offset, + size_t size) { if (!m_pFS || !m_pFS->WriteBlock) return false; @@ -264,7 +264,7 @@ bool CFPDF_FileStream::WriteBlock(const void* buffer, return false; } -bool CFPDF_FileStream::Flush() { +bool FPDF_FileHandlerContext::Flush() { if (!m_pFS || !m_pFS->Flush) return true; @@ -417,7 +417,7 @@ RetainPtr<IFX_SeekableReadStream> MakeSeekableReadStream( #ifdef PDF_ENABLE_XFA RetainPtr<IFX_SeekableStream> MakeSeekableStream( FPDF_FILEHANDLER* pFilehandler) { - return pdfium::MakeRetain<CFPDF_FileStream>(pFilehandler); + return pdfium::MakeRetain<FPDF_FileHandlerContext>(pFilehandler); } #endif // PDF_ENABLE_XFA |