summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_array.cpp3
-rw-r--r--core/fpdfapi/parser/cpdf_array.h4
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.cpp4
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.h8
-rw-r--r--core/fpdfapi/parser/cpdf_indirect_object_holder.h6
-rw-r--r--core/fpdfapi/parser/cpdf_name.cpp2
-rw-r--r--core/fpdfapi/parser/cpdf_name.h4
-rw-r--r--core/fpdfapi/parser/cpdf_string.cpp5
-rw-r--r--core/fpdfapi/parser/cpdf_string.h8
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp4
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.h6
11 files changed, 25 insertions, 29 deletions
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp
index f4907ffdf1..5a5cdc9be0 100644
--- a/core/fpdfapi/parser/cpdf_array.cpp
+++ b/core/fpdfapi/parser/cpdf_array.cpp
@@ -20,8 +20,7 @@
CPDF_Array::CPDF_Array() {}
-CPDF_Array::CPDF_Array(const CFX_WeakPtr<ByteStringPool>& pPool)
- : m_pPool(pPool) {}
+CPDF_Array::CPDF_Array(const WeakPtr<ByteStringPool>& pPool) : m_pPool(pPool) {}
CPDF_Array::~CPDF_Array() {
// Break cycles for cyclic references.
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index 3b18025b2d..bf8cb426c4 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -24,7 +24,7 @@ class CPDF_Array : public CPDF_Object {
std::vector<std::unique_ptr<CPDF_Object>>::const_iterator;
CPDF_Array();
- explicit CPDF_Array(const CFX_WeakPtr<ByteStringPool>& pPool);
+ explicit CPDF_Array(const WeakPtr<ByteStringPool>& pPool);
~CPDF_Array() override;
// CPDF_Object:
@@ -112,7 +112,7 @@ class CPDF_Array : public CPDF_Object {
std::set<const CPDF_Object*>* pVisited) const override;
std::vector<std::unique_ptr<CPDF_Object>> m_Objects;
- CFX_WeakPtr<ByteStringPool> m_pPool;
+ WeakPtr<ByteStringPool> m_pPool;
};
inline CPDF_Array* ToArray(CPDF_Object* obj) {
diff --git a/core/fpdfapi/parser/cpdf_dictionary.cpp b/core/fpdfapi/parser/cpdf_dictionary.cpp
index 570c57e557..5cdcf34f81 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.cpp
+++ b/core/fpdfapi/parser/cpdf_dictionary.cpp
@@ -22,9 +22,9 @@
#include "third_party/base/stl_util.h"
CPDF_Dictionary::CPDF_Dictionary()
- : CPDF_Dictionary(CFX_WeakPtr<ByteStringPool>()) {}
+ : CPDF_Dictionary(WeakPtr<ByteStringPool>()) {}
-CPDF_Dictionary::CPDF_Dictionary(const CFX_WeakPtr<ByteStringPool>& pPool)
+CPDF_Dictionary::CPDF_Dictionary(const WeakPtr<ByteStringPool>& pPool)
: m_pPool(pPool) {}
CPDF_Dictionary::~CPDF_Dictionary() {
diff --git a/core/fpdfapi/parser/cpdf_dictionary.h b/core/fpdfapi/parser/cpdf_dictionary.h
index a9ff353fbe..688e88e510 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.h
+++ b/core/fpdfapi/parser/cpdf_dictionary.h
@@ -13,10 +13,10 @@
#include <utility>
#include "core/fpdfapi/parser/cpdf_object.h"
-#include "core/fxcrt/cfx_weak_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/string_pool_template.h"
+#include "core/fxcrt/weak_ptr.h"
#include "third_party/base/ptr_util.h"
class CPDF_IndirectObjectHolder;
@@ -27,7 +27,7 @@ class CPDF_Dictionary : public CPDF_Object {
std::map<ByteString, std::unique_ptr<CPDF_Object>>::const_iterator;
CPDF_Dictionary();
- explicit CPDF_Dictionary(const CFX_WeakPtr<ByteStringPool>& pPool);
+ explicit CPDF_Dictionary(const WeakPtr<ByteStringPool>& pPool);
~CPDF_Dictionary() override;
// CPDF_Object:
@@ -97,7 +97,7 @@ class CPDF_Dictionary : public CPDF_Object {
const_iterator begin() const { return m_Map.begin(); }
const_iterator end() const { return m_Map.end(); }
- CFX_WeakPtr<ByteStringPool> GetByteStringPool() const { return m_pPool; }
+ WeakPtr<ByteStringPool> GetByteStringPool() const { return m_pPool; }
protected:
ByteString MaybeIntern(const ByteString& str);
@@ -105,7 +105,7 @@ class CPDF_Dictionary : public CPDF_Object {
bool bDirect,
std::set<const CPDF_Object*>* visited) const override;
- CFX_WeakPtr<ByteStringPool> m_pPool;
+ WeakPtr<ByteStringPool> m_pPool;
std::map<ByteString, std::unique_ptr<CPDF_Object>> m_Map;
};
diff --git a/core/fpdfapi/parser/cpdf_indirect_object_holder.h b/core/fpdfapi/parser/cpdf_indirect_object_holder.h
index ea70c4a351..57374b9cc2 100644
--- a/core/fpdfapi/parser/cpdf_indirect_object_holder.h
+++ b/core/fpdfapi/parser/cpdf_indirect_object_holder.h
@@ -14,9 +14,9 @@
#include <vector>
#include "core/fpdfapi/parser/cpdf_object.h"
-#include "core/fxcrt/cfx_weak_ptr.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/string_pool_template.h"
+#include "core/fxcrt/weak_ptr.h"
#include "third_party/base/ptr_util.h"
class CPDF_IndirectObjectHolder {
@@ -58,7 +58,7 @@ class CPDF_IndirectObjectHolder {
uint32_t GetLastObjNum() const { return m_LastObjNum; }
void SetLastObjNum(uint32_t objnum) { m_LastObjNum = objnum; }
- CFX_WeakPtr<ByteStringPool> GetByteStringPool() const {
+ WeakPtr<ByteStringPool> GetByteStringPool() const {
return m_pByteStringPool;
}
@@ -72,7 +72,7 @@ class CPDF_IndirectObjectHolder {
uint32_t m_LastObjNum;
std::map<uint32_t, std::unique_ptr<CPDF_Object>> m_IndirectObjs;
std::vector<std::unique_ptr<CPDF_Object>> m_OrphanObjs;
- CFX_WeakPtr<ByteStringPool> m_pByteStringPool;
+ WeakPtr<ByteStringPool> m_pByteStringPool;
};
#endif // CORE_FPDFAPI_PARSER_CPDF_INDIRECT_OBJECT_HOLDER_H_
diff --git a/core/fpdfapi/parser/cpdf_name.cpp b/core/fpdfapi/parser/cpdf_name.cpp
index 0dd9890702..0607a30342 100644
--- a/core/fpdfapi/parser/cpdf_name.cpp
+++ b/core/fpdfapi/parser/cpdf_name.cpp
@@ -10,7 +10,7 @@
#include "core/fxcrt/fx_stream.h"
#include "third_party/base/ptr_util.h"
-CPDF_Name::CPDF_Name(CFX_WeakPtr<ByteStringPool> pPool, const ByteString& str)
+CPDF_Name::CPDF_Name(WeakPtr<ByteStringPool> pPool, const ByteString& str)
: m_Name(str) {
if (pPool)
m_Name = pPool->Intern(m_Name);
diff --git a/core/fpdfapi/parser/cpdf_name.h b/core/fpdfapi/parser/cpdf_name.h
index 8a1cf2b63b..880c10aedb 100644
--- a/core/fpdfapi/parser/cpdf_name.h
+++ b/core/fpdfapi/parser/cpdf_name.h
@@ -10,12 +10,12 @@
#include <memory>
#include "core/fpdfapi/parser/cpdf_object.h"
-#include "core/fxcrt/cfx_weak_ptr.h"
#include "core/fxcrt/string_pool_template.h"
+#include "core/fxcrt/weak_ptr.h"
class CPDF_Name : public CPDF_Object {
public:
- CPDF_Name(CFX_WeakPtr<ByteStringPool> pPool, const ByteString& str);
+ CPDF_Name(WeakPtr<ByteStringPool> pPool, const ByteString& str);
~CPDF_Name() override;
// CPDF_Object:
diff --git a/core/fpdfapi/parser/cpdf_string.cpp b/core/fpdfapi/parser/cpdf_string.cpp
index 1539861622..851442e8b4 100644
--- a/core/fpdfapi/parser/cpdf_string.cpp
+++ b/core/fpdfapi/parser/cpdf_string.cpp
@@ -14,7 +14,7 @@
CPDF_String::CPDF_String() : m_bHex(false) {}
-CPDF_String::CPDF_String(CFX_WeakPtr<ByteStringPool> pPool,
+CPDF_String::CPDF_String(WeakPtr<ByteStringPool> pPool,
const ByteString& str,
bool bHex)
: m_String(str), m_bHex(bHex) {
@@ -22,8 +22,7 @@ CPDF_String::CPDF_String(CFX_WeakPtr<ByteStringPool> pPool,
m_String = pPool->Intern(m_String);
}
-CPDF_String::CPDF_String(CFX_WeakPtr<ByteStringPool> pPool,
- const WideString& str)
+CPDF_String::CPDF_String(WeakPtr<ByteStringPool> pPool, const WideString& str)
: m_String(PDF_EncodeText(str)), m_bHex(false) {
if (pPool)
m_String = pPool->Intern(m_String);
diff --git a/core/fpdfapi/parser/cpdf_string.h b/core/fpdfapi/parser/cpdf_string.h
index 6f762ae27b..b6aaacb043 100644
--- a/core/fpdfapi/parser/cpdf_string.h
+++ b/core/fpdfapi/parser/cpdf_string.h
@@ -10,18 +10,16 @@
#include <memory>
#include "core/fpdfapi/parser/cpdf_object.h"
-#include "core/fxcrt/cfx_weak_ptr.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
#include "core/fxcrt/string_pool_template.h"
+#include "core/fxcrt/weak_ptr.h"
class CPDF_String : public CPDF_Object {
public:
CPDF_String();
- CPDF_String(CFX_WeakPtr<ByteStringPool> pPool,
- const ByteString& str,
- bool bHex);
- CPDF_String(CFX_WeakPtr<ByteStringPool> pPool, const WideString& str);
+ CPDF_String(WeakPtr<ByteStringPool> pPool, const ByteString& str, bool bHex);
+ CPDF_String(WeakPtr<ByteStringPool> pPool, const WideString& str);
~CPDF_String() override;
// CPDF_Object:
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 7bea4c45fc..bf6d90ca9a 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -41,9 +41,9 @@ enum class ReadStatus { Normal, Backslash, Octal, FinishOctal, CarriageReturn };
int CPDF_SyntaxParser::s_CurrentRecursionDepth = 0;
CPDF_SyntaxParser::CPDF_SyntaxParser()
- : CPDF_SyntaxParser(CFX_WeakPtr<ByteStringPool>()) {}
+ : CPDF_SyntaxParser(WeakPtr<ByteStringPool>()) {}
-CPDF_SyntaxParser::CPDF_SyntaxParser(const CFX_WeakPtr<ByteStringPool>& pPool)
+CPDF_SyntaxParser::CPDF_SyntaxParser(const WeakPtr<ByteStringPool>& pPool)
: m_MetadataObjnum(0),
m_pFileAccess(nullptr),
m_pFileBuf(nullptr),
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.h b/core/fpdfapi/parser/cpdf_syntax_parser.h
index cb266837dc..2b642b5963 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.h
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.h
@@ -10,8 +10,8 @@
#include <algorithm>
#include <memory>
-#include "core/fxcrt/cfx_weak_ptr.h"
#include "core/fxcrt/string_pool_template.h"
+#include "core/fxcrt/weak_ptr.h"
class CPDF_CryptoHandler;
class CPDF_Dictionary;
@@ -26,7 +26,7 @@ class CPDF_SyntaxParser {
enum class ParseType { kStrict, kLoose };
CPDF_SyntaxParser();
- explicit CPDF_SyntaxParser(const CFX_WeakPtr<ByteStringPool>& pPool);
+ explicit CPDF_SyntaxParser(const WeakPtr<ByteStringPool>& pPool);
~CPDF_SyntaxParser();
void InitParser(const RetainPtr<IFX_SeekableReadStream>& pFileAccess,
@@ -121,7 +121,7 @@ class CPDF_SyntaxParser {
RetainPtr<CPDF_CryptoHandler> m_pCryptoHandler;
uint8_t m_WordBuffer[257];
uint32_t m_WordSize;
- CFX_WeakPtr<ByteStringPool> m_pPool;
+ WeakPtr<ByteStringPool> m_pPool;
};
#endif // CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_