Remove GetPageOrganizerPageContent().
Inline it into its only caller, which asserts the conditional check
inside GetPageOrganizerPageContent() always evaluates to true.
Change-Id: I5851359544f842770d773449e3a277a7215dec3a
Reviewed-on: https://pdfium-review.googlesource.com/c/49230
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_ppo.cpp b/fpdfsdk/fpdf_ppo.cpp
index d8c7747..cbbd021 100644
--- a/fpdfsdk/fpdf_ppo.cpp
+++ b/fpdfsdk/fpdf_ppo.cpp
@@ -185,13 +185,6 @@
return GetMediaBox(pPageDict);
}
-const CPDF_Object* GetPageOrganizerPageContent(
- const CPDF_Dictionary* pPageDict) {
- return pPageDict
- ? pPageDict->GetDirectObjectFor(pdfium::page_object::kContents)
- : nullptr;
-}
-
bool CopyInheritable(CPDF_Dictionary* pDestPageDict,
const CPDF_Dictionary* pSrcPageDict,
const ByteString& key) {
@@ -683,7 +676,9 @@
ObjectNumberMap* pObjNumberMap) {
ASSERT(pSrcPageDict);
- const CPDF_Object* pSrcContentObj = GetPageOrganizerPageContent(pSrcPageDict);
+ const CPDF_Object* pSrcContentObj =
+ pSrcPageDict->GetDirectObjectFor(pdfium::page_object::kContents);
+
CPDF_Stream* pNewXObject = dest()->NewIndirect<CPDF_Stream>(
nullptr, 0, dest()->New<CPDF_Dictionary>());
CPDF_Dictionary* pNewXObjectDict = pNewXObject->GetDict();