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

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

Issue 1420583003: Revert "Revert "Add type cast definitions for CPDF_Dictionary."" (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 e9f70c14db522728b7b5a7404e05be42d21beb99..9cdf00e717d2d2bb5c7ba62090867a3170dce1ec 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
@@ -52,8 +52,7 @@ CPDF_Image* CPDF_Image::Clone() {
pImage->LoadImageF((CPDF_Stream*)((CPDF_Object*)m_pStream)->Clone(),
m_bInline);
if (m_bInline) {
- CPDF_Dictionary* pInlineDict = (CPDF_Dictionary*)m_pInlineDict->Clone(TRUE);
- pImage->SetInlineDict(pInlineDict);
+ pImage->SetInlineDict(ToDictionary(m_pInlineDict->Clone(TRUE)));
}
return pImage;
}
@@ -86,7 +85,7 @@ FX_BOOL CPDF_Image::LoadImageF(CPDF_Stream* pStream, FX_BOOL bInline) {
m_bInline = bInline;
CPDF_Dictionary* pDict = pStream->GetDict();
if (m_bInline) {
- m_pInlineDict = (CPDF_Dictionary*)pDict->Clone();
+ m_pInlineDict = ToDictionary(pDict->Clone());
}
m_pOC = pDict->GetDict(FX_BSTRC("OC"));
m_bIsMask = !pDict->KeyExist(FX_BSTRC("ColorSpace")) ||
« no previous file with comments | « core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698