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

Side by Side Diff: core/src/fpdfdoc/doc_ap.cpp

Issue 404653005: Remove a few unused variables, functions, and tables. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 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 | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | core/src/fpdftext/fpdf_text.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 "../../include/fpdfdoc/fpdf_doc.h" 7 #include "../../include/fpdfdoc/fpdf_doc.h"
8 #include "../../include/fpdfdoc/fpdf_vt.h" 8 #include "../../include/fpdfdoc/fpdf_vt.h"
9 #include "pdf_vt.h" 9 #include "pdf_vt.h"
10 #include "../../include/fpdfdoc/fpdf_ap.h" 10 #include "../../include/fpdfdoc/fpdf_ap.h"
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 pFontDict->SetAtName(FX_BSTRC("Subtype"), "Type1"); 299 pFontDict->SetAtName(FX_BSTRC("Subtype"), "Type1");
300 pFontDict->SetAtName(FX_BSTRC("BaseFont"), "Helvetica"); 300 pFontDict->SetAtName(FX_BSTRC("BaseFont"), "Helvetica");
301 pFontDict->SetAtName(FX_BSTRC("Encoding"), "WinAnsiEncoding"); 301 pFontDict->SetAtName(FX_BSTRC("Encoding"), "WinAnsiEncoding");
302 pDoc->AddIndirectObject(pFontDict); 302 pDoc->AddIndirectObject(pFontDict);
303 pDRFontDict->SetAtReference(sFontName.Mid(1), pDoc, pFontDict); 303 pDRFontDict->SetAtReference(sFontName.Mid(1), pDoc, pFontDict);
304 } 304 }
305 CPDF_Font* pDefFont = pDoc->LoadFont(pFontDict); 305 CPDF_Font* pDefFont = pDoc->LoadFont(pFontDict);
306 if (!pDefFont) { 306 if (!pDefFont) {
307 return FALSE; 307 return FALSE;
308 } 308 }
309 CFX_CharMap* pCharMap = pDefFont->GetCharMap();
310 CPDF_Rect rcAnnot = pAnnotDict->GetRect("Rect"); 309 CPDF_Rect rcAnnot = pAnnotDict->GetRect("Rect");
311 FX_INT32 nRotate = 0; 310 FX_INT32 nRotate = 0;
312 if (CPDF_Dictionary * pMKDict = pAnnotDict->GetDict("MK")) { 311 if (CPDF_Dictionary * pMKDict = pAnnotDict->GetDict("MK")) {
313 nRotate = pMKDict->GetInteger("R"); 312 nRotate = pMKDict->GetInteger("R");
314 } 313 }
315 CPDF_Rect rcBBox; 314 CPDF_Rect rcBBox;
316 CPDF_Matrix matrix; 315 CPDF_Matrix matrix;
317 switch (nRotate % 360) { 316 switch (nRotate % 360) {
318 case 0: 317 case 0:
319 rcBBox = CPDF_Rect(0, 0, rcAnnot.right - rcAnnot.left, rcAnnot.top - rcAnnot.bottom); 318 rcBBox = CPDF_Rect(0, 0, rcAnnot.right - rcAnnot.left, rcAnnot.top - rcAnnot.bottom);
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 case CT_GRAY: 798 case CT_GRAY:
800 sColorStream << color.fColor1 << " " << (bFillOrStroke ? "g" : "G") << "\n"; 799 sColorStream << color.fColor1 << " " << (bFillOrStroke ? "g" : "G") << "\n";
801 break; 800 break;
802 case CT_CMYK: 801 case CT_CMYK:
803 sColorStream << color.fColor1 << " " << color.fColor2 << " " << colo r.fColor3 << " " << color.fColor4 << " " 802 sColorStream << color.fColor1 << " " << color.fColor2 << " " << colo r.fColor3 << " " << color.fColor4 << " "
804 << (bFillOrStroke ? "k" : "K") << "\n"; 803 << (bFillOrStroke ? "k" : "K") << "\n";
805 break; 804 break;
806 } 805 }
807 return sColorStream.GetByteString(); 806 return sColorStream.GetByteString();
808 } 807 }
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | core/src/fpdftext/fpdf_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698