diff options
author | tsepez <tsepez@chromium.org> | 2016-03-29 14:51:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-29 14:51:50 -0700 |
commit | bd56755ba86f2d87e24a3cee5cb92aa14a81bb27 (patch) | |
tree | fb4692dc44cb549b7149be080ec26f4b7cd7b086 /fpdfsdk/fpdfeditpage.cpp | |
parent | 7f432a1c87014d6673ee69ff0ffa3724f237acf4 (diff) | |
download | pdfium-bd56755ba86f2d87e24a3cee5cb92aa14a81bb27.tar.xz |
Rename GetElementValue() to GetDirectObject{By,At}().
Every time I read this code, I have to make the mental substituion
that "Element value" means "de-ref indirect object", so it might
as well just say so.
BUG=
Review URL: https://codereview.chromium.org/1841173002
Diffstat (limited to 'fpdfsdk/fpdfeditpage.cpp')
-rw-r--r-- | fpdfsdk/fpdfeditpage.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp index 72148b8e6d..25ace0e039 100644 --- a/fpdfsdk/fpdfeditpage.cpp +++ b/fpdfsdk/fpdfeditpage.cpp @@ -111,8 +111,8 @@ DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document, DLLEXPORT int STDCALL FPDFPage_GetRotation(FPDF_PAGE page) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || - !pPage->m_pFormDict->GetElement("Type")->GetDirect() || - pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( + !pPage->m_pFormDict->GetObjectBy("Type")->GetDirect() || + pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare( "Page")) { return -1; } @@ -122,13 +122,13 @@ DLLEXPORT int STDCALL FPDFPage_GetRotation(FPDF_PAGE page) { while (pDict) { if (pDict->KeyExist("Rotate")) { - CPDF_Object* pRotateObj = pDict->GetElement("Rotate")->GetDirect(); + CPDF_Object* pRotateObj = pDict->GetObjectBy("Rotate")->GetDirect(); return pRotateObj ? pRotateObj->GetInteger() / 90 : 0; } if (!pDict->KeyExist("Parent")) break; - pDict = ToDictionary(pDict->GetElement("Parent")->GetDirect()); + pDict = ToDictionary(pDict->GetObjectBy("Parent")->GetDirect()); } return 0; @@ -138,8 +138,8 @@ DLLEXPORT void STDCALL FPDFPage_InsertObject(FPDF_PAGE page, FPDF_PAGEOBJECT page_obj) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || - !pPage->m_pFormDict->GetElement("Type")->GetDirect() || - pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( + !pPage->m_pFormDict->GetObjectBy("Type")->GetDirect() || + pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare( "Page")) { return; } @@ -182,8 +182,8 @@ DLLEXPORT void STDCALL FPDFPage_InsertObject(FPDF_PAGE page, DLLEXPORT int STDCALL FPDFPage_CountObject(FPDF_PAGE page) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || - !pPage->m_pFormDict->GetElement("Type")->GetDirect() || - pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( + !pPage->m_pFormDict->GetObjectBy("Type")->GetDirect() || + pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare( "Page")) { return -1; } @@ -194,7 +194,7 @@ DLLEXPORT FPDF_PAGEOBJECT STDCALL FPDFPage_GetObject(FPDF_PAGE page, int index) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || - pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( + pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare( "Page")) { return nullptr; } @@ -247,8 +247,8 @@ FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) { DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GenerateContent(FPDF_PAGE page) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || - !pPage->m_pFormDict->GetElement("Type")->GetDirect() || - pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( + !pPage->m_pFormDict->GetObjectBy("Type")->GetDirect() || + pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare( "Page")) { return FALSE; } @@ -310,8 +310,8 @@ DLLEXPORT void STDCALL FPDFPage_TransformAnnots(FPDF_PAGE page, DLLEXPORT void STDCALL FPDFPage_SetRotation(FPDF_PAGE page, int rotate) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type") || - !pPage->m_pFormDict->GetElement("Type")->GetDirect() || - pPage->m_pFormDict->GetElement("Type")->GetDirect()->GetString().Compare( + !pPage->m_pFormDict->GetObjectBy("Type")->GetDirect() || + pPage->m_pFormDict->GetObjectBy("Type")->GetDirect()->GetString().Compare( "Page")) { return; } |