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

Side by Side Diff: core/fpdfdoc/cpvt_generateap.cpp

Issue 1879683002: Remove CPDF_Object::GetConstString and overrides (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Move bLuminosity down. Created 4 years, 8 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/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/fpdfdoc/doc_annot.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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "core/fpdfdoc/cpvt_generateap.h" 7 #include "core/fpdfdoc/cpvt_generateap.h"
8 8
9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h"
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 pStreamResList = pStreamDict->GetDictBy("Resources"); 444 pStreamResList = pStreamDict->GetDictBy("Resources");
445 } 445 }
446 } 446 }
447 } 447 }
448 return TRUE; 448 return TRUE;
449 } 449 }
450 450
451 } // namespace 451 } // namespace
452 452
453 FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) { 453 FX_BOOL FPDF_GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) {
454 if (!pAnnotDict || pAnnotDict->GetConstStringBy("Subtype") != "Widget") { 454 if (!pAnnotDict || pAnnotDict->GetStringBy("Subtype") != "Widget") {
455 return FALSE; 455 return FALSE;
456 } 456 }
457 CFX_ByteString field_type = FPDF_GetFieldAttr(pAnnotDict, "FT")->GetString(); 457 CFX_ByteString field_type = FPDF_GetFieldAttr(pAnnotDict, "FT")->GetString();
458 uint32_t flags = FPDF_GetFieldAttr(pAnnotDict, "Ff") 458 uint32_t flags = FPDF_GetFieldAttr(pAnnotDict, "Ff")
459 ? FPDF_GetFieldAttr(pAnnotDict, "Ff")->GetInteger() 459 ? FPDF_GetFieldAttr(pAnnotDict, "Ff")->GetInteger()
460 : 0; 460 : 0;
461 if (field_type == "Tx") { 461 if (field_type == "Tx") {
462 return CPVT_GenerateAP::GenerateTextFieldAP(pDoc, pAnnotDict); 462 return CPVT_GenerateAP::GenerateTextFieldAP(pDoc, pAnnotDict);
463 } 463 }
464 if (field_type == "Ch") { 464 if (field_type == "Ch") {
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 int32_t nFontIndex, 762 int32_t nFontIndex,
763 FX_FLOAT fFontSize) { 763 FX_FLOAT fFontSize) {
764 CFX_ByteTextBuf sRet; 764 CFX_ByteTextBuf sRet;
765 if (pFontMap) { 765 if (pFontMap) {
766 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex); 766 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex);
767 if (sFontAlias.GetLength() > 0 && fFontSize > 0) 767 if (sFontAlias.GetLength() > 0 && fFontSize > 0)
768 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n"; 768 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n";
769 } 769 }
770 return sRet.GetByteString(); 770 return sRet.GetByteString();
771 } 771 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_render/fpdf_render_image.cpp ('k') | core/fpdfdoc/doc_annot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698