diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-09-21 15:49:49 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-21 20:17:31 +0000 |
commit | 0b95042db2e6dab5876abd12ce485fff0a8e08fe (patch) | |
tree | 02132ed53945fde30bfbf230ff4e9b5308dd7732 /core/fpdfdoc | |
parent | a5eb9f05b7c3f82630784e043ccf75c4e019b18f (diff) | |
download | pdfium-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/fpdfdoc')
-rw-r--r-- | core/fpdfdoc/cpdf_annotlist.cpp | 2 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_occontext.h | 6 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_structelement.h | 8 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_structtree.cpp | 10 | ||||
-rw-r--r-- | core/fpdfdoc/cpdf_structtree.h | 10 |
5 files changed, 18 insertions, 18 deletions
diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp index 87e5ba7808..503c533b84 100644 --- a/core/fpdfdoc/cpdf_annotlist.cpp +++ b/core/fpdfdoc/cpdf_annotlist.cpp @@ -141,7 +141,7 @@ void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, continue; if (pOptions) { - CFX_RetainPtr<CPDF_OCContext> pOCContext = pOptions->m_pOCContext; + RetainPtr<CPDF_OCContext> pOCContext = pOptions->m_pOCContext; CPDF_Dictionary* pAnnotDict = pAnnot->GetAnnotDict(); if (pOCContext && pAnnotDict && !pOCContext->CheckOCGVisible(pAnnotDict->GetDictFor("OC"))) { diff --git a/core/fpdfdoc/cpdf_occontext.h b/core/fpdfdoc/cpdf_occontext.h index 3c93ef1d59..c4fbb25724 100644 --- a/core/fpdfdoc/cpdf_occontext.h +++ b/core/fpdfdoc/cpdf_occontext.h @@ -9,18 +9,18 @@ #include <map> -#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/fx_string.h" +#include "core/fxcrt/retain_ptr.h" class CPDF_Array; class CPDF_Dictionary; class CPDF_Document; class CPDF_PageObject; -class CPDF_OCContext : public CFX_Retainable { +class CPDF_OCContext : public Retainable { public: template <typename T, typename... Args> - friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args); + friend RetainPtr<T> pdfium::MakeRetain(Args&&... args); enum UsageType { View = 0, Design, Print, Export }; diff --git a/core/fpdfdoc/cpdf_structelement.h b/core/fpdfdoc/cpdf_structelement.h index b54487e7f8..c1e5f5001d 100644 --- a/core/fpdfdoc/cpdf_structelement.h +++ b/core/fpdfdoc/cpdf_structelement.h @@ -9,9 +9,9 @@ #include <vector> -#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxcrt/fx_string.h" +#include "core/fxcrt/retain_ptr.h" #include "core/fxge/fx_dib.h" class CPDF_Dictionary; @@ -27,17 +27,17 @@ class CPDF_StructKid { enum { Invalid, Element, PageContent, StreamContent, Object } m_Type; - CFX_RetainPtr<CPDF_StructElement> m_pElement; // For Element. + RetainPtr<CPDF_StructElement> m_pElement; // For Element. CFX_UnownedPtr<CPDF_Dictionary> m_pDict; // For Element. uint32_t m_PageObjNum; // For PageContent, StreamContent, Object. uint32_t m_RefObjNum; // For StreamContent, Object. uint32_t m_ContentId; // For PageContent, StreamContent. }; -class CPDF_StructElement : public CFX_Retainable { +class CPDF_StructElement : public Retainable { public: template <typename T, typename... Args> - friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args); + friend RetainPtr<T> pdfium::MakeRetain(Args&&... args); const ByteString& GetType() const { return m_Type; } const ByteString& GetTitle() const { return m_Title; } diff --git a/core/fpdfdoc/cpdf_structtree.cpp b/core/fpdfdoc/cpdf_structtree.cpp index 9168a4f01a..0e9b529ca8 100644 --- a/core/fpdfdoc/cpdf_structtree.cpp +++ b/core/fpdfdoc/cpdf_structtree.cpp @@ -85,16 +85,16 @@ void CPDF_StructTree::LoadPageTree(const CPDF_Dictionary* pPageDict) { if (!pParentArray) return; - std::map<CPDF_Dictionary*, CFX_RetainPtr<CPDF_StructElement>> element_map; + std::map<CPDF_Dictionary*, RetainPtr<CPDF_StructElement>> element_map; for (size_t i = 0; i < pParentArray->GetCount(); i++) { if (CPDF_Dictionary* pParent = pParentArray->GetDictAt(i)) AddPageNode(pParent, &element_map, 0); } } -CFX_RetainPtr<CPDF_StructElement> CPDF_StructTree::AddPageNode( +RetainPtr<CPDF_StructElement> CPDF_StructTree::AddPageNode( CPDF_Dictionary* pDict, - std::map<CPDF_Dictionary*, CFX_RetainPtr<CPDF_StructElement>>* map, + std::map<CPDF_Dictionary*, RetainPtr<CPDF_StructElement>>* map, int nLevel) { if (nLevel > nMaxRecursion) return nullptr; @@ -112,7 +112,7 @@ CFX_RetainPtr<CPDF_StructElement> CPDF_StructTree::AddPageNode( return pElement; } - CFX_RetainPtr<CPDF_StructElement> pParentElement = + RetainPtr<CPDF_StructElement> pParentElement = AddPageNode(pParent, map, nLevel + 1); bool bSave = false; for (CPDF_StructKid& kid : *pParentElement->GetKids()) { @@ -128,7 +128,7 @@ CFX_RetainPtr<CPDF_StructElement> CPDF_StructTree::AddPageNode( bool CPDF_StructTree::AddTopLevelNode( CPDF_Dictionary* pDict, - const CFX_RetainPtr<CPDF_StructElement>& pElement) { + const RetainPtr<CPDF_StructElement>& pElement) { CPDF_Object* pObj = m_pTreeRoot->GetDirectObjectFor("K"); if (!pObj) return false; diff --git a/core/fpdfdoc/cpdf_structtree.h b/core/fpdfdoc/cpdf_structtree.h index 037512acfc..9603620fc1 100644 --- a/core/fpdfdoc/cpdf_structtree.h +++ b/core/fpdfdoc/cpdf_structtree.h @@ -11,8 +11,8 @@ #include <memory> #include <vector> -#include "core/fxcrt/cfx_retain_ptr.h" #include "core/fxcrt/cfx_unowned_ptr.h" +#include "core/fxcrt/retain_ptr.h" class CPDF_Dictionary; class CPDF_Document; @@ -35,17 +35,17 @@ class CPDF_StructTree { private: void LoadPageTree(const CPDF_Dictionary* pPageDict); - CFX_RetainPtr<CPDF_StructElement> AddPageNode( + RetainPtr<CPDF_StructElement> AddPageNode( CPDF_Dictionary* pElement, - std::map<CPDF_Dictionary*, CFX_RetainPtr<CPDF_StructElement>>* map, + std::map<CPDF_Dictionary*, RetainPtr<CPDF_StructElement>>* map, int nLevel); bool AddTopLevelNode(CPDF_Dictionary* pDict, - const CFX_RetainPtr<CPDF_StructElement>& pElement); + const RetainPtr<CPDF_StructElement>& pElement); CFX_UnownedPtr<const CPDF_Dictionary> const m_pTreeRoot; CFX_UnownedPtr<const CPDF_Dictionary> const m_pRoleMap; CFX_UnownedPtr<const CPDF_Dictionary> m_pPage; - std::vector<CFX_RetainPtr<CPDF_StructElement>> m_Kids; + std::vector<RetainPtr<CPDF_StructElement>> m_Kids; }; #endif // CORE_FPDFDOC_CPDF_STRUCTTREE_H_ |