From 0b95042db2e6dab5876abd12ce485fff0a8e08fe Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 21 Sep 2017 15:49:49 -0400 Subject: Rename CFX_RetainPtr to RetainPtr This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e Reviewed-on: https://pdfium-review.googlesource.com/14616 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- core/fpdfapi/edit/cpdf_creator.cpp | 11 +++++------ core/fpdfapi/edit/cpdf_creator.h | 6 +++--- core/fpdfapi/edit/cpdf_flateencoder.h | 4 ++-- core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) (limited to 'core/fpdfapi/edit') diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp index c3143b5322..7c567779ff 100644 --- a/core/fpdfapi/edit/cpdf_creator.cpp +++ b/core/fpdfapi/edit/cpdf_creator.cpp @@ -27,7 +27,7 @@ const size_t kArchiveBufferSize = 32768; class CFX_FileBufferArchive : public IFX_ArchiveStream { public: - explicit CFX_FileBufferArchive(const CFX_RetainPtr& archive); + explicit CFX_FileBufferArchive(const RetainPtr& archive); ~CFX_FileBufferArchive() override; bool WriteBlock(const void* pBuf, size_t size) override; @@ -43,11 +43,11 @@ class CFX_FileBufferArchive : public IFX_ArchiveStream { FX_FILESIZE offset_; size_t current_length_; std::vector buffer_; - CFX_RetainPtr backing_file_; + RetainPtr backing_file_; }; CFX_FileBufferArchive::CFX_FileBufferArchive( - const CFX_RetainPtr& file) + const RetainPtr& file) : offset_(0), current_length_(0), buffer_(kArchiveBufferSize), @@ -139,7 +139,7 @@ int32_t OutputIndex(IFX_ArchiveStream* archive, FX_FILESIZE offset) { } // namespace CPDF_Creator::CPDF_Creator(CPDF_Document* pDoc, - const CFX_RetainPtr& archive) + const RetainPtr& archive) : m_pDocument(pDoc), m_pParser(pDoc->GetParser()), m_bSecurityChanged(false), @@ -437,8 +437,7 @@ int32_t CPDF_Creator::WriteDoc_Stage1() { } if (m_iStage == 15) { if (IsOriginal() && m_SavedOffset > 0) { - CFX_RetainPtr pSrcFile = - m_pParser->GetFileAccess(); + RetainPtr pSrcFile = m_pParser->GetFileAccess(); std::vector buffer(4096); FX_FILESIZE src_size = m_SavedOffset; while (src_size) { diff --git a/core/fpdfapi/edit/cpdf_creator.h b/core/fpdfapi/edit/cpdf_creator.h index d97ee01d73..3ea5da85b7 100644 --- a/core/fpdfapi/edit/cpdf_creator.h +++ b/core/fpdfapi/edit/cpdf_creator.h @@ -11,9 +11,9 @@ #include #include -#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_stream.h" +#include "core/fxcrt/retain_ptr.h" class CPDF_Array; class CPDF_CryptoHandler; @@ -28,7 +28,7 @@ class CPDF_Parser; class CPDF_Creator { public: explicit CPDF_Creator(CPDF_Document* pDoc, - const CFX_RetainPtr& archive); + const RetainPtr& archive); ~CPDF_Creator(); void RemoveSecurity(); @@ -85,7 +85,7 @@ class CPDF_Creator { bool m_bSecurityChanged; CFX_UnownedPtr m_pEncryptDict; uint32_t m_dwEncryptObjNum; - CFX_RetainPtr m_pCryptoHandler; + RetainPtr m_pCryptoHandler; CFX_UnownedPtr m_pMetadata; uint32_t m_dwLastObjNum; std::unique_ptr m_Archive; diff --git a/core/fpdfapi/edit/cpdf_flateencoder.h b/core/fpdfapi/edit/cpdf_flateencoder.h index 3698414fd2..887816c1a1 100644 --- a/core/fpdfapi/edit/cpdf_flateencoder.h +++ b/core/fpdfapi/edit/cpdf_flateencoder.h @@ -9,9 +9,9 @@ #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_stream_acc.h" -#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/fx_memory.h" #include "core/fxcrt/maybe_owned.h" +#include "core/fxcrt/retain_ptr.h" class CPDF_Stream; @@ -31,7 +31,7 @@ class CPDF_FlateEncoder { uint32_t m_dwSize; MaybeOwned m_pData; MaybeOwned m_pDict; - CFX_RetainPtr m_pAcc; + RetainPtr m_pAcc; }; #endif // CORE_FPDFAPI_EDIT_CPDF_FLATEENCODER_H_ diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp index c0c6604671..fc7e97fc79 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp @@ -175,7 +175,7 @@ void CPDF_PageContentGenerator::ProcessImage(std::ostringstream* buf, } *buf << "q " << pImageObj->matrix() << " cm "; - CFX_RetainPtr pImage = pImageObj->GetImage(); + RetainPtr pImage = pImageObj->GetImage(); if (pImage->IsInline()) return; -- cgit v1.2.3