summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-21 15:49:49 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-21 20:17:31 +0000
commit0b95042db2e6dab5876abd12ce485fff0a8e08fe (patch)
tree02132ed53945fde30bfbf230ff4e9b5308dd7732 /core/fpdfapi/edit
parenta5eb9f05b7c3f82630784e043ccf75c4e019b18f (diff)
downloadpdfium-0b95042db2e6dab5876abd12ce485fff0a8e08fe.tar.xz
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 <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_creator.cpp11
-rw-r--r--core/fpdfapi/edit/cpdf_creator.h6
-rw-r--r--core/fpdfapi/edit/cpdf_flateencoder.h4
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp2
4 files changed, 11 insertions, 12 deletions
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<IFX_WriteStream>& archive);
+ explicit CFX_FileBufferArchive(const RetainPtr<IFX_WriteStream>& 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<uint8_t> buffer_;
- CFX_RetainPtr<IFX_WriteStream> backing_file_;
+ RetainPtr<IFX_WriteStream> backing_file_;
};
CFX_FileBufferArchive::CFX_FileBufferArchive(
- const CFX_RetainPtr<IFX_WriteStream>& file)
+ const RetainPtr<IFX_WriteStream>& 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<IFX_WriteStream>& archive)
+ const RetainPtr<IFX_WriteStream>& 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<IFX_SeekableReadStream> pSrcFile =
- m_pParser->GetFileAccess();
+ RetainPtr<IFX_SeekableReadStream> pSrcFile = m_pParser->GetFileAccess();
std::vector<uint8_t> 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 <memory>
#include <vector>
-#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<IFX_WriteStream>& archive);
+ const RetainPtr<IFX_WriteStream>& archive);
~CPDF_Creator();
void RemoveSecurity();
@@ -85,7 +85,7 @@ class CPDF_Creator {
bool m_bSecurityChanged;
CFX_UnownedPtr<CPDF_Dictionary> m_pEncryptDict;
uint32_t m_dwEncryptObjNum;
- CFX_RetainPtr<CPDF_CryptoHandler> m_pCryptoHandler;
+ RetainPtr<CPDF_CryptoHandler> m_pCryptoHandler;
CFX_UnownedPtr<CPDF_Object> m_pMetadata;
uint32_t m_dwLastObjNum;
std::unique_ptr<IFX_ArchiveStream> 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<uint8_t, FxFreeDeleter> m_pData;
MaybeOwned<CPDF_Dictionary> m_pDict;
- CFX_RetainPtr<CPDF_StreamAcc> m_pAcc;
+ RetainPtr<CPDF_StreamAcc> 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<CPDF_Image> pImage = pImageObj->GetImage();
+ RetainPtr<CPDF_Image> pImage = pImageObj->GetImage();
if (pImage->IsInline())
return;