OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |