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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_form.cpp

Issue 1918113002: Clean up CPDF_Page. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: more 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/fpdfapi/fpdf_page/cpdf_colorstate.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_page.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/fpdfapi/fpdf_page/include/cpdf_form.h" 7 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h"
8 8
9 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" 9 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h"
10 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h" 10 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobjectholder.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 m_Transparency = 0; 30 m_Transparency = 0;
31 LoadTransInfo(); 31 LoadTransInfo();
32 } 32 }
33 33
34 CPDF_Form::~CPDF_Form() {} 34 CPDF_Form::~CPDF_Form() {}
35 35
36 void CPDF_Form::StartParse(CPDF_AllStates* pGraphicStates, 36 void CPDF_Form::StartParse(CPDF_AllStates* pGraphicStates,
37 CFX_Matrix* pParentMatrix, 37 CFX_Matrix* pParentMatrix,
38 CPDF_Type3Char* pType3Char, 38 CPDF_Type3Char* pType3Char,
39 CPDF_ParseOptions* pOptions,
40 int level) { 39 int level) {
41 if (m_ParseState == CONTENT_PARSED || m_ParseState == CONTENT_PARSING) { 40 if (m_ParseState == CONTENT_PARSED || m_ParseState == CONTENT_PARSING) {
42 return; 41 return;
43 } 42 }
44 m_pParser.reset(new CPDF_ContentParser); 43 m_pParser.reset(new CPDF_ContentParser);
45 m_pParser->Start(this, pGraphicStates, pParentMatrix, pType3Char, pOptions, 44 m_pParser->Start(this, pGraphicStates, pParentMatrix, pType3Char, level);
46 level);
47 m_ParseState = CONTENT_PARSING; 45 m_ParseState = CONTENT_PARSING;
48 } 46 }
49 47
50 void CPDF_Form::ParseContent(CPDF_AllStates* pGraphicStates, 48 void CPDF_Form::ParseContent(CPDF_AllStates* pGraphicStates,
51 CFX_Matrix* pParentMatrix, 49 CFX_Matrix* pParentMatrix,
52 CPDF_Type3Char* pType3Char, 50 CPDF_Type3Char* pType3Char,
53 CPDF_ParseOptions* pOptions,
54 int level) { 51 int level) {
55 StartParse(pGraphicStates, pParentMatrix, pType3Char, pOptions, level); 52 StartParse(pGraphicStates, pParentMatrix, pType3Char, level);
56 ContinueParse(NULL); 53 ContinueParse(NULL);
57 } 54 }
58 55
59 CPDF_Form* CPDF_Form::Clone() const { 56 CPDF_Form* CPDF_Form::Clone() const {
60 CPDF_Form* pCloneForm = 57 CPDF_Form* pCloneForm =
61 new CPDF_Form(m_pDocument, m_pPageResources, m_pFormStream, m_pResources); 58 new CPDF_Form(m_pDocument, m_pPageResources, m_pFormStream, m_pResources);
62 for (const auto& pObj : m_PageObjectList) 59 for (const auto& pObj : m_PageObjectList)
63 pCloneForm->m_PageObjectList.emplace_back(pObj->Clone()); 60 pCloneForm->m_PageObjectList.emplace_back(pObj->Clone());
64 61
65 return pCloneForm; 62 return pCloneForm;
66 } 63 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_colorstate.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_page.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698