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

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

Issue 1248153004: Merge to XFA: FX_BOOL combo patch. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: CTTFontDesc::ReleaseFace() mismatch Created 5 years, 5 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
« no previous file with comments | « fpdfsdk/src/fpdf_sysfontinfo.cpp ('k') | fpdfsdk/src/javascript/PublicMethods.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 26 matching lines...) Expand all
37 pCropBoxArray->Add(FX_NEW CPDF_Number(left)); 37 pCropBoxArray->Add(FX_NEW CPDF_Number(left));
38 pCropBoxArray->Add(FX_NEW CPDF_Number(bottom)); 38 pCropBoxArray->Add(FX_NEW CPDF_Number(bottom));
39 pCropBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(right))); 39 pCropBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(right)));
40 pCropBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(top))); 40 pCropBoxArray->Add(FX_NEW CPDF_Number(FX_FLOAT(top)));
41 41
42 42
43 pPageDict->SetAt("CropBox", pCropBoxArray); 43 pPageDict->SetAt("CropBox", pCropBoxArray);
44 } 44 }
45 45
46 46
47 DLLEXPORT FX_BOOL STDCALL FPDFPage_GetMediaBox(FPDF_PAGE page, float* left, floa t* bottom, float* right, float* top) 47 DLLEXPORT FPDF_BOOL STDCALL FPDFPage_GetMediaBox(FPDF_PAGE page, float* left, fl oat* bottom, float* right, float* top)
48 { 48 {
49 if(!page) 49 if(!page)
50 return FALSE; 50 return FALSE;
51 CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage(); 51 CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage();
52 if (!pPage) return FALSE; 52 if (!pPage) return FALSE;
53 CPDF_Dictionary* pPageDict = pPage->m_pFormDict; 53 CPDF_Dictionary* pPageDict = pPage->m_pFormDict;
54 CPDF_Array* pArray = pPageDict->GetArray("MediaBox"); 54 CPDF_Array* pArray = pPageDict->GetArray("MediaBox");
55 if(pArray) 55 if(pArray)
56 { 56 {
57 *left = pArray->GetFloat(0); 57 *left = pArray->GetFloat(0);
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 { 325 {
326 pContentArray = FX_NEW CPDF_Array(); 326 pContentArray = FX_NEW CPDF_Array();
327 pContentArray->AddReference(pDoc,pStream->GetObj Num()); 327 pContentArray->AddReference(pDoc,pStream->GetObj Num());
328 pContentArray->AddReference(pDoc,pDirectObj->Get ObjNum()); 328 pContentArray->AddReference(pDoc,pDirectObj->Get ObjNum());
329 pPageDic->SetAtReference("Contents", pDoc, pDoc- >AddIndirectObject(pContentArray)); 329 pPageDic->SetAtReference("Contents", pDoc, pDoc- >AddIndirectObject(pContentArray));
330 } 330 }
331 } 331 }
332 } 332 }
333 } 333 }
334 334
OLDNEW
« no previous file with comments | « fpdfsdk/src/fpdf_sysfontinfo.cpp ('k') | fpdfsdk/src/javascript/PublicMethods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698