Index: fpdfsdk/fpdfdoc_unittest.cpp |
diff --git a/fpdfsdk/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp |
index a555e961f3889f9378644cbf43b1b8fb5d3dfa2e..5bda8da9282af3dae5f72589ee06b7784a2429d5 100644 |
--- a/fpdfsdk/fpdfdoc_unittest.cpp |
+++ b/fpdfsdk/fpdfdoc_unittest.cpp |
@@ -104,7 +104,7 @@ TEST_F(PDFDocTest, FindBookmark) { |
} |
{ |
// Empty bookmark tree. |
- m_pRootObj->SetAt("Outlines", new CPDF_Dictionary()); |
+ m_pRootObj->SetFor("Outlines", new CPDF_Dictionary()); |
std::unique_ptr<unsigned short, pdfium::FreeDeleter> title = |
GetFPDFWideString(L""); |
EXPECT_EQ(nullptr, FPDFBookmark_Find(m_pDoc.get(), title.get())); |
@@ -116,27 +116,27 @@ TEST_F(PDFDocTest, FindBookmark) { |
// Check on a regular bookmark tree. |
auto bookmarks = CreateDictObjs(3); |
- bookmarks[1].obj->SetAt("Title", new CPDF_String(L"Chapter 1")); |
- bookmarks[1].obj->SetAt( |
+ bookmarks[1].obj->SetFor("Title", new CPDF_String(L"Chapter 1")); |
+ bookmarks[1].obj->SetFor( |
"Parent", new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
- bookmarks[1].obj->SetAt( |
+ bookmarks[1].obj->SetFor( |
"Next", new CPDF_Reference(m_pIndirectObjs, bookmarks[2].num)); |
- bookmarks[2].obj->SetAt("Title", new CPDF_String(L"Chapter 2")); |
- bookmarks[2].obj->SetAt( |
+ bookmarks[2].obj->SetFor("Title", new CPDF_String(L"Chapter 2")); |
+ bookmarks[2].obj->SetFor( |
"Parent", new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
- bookmarks[2].obj->SetAt( |
+ bookmarks[2].obj->SetFor( |
"Prev", new CPDF_Reference(m_pIndirectObjs, bookmarks[1].num)); |
- bookmarks[0].obj->SetAt("Type", new CPDF_Name("Outlines")); |
- bookmarks[0].obj->SetAt("Count", new CPDF_Number(2)); |
- bookmarks[0].obj->SetAt( |
+ bookmarks[0].obj->SetFor("Type", new CPDF_Name("Outlines")); |
+ bookmarks[0].obj->SetFor("Count", new CPDF_Number(2)); |
+ bookmarks[0].obj->SetFor( |
"First", new CPDF_Reference(m_pIndirectObjs, bookmarks[1].num)); |
- bookmarks[0].obj->SetAt( |
+ bookmarks[0].obj->SetFor( |
"Last", new CPDF_Reference(m_pIndirectObjs, bookmarks[2].num)); |
- m_pRootObj->SetAt("Outlines", |
- new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
+ m_pRootObj->SetFor("Outlines", |
+ new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
// Title with no match. |
std::unique_ptr<unsigned short, pdfium::FreeDeleter> title = |
@@ -159,27 +159,27 @@ TEST_F(PDFDocTest, FindBookmark) { |
// Circular bookmarks in depth. |
auto bookmarks = CreateDictObjs(3); |
- bookmarks[1].obj->SetAt("Title", new CPDF_String(L"Chapter 1")); |
- bookmarks[1].obj->SetAt( |
+ bookmarks[1].obj->SetFor("Title", new CPDF_String(L"Chapter 1")); |
+ bookmarks[1].obj->SetFor( |
"Parent", new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
- bookmarks[1].obj->SetAt( |
+ bookmarks[1].obj->SetFor( |
"First", new CPDF_Reference(m_pIndirectObjs, bookmarks[2].num)); |
- bookmarks[2].obj->SetAt("Title", new CPDF_String(L"Chapter 2")); |
- bookmarks[2].obj->SetAt( |
+ bookmarks[2].obj->SetFor("Title", new CPDF_String(L"Chapter 2")); |
+ bookmarks[2].obj->SetFor( |
"Parent", new CPDF_Reference(m_pIndirectObjs, bookmarks[1].num)); |
- bookmarks[2].obj->SetAt( |
+ bookmarks[2].obj->SetFor( |
"First", new CPDF_Reference(m_pIndirectObjs, bookmarks[1].num)); |
- bookmarks[0].obj->SetAt("Type", new CPDF_Name("Outlines")); |
- bookmarks[0].obj->SetAt("Count", new CPDF_Number(2)); |
- bookmarks[0].obj->SetAt( |
+ bookmarks[0].obj->SetFor("Type", new CPDF_Name("Outlines")); |
+ bookmarks[0].obj->SetFor("Count", new CPDF_Number(2)); |
+ bookmarks[0].obj->SetFor( |
"First", new CPDF_Reference(m_pIndirectObjs, bookmarks[1].num)); |
- bookmarks[0].obj->SetAt( |
+ bookmarks[0].obj->SetFor( |
"Last", new CPDF_Reference(m_pIndirectObjs, bookmarks[2].num)); |
- m_pRootObj->SetAt("Outlines", |
- new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
+ m_pRootObj->SetFor("Outlines", |
+ new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
// Title with no match. |
std::unique_ptr<unsigned short, pdfium::FreeDeleter> title = |
@@ -194,33 +194,33 @@ TEST_F(PDFDocTest, FindBookmark) { |
// Circular bookmarks in breadth. |
auto bookmarks = CreateDictObjs(4); |
- bookmarks[1].obj->SetAt("Title", new CPDF_String(L"Chapter 1")); |
- bookmarks[1].obj->SetAt( |
+ bookmarks[1].obj->SetFor("Title", new CPDF_String(L"Chapter 1")); |
+ bookmarks[1].obj->SetFor( |
"Parent", new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
- bookmarks[1].obj->SetAt( |
+ bookmarks[1].obj->SetFor( |
"Next", new CPDF_Reference(m_pIndirectObjs, bookmarks[2].num)); |
- bookmarks[2].obj->SetAt("Title", new CPDF_String(L"Chapter 2")); |
- bookmarks[2].obj->SetAt( |
+ bookmarks[2].obj->SetFor("Title", new CPDF_String(L"Chapter 2")); |
+ bookmarks[2].obj->SetFor( |
"Parent", new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
- bookmarks[2].obj->SetAt( |
+ bookmarks[2].obj->SetFor( |
"Next", new CPDF_Reference(m_pIndirectObjs, bookmarks[3].num)); |
- bookmarks[3].obj->SetAt("Title", new CPDF_String(L"Chapter 3")); |
- bookmarks[3].obj->SetAt( |
+ bookmarks[3].obj->SetFor("Title", new CPDF_String(L"Chapter 3")); |
+ bookmarks[3].obj->SetFor( |
"Parent", new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
- bookmarks[3].obj->SetAt( |
+ bookmarks[3].obj->SetFor( |
"Next", new CPDF_Reference(m_pIndirectObjs, bookmarks[1].num)); |
- bookmarks[0].obj->SetAt("Type", new CPDF_Name("Outlines")); |
- bookmarks[0].obj->SetAt("Count", new CPDF_Number(2)); |
- bookmarks[0].obj->SetAt( |
+ bookmarks[0].obj->SetFor("Type", new CPDF_Name("Outlines")); |
+ bookmarks[0].obj->SetFor("Count", new CPDF_Number(2)); |
+ bookmarks[0].obj->SetFor( |
"First", new CPDF_Reference(m_pIndirectObjs, bookmarks[1].num)); |
- bookmarks[0].obj->SetAt( |
+ bookmarks[0].obj->SetFor( |
"Last", new CPDF_Reference(m_pIndirectObjs, bookmarks[2].num)); |
- m_pRootObj->SetAt("Outlines", |
- new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
+ m_pRootObj->SetFor("Outlines", |
+ new CPDF_Reference(m_pIndirectObjs, bookmarks[0].num)); |
// Title with no match. |
std::unique_ptr<unsigned short, pdfium::FreeDeleter> title = |