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

Unified Diff: core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp

Issue 1402413004: Add type cast definitions for CPDF_Stream. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 2 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
Index: core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
index 9cdf00e717d2d2bb5c7ba62090867a3170dce1ec..a24da0adc1445f73e44b97c831959b5353797acf 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
@@ -45,15 +45,14 @@ void CPDF_Image::Release() {
}
}
CPDF_Image* CPDF_Image::Clone() {
- if (m_pStream->GetObjNum()) {
+ if (m_pStream->GetObjNum())
return m_pDocument->GetPageData()->GetImage(m_pStream);
- }
+
CPDF_Image* pImage = new CPDF_Image(m_pDocument);
- pImage->LoadImageF((CPDF_Stream*)((CPDF_Object*)m_pStream)->Clone(),
- m_bInline);
- if (m_bInline) {
+ pImage->LoadImageF(ToStream(m_pStream->Clone()), m_bInline);
+ if (m_bInline)
pImage->SetInlineDict(ToDictionary(m_pInlineDict->Clone(TRUE)));
- }
+
return pImage;
}
CPDF_Image::CPDF_Image(CPDF_Document* pDoc) {

Powered by Google App Engine
This is Rietveld 408576698