summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_edit
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-02-19 11:53:03 -0800
committerWei Li <weili@chromium.org>2016-02-19 11:53:03 -0800
commit7cf13c9c8b9b69b01e5debb5e8dc8b265983dfa8 (patch)
tree3a5b016ba365f11d775df0009c51b5a554ec302e /core/src/fpdfapi/fpdf_edit
parent31c7b73b71bd7352f96a82716b5e81d7fa24f37f (diff)
downloadpdfium-7cf13c9c8b9b69b01e5debb5e8dc8b265983dfa8.tar.xz
Remove PageObject's m_Type and add As<Type> functions
For CPDF_PageObject and its subclasses, remove m_Type and use GetType() instead. Also, add As<Type> functions to avoid casting all over the places. BUG=pdfium:397 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1709393002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit')
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index ef0344cda0..77c58f0925 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;