Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2055)

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp

Issue 1709393002: Remove PageObject's m_Type and add As<Type> functions (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_pageobj.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index ef0344cda0352fb2f23a4c49e7645311724df3d7..77c58f09255da975079c27f342564dc365cb2cac 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -31,10 +31,10 @@ void CPDF_PageContentGenerator::GenerateContent() {
CPDF_Dictionary* pPageDict = m_pPage->m_pFormDict;
for (int i = 0; i < m_pageObjects.GetSize(); ++i) {
CPDF_PageObject* pPageObj = m_pageObjects[i];
- if (!pPageObj || pPageObj->m_Type != CPDF_PageObject::IMAGE) {
+ if (!pPageObj || !pPageObj->IsImage()) {
continue;
}
- ProcessImage(buf, (CPDF_ImageObject*)pPageObj);
+ ProcessImage(buf, pPageObj->AsImage());
}
CPDF_Object* pContent =
pPageDict ? pPageDict->GetElementValue("Contents") : NULL;
« no previous file with comments | « core/include/fpdfapi/fpdf_pageobj.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698