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

Side by Side Diff: core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp

Issue 1417033004: Merge to XFA: Add type cast definitions for CPDF_Name. (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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../../include/fpdfapi/fpdf_page.h" 7 #include "../../../include/fpdfapi/fpdf_page.h"
8 #include "../../../include/fpdfapi/fpdf_module.h" 8 #include "../../../include/fpdfapi/fpdf_module.h"
9 #include "../../../include/fxcodec/fx_codec.h" 9 #include "../../../include/fxcodec/fx_codec.h"
10 #include "pageint.h" 10 #include "pageint.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (!key.IsEmpty()) { 81 if (!key.IsEmpty()) {
82 pDict->SetAt(key, pObj, m_pDocument); 82 pDict->SetAt(key, pObj, m_pDocument);
83 } else if (pObj) { 83 } else if (pObj) {
84 pObj->Release(); 84 pObj->Release();
85 } 85 }
86 } 86 }
87 _PDF_ReplaceAbbr(pDict); 87 _PDF_ReplaceAbbr(pDict);
88 CPDF_Object* pCSObj = NULL; 88 CPDF_Object* pCSObj = NULL;
89 if (pDict->KeyExist(FX_BSTRC("ColorSpace"))) { 89 if (pDict->KeyExist(FX_BSTRC("ColorSpace"))) {
90 pCSObj = pDict->GetElementValue(FX_BSTRC("ColorSpace")); 90 pCSObj = pDict->GetElementValue(FX_BSTRC("ColorSpace"));
91 if (pCSObj->GetType() == PDFOBJ_NAME) { 91 if (pCSObj->IsName()) {
92 CFX_ByteString name = pCSObj->GetString(); 92 CFX_ByteString name = pCSObj->GetString();
93 if (name != FX_BSTRC("DeviceRGB") && name != FX_BSTRC("DeviceGray") && 93 if (name != FX_BSTRC("DeviceRGB") && name != FX_BSTRC("DeviceGray") &&
94 name != FX_BSTRC("DeviceCMYK")) { 94 name != FX_BSTRC("DeviceCMYK")) {
95 pCSObj = FindResourceObj(FX_BSTRC("ColorSpace"), name); 95 pCSObj = FindResourceObj(FX_BSTRC("ColorSpace"), name);
96 if (pCSObj && !pCSObj->GetObjNum()) { 96 if (pCSObj && !pCSObj->GetObjNum()) {
97 pCSObj = pCSObj->Clone(); 97 pCSObj = pCSObj->Clone();
98 pDict->SetAt(FX_BSTRC("ColorSpace"), pCSObj, m_pDocument); 98 pDict->SetAt(FX_BSTRC("ColorSpace"), pCSObj, m_pDocument);
99 } 99 }
100 } 100 }
101 } 101 }
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 } 1144 }
1145 m_Status = Done; 1145 m_Status = Done;
1146 return; 1146 return;
1147 } 1147 }
1148 steps++; 1148 steps++;
1149 if (pPause && pPause->NeedToPauseNow()) { 1149 if (pPause && pPause->NeedToPauseNow()) {
1150 break; 1150 break;
1151 } 1151 }
1152 } 1152 }
1153 } 1153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698