Index: core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp |
diff --git a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp |
index e79bac1839f98330d6246f73ab7fdf6c8c4c35c0..cc395a2e089d7634d99331844e59d74a0fac50bf 100644 |
--- a/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp |
+++ b/core/fpdfapi/fpdf_parser/cpdf_dictionary.cpp |
@@ -71,59 +71,59 @@ CPDF_Object* CPDF_Dictionary::CloneNonCyclic( |
return pCopy; |
} |
-CPDF_Object* CPDF_Dictionary::GetObjectBy(const CFX_ByteString& key) const { |
+CPDF_Object* CPDF_Dictionary::GetObjectFor(const CFX_ByteString& key) const { |
auto it = m_Map.find(key); |
return it != m_Map.end() ? it->second : nullptr; |
} |
-CPDF_Object* CPDF_Dictionary::GetDirectObjectBy( |
+CPDF_Object* CPDF_Dictionary::GetDirectObjectFor( |
const CFX_ByteString& key) const { |
- CPDF_Object* p = GetObjectBy(key); |
+ CPDF_Object* p = GetObjectFor(key); |
return p ? p->GetDirect() : nullptr; |
} |
-CFX_ByteString CPDF_Dictionary::GetStringBy(const CFX_ByteString& key) const { |
- CPDF_Object* p = GetObjectBy(key); |
+CFX_ByteString CPDF_Dictionary::GetStringFor(const CFX_ByteString& key) const { |
+ CPDF_Object* p = GetObjectFor(key); |
return p ? p->GetString() : CFX_ByteString(); |
} |
-CFX_WideString CPDF_Dictionary::GetUnicodeTextBy( |
+CFX_WideString CPDF_Dictionary::GetUnicodeTextFor( |
const CFX_ByteString& key) const { |
- CPDF_Object* p = GetObjectBy(key); |
+ CPDF_Object* p = GetObjectFor(key); |
if (CPDF_Reference* pRef = ToReference(p)) |
p = pRef->GetDirect(); |
return p ? p->GetUnicodeText() : CFX_WideString(); |
} |
-CFX_ByteString CPDF_Dictionary::GetStringBy(const CFX_ByteString& key, |
- const CFX_ByteString& def) const { |
- CPDF_Object* p = GetObjectBy(key); |
+CFX_ByteString CPDF_Dictionary::GetStringFor(const CFX_ByteString& key, |
+ const CFX_ByteString& def) const { |
+ CPDF_Object* p = GetObjectFor(key); |
return p ? p->GetString() : CFX_ByteString(def); |
} |
-int CPDF_Dictionary::GetIntegerBy(const CFX_ByteString& key) const { |
- CPDF_Object* p = GetObjectBy(key); |
+int CPDF_Dictionary::GetIntegerFor(const CFX_ByteString& key) const { |
+ CPDF_Object* p = GetObjectFor(key); |
return p ? p->GetInteger() : 0; |
} |
-int CPDF_Dictionary::GetIntegerBy(const CFX_ByteString& key, int def) const { |
- CPDF_Object* p = GetObjectBy(key); |
+int CPDF_Dictionary::GetIntegerFor(const CFX_ByteString& key, int def) const { |
+ CPDF_Object* p = GetObjectFor(key); |
return p ? p->GetInteger() : def; |
} |
-FX_FLOAT CPDF_Dictionary::GetNumberBy(const CFX_ByteString& key) const { |
- CPDF_Object* p = GetObjectBy(key); |
+FX_FLOAT CPDF_Dictionary::GetNumberFor(const CFX_ByteString& key) const { |
+ CPDF_Object* p = GetObjectFor(key); |
return p ? p->GetNumber() : 0; |
} |
-bool CPDF_Dictionary::GetBooleanBy(const CFX_ByteString& key, |
- bool bDefault) const { |
- CPDF_Object* p = GetObjectBy(key); |
+bool CPDF_Dictionary::GetBooleanFor(const CFX_ByteString& key, |
+ bool bDefault) const { |
+ CPDF_Object* p = GetObjectFor(key); |
return ToBoolean(p) ? p->GetInteger() != 0 : bDefault; |
} |
-CPDF_Dictionary* CPDF_Dictionary::GetDictBy(const CFX_ByteString& key) const { |
- CPDF_Object* p = GetDirectObjectBy(key); |
+CPDF_Dictionary* CPDF_Dictionary::GetDictFor(const CFX_ByteString& key) const { |
+ CPDF_Object* p = GetDirectObjectFor(key); |
if (!p) |
return nullptr; |
if (CPDF_Dictionary* pDict = p->AsDictionary()) |
@@ -133,25 +133,25 @@ CPDF_Dictionary* CPDF_Dictionary::GetDictBy(const CFX_ByteString& key) const { |
return nullptr; |
} |
-CPDF_Array* CPDF_Dictionary::GetArrayBy(const CFX_ByteString& key) const { |
- return ToArray(GetDirectObjectBy(key)); |
+CPDF_Array* CPDF_Dictionary::GetArrayFor(const CFX_ByteString& key) const { |
+ return ToArray(GetDirectObjectFor(key)); |
} |
-CPDF_Stream* CPDF_Dictionary::GetStreamBy(const CFX_ByteString& key) const { |
- return ToStream(GetDirectObjectBy(key)); |
+CPDF_Stream* CPDF_Dictionary::GetStreamFor(const CFX_ByteString& key) const { |
+ return ToStream(GetDirectObjectFor(key)); |
} |
-CFX_FloatRect CPDF_Dictionary::GetRectBy(const CFX_ByteString& key) const { |
+CFX_FloatRect CPDF_Dictionary::GetRectFor(const CFX_ByteString& key) const { |
CFX_FloatRect rect; |
- CPDF_Array* pArray = GetArrayBy(key); |
+ CPDF_Array* pArray = GetArrayFor(key); |
if (pArray) |
rect = pArray->GetRect(); |
return rect; |
} |
-CFX_Matrix CPDF_Dictionary::GetMatrixBy(const CFX_ByteString& key) const { |
+CFX_Matrix CPDF_Dictionary::GetMatrixFor(const CFX_ByteString& key) const { |
CFX_Matrix matrix; |
- CPDF_Array* pArray = GetArrayBy(key); |
+ CPDF_Array* pArray = GetArrayFor(key); |
if (pArray) |
matrix = pArray->GetMatrix(); |
return matrix; |
@@ -162,13 +162,13 @@ FX_BOOL CPDF_Dictionary::KeyExist(const CFX_ByteString& key) const { |
} |
bool CPDF_Dictionary::IsSignatureDict() const { |
- CPDF_Object* pType = GetDirectObjectBy("Type"); |
+ CPDF_Object* pType = GetDirectObjectFor("Type"); |
if (!pType) |
- pType = GetDirectObjectBy("FT"); |
+ pType = GetDirectObjectFor("FT"); |
return pType && pType->GetString() == "Sig"; |
} |
-void CPDF_Dictionary::SetAt(const CFX_ByteString& key, CPDF_Object* pObj) { |
+void CPDF_Dictionary::SetFor(const CFX_ByteString& key, CPDF_Object* pObj) { |
auto it = m_Map.find(key); |
if (it == m_Map.end()) { |
if (pObj) |
@@ -186,7 +186,7 @@ void CPDF_Dictionary::SetAt(const CFX_ByteString& key, CPDF_Object* pObj) { |
m_Map.erase(it); |
} |
-void CPDF_Dictionary::RemoveAt(const CFX_ByteString& key) { |
+void CPDF_Dictionary::RemoveFor(const CFX_ByteString& key) { |
auto it = m_Map.find(key); |
if (it == m_Map.end()) |
return; |
@@ -214,46 +214,46 @@ void CPDF_Dictionary::ReplaceKey(const CFX_ByteString& oldkey, |
m_Map.erase(old_it); |
} |
-void CPDF_Dictionary::SetAtInteger(const CFX_ByteString& key, int i) { |
- SetAt(key, new CPDF_Number(i)); |
+void CPDF_Dictionary::SetIntegerFor(const CFX_ByteString& key, int i) { |
+ SetFor(key, new CPDF_Number(i)); |
} |
-void CPDF_Dictionary::SetAtName(const CFX_ByteString& key, |
- const CFX_ByteString& name) { |
- SetAt(key, new CPDF_Name(name)); |
+void CPDF_Dictionary::SetNameFor(const CFX_ByteString& key, |
+ const CFX_ByteString& name) { |
+ SetFor(key, new CPDF_Name(name)); |
} |
-void CPDF_Dictionary::SetAtString(const CFX_ByteString& key, |
- const CFX_ByteString& str) { |
- SetAt(key, new CPDF_String(str, FALSE)); |
+void CPDF_Dictionary::SetStringFor(const CFX_ByteString& key, |
+ const CFX_ByteString& str) { |
+ SetFor(key, new CPDF_String(str, FALSE)); |
} |
-void CPDF_Dictionary::SetAtReference(const CFX_ByteString& key, |
- CPDF_IndirectObjectHolder* pDoc, |
- uint32_t objnum) { |
- SetAt(key, new CPDF_Reference(pDoc, objnum)); |
+void CPDF_Dictionary::SetReferenceFor(const CFX_ByteString& key, |
+ CPDF_IndirectObjectHolder* pDoc, |
+ uint32_t objnum) { |
+ SetFor(key, new CPDF_Reference(pDoc, objnum)); |
} |
-void CPDF_Dictionary::SetAtNumber(const CFX_ByteString& key, FX_FLOAT f) { |
- SetAt(key, new CPDF_Number(f)); |
+void CPDF_Dictionary::SetNumberFor(const CFX_ByteString& key, FX_FLOAT f) { |
+ SetFor(key, new CPDF_Number(f)); |
} |
-void CPDF_Dictionary::SetAtBoolean(const CFX_ByteString& key, bool bValue) { |
- SetAt(key, new CPDF_Boolean(bValue)); |
+void CPDF_Dictionary::SetBooleanFor(const CFX_ByteString& key, bool bValue) { |
+ SetFor(key, new CPDF_Boolean(bValue)); |
} |
-void CPDF_Dictionary::SetAtRect(const CFX_ByteString& key, |
- const CFX_FloatRect& rect) { |
+void CPDF_Dictionary::SetRectFor(const CFX_ByteString& key, |
+ const CFX_FloatRect& rect) { |
CPDF_Array* pArray = new CPDF_Array; |
pArray->AddNumber(rect.left); |
pArray->AddNumber(rect.bottom); |
pArray->AddNumber(rect.right); |
pArray->AddNumber(rect.top); |
- SetAt(key, pArray); |
+ SetFor(key, pArray); |
} |
-void CPDF_Dictionary::SetAtMatrix(const CFX_ByteString& key, |
- const CFX_Matrix& matrix) { |
+void CPDF_Dictionary::SetMatrixFor(const CFX_ByteString& key, |
+ const CFX_Matrix& matrix) { |
CPDF_Array* pArray = new CPDF_Array; |
pArray->AddNumber(matrix.a); |
pArray->AddNumber(matrix.b); |
@@ -261,5 +261,5 @@ void CPDF_Dictionary::SetAtMatrix(const CFX_ByteString& key, |
pArray->AddNumber(matrix.d); |
pArray->AddNumber(matrix.e); |
pArray->AddNumber(matrix.f); |
- SetAt(key, pArray); |
+ SetFor(key, pArray); |
} |