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

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

Issue 1947093002: Revert of Remove unneeded CPVT classes. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 7 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/fpdfdoc/cpdf_variabletext.cpp ('k') | core/fpdfdoc/csection.h » ('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"
11 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" 11 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
12 #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h" 12 #include "core/fpdfapi/fpdf_parser/include/cpdf_simple_parser.h"
13 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" 13 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h"
14 #include "core/fpdfdoc/cpvt_color.h" 14 #include "core/fpdfdoc/cpvt_color.h"
15 #include "core/fpdfdoc/cpvt_fontmap.h" 15 #include "core/fpdfdoc/cpvt_fontmap.h"
16 #include "core/fpdfdoc/doc_vt.h"
17 #include "core/fpdfdoc/include/cpvt_word.h" 16 #include "core/fpdfdoc/include/cpvt_word.h"
18 #include "core/fpdfdoc/include/fpdf_doc.h" 17 #include "core/fpdfdoc/include/fpdf_doc.h"
18 #include "core/fpdfdoc/pdf_vt.h"
19 19
20 namespace { 20 namespace {
21 21
22 FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, 22 FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
23 CPDF_Dictionary* pAnnotDict, 23 CPDF_Dictionary* pAnnotDict,
24 const int32_t& nWidgetType) { 24 const int32_t& nWidgetType) {
25 CPDF_Dictionary* pFormDict = nullptr; 25 CPDF_Dictionary* pFormDict = nullptr;
26 if (CPDF_Dictionary* pRootDict = pDoc->GetRoot()) 26 if (CPDF_Dictionary* pRootDict = pDoc->GetRoot())
27 pFormDict = pRootDict->GetDictBy("AcroForm"); 27 pFormDict = pRootDict->GetDictBy("AcroForm");
28 if (!pFormDict) 28 if (!pFormDict)
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 int32_t nFontIndex, 761 int32_t nFontIndex,
762 FX_FLOAT fFontSize) { 762 FX_FLOAT fFontSize) {
763 CFX_ByteTextBuf sRet; 763 CFX_ByteTextBuf sRet;
764 if (pFontMap) { 764 if (pFontMap) {
765 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex); 765 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex);
766 if (sFontAlias.GetLength() > 0 && fFontSize > 0) 766 if (sFontAlias.GetLength() > 0 && fFontSize > 0)
767 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n"; 767 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n";
768 } 768 }
769 return sRet.AsStringC(); 769 return sRet.AsStringC();
770 } 770 }
OLDNEW
« no previous file with comments | « core/fpdfdoc/cpdf_variabletext.cpp ('k') | core/fpdfdoc/csection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698