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

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

Issue 2187073005: Splitting fpdfdoc/doc_* part II. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@fpdf_doc_III
Patch Set: Rebase to master Created 4 years, 4 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 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/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h" 14 #include "core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h"
15 #include "core/fpdfdoc/cpvt_color.h" 15 #include "core/fpdfdoc/cpvt_color.h"
16 #include "core/fpdfdoc/cpvt_fontmap.h" 16 #include "core/fpdfdoc/cpvt_fontmap.h"
17 #include "core/fpdfdoc/include/cpdf_formfield.h" 17 #include "core/fpdfdoc/include/cpdf_formfield.h"
18 #include "core/fpdfdoc/include/cpvt_word.h" 18 #include "core/fpdfdoc/include/cpvt_word.h"
19 #include "core/fpdfdoc/pdf_vt.h"
20 19
21 namespace { 20 namespace {
22 21
23 FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, 22 FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc,
24 CPDF_Dictionary* pAnnotDict, 23 CPDF_Dictionary* pAnnotDict,
25 const int32_t& nWidgetType) { 24 const int32_t& nWidgetType) {
26 CPDF_Dictionary* pFormDict = nullptr; 25 CPDF_Dictionary* pFormDict = nullptr;
27 if (CPDF_Dictionary* pRootDict = pDoc->GetRoot()) 26 if (CPDF_Dictionary* pRootDict = pDoc->GetRoot())
28 pFormDict = pRootDict->GetDictBy("AcroForm"); 27 pFormDict = pRootDict->GetDictBy("AcroForm");
29 if (!pFormDict) 28 if (!pFormDict)
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 int32_t nFontIndex, 750 int32_t nFontIndex,
752 FX_FLOAT fFontSize) { 751 FX_FLOAT fFontSize) {
753 CFX_ByteTextBuf sRet; 752 CFX_ByteTextBuf sRet;
754 if (pFontMap) { 753 if (pFontMap) {
755 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex); 754 CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex);
756 if (sFontAlias.GetLength() > 0 && fFontSize > 0) 755 if (sFontAlias.GetLength() > 0 && fFontSize > 0)
757 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n"; 756 sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n";
758 } 757 }
759 return sRet.MakeString(); 758 return sRet.MakeString();
760 } 759 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698