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

Side by Side Diff: fpdfsdk/src/fpdf_transformpage.cpp

Issue 1398703009: Next round of XFA changes to match master (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: remove arg 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 "../../public/fpdf_transformpage.h" 7 #include "../../public/fpdf_transformpage.h"
8 #include "../include/fsdk_define.h" 8 #include "../include/fsdk_define.h"
9 #include "../include/fpdfxfa/fpdfxfa_doc.h" 9 #include "../include/fpdfxfa/fpdfxfa_doc.h"
10 #include "../include/fpdfxfa/fpdfxfa_page.h" 10 #include "../include/fpdfxfa/fpdfxfa_page.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 pContentArray->AddReference(pDoc, pEndStream); 142 pContentArray->AddReference(pDoc, pEndStream);
143 } else if (pContentObj && pContentObj->GetType() == PDFOBJ_REFERENCE) { 143 } else if (pContentObj && pContentObj->GetType() == PDFOBJ_REFERENCE) {
144 CPDF_Reference* pReference = (CPDF_Reference*)pContentObj; 144 CPDF_Reference* pReference = (CPDF_Reference*)pContentObj;
145 CPDF_Object* pDirectObj = pReference->GetDirect(); 145 CPDF_Object* pDirectObj = pReference->GetDirect();
146 if (pDirectObj != NULL) { 146 if (pDirectObj != NULL) {
147 if (pDirectObj->GetType() == PDFOBJ_ARRAY) { 147 if (pDirectObj->GetType() == PDFOBJ_ARRAY) {
148 pContentArray = (CPDF_Array*)pDirectObj; 148 pContentArray = (CPDF_Array*)pDirectObj;
149 CPDF_Reference* pRef = new CPDF_Reference(pDoc, pStream->GetObjNum()); 149 CPDF_Reference* pRef = new CPDF_Reference(pDoc, pStream->GetObjNum());
150 pContentArray->InsertAt(0, pRef); 150 pContentArray->InsertAt(0, pRef);
151 pContentArray->AddReference(pDoc, pEndStream); 151 pContentArray->AddReference(pDoc, pEndStream);
152
153 } else if (pDirectObj->GetType() == PDFOBJ_STREAM) { 152 } else if (pDirectObj->GetType() == PDFOBJ_STREAM) {
154 pContentArray = new CPDF_Array(); 153 pContentArray = new CPDF_Array();
155 pContentArray->AddReference(pDoc, pStream->GetObjNum()); 154 pContentArray->AddReference(pDoc, pStream->GetObjNum());
156 pContentArray->AddReference(pDoc, pDirectObj->GetObjNum()); 155 pContentArray->AddReference(pDoc, pDirectObj->GetObjNum());
157 pContentArray->AddReference(pDoc, pEndStream); 156 pContentArray->AddReference(pDoc, pEndStream);
158 pPageDic->SetAtReference("Contents", pDoc, 157 pPageDic->SetAtReference("Contents", pDoc,
159 pDoc->AddIndirectObject(pContentArray)); 158 pDoc->AddIndirectObject(pContentArray));
160 } 159 }
161 } 160 }
162 } 161 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 } else if (pDirectObj->GetType() == PDFOBJ_STREAM) { 320 } else if (pDirectObj->GetType() == PDFOBJ_STREAM) {
322 pContentArray = new CPDF_Array(); 321 pContentArray = new CPDF_Array();
323 pContentArray->AddReference(pDoc, pStream->GetObjNum()); 322 pContentArray->AddReference(pDoc, pStream->GetObjNum());
324 pContentArray->AddReference(pDoc, pDirectObj->GetObjNum()); 323 pContentArray->AddReference(pDoc, pDirectObj->GetObjNum());
325 pPageDic->SetAtReference("Contents", pDoc, 324 pPageDic->SetAtReference("Contents", pDoc,
326 pDoc->AddIndirectObject(pContentArray)); 325 pDoc->AddIndirectObject(pContentArray));
327 } 326 }
328 } 327 }
329 } 328 }
330 } 329 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698