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/fpdfdoc/cpdf_annotlist.cpp | 2 +- core/fpdfdoc/cpdf_occontext.h | 6 +++--- core/fpdfdoc/cpdf_structelement.h | 8 ++++---- core/fpdfdoc/cpdf_structtree.cpp | 10 +++++----- core/fpdfdoc/cpdf_structtree.h | 10 +++++----- 5 files changed, 18 insertions(+), 18 deletions(-) (limited to 'core/fpdfdoc') 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 pOCContext = pOptions->m_pOCContext; + RetainPtr 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 -#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 - friend CFX_RetainPtr pdfium::MakeRetain(Args&&... args); + friend RetainPtr 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 -#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 m_pElement; // For Element. + RetainPtr m_pElement; // For Element. CFX_UnownedPtr 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 - friend CFX_RetainPtr pdfium::MakeRetain(Args&&... args); + friend RetainPtr 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> element_map; + std::map> 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_StructTree::AddPageNode( +RetainPtr CPDF_StructTree::AddPageNode( CPDF_Dictionary* pDict, - std::map>* map, + std::map>* map, int nLevel) { if (nLevel > nMaxRecursion) return nullptr; @@ -112,7 +112,7 @@ CFX_RetainPtr CPDF_StructTree::AddPageNode( return pElement; } - CFX_RetainPtr pParentElement = + RetainPtr pParentElement = AddPageNode(pParent, map, nLevel + 1); bool bSave = false; for (CPDF_StructKid& kid : *pParentElement->GetKids()) { @@ -128,7 +128,7 @@ CFX_RetainPtr CPDF_StructTree::AddPageNode( bool CPDF_StructTree::AddTopLevelNode( CPDF_Dictionary* pDict, - const CFX_RetainPtr& pElement) { + const RetainPtr& 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 #include -#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 AddPageNode( + RetainPtr AddPageNode( CPDF_Dictionary* pElement, - std::map>* map, + std::map>* map, int nLevel); bool AddTopLevelNode(CPDF_Dictionary* pDict, - const CFX_RetainPtr& pElement); + const RetainPtr& pElement); CFX_UnownedPtr const m_pTreeRoot; CFX_UnownedPtr const m_pRoleMap; CFX_UnownedPtr m_pPage; - std::vector> m_Kids; + std::vector> m_Kids; }; #endif // CORE_FPDFDOC_CPDF_STRUCTTREE_H_ -- cgit v1.2.3