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

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

Issue 1422513004: Merge to XFA: Add type cast definitions for CPDF_Stream. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
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..06e2d2c18747fcb5e222ef64ec5334f3a08bb312 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->CPDF_Object::Clone()), m_bInline);
dsinclair 2015/10/22 19:54:50 There is a Clone() override in CPDF_Stream which c
Tom Sepez 2015/10/22 20:44:44 On 2015/10/22 19:54:50, dsinclair wrote: > There i
+ 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