summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_editpage.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-05-08 00:00:16 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-08 00:00:16 +0000
commite5c0fa97c2da104426dbc1cecfc0ed488a22efe5 (patch)
treef98799cbca4694a7f20fbc0816d422a1147368b8 /fpdfsdk/fpdf_editpage.cpp
parent8f63763317ae1ef65d1ac2719624adeb728f2207 (diff)
downloadpdfium-e5c0fa97c2da104426dbc1cecfc0ed488a22efe5.tar.xz
Make one more CPDF_PageObjectHolder member protected.
Change-Id: Id9288d504f063759f69632ab59b0a21569ff76d8 Reviewed-on: https://pdfium-review.googlesource.com/32113 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_editpage.cpp')
-rw-r--r--fpdfsdk/fpdf_editpage.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 3f1098c371..19c301bf12 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -55,10 +55,14 @@ static_assert(FPDF_PAGEOBJ_FORM == CPDF_PageObject::FORM,
"FPDF_PAGEOBJ_FORM/CPDF_PageObject::FORM mismatch");
bool IsPageObject(CPDF_Page* pPage) {
- if (!pPage || !pPage->m_pFormDict || !pPage->m_pFormDict->KeyExist("Type"))
+ if (!pPage)
+ return false;
+
+ const CPDF_Dictionary* pFormDict = pPage->GetFormDict();
+ if (!pFormDict || !pFormDict->KeyExist("Type"))
return false;
- CPDF_Object* pObject = pPage->m_pFormDict->GetObjectFor("Type")->GetDirect();
+ const CPDF_Object* pObject = pFormDict->GetObjectFor("Type")->GetDirect();
return pObject && !pObject->GetString().Compare("Page");
}
@@ -479,7 +483,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetRotation(FPDF_PAGE page,
return;
rotate %= 4;
- pPage->m_pFormDict->SetNewFor<CPDF_Number>("Rotate", rotate * 90);
+ pPage->GetFormDict()->SetNewFor<CPDF_Number>("Rotate", rotate * 90);
}
FPDF_BOOL FPDFPageObj_SetFillColor(FPDF_PAGEOBJECT page_object,